Edit C:\Users\Administrator\AppData\Roaming\GameBox\Application\cef.3.2623.1401.0\cef.pak
? ?9 V^} W^? X^?! Y^? Z^? [^? \^? ]^? ^^g? _^u? `^y? a^? b^? c^ d^B e^?! f^9> g^? h^k? i^? j^? k^5 l^?? m^? n^? t^'W u^? v^? w^t? x^ ? y^? z^? {^? lk? mk~Z nk? ok? pk8n qkwq rk{? sk? ?? ?? ?? ?? ?? ? ?- ? ?? ? ?? ?? ?? ?? ?? ?? ?t ? ??& ?gN ?? ?? ?? ?v? ?? ?? ?F? ?? ?m? ?E? ?? ?u? vw? v? v{? v? v|* v=+ v?2 vx6 vX> v? v? vNT v? v? v? v? v? v? v? v<? v? v? v? v? v! v? vAG v? ?? ?? ?? ?? ?? ?%? ?? ?? ?? ?|0 ?? ?? ?k ?? ??; ?? ?? ??? ?!? ?? ?? ? ??? ?? ?? ??3 ?? ?? ?w ?y ?? ?{? ?? (?# <!DOCTYPE html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <meta name="google" value="notranslate"> <script> function addRow(name, url, isdir, size, date_modified) { if (name == ".") return; var root = document.location.pathname; if (root.substr(-1) !== "/") root += "/"; var table = document.getElementById("table"); var row = document.createElement("tr"); var file_cell = document.createElement("td"); var link = document.createElement("a"); link.className = isdir ? "icon dir" : "icon file"; if (name == "..") { link.href = root + ".."; link.innerText = document.getElementById("parentDirText").innerText; link.className = "icon up"; size = ""; date_modified = ""; } else { if (isdir) { name = name + "/"; url = url + "/"; size = ""; } else { link.draggable = "true"; link.addEventListener("dragstart", onDragStart, false); } link.innerText = name; link.href = root + url; } file_cell.appendChild(link); row.appendChild(file_cell); row.appendChild(createCell(size)); row.appendChild(createCell(date_modified)); table.appendChild(row); } function onDragStart(e) { var el = e.srcElement; var name = el.innerText.replace(":", ""); var download_url_data = "application/octet-stream:" + name + ":" + el.href; e.dataTransfer.setData("DownloadURL", download_url_data); e.dataTransfer.effectAllowed = "copy"; } function createCell(text) { var cell = document.createElement("td"); cell.setAttribute("class", "detailsColumn"); cell.innerText = text; return cell; } function start(location) { var header = document.getElementById("header"); header.innerText = header.innerText.replace("LOCATION", location); document.getElementById("title").innerText = header.innerText; } function onListingParsingError() { var box = document.getElementById("listingParsingErrorBox"); box.innerHTML = box.innerHTML.replace("LOCATION", encodeURI(document.location) + "?raw"); box.style.display = "block"; } </script> <style> h1 { border-bottom: 1px solid #c0c0c0; margin-bottom: 10px; padding-bottom: 10px; white-space: nowrap; } table { border-collapse: collapse; } tr.header { font-weight: bold; } td.detailsColumn { -webkit-padding-start: 2em; text-align: end; white-space: nowrap; } a.icon { -webkit-padding-start: 1.5em; text-decoration: none; } a.icon:hover { text-decoration: underline; } a.file { background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAABHUlEQVR42o2RMW7DIBiF3498iHRJD5JKHurL+CRVBp+i2T16tTynF2gO0KSb5ZrBBl4HHDBuK/WXACH4eO9/CAAAbdvijzLGNE1TVZXfZuHg6XCAQESAZXbOKaXO57eiKG6ft9PrKQIkCQqFoIiQFBGlFIB5nvM8t9aOX2Nd18oDzjnPgCDpn/BH4zh2XZdlWVmWiUK4IgCBoFMUz9eP6zRN75cLgEQhcmTQIbl72O0f9865qLAAsURAAgKBJKEtgLXWvyjLuFsThCSstb8rBCaAQhDYWgIZ7myM+TUBjDHrHlZcbMYYk34cN0YSLcgS+wL0fe9TXDMbY33fR2AYBvyQ8L0Gk8MwREBrTfKe4TpTzwhArXWi8HI84h/1DfwI5mhxJamFAAAAAElFTkSuQmCC ") left top no-repeat; } a.dir { background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAd5JREFUeNqMU79rFUEQ/vbuodFEEkzAImBpkUabFP4ldpaJhZXYm/RiZWsv/hkWFglBUyTIgyAIIfgIRjHv3r39MePM7N3LcbxAFvZ2b2bn22/mm3XMjF+HL3YW7q28YSIw8mBKoBihhhgCsoORot9d3/ywg3YowMXwNde/PzGnk2vn6PitrT+/PGeNaecg4+qNY3D43vy16A5wDDd4Aqg/ngmrjl/GoN0U5V1QquHQG3q+TPDVhVwyBffcmQGJmSVfyZk7R3SngI4JKfwDJ2+05zIg8gbiereTZRHhJ5KCMOwDFLjhoBTn2g0ghagfKeIYJDPFyibJVBtTREwq60SpYvh5++PpwatHsxSm9QRLSQpEVSd7/TYJUb49TX7gztpjjEffnoVw66+Ytovs14Yp7HaKmUXeX9rKUoMoLNW3srqI5fWn8JejrVkK0QcrkFLOgS39yoKUQe292WJ1guUHG8K2o8K00oO1BTvXoW4yasclUTgZYJY9aFNfAThX5CZRmczAV52oAPoupHhWRIUUAOoyUIlYVaAa/VbLbyiZUiyFbjQFNwiZQSGl4IDy9sO5Wrty0QLKhdZPxmgGcDo8ejn+c/6eiK9poz15Kw7Dr/vN/z6W7q++091/AQYA5mZ8GYJ9K0AAAAAASUVORK5CYII= ") left top no-repeat; } a.up { background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU0toU0EUPfPysx/tTxuDH9SCWhUDooIbd7oRUUTMouqi2iIoCO6lceHWhegy4EJFinWjrlQUpVm0IIoFpVDEIthm0dpikpf3ZuZ6Z94nrXhhMjM3c8895977BBHB2PznK8WPtDgyWH5q77cPH8PpdXuhpQT4ifR9u5sfJb1bmw6VivahATDrxcRZ2njfoaMv+2j7mLDn93MPiNRMvGbL18L9IpF8h9/TN+EYkMffSiOXJ5+hkD+PdqcLpICWHOHc2CC+LEyA/K+cKQMnlQHJX8wqYG3MAJy88Wa4OLDvEqAEOpJd0LxHIMdHBziowSwVlF8D6QaicK01krw/JynwcKoEwZczewroTvZirlKJs5CqQ5CG8pb57FnJUA0LYCXMX5fibd+p8LWDDemcPZbzQyjvH+Ki1TlIciElA7ghwLKV4kRZstt2sANWRjYTAGzuP2hXZFpJ/GsxgGJ0ox1aoFWsDXyyxqCs26+ydmagFN/rRjymJ1898bzGzmQE0HCZpmk5A0RFIv8Pn0WYPsiu6t/Rsj6PauVTwffTSzGAGZhUG2F06hEc9ibS7OPMNp6ErYFlKavo7MkhmTqCxZ/jwzGA9Hx82H2BZSw1NTN9Gx8ycHkajU/7M+jInsDC7DiaEmo1bNl1AMr9ASFgqVu9MCTIzoGUimXVAnnaN0PdBBDCCYbEtMk6wkpQwIG0sn0PQIUF4GsTwLSIFKNqF6DVrQq+IWVrQDxAYQC/1SsYOI4pOxKZrfifiUSbDUisif7XlpGIPufXd/uvdvZm760M0no1FZcnrzUdjw7au3vu/BVgAFLXeuTxhTXVAAAAAElFTkSuQmCC ") left top no-repeat; } html[dir=rtl] a { background-position-x: right; } #listingParsingErrorBox { border: 1px solid black; background: #fae691; padding: 10px; display: none; } </style> <title id="title"></title> </head> <body> <div id="listingParsingErrorBox" i18n-values=".innerHTML:listingParsingErrorBoxText"></div> <span id="parentDirText" style="display:none" i18n-content="parentDirText"></span> <h1 id="header" i18n-content="header"></h1> <table id="table"> <tr class="header"> <td i18n-content="headerName"></td> <td class="detailsColumn" i18n-content="headerSize"></td> <td class="detailsColumn" i18n-content="headerDateModified"></td> </tr> </table> </body> </html> <!doctype html> <html> <!-- Copyright (c) 2013 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <head> <meta charset="utf-8"> <title>Accessibility</title> <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css"> <style>/* * Copyright (c) 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { font-family: Arial, sans-serif; font-size: 12px; margin: 10px; min-width: 47em; padding-bottom: 65px; } img { float: left; height: 16px; padding-right: 5px; width: 16px; } .row { border-bottom: 1px solid #A0A0A0; padding: 5px; } .url { color: #A0A0A0; } </style> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/action_link.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="strings.js"></script> <script src="accessibility.js"></script> </head> <body> <h1>Accessibility</h1> <div id="global" class="row">Global accessibility mode: <a is="action-link" role="button" id="toggle_global" aria-labelledby="global"></a> </div> <div id="internal" class="row">Show internal accessibility tree instead of native: <a is="action-link" role="button" id="toggle_internal" aria-labelledby="internal"></a> </div> <div id="pages" class="list"></div> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html> /* * Copyright (c) 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { font-family: Arial, sans-serif; font-size: 12px; margin: 10px; min-width: 47em; padding-bottom: 65px; } img { float: left; height: 16px; padding-right: 5px; width: 16px; } .row { border-bottom: 1px solid #A0A0A0; padding: 5px; } .url { color: #A0A0A0; } // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('accessibility', function() { 'use strict'; // Keep in sync with view_message_enums.h var AccessibilityModeFlag = { Platform: 1 << 0, FullTree: 1 << 1 } var AccessibilityMode = { Off: 0, Complete: AccessibilityModeFlag.Platform | AccessibilityModeFlag.FullTree, EditableTextOnly: AccessibilityModeFlag.Platform, TreeOnly: AccessibilityModeFlag.FullTree } function isAccessibilityComplete(mode) { return ((mode & AccessibilityMode.Complete) == AccessibilityMode.Complete); } function requestData() { var xhr = new XMLHttpRequest(); xhr.open('GET', 'targets-data.json', false); xhr.send(null); if (xhr.status === 200) { console.log(xhr.responseText); return JSON.parse(xhr.responseText); } return []; } // TODO(aboxhall): add a mechanism to request individual and global a11y // mode, xhr them on toggle... or just re-requestData and be smarter about // ID-ing rows? function toggleAccessibility(data, element) { chrome.send('toggleAccessibility', [String(data.processId), String(data.routeId)]); var a11y_was_on = (element.textContent.match(/on/) != null); element.textContent = ' accessibility ' + (a11y_was_on ? ' off' : ' on'); var row = element.parentElement; if (a11y_was_on) { while (row.lastChild != element) row.removeChild(row.lastChild); } else { row.appendChild(document.createTextNode(' | ')); row.appendChild(createShowAccessibilityTreeElement(data, row, false)); } } function requestAccessibilityTree(data, element) { chrome.send('requestAccessibilityTree', [String(data.processId), String(data.routeId)]); } function toggleGlobalAccessibility() { chrome.send('toggleGlobalAccessibility'); document.location.reload(); // FIXME see TODO above } function toggleInternalTree() { chrome.send('toggleInternalTree'); document.location.reload(); // FIXME see TODO above } function initialize() { console.log('initialize'); var data = requestData(); addGlobalAccessibilityModeToggle(data['global_a11y_mode']); addInternalTreeToggle(data['global_internal_tree_mode']); $('pages').textContent = ''; var list = data['list']; for (var i = 0; i < list.length; i++) { addToPagesList(list[i]); } } function addGlobalAccessibilityModeToggle(global_a11y_mode) { var full_a11y_on = isAccessibilityComplete(global_a11y_mode); $('toggle_global').textContent = (full_a11y_on ? 'on' : 'off'); $('toggle_global').setAttribute('aria-pressed', (full_a11y_on ? 'true' : 'false')); $('toggle_global').addEventListener('click', toggleGlobalAccessibility); } function addInternalTreeToggle(global_internal_tree_mode) { var on = global_internal_tree_mode; $('toggle_internal').textContent = (on ? 'on' : 'off'); $('toggle_internal').setAttribute('aria-pressed', (on ? 'true' : 'false')); $('toggle_internal').addEventListener('click', toggleInternalTree); } function addToPagesList(data) { // TODO: iterate through data and pages rows instead var id = data['processId'] + '.' + data['routeId']; var row = document.createElement('div'); row.className = 'row'; row.id = id; formatRow(row, data); row.processId = data.processId; row.routeId = data.routeId; var list = $('pages'); list.appendChild(row); } function formatRow(row, data) { if (!('url' in data)) { if ('error' in data) { row.appendChild(createErrorMessageElement(data, row)); return; } } var properties = ['favicon_url', 'name', 'url']; for (var j = 0; j < properties.length; j++) row.appendChild(formatValue(data, properties[j])); row.appendChild(createToggleAccessibilityElement(data)); if (isAccessibilityComplete(data['a11y_mode'])) { row.appendChild(document.createTextNode(' | ')); if ('tree' in data) { row.appendChild(createShowAccessibilityTreeElement(data, row, true)); row.appendChild(document.createTextNode(' | ')); row.appendChild(createHideAccessibilityTreeElement(row.id)); row.appendChild(createAccessibilityTreeElement(data)); } else { row.appendChild(createShowAccessibilityTreeElement(data, row, false)); if ('error' in data) row.appendChild(createErrorMessageElement(data, row)); } } } function formatValue(data, property) { var value = data[property]; if (property == 'favicon_url') { var faviconElement = document.createElement('img'); if (value) faviconElement.src = value; faviconElement.alt = ""; return faviconElement; } var text = value ? String(value) : ''; if (text.length > 100) text = text.substring(0, 100) + '\u2026'; // ellipsis var span = document.createElement('span'); span.textContent = ' ' + text + ' '; span.className = property; return span; } function createToggleAccessibilityElement(data) { var link = document.createElement('a', 'action-link'); link.setAttribute('role', 'button'); var full_a11y_on = isAccessibilityComplete(data['a11y_mode']); link.textContent = 'accessibility ' + (full_a11y_on ? 'on' : 'off'); link.setAttribute('aria-pressed', (full_a11y_on ? 'true' : 'false')); link.addEventListener('click', toggleAccessibility.bind(this, data, link)); return link; } function createShowAccessibilityTreeElement(data, row, opt_refresh) { var link = document.createElement('a', 'action-link'); link.setAttribute('role', 'button'); if (opt_refresh) link.textContent = 'refresh accessibility tree'; else link.textContent = 'show accessibility tree'; link.id = row.id + ':showTree'; link.addEventListener('click', requestAccessibilityTree.bind(this, data, link)); return link; } function createHideAccessibilityTreeElement(id) { var link = document.createElement('a', 'action-link'); link.setAttribute('role', 'button'); link.textContent = 'hide accessibility tree'; link.addEventListener('click', function() { $(id + ':showTree').textContent = 'show accessibility tree'; var existingTreeElements = $(id).getElementsByTagName('pre'); for (var i = 0; i < existingTreeElements.length; i++) $(id).removeChild(existingTreeElements[i]); var row = $(id); while (row.lastChild != $(id + ':showTree')) row.removeChild(row.lastChild); }); return link; } function createErrorMessageElement(data) { var errorMessageElement = document.createElement('div'); var errorMessage = data.error; errorMessageElement.innerHTML = errorMessage + ' '; var closeLink = document.createElement('a'); closeLink.href='#'; closeLink.textContent = '[close]'; closeLink.addEventListener('click', function() { var parentElement = errorMessageElement.parentElement; parentElement.removeChild(errorMessageElement); if (parentElement.childElementCount == 0) parentElement.parentElement.removeChild(parentElement); }); errorMessageElement.appendChild(closeLink); return errorMessageElement; } function showTree(data) { var id = data.processId + '.' + data.routeId; var row = $(id); if (!row) return; row.textContent = ''; formatRow(row, data); } function createAccessibilityTreeElement(data) { var treeElement = document.createElement('pre'); var tree = data.tree; treeElement.textContent = tree; return treeElement; } return { initialize: initialize, showTree: showTree }; }); document.addEventListener('DOMContentLoaded', accessibility.initialize); <!-- Copyright 2015 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <!DOCTYPE html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title>AppCache</title> <link rel="stylesheet" href="chrome://resources/css/tabs.css"> <link rel="stylesheet" href="chrome://resources/css/widgets.css"> <style>/* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .appcache-summary { background-color: rgb(235, 239, 249); border-top: 1px solid rgb(156, 194, 239); margin-bottom: 6px; margin-top: 12px; padding: 3px; font-weight: bold; } .appcache-item { margin-bottom: 15px; margin-top: 6px; position: relative; } .appcache-url { color: rgb(85, 102, 221); display: inline-block; max-width: 500px; overflow: hidden; padding-bottom: 1px; padding-top: 4px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } .appcache-info-template-table { table-layout: fixed; } .appcache-info-properties { word-wrap: break-word; } .appcache-info-url { color: rgb(85, 102, 221); display: inline-block; } .appcache-manifest-url { color: rgb(85, 102, 221); display: inline-block; max-width: 500px; overflow: hidden; padding-bottom: 1px; padding-top: 4px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } .appcache-info-item { margin-bottom: 10px; margin-top: 6px; margin-left: 6px; position: relative; } .appcache-manifest-commands a { -webkit-margin-end: 16px; color: #777; } .appcache-info-template-file-url { width: 200px; height:25px; } .appcache-info-template-file-url { color: rgb(60, 102, 221); } </style> </head> <body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <!-- templates --> <div style="display:none"> <div id="appcache-list-template" jsvalues=".partitionPath:$this.partition_path"> <div class="appcache-summary"> <span jsdisplay="$this.partition_path"> <span>Instances in: </span> <span jscontent="$this.partition_path"></span> </span> <span jsdisplay="!$this.partition_path"> <span>Instances: Incognito </span> </span> <span jscontent="'(' + $this.appcache_vector.length + ')'"> </span> </div> <div class="appcache-item" jsselect="$this.appcache_vector"> <a class="appcache-url" jscontent="originURL" jsvalues="href:originURL" target="_blank"></a> <div jsselect="manifests"> <div class="appcache-info-item" jsvalues="$manifestURL:manifestURL; $groupId:groupId;"> <div class="appcache-manifest"> <span> Manifest: </span> <a class="appcache-info-url" jscontent="manifestURL" jsvalues="href:manifestURL;" target="_blank"></a> </div> <div class="appcache-size"> <span> Size: </span> <span jscontent="size"></span> </div> <div class="appcache-dates"> <ul> <li> <span> Creation Time: </span> <span jscontent="new Date(creationTime)"></span> </li> <li> <span> Last Access Time: </span> <span jscontent="new Date(lastAccessTime)"></span> </li> <li> <span> Last Update Time: </span> <span jscontent="new Date(lastUpdateTime)"></span> </li> </ul> </div> <div class="appcache-manifest-commands" jsvalues=".manifestURL:$manifestURL;.groupId:$groupId"> <table> <tr> <td> <a href="#" class="remove-manifest"> Remove Item </a> </td> <td> <a href="#" class="view-details"> View Details </a> </td> </tr> </table> </div> <div class="appcache-details" jsvalues=".manifestURL:$manifestURL;.groupId:$groupId;"> </div> </div> </div> </div> </div> <div id="appcache-info-template" jsselect="$this.items"> <span> <a href="#" class="appcache-info-template-file-url" jscontent="fileUrl" jsvalues=".responseId:responseId"> </a> </span> <span jscontent="size"></span> <span jscontent="properties"></span> </div> </div> <h1>Application Cache</h1> <div class="content"> <div id="appcache-list"> </div> <script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/cr.js"></script> <script src="appcache_internals.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> <script src="strings.js"></script> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('appcache', function() { 'use strict'; var VIEW_DETAILS_TEXT = 'View Details'; var HIDE_DETAILS_TEXT = 'Hide Details'; var GET_ALL_APPCACHE = 'getAllAppCache'; var DELETE_APPCACHE = 'deleteAppCache'; var GET_APPCACHE_DETAILS = 'getAppCacheDetails'; var GET_FILE_DETAILS = 'getFileDetails'; var manifestsToView = []; var manifestsToDelete = []; var fileDetailsRequests = []; function Manifest(url, path, link) { this.url = url; this.path = path; this.link = link; } function FileRequest(fileURL, manifestURL, path, groupId, responseId) { this.fileURL = fileURL; this.partitionPath = path; this.manifestURL = manifestURL; this.groupId = groupId; this.responseId = responseId; } function getFirstAncestor(node, selector) { while(node) { if (selector(node)) { break; } node = node.parentNode; } return node; } function getItemByProperties(list, properties, values) { return list.find(function(candidate) { return properties.every(function(key, i) { return candidate[key] == values[i]; }); }) || null; } function removeFromList(list, item, properties) { var pos = 0; while (pos < list.length) { var candidate = list[pos]; if (properties.every(function(key) { return candidate[key] == item[key]; })) { list.splice(pos, 1); } else { pos++; } } } function initialize() { chrome.send(GET_ALL_APPCACHE); } function onAllAppCacheInfoReady(partition_path, data) { var template = jstGetTemplate('appcache-list-template'); var container = $('appcache-list'); container.appendChild(template); jstProcess(new JsEvalContext( {appcache_vector: data, partition_path: partition_path}), template); var removeLinks = container.querySelectorAll('a.remove-manifest'); for (var i = 0; i < removeLinks.length; ++i) { removeLinks[i].onclick = deleteAppCacheInfoEventHandler; } var viewLinks = container.querySelectorAll('a.view-details'); for (i = 0; i < viewLinks.length; ++i) { viewLinks[i].onclick = getAppCacheInfoEventHandler; } } function getAppCacheInfoEventHandler(event) { var link = event.target; if (link.text.indexOf(VIEW_DETAILS_TEXT) === -1) { hideAppCacheInfo(link); } else { var manifestURL = getFirstAncestor(link, function(node) { return !!node.manifestURL; }).manifestURL; var partitionPath = getFirstAncestor(link, function(node) { return !!node.partitionPath; }).partitionPath; var manifest = new Manifest(manifestURL, partitionPath, link); if (getItemByProperties(manifestsToView, ['url', 'path'], [manifestURL, partitionPath])) { return; } manifestsToView.push(manifest); chrome.send(GET_APPCACHE_DETAILS, [partitionPath, manifestURL]); } } function hideAppCacheInfo(link) { getFirstAncestor(link, function(node) { return node.className === 'appcache-info-item'; }).querySelector('.appcache-details').innerHTML = ''; link.text = VIEW_DETAILS_TEXT; } function onAppCacheDetailsReady(manifestURL, partitionPath, details) { if (!details) { console.log('Cannot show details for "' + manifestURL + '" on partition ' + '"' + partitionPath + '".'); return; } var manifest = getItemByProperties( manifestsToView, ['url', 'path'], [manifestURL, partitionPath]); var link = manifest.link; removeFromList(manifestsToView, manifest, ['url', 'path']); var container = getFirstAncestor(link, function(node) { return node.className === 'appcache-info-item'; }).querySelector('.appcache-details'); var template = jstGetTemplate('appcache-info-template'); container.appendChild(template); jstProcess( new JsEvalContext({items: simplifyAppCacheInfo(details)}), template); var fileLinks = container.querySelectorAll('a.appcache-info-template-file-url'); for (var i = 0; i < fileLinks.length; ++i) { fileLinks[i].onclick = getFileContentsEventHandler; } link.text = HIDE_DETAILS_TEXT; } function simplifyAppCacheInfo(detailsVector) { var simpleVector = []; for (var index = 0; index < detailsVector.length; ++index) { var details = detailsVector[index]; var properties = []; if (details.isManifest) { properties.push('Manifest'); } if (details.isExplicit) { properties.push('Explicit'); } if (details.isMaster) { properties.push('Master'); } if (details.isForeign) { properties.push('Foreign'); } if (details.isIntercept) { properties.push('Intercept'); } if (details.isFallback) { properties.push('Fallback'); } properties = properties.join(','); simpleVector.push({ size : details.size, properties : properties, fileUrl : details.url, responseId : details.responseId }); } return simpleVector; } function deleteAppCacheInfoEventHandler(event) { var link = event.target; var manifestURL = getFirstAncestor(link, function(node) { return !!node.manifestURL; }).manifestURL; var partitionPath = getFirstAncestor(link, function(node) { return !!node.partitionPath; }).partitionPath; var manifest = new Manifest(manifestURL, partitionPath, link); manifestsToDelete.push(manifest); chrome.send(DELETE_APPCACHE, [partitionPath, manifestURL]); } function onAppCacheInfoDeleted(partitionPath, manifestURL, deleted) { var manifest = getItemByProperties( manifestsToDelete, ['url', 'path'], [manifestURL, partitionPath]); if (manifest && deleted) { var link = manifest.link; var appcacheItemNode = getFirstAncestor(link, function(node) { return node.className === 'appcache-info-item'; }); var appcacheNode = getFirstAncestor(link, function(node) { return node.className === 'appcache-item'; }); appcacheItemNode.parentNode.removeChild(appcacheItemNode); if (appcacheNode.querySelectorAll('.appcache-info-item').length === 0) { appcacheNode.parentNode.removeChild(appcacheNode); } } else if (!deleted) { // For some reason, the delete command failed. console.log('Manifest "' + manifestURL + '" on partition "' + partitionPath + ' cannot be accessed.'); } } function getFileContentsEventHandler(event) { var link = event.target; var partitionPath = getFirstAncestor(link, function(node) { return !!node.partitionPath; }).partitionPath; var manifestURL = getFirstAncestor(link, function(node) { return !!node.manifestURL; }).manifestURL; var groupId = getFirstAncestor(link, function(node) { return !!node.groupId; }).groupId; var responseId = link.responseId; if (!getItemByProperties(fileDetailsRequests, ['manifestURL', 'groupId', 'responseId'], [manifestURL, groupId, responseId])) { var fileRequest = new FileRequest(link.innerText, manifestURL, partitionPath, groupId, responseId); fileDetailsRequests.push(fileRequest); chrome.send(GET_FILE_DETAILS, [partitionPath, manifestURL, groupId, responseId]); } } function onFileDetailsFailed(response, code) { var request = getItemByProperties( fileDetailsRequests, ['manifestURL', 'groupId', 'responseId'], [response.manifestURL, response.groupId, response.responseId]); console.log('Failed to get file information for file "' + request.fileURL + '" from partition "' + request.partitionPath + '" (net result code:' + code +').'); removeFromList( fileDetailsRequests, request, ['manifestURL', 'groupId', 'responseId']); } function onFileDetailsReady(response, headers, raw_data) { var request = getItemByProperties( fileDetailsRequests, ['manifestURL', 'groupId', 'responseId'], [response.manifestURL, response.groupId, response.responseId]); removeFromList( fileDetailsRequests, request, ['manifestURL', 'groupId', 'responseId']); var doc = window.open().document; var head = document.createElement('head'); doc.title = 'File Details: '.concat(request.fileURL); var headersDiv = doc.createElement('div'); headersDiv.innerHTML = headers; doc.body.appendChild(headersDiv); var hexDumpDiv = doc.createElement('div'); hexDumpDiv.innerHTML = raw_data; var linkToManifest = doc.createElement('a'); linkToManifest.style.color = "#3C66DD"; linkToManifest.href = request.fileURL; linkToManifest.target = '_blank'; linkToManifest.innerHTML = request.fileURL; doc.body.appendChild(linkToManifest); doc.body.appendChild(headersDiv); doc.body.appendChild(hexDumpDiv); copyStylesFrom(document, doc); } function copyStylesFrom(src, dest) { var styles = src.querySelector('style'); if (dest.getElementsByTagName('style').length < 1) { dest.head.appendChild(dest.createElement('style')); } var destStyle= dest.querySelector('style'); var tmp = ''; for (var i = 0; i < styles.length; ++i) { tmp += styles[i].innerHTML; } destStyle.innerHTML = tmp; } return { initialize: initialize, onAllAppCacheInfoReady: onAllAppCacheInfoReady, onAppCacheInfoDeleted: onAppCacheInfoDeleted, onAppCacheDetailsReady : onAppCacheDetailsReady, onFileDetailsReady : onFileDetailsReady, onFileDetailsFailed: onFileDetailsFailed }; }); document.addEventListener('DOMContentLoaded', appcache.initialize); /* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .appcache-summary { background-color: rgb(235, 239, 249); border-top: 1px solid rgb(156, 194, 239); margin-bottom: 6px; margin-top: 12px; padding: 3px; font-weight: bold; } .appcache-item { margin-bottom: 15px; margin-top: 6px; position: relative; } .appcache-url { color: rgb(85, 102, 221); display: inline-block; max-width: 500px; overflow: hidden; padding-bottom: 1px; padding-top: 4px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } .appcache-info-template-table { table-layout: fixed; } .appcache-info-properties { word-wrap: break-word; } .appcache-info-url { color: rgb(85, 102, 221); display: inline-block; } .appcache-manifest-url { color: rgb(85, 102, 221); display: inline-block; max-width: 500px; overflow: hidden; padding-bottom: 1px; padding-top: 4px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } .appcache-info-item { margin-bottom: 10px; margin-top: 6px; margin-left: 6px; position: relative; } .appcache-manifest-commands a { -webkit-margin-end: 16px; color: #777; } .appcache-info-template-file-url { width: 200px; height:25px; } .appcache-info-template-file-url { color: rgb(60, 102, 221); } ?NG IHDR ?a RIDATx^?A 0?7;:us?K?HjtAa%??8?1d/?<sZh(??;*0>??T??8??!???S?: ??? IEND?`?PNG IHDR D?? PLTE?????? ?V tRNS @?f cIDATx^?I ? ???Y?pNB??W?+??p?? T? g??, 3?2? s? ?? ?B}QIV??u?}?0?ic?p??3^?+?o: IEND?`?PNG IHDR J#+ ?DATx^?1?0Ec???.????vqve1k? ?#?"?y?$\^?#??3??T?? *a??th?2???!D`(?B??'??B<r}@g|?31?>#b?i???s??? ?LT?*3?????s??????3?}\?#?:?uB????|USgL?4???5????? IEND?`?PNG IHDR . . ?? ?DATx?O?@p??.???'?e?ZA??71<B?r????????&?*^?QT?? B?;0x0?~??l0?3I?C[?p???%?|ABX??+?Os?y??Fm????{???N??/?t'?/?:??#??Cf}5?????H???/L??^?+c!???y?9?r??????w?-n?&z)?9?5????r?C?#??k\-9p???3??6}2?-~?gew8?l?O????C?/?????$K3gi????,?{?O?x?u A??8+z<?uK?w??$? ?????? ???T?K??s??q??Qg.tE?E?*???? ??/???b??@? IEND?`?<!doctype html> <html> <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <head i18n-values="dir:textdirection;lang:language"> <meta name="viewport" content="width=device-width" /> <style> * { box-sizing: border-box; -webkit-user-select: none; } body { cursor: default; font-family: sans-serif; padding: 0; } #debug-div { display: -webkit-box; position: fixed; top: 0px; left: 50%; border: 1px solid red; } tabbox tabpanels { padding: 10px; } </style> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #info-view { -webkit-box-flex: 1; overflow: auto; padding: 10px; } #info-view * { -webkit-user-select: text; } #info-view[selected] { -webkit-box-orient: vertical; display: -webkit-box; } #info-view h3, #info-view ul { margin-bottom: 0; margin-top: 0; } #info-view > div { margin-bottom: 1em; } #info-view .row-title { font-weight: bold; } #info-view table { border-collapse: collapse; cursor: auto; table-layout: fixed; width: 100%; } #info-view table, #info-view th, #info-view td { border: 1px solid #777; padding-left: 4px; padding-right: 4px; text-align: top; } #info-view td { overflow-x: auto; } #info-view .feature-green { color: rgb(0, 128, 0); } #info-view .feature-yellow { color: rgb(128, 128, 0); } #info-view .feature-red { color: rgb(255, 0, 0); } </style> <link rel="stylesheet" href="chrome://resources/css/tabs.css"> <link rel="stylesheet" href="chrome://resources/css/widgets.css"> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/cr/event_target.js"></script> <script src="chrome://resources/js/cr/ui.js"></script> <script src="chrome://resources/js/cr/ui/focus_outline_manager.js"></script> <script src="chrome://resources/js/cr/ui/tabs.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="gpu_internals.js"></script> <script src="strings.js"></script> </head> <body> <div id="debug-div"> </div> <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <tabpanel id="info-view"> <div> <h3>Graphics Feature Status</h3> <ul class="feature-status-list"> </ul> </div> <div class='workarounds-div'> <h3>Driver Bug Workarounds</h3> <ul class="workarounds-list"> </ul> </div> <div class='problems-div'> <h3>Problems Detected</h3> <ul class="problems-list"> </ul> </div> <div> <h3>GpuMemoryBuffer Status</h3> <div id="gpu-memory-buffer-info"></div> </div> <div> <h3>Version Information</h3> <div id="client-info"></div> </div> <div> <h3>Driver Information</h3> <div id="basic-info"></div> </div> <div class="diagnostics"> <h3>Diagnostics</h3> <div class="diagnostics-loading">... loading ...</div> <div id="diagnostics-table">None</div> </div> <div id="log-messages" jsdisplay="values.length"> <h3>Log Messages</h3> <ul> <li jsselect="values"> <span jscontent="header"></span>: <span jscontent="message"></span> </li> </ul> </div> <!-- templates --> <div style="display:none"> <div id="info-view-table-template"> <table id="info-view-table"> <colgroup> <col style="width: 25%" /> <col style="width: 75%" /> </colgroup> <tr jsselect="value"> <td jsdisplay="!(value instanceof Array)"> <span class="row-title" jscontent="description">title</span> </td> <td jsdisplay="!(value instanceof Array)"> <span jscontent="value">value</span> </td> <td jsdisplay="value instanceof Array" colspan=2> <span jscontent="description" class="row-title"></span> <div transclude="info-view-table-template"></div> </td> </tr> </table> </div> </div> </tabpanel> <script src="chrome://resources/js/i18n_template.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> </body> </html> // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('gpu', function() { /** * This class provides a 'bridge' for communicating between javascript and the * browser. When run outside of WebUI, e.g. as a regular webpage, it provides * synthetic data to assist in testing. * @constructor */ function BrowserBridge() { // If we are not running inside WebUI, output chrome.send messages // to the console to help with quick-iteration debugging. this.debugMode_ = (chrome.send === undefined && console.log); if (this.debugMode_) { var browserBridgeTests = document.createElement('script'); browserBridgeTests.src = './gpu_internals/browser_bridge_tests.js'; document.body.appendChild(browserBridgeTests); } this.nextRequestId_ = 0; this.pendingCallbacks_ = []; this.logMessages_ = []; // Tell c++ code that we are ready to receive GPU Info. if (!this.debugMode_) { chrome.send('browserBridgeInitialized'); this.beginRequestClientInfo_(); this.beginRequestLogMessages_(); } } BrowserBridge.prototype = { __proto__: cr.EventTarget.prototype, applySimulatedData_: function applySimulatedData(data) { // set up things according to the simulated data this.gpuInfo_ = data.gpuInfo; this.gpuMemoryBufferInfo_ = data.gpuMemoryBufferInfo; this.clientInfo_ = data.clientInfo; this.logMessages_ = data.logMessages; cr.dispatchSimpleEvent(this, 'gpuInfoUpdate'); cr.dispatchSimpleEvent(this, 'gpuMemoryBufferInfoUpdate'); cr.dispatchSimpleEvent(this, 'clientInfoChange'); cr.dispatchSimpleEvent(this, 'logMessagesChange'); }, /** * Returns true if the page is hosted inside Chrome WebUI * Helps have behavior conditional to emulate_webui.py */ get debugMode() { return this.debugMode_; }, /** * Sends a message to the browser with specified args. The * browser will reply asynchronously via the provided callback. */ callAsync: function(submessage, args, callback) { var requestId = this.nextRequestId_; this.nextRequestId_ += 1; this.pendingCallbacks_[requestId] = callback; if (!args) { chrome.send('callAsync', [requestId.toString(), submessage]); } else { var allArgs = [requestId.toString(), submessage].concat(args); chrome.send('callAsync', allArgs); } }, /** * Called by gpu c++ code when client info is ready. */ onCallAsyncReply: function(requestId, args) { if (this.pendingCallbacks_[requestId] === undefined) { throw new Error('requestId ' + requestId + ' is not pending'); } var callback = this.pendingCallbacks_[requestId]; callback(args); delete this.pendingCallbacks_[requestId]; }, /** * Get gpuInfo data. */ get gpuInfo() { return this.gpuInfo_; }, /** * Called from gpu c++ code when GPU Info is updated. */ onGpuInfoUpdate: function(gpuInfo) { this.gpuInfo_ = gpuInfo; cr.dispatchSimpleEvent(this, 'gpuInfoUpdate'); }, /** * Get gpuMemoryBufferInfo data. */ get gpuMemoryBufferInfo() { return this.gpuMemoryBufferInfo_; }, /** * Called from gpu c++ code when GpuMemoryBuffer Info is updated. */ onGpuMemoryBufferInfoUpdate: function(gpuMemoryBufferInfo) { this.gpuMemoryBufferInfo_ = gpuMemoryBufferInfo; cr.dispatchSimpleEvent(this, 'gpuMemoryBufferInfoUpdate'); }, /** * This function begins a request for the ClientInfo. If it comes back * as undefined, then we will issue the request again in 250ms. */ beginRequestClientInfo_: function() { this.callAsync('requestClientInfo', undefined, (function(data) { if (data === undefined) { // try again in 250 ms window.setTimeout(this.beginRequestClientInfo_.bind(this), 250); } else { this.clientInfo_ = data; cr.dispatchSimpleEvent(this, 'clientInfoChange'); } }).bind(this)); }, /** * Returns information about the currently running Chrome build. */ get clientInfo() { return this.clientInfo_; }, /** * This function checks for new GPU_LOG messages. * If any are found, a refresh is triggered. */ beginRequestLogMessages_: function() { this.callAsync('requestLogMessages', undefined, (function(messages) { if (messages.length != this.logMessages_.length) { this.logMessages_ = messages; cr.dispatchSimpleEvent(this, 'logMessagesChange'); } // check again in 250 ms window.setTimeout(this.beginRequestLogMessages_.bind(this), 250); }).bind(this)); }, /** * Returns an array of log messages issued by the GPU process, if any. */ get logMessages() { return this.logMessages_; }, /** * Returns the value of the "Sandboxed" row. */ isSandboxedForTesting : function() { for (i = 0; i < this.gpuInfo_.basic_info.length; ++i) { var info = this.gpuInfo_.basic_info[i]; if (info.description == "Sandboxed") return info.value; } return false; } }; return { BrowserBridge: BrowserBridge }; }); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This view displays information on the current GPU * hardware. Its primary usefulness is to allow users to copy-paste * their data in an easy to read format for bug reports. */ cr.define('gpu', function() { /** * Provides information on the GPU process and underlying graphics hardware. * @constructor * @extends {cr.ui.TabPanel} */ var InfoView = cr.ui.define(cr.ui.TabPanel); InfoView.prototype = { __proto__: cr.ui.TabPanel.prototype, decorate: function() { cr.ui.TabPanel.prototype.decorate.apply(this); browserBridge.addEventListener('gpuInfoUpdate', this.refresh.bind(this)); browserBridge.addEventListener('gpuMemoryBufferInfoUpdate', this.refresh.bind(this)); browserBridge.addEventListener('logMessagesChange', this.refresh.bind(this)); browserBridge.addEventListener('clientInfoChange', this.refresh.bind(this)); this.refresh(); }, /** * Updates the view based on its currently known data */ refresh: function(data) { // Client info if (browserBridge.clientInfo) { var clientInfo = browserBridge.clientInfo; var commandLineParts = clientInfo.command_line.split(' '); commandLineParts.shift(); // Pop off the exe path var commandLineString = commandLineParts.join(' ') this.setTable_('client-info', [ { description: 'Data exported', value: (new Date()).toLocaleString() }, { description: 'Chrome version', value: clientInfo.version }, { description: 'Operating system', value: clientInfo.operating_system }, { description: 'Software rendering list version', value: clientInfo.blacklist_version }, { description: 'Driver bug list version', value: clientInfo.driver_bug_list_version }, { description: 'ANGLE commit id', value: clientInfo.angle_commit_id }, { description: '2D graphics backend', value: clientInfo.graphics_backend }, { description: 'Command Line Args', value: commandLineString }]); } else { this.setText_('client-info', '... loading...'); } // Feature map var featureLabelMap = { '2d_canvas': 'Canvas', 'gpu_compositing': 'Compositing', 'webgl': 'WebGL', 'multisampling': 'WebGL multisampling', 'flash_3d': 'Flash', 'flash_stage3d': 'Flash Stage3D', 'flash_stage3d_baseline': 'Flash Stage3D Baseline profile', 'texture_sharing': 'Texture Sharing', 'video_decode': 'Video Decode', 'video_encode': 'Video Encode', 'panel_fitting': 'Panel Fitting', 'rasterization': 'Rasterization', 'multiple_raster_threads': 'Multiple Raster Threads', }; var statusMap = { 'disabled_software': { 'label': 'Software only. Hardware acceleration disabled', 'class': 'feature-yellow' }, 'disabled_off': { 'label': 'Disabled', 'class': 'feature-red' }, 'disabled_off_ok': { 'label': 'Disabled', 'class': 'feature-yellow' }, 'unavailable_software': { 'label': 'Software only, hardware acceleration unavailable', 'class': 'feature-yellow' }, 'unavailable_off': { 'label': 'Unavailable', 'class': 'feature-red' }, 'unavailable_off_ok': { 'label': 'Unavailable', 'class': 'feature-yellow' }, 'enabled_readback': { 'label': 'Hardware accelerated but at reduced performance', 'class': 'feature-yellow' }, 'enabled_force': { 'label': 'Hardware accelerated on all pages', 'class': 'feature-green' }, 'enabled': { 'label': 'Hardware accelerated', 'class': 'feature-green' }, 'enabled_on': { 'label': 'Enabled', 'class': 'feature-green' }, 'enabled_force_on': { 'label': 'Force enabled', 'class': 'feature-green' }, }; // GPU info, basic var diagnosticsDiv = this.querySelector('.diagnostics'); var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); var featureStatusList = this.querySelector('.feature-status-list'); var problemsDiv = this.querySelector('.problems-div'); var problemsList = this.querySelector('.problems-list'); var workaroundsDiv = this.querySelector('.workarounds-div'); var workaroundsList = this.querySelector('.workarounds-list'); var gpuInfo = browserBridge.gpuInfo; var gpuMemoryBufferInfo = browserBridge.gpuMemoryBufferInfo; var i; if (gpuInfo) { // Not using jstemplate here for blacklist status because we construct // href from data, which jstemplate can't seem to do. if (gpuInfo.featureStatus) { // feature status list featureStatusList.textContent = ''; for (var featureName in gpuInfo.featureStatus.featureStatus) { var featureStatus = gpuInfo.featureStatus.featureStatus[featureName]; var featureEl = document.createElement('li'); var nameEl = document.createElement('span'); if (!featureLabelMap[featureName]) console.log('Missing featureLabel for', featureName); nameEl.textContent = featureLabelMap[featureName] + ': '; featureEl.appendChild(nameEl); var statusEl = document.createElement('span'); var statusInfo = statusMap[featureStatus]; if (!statusInfo) { console.log('Missing status for ', featureStatus); statusEl.textContent = 'Unknown'; statusEl.className = 'feature-red'; } else { statusEl.textContent = statusInfo['label']; statusEl.className = statusInfo['class']; } featureEl.appendChild(statusEl); featureStatusList.appendChild(featureEl); } // problems list if (gpuInfo.featureStatus.problems.length) { problemsDiv.hidden = false; problemsList.textContent = ''; for (i = 0; i < gpuInfo.featureStatus.problems.length; i++) { var problem = gpuInfo.featureStatus.problems[i]; var problemEl = this.createProblemEl_(problem); problemsList.appendChild(problemEl); } } else { problemsDiv.hidden = true; } // driver bug workarounds list if (gpuInfo.featureStatus.workarounds.length) { workaroundsDiv.hidden = false; workaroundsList.textContent = ''; for (i = 0; i < gpuInfo.featureStatus.workarounds.length; i++) { var workaroundEl = document.createElement('li'); workaroundEl.textContent = gpuInfo.featureStatus.workarounds[i]; workaroundsList.appendChild(workaroundEl); } } else { workaroundsDiv.hidden = true; } } else { featureStatusList.textContent = ''; problemsList.hidden = true; workaroundsList.hidden = true; } if (gpuMemoryBufferInfo.gpu_memory_buffer_info) this.setTable_('gpu-memory-buffer-info', gpuMemoryBufferInfo.gpu_memory_buffer_info); else this.setTable_('gpu-memory-buffer-info', []); if (gpuInfo.basic_info) this.setTable_('basic-info', gpuInfo.basic_info); else this.setTable_('basic-info', []); if (gpuInfo.diagnostics) { diagnosticsDiv.hidden = false; diagnosticsLoadingDiv.hidden = true; $('diagnostics-table').hidden = false; this.setTable_('diagnostics-table', gpuInfo.diagnostics); } else if (gpuInfo.diagnostics === null) { // gpu_internals.cc sets diagnostics to null when it is being loaded diagnosticsDiv.hidden = false; diagnosticsLoadingDiv.hidden = false; $('diagnostics-table').hidden = true; } else { diagnosticsDiv.hidden = true; } } else { this.setText_('basic-info', '... loading ...'); diagnosticsDiv.hidden = true; featureStatusList.textContent = ''; problemsDiv.hidden = true; } // Log messages jstProcess(new JsEvalContext({values: browserBridge.logMessages}), $('log-messages')); }, createProblemEl_: function(problem) { var problemEl; problemEl = document.createElement('li'); // Description of issue var desc = document.createElement('a'); desc.textContent = problem.description; problemEl.appendChild(desc); // Spacing ':' element if (problem.crBugs.length + problem.webkitBugs.length > 0) { var tmp = document.createElement('span'); tmp.textContent = ': '; problemEl.appendChild(tmp); } var nbugs = 0; var j; // crBugs for (j = 0; j < problem.crBugs.length; ++j) { if (nbugs > 0) { var tmp = document.createElement('span'); tmp.textContent = ', '; problemEl.appendChild(tmp); } var link = document.createElement('a'); var bugid = parseInt(problem.crBugs[j]); link.textContent = bugid; link.href = 'http://crbug.com/' + bugid; problemEl.appendChild(link); nbugs++; } for (j = 0; j < problem.webkitBugs.length; ++j) { if (nbugs > 0) { var tmp = document.createElement('span'); tmp.textContent = ', '; problemEl.appendChild(tmp); } var link = document.createElement('a'); var bugid = parseInt(problem.webkitBugs[j]); link.textContent = bugid; link.href = 'https://bugs.webkit.org/show_bug.cgi?id=' + bugid; problemEl.appendChild(link); nbugs++; } if (problem.affectedGpuSettings.length > 0) { var brNode = document.createElement('br'); problemEl.appendChild(brNode); var iNode = document.createElement('i'); problemEl.appendChild(iNode); var headNode = document.createElement('span'); if (problem.tag == 'disabledFeatures') headNode.textContent = 'Disabled Features: '; else // problem.tag == 'workarounds' headNode.textContent = 'Applied Workarounds: '; iNode.appendChild(headNode); for (j = 0; j < problem.affectedGpuSettings.length; ++j) { if (j > 0) { var separateNode = document.createElement('span'); separateNode.textContent = ', '; iNode.appendChild(separateNode); } var nameNode = document.createElement('span'); if (problem.tag == 'disabledFeatures') nameNode.classList.add('feature-red'); else // problem.tag == 'workarounds' nameNode.classList.add('feature-yellow'); nameNode.textContent = problem.affectedGpuSettings[j]; iNode.appendChild(nameNode); } } return problemEl; }, setText_: function(outputElementId, text) { var peg = document.getElementById(outputElementId); peg.textContent = text; }, setTable_: function(outputElementId, inputData) { var template = jstGetTemplate('info-view-table-template'); jstProcess(new JsEvalContext({value: inputData}), template); var peg = document.getElementById(outputElementId); if (!peg) throw new Error('Node ' + outputElementId + ' not found'); peg.innerHTML = ''; peg.appendChild(template); } }; return { InfoView: InfoView }; }); var browserBridge; /** * Main entry point. called once the page has loaded. */ function onLoad() { browserBridge = new gpu.BrowserBridge(); // Create the views. cr.ui.decorate('#info-view', gpu.InfoView); } document.addEventListener('DOMContentLoaded', onLoad); <!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title>IndexedDB</title> <link rel="stylesheet" href="chrome://resources/css/tabs.css"> <link rel="stylesheet" href="chrome://resources/css/widgets.css"> <style>/* Copyright (c) 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .indexeddb-summary { background-color: rgb(235, 239, 249); border-top: 1px solid rgb(156, 194, 239); margin-bottom: 6px; margin-top: 12px; padding: 3px; font-weight: bold; } .indexeddb-item { margin-bottom: 15px; margin-top: 6px; position: relative; } .indexeddb-url { color: rgb(85, 102, 221); display: inline-block; max-width: 500px; overflow: hidden; padding-bottom: 1px; padding-top: 4px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } .indexeddb-database { margin-bottom: 6px; margin-top: 6px; margin-left: 12px; position: relative; } .indexeddb-database > div { margin-left: 12px; } .indexeddb-connection-count { margin: 0 8px; } .indexeddb-connection-count.pending { font-weight: bold; } .indexeddb-path { display: block; margin-left: 1em; } .indexeddb-transaction-list { margin-left: 10px; border-collapse: collapse; } .indexeddb-transaction-list th, .indexeddb-transaction-list td { padding: 2px 10px; min-width: 50px; max-width: 75px; } td.indexeddb-transaction-scope { min-width: 200px; max-width: 500px; } .indexeddb-transaction-list th { background-color: rgb(249, 249, 249); border: 1px solid rgb(156, 194, 239); font-weight: normal; text-align: left; } .indexeddb-transaction { background-color: rgb(235, 239, 249); border-bottom: 2px solid white; } .indexeddb-transaction.created { font-weight: italic; } .indexeddb-transaction.started { font-weight: bold; } .indexeddb-transaction.running { font-weight: bold; } .indexeddb-transaction.committing { font-weight: bold; } .indexeddb-transaction.blocked { } .indexeddb-transaction.started .indexeddb-transaction-state { background-color: rgb(249, 249, 235); } .indexeddb-transaction.running .indexeddb-transaction-state { background-color: rgb(235, 249, 235); } .indexeddb-transaction.committing .indexeddb-transaction-state { background-color: rgb(235, 235, 249); } .indexeddb-transaction.blocked .indexeddb-transaction-state { background-color: rgb(249, 235, 235); } .controls a { -webkit-margin-end: 16px; color: #777; } </style> </head> <body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <!-- templates --> <div style="display:none"> <div id="indexeddb-list-template" jsvalues="$partition_path:$this.partition_path"> <div class="indexeddb-summary"> <span jsdisplay="$this.partition_path"> <span>Instances in: </span> <span jscontent="$this.partition_path"></span> </span> <span jsdisplay="!$this.partition_path"> <span>Instances: Incognito </span> </span> <span jscontent="'(' + $this.idbs.length + ')'"></span> </div> <div class="indexeddb-item" jsselect="$this.idbs"> <a class="indexeddb-url" jscontent="url" jsvalues="href:url" target="_blank"></a> <div class="indexeddb-size"> <span>Size:</span> <span jscontent="size"></span> </div> <div class="indexeddb-last-modified"> <span>Last modified:</span> <span jscontent="new Date(last_modified)"></span> </div> <div> <span>Open connections:</span> <span class="connection-count" jsvalues=".idb_origin_url:url;.idb_partition_path:$partition_path" jscontent="connection_count"> </div> <div class="indexeddb-paths"> <span>Paths:</span> <span class="indexeddb-path" jscontent="$this" jsselect="$this.paths"></span> </div> <div class="controls"> <a href="#" class="force-close" jsvalues=".idb_origin_url:url;.idb_partition_path:$partition_path">Force close</a> <a href="#" class="download" jsvalues=".idb_origin_url:url;.idb_partition_path:$partition_path">Download</a> <span class="download-status" style="display: none">Loading...</span> </div> <div class="indexeddb-database" jsselect="$this.databases"> <span>Open database:</span> <span jscontent="name"></span> <div> <span>Connections:</span> <span class="indexeddb-connection-count" jsdisplay="connection_count"> <span>open:</span> <span jscontent="connection_count"></span> </span> <span class="indexeddb-connection-count pending" jsdisplay="pending_opens"> <span>pending opens:</span> <span jscontent="pending_opens"></span> </span> <span class="indexeddb-connection-count pending" jsdisplay="pending_upgrades"> <span>pending upgrades:</span> <span jscontent="pending_upgrades"></span> </span> <span class="indexeddb-connection-count pending" jsdisplay="running_upgrades"> <span>running upgrades:</span> <span jscontent="running_upgrades"></span> </span> <span class="indexeddb-connection-count pending" jsdisplay="pending_deletes"> <span>pending deletes:</span> <span jscontent="pending_deletes"></span> </span> </div> <div jsdisplay="$this.transactions && $this.transactions.length"> <span>Transactions:</span> <table class="indexeddb-transaction-list"> <tbody> <tr> <th title="Process ID of the tab or SharedWorker that created the transaction"> Process ID </th> <th title="Transaction ID (unique within Process)"> ID </th> <th title="Type of transaction"> Mode </th> <th title="Names of object stores used by the transaction"> Scope </th> <th title="Number of requests that have been executed"> Completed Requests </th> <th title="Number of requests that have not yet been executed"> Pending Requests </th> <th title="Time since transaction creation"> Age (ms) </th> <th title="Time since transaction started"> Runtime (ms) </th> <th title="Status in the transaction queue"> Status </th> </tr> <tr class="indexeddb-transaction" jsselect="$this.transactions" jseval="this.classList.add($this.status)"> <td class="indexeddb-transaction-pid" jscontent="pid"> </td> <td class="indexeddb-transaction-tid" jscontent="tid"> </td> <td class="indexeddb-transaction-mode" jscontent="mode"> </td> <td class="indexeddb-transaction-scope" jscontent="'[ ' + scope.join(', ') + ' ]'"> </td> <td class="indexeddb-transaction-requests-complete" jscontent="tasks_completed"> </td> <td class="indexeddb-transaction-requests-pending" jscontent="tasks_scheduled - tasks_completed"> </td> <td class="indexeddb-transaction-age" jscontent="Math.round(age)"> </td> <td class="indexeddb-transaction-age"> <span jsdisplay="status == 'started' || status == 'running' || status == 'committing'" jscontent="Math.round(runtime)"> </span> </td> <td class="indexeddb-transaction-state" jscontent="status"> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <h1>IndexedDB</h1> <div class="content"> <div id="indexeddb-list"> </div> <script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/cr.js"></script> <script src="indexeddb_internals.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> <script src="strings.js"></script> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html> // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('indexeddb', function() { 'use strict'; function initialize() { chrome.send('getAllOrigins'); } function progressNodeFor(link) { return link.parentNode.querySelector('.download-status'); } function downloadOriginData(event) { var link = event.target; progressNodeFor(link).style.display = 'inline'; chrome.send('downloadOriginData', [link.idb_partition_path, link.idb_origin_url]); return false; } function forceClose(event) { var link = event.target; progressNodeFor(link).style.display = 'inline'; chrome.send('forceClose', [link.idb_partition_path, link.idb_origin_url]); return false; } function withNode(selector, partition_path, origin_url, callback) { var links = document.querySelectorAll(selector); for (var i = 0; i < links.length; ++i) { var link = links[i]; if (partition_path == link.idb_partition_path && origin_url == link.idb_origin_url) { callback(link); } } } // Fired from the backend after the data has been zipped up, and the // download manager has begun downloading the file. function onOriginDownloadReady(partition_path, origin_url, connection_count) { withNode('a.download', partition_path, origin_url, function(link) { progressNodeFor(link).style.display = 'none'; }); withNode('.connection-count', partition_path, origin_url, function(span) { span.innerText = connection_count; }); } function onForcedClose(partition_path, origin_url, connection_count) { withNode('a.force-close', partition_path, origin_url, function(link) { progressNodeFor(link).style.display = 'none'; }); withNode('.connection-count', partition_path, origin_url, function(span) { span.innerText = connection_count; }); } // Fired from the backend with a single partition's worth of // IndexedDB metadata. function onOriginsReady(origins, partition_path) { var template = jstGetTemplate('indexeddb-list-template'); var container = $('indexeddb-list'); container.appendChild(template); jstProcess(new JsEvalContext({ idbs: origins, partition_path: partition_path}), template); var downloadLinks = container.querySelectorAll('a.download'); for (var i = 0; i < downloadLinks.length; ++i) { downloadLinks[i].addEventListener('click', downloadOriginData, false); } var forceCloseLinks = container.querySelectorAll('a.force-close'); for (i = 0; i < forceCloseLinks.length; ++i) { forceCloseLinks[i].addEventListener('click', forceClose, false); } } return { initialize: initialize, onForcedClose: onForcedClose, onOriginDownloadReady: onOriginDownloadReady, onOriginsReady: onOriginsReady, }; }); document.addEventListener('DOMContentLoaded', indexeddb.initialize); /* Copyright (c) 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .indexeddb-summary { background-color: rgb(235, 239, 249); border-top: 1px solid rgb(156, 194, 239); margin-bottom: 6px; margin-top: 12px; padding: 3px; font-weight: bold; } .indexeddb-item { margin-bottom: 15px; margin-top: 6px; position: relative; } .indexeddb-url { color: rgb(85, 102, 221); display: inline-block; max-width: 500px; overflow: hidden; padding-bottom: 1px; padding-top: 4px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } .indexeddb-database { margin-bottom: 6px; margin-top: 6px; margin-left: 12px; position: relative; } .indexeddb-database > div { margin-left: 12px; } .indexeddb-connection-count { margin: 0 8px; } .indexeddb-connection-count.pending { font-weight: bold; } .indexeddb-path { display: block; margin-left: 1em; } .indexeddb-transaction-list { margin-left: 10px; border-collapse: collapse; } .indexeddb-transaction-list th, .indexeddb-transaction-list td { padding: 2px 10px; min-width: 50px; max-width: 75px; } td.indexeddb-transaction-scope { min-width: 200px; max-width: 500px; } .indexeddb-transaction-list th { background-color: rgb(249, 249, 249); border: 1px solid rgb(156, 194, 239); font-weight: normal; text-align: left; } .indexeddb-transaction { background-color: rgb(235, 239, 249); border-bottom: 2px solid white; } .indexeddb-transaction.created { font-weight: italic; } .indexeddb-transaction.started { font-weight: bold; } .indexeddb-transaction.running { font-weight: bold; } .indexeddb-transaction.committing { font-weight: bold; } .indexeddb-transaction.blocked { } .indexeddb-transaction.started .indexeddb-transaction-state { background-color: rgb(249, 249, 235); } .indexeddb-transaction.running .indexeddb-transaction-state { background-color: rgb(235, 249, 235); } .indexeddb-transaction.committing .indexeddb-transaction-state { background-color: rgb(235, 235, 249); } .indexeddb-transaction.blocked .indexeddb-transaction-state { background-color: rgb(249, 235, 235); } .controls a { -webkit-margin-end: 16px; color: #777; } <!-- Copyright 2013 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <!DOCTYPE html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title i18n-content="Media Internals"></title> <style>/* Copyright 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ html, body, #container { margin: 0; padding: 0; width: 100%; height: 100%; font-family:Arial; } tabbox { margin-top: 10px; } tab { -webkit-user-select: none; } body tabpanels { box-shadow: none; } tabpanel { padding: 10px; } table { font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 115%; width: auto; overflow: auto; display: block; } th { background-color: #4AA9E4; font-weight: normal; color: white; padding: 2px; text-align: center; min-width: 230px; } td { background-color: rgb(238, 238, 238); padding: 2px; color: rgb(111, 111, 111); word-wrap: break-word; min-width: 230px; } h1, h2, h3 { color: rgb(50,50,50); } #container { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; align-content: stretch; } #container > * { padding: 0; padding-left: 25px; margin: 0; } #list-wrapper { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; align-content: stretch; } #player-list-wrapper, #audio-component-list-wrapper { flex-grow: 1; align-self: stretch; min-width: 200px; overflow: auto; } #player-list-wrapper ul, #player-list-wrapper li, #audio-component-list-wrapper ul, #audio-component-list-wrapper li { padding: 0px; list-style-type: none; } #list-wrapper button { padding: 0px; } .property-wrapper, #log-wrapper { align-self: stretch; display:block; flex-grow: 0.25; overflow: auto; margin-bottom: 10px; } #video-capture-capabilities-wrapper { flex-grow: 0.5; align-self: stretch; overflow: auto; } #log-wrapper > thead { position: fixed; } #graphs li { list-style-type: none; } #clipboard-textarea { position: absolute; width: 50%; height: 50%; left: 25%; top: 25%; } .hiddenClipboard { display: none; } .timestamp { min-width: 115px; } #video-capture-capabilities-table { margin-bottom:30px; } #video-capture-capabilities-table th, #video-capture-capabilities-table td { min-width:120px; } #video-capture-capabilities-table td { padding:5px; } #video-capture-capabilities-table tr td { font-size:13px; text-align:center; } #video-capture-capabilities-table .video-capture-formats-table th, #video-capture-capabilities-table .video-capture-formats-table td { text-align:right; min-width:80px; } #video-capture-capabilities-table .video-capture-formats-table th { background:none; color:#666; font-size:13px; font-weight:bold; } #video-capture-capabilities-table .video-capture-formats-table td { padding:2px; } .show-none-if-empty:empty:after { content: "none"; color: rgba(0, 0, 0, .5); } label.selectable-button { -webkit-appearance: button; -webkit-user-select: none; padding: 2px 5px; margin-bottom: 5px; } input.selectable-button { display: none; } input.selectable-button:checked + label.selectable-button { background-color: #4AA9E4; color: white; } .no-players-selected #players .property-wrapper, .no-players-selected #players #log-wrapper { display: none; } .no-components-selected #audio .property-wrapper { display: none; } </style> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/cr/ui.js"></script> <script src="chrome://resources/js/cr/ui/focus_outline_manager.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/cr/ui/tabs.js"></script> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <link rel="stylesheet" href="chrome://resources/css/tabs.css"> </head> <body> <tabbox> <tabs> <tab>Players</tab> <tab>Audio</tab> <tab>Video Capture</tab> </tabs> <tabpanels> <tabpanel id="players"> <div id="list-wrapper"> <div id="player-list-wrapper"> <h2>Players</h2> <ul id="player-list" class="show-none-if-empty"></ul> </div> </div> <div class="property-wrapper"> <h2> Player Properties <button class="copy-button">Copy to clipboard</button> </h2> <table id="player-property-table"> <thead> <tr> <th>Property</th> <th>Value</th> </tr> </thead> <tbody></tbody> </table> </div> <div id="log-wrapper"> <h2> Log <input id="filter-text" type="text" placeholder="property filter"> </h2> <table id="log"> <thead> <tr> <th class="timestamp">Timestamp</th> <th>Property</th> <th>Value</th> </tr> </thead> <tbody></tbody> </table> </div> <ul id="graphs"></ul> </tabpanel> <tabpanel id="audio"> <div id="audio-component-list-wrapper"> <h2>Input Controllers</h2> <ul id="audio-input-controller-list" class="show-none-if-empty"></ul> </div> <div id="audio-component-list-wrapper"> <h2>Output Controllers</h2> <ul id="audio-output-controller-list" class="show-none-if-empty"></ul> </div> <div id="audio-component-list-wrapper"> <h2>Output Streams</h2> <ul id="audio-output-stream-list" class="show-none-if-empty"></ul> </div> <div class="property-wrapper"> <h2> <span id="audio-property-name"></span> Properties <button class="copy-button">Copy to clipboard</button> </h2> <table id="audio-property-table"> <thead> <tr> <th>Property</th> <th>Value</th> </tr> </thead> <tbody></tbody> </table> </div> </tabpanel> <tabpanel id="video-capture"> <div id="video-capture-capabilities-wrapper"> <h2> <span>Video Capture Device Capabilities</span> <button id="video-capture-capabilities-copy-button"> Copy to clipboard </button> </h2> <table id="video-capture-capabilities-table"> <thead> <tr> <th>Device Name</th> <th>Formats</th> <th>Capture API</th> <th>Device ID</th> </tr> </thead> <tbody id="video-capture-capabilities-tbody" class="show-none-if-empty"></tbody> </table> </div> </tabpanel> </tabpanels> </tabbox> <textarea id="clipboard-textarea" class="hiddenClipboard"></textarea> <script src="media_internals.js"></script> </body> </html> // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var media = {}; // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * A global object that gets used by the C++ interface. */ var media = (function() { 'use strict'; var manager = null; // A number->string mapping that is populated through the backend that // describes the phase that the network entity is in. var eventPhases = {}; // A number->string mapping that is populated through the backend that // describes the type of event sent from the network. var eventTypes = {}; // A mapping of number->CacheEntry where the number is a unique id for that // network request. var cacheEntries = {}; // A mapping of url->CacheEntity where the url is the url of the resource. var cacheEntriesByKey = {}; var requrestURLs = {}; var media = { BAR_WIDTH: 200, BAR_HEIGHT: 25 }; /** * Users of |media| must call initialize prior to calling other methods. */ media.initialize = function(theManager) { manager = theManager; }; media.onReceiveAudioStreamData = function(audioStreamData) { for (var component in audioStreamData) { media.updateAudioComponent(audioStreamData[component]); } }; media.onReceiveVideoCaptureCapabilities = function(videoCaptureCapabilities) { manager.updateVideoCaptureCapabilities(videoCaptureCapabilities) } media.onReceiveConstants = function(constants) { for (var key in constants.eventTypes) { var value = constants.eventTypes[key]; eventTypes[value] = key; } for (var key in constants.eventPhases) { var value = constants.eventPhases[key]; eventPhases[value] = key; } }; media.cacheForUrl = function(url) { return cacheEntriesByKey[url]; }; media.onNetUpdate = function(updates) { updates.forEach(function(update) { var id = update.source.id; if (!cacheEntries[id]) cacheEntries[id] = new media.CacheEntry; switch (eventPhases[update.phase] + '.' + eventTypes[update.type]) { case 'PHASE_BEGIN.DISK_CACHE_ENTRY_IMPL': var key = update.params.key; // Merge this source with anything we already know about this key. if (cacheEntriesByKey[key]) { cacheEntriesByKey[key].merge(cacheEntries[id]); cacheEntries[id] = cacheEntriesByKey[key]; } else { cacheEntriesByKey[key] = cacheEntries[id]; } cacheEntriesByKey[key].key = key; break; case 'PHASE_BEGIN.SPARSE_READ': cacheEntries[id].readBytes(update.params.offset, update.params.buff_len); cacheEntries[id].sparse = true; break; case 'PHASE_BEGIN.SPARSE_WRITE': cacheEntries[id].writeBytes(update.params.offset, update.params.buff_len); cacheEntries[id].sparse = true; break; case 'PHASE_BEGIN.URL_REQUEST_START_JOB': requrestURLs[update.source.id] = update.params.url; break; case 'PHASE_NONE.HTTP_TRANSACTION_READ_RESPONSE_HEADERS': // Record the total size of the file if this was a range request. var range = /content-range:\s*bytes\s*\d+-\d+\/(\d+)/i.exec( update.params.headers); var key = requrestURLs[update.source.id]; delete requrestURLs[update.source.id]; if (range && key) { if (!cacheEntriesByKey[key]) { cacheEntriesByKey[key] = new media.CacheEntry; cacheEntriesByKey[key].key = key; } cacheEntriesByKey[key].size = range[1]; } break; } }); }; media.onRendererTerminated = function(renderId) { util.object.forEach(manager.players_, function(playerInfo, id) { if (playerInfo.properties['render_id'] == renderId) { manager.removePlayer(id); } }); }; media.updateAudioComponent = function(component) { var uniqueComponentId = component.owner_id + ':' + component.component_id; switch (component.status) { case 'closed': manager.removeAudioComponent( component.component_type, uniqueComponentId); break; default: manager.updateAudioComponent( component.component_type, uniqueComponentId, component); break; } }; media.onPlayerOpen = function(id, timestamp) { manager.addPlayer(id, timestamp); }; media.onMediaEvent = function(event) { var source = event.renderer + ':' + event.player; // Although this gets called on every event, there is nothing we can do // because there is no onOpen event. media.onPlayerOpen(source); manager.updatePlayerInfoNoRecord( source, event.ticksMillis, 'render_id', event.renderer); manager.updatePlayerInfoNoRecord( source, event.ticksMillis, 'player_id', event.player); var propertyCount = 0; util.object.forEach(event.params, function(value, key) { key = key.trim(); // These keys get spammed *a lot*, so put them on the display // but don't log list. if (key === 'buffer_start' || key === 'buffer_end' || key === 'buffer_current' || key === 'is_downloading_data') { manager.updatePlayerInfoNoRecord( source, event.ticksMillis, key, value); } else { manager.updatePlayerInfo(source, event.ticksMillis, key, value); } propertyCount += 1; }); if (propertyCount === 0) { manager.updatePlayerInfo( source, event.ticksMillis, 'event', event.type); } }; // |chrome| is not defined during tests. if (window.chrome && window.chrome.send) { chrome.send('getEverything'); } return media; }()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Some utility functions that don't belong anywhere else in the * code. */ var util = (function() { var util = {}; util.object = {}; /** * Calls a function for each element in an object/map/hash. * * @param obj The object to iterate over. * @param f The function to call on every value in the object. F should have * the following arguments: f(value, key, object) where value is the value * of the property, key is the corresponding key, and obj is the object that * was passed in originally. * @param optObj The object use as 'this' within f. */ util.object.forEach = function(obj, f, optObj) { 'use strict'; var key; for (key in obj) { if (obj.hasOwnProperty(key)) { f.call(optObj, obj[key], key, obj); } } }; util.millisecondsToString = function(timeMillis) { function pad(num) { num = num.toString(); if (num.length < 2) { return '0' + num; } return num; } var date = new Date(timeMillis); return pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' + pad(date.getUTCSeconds()) + ' ' + pad((date.getMilliseconds()) % 1000); }; return util; }()); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('media', function() { 'use strict'; /** * This class represents a file cached by net. */ function CacheEntry() { this.read_ = new media.DisjointRangeSet; this.written_ = new media.DisjointRangeSet; this.available_ = new media.DisjointRangeSet; // Set to true when we know the entry is sparse. this.sparse = false; this.key = null; this.size = null; // The <details> element representing this CacheEntry. this.details_ = document.createElement('details'); this.details_.className = 'cache-entry'; this.details_.open = false; // The <details> summary line. It contains a chart of requested file ranges // and the url if we know it. var summary = document.createElement('summary'); this.summaryText_ = document.createTextNode(''); summary.appendChild(this.summaryText_); summary.appendChild(document.createTextNode(' ')); // Controls to modify this CacheEntry. var controls = document.createElement('span'); controls.className = 'cache-entry-controls'; summary.appendChild(controls); summary.appendChild(document.createElement('br')); // A link to clear recorded data from this CacheEntry. var clearControl = document.createElement('a'); clearControl.href = 'javascript:void(0)'; clearControl.onclick = this.clear.bind(this); clearControl.textContent = '(clear entry)'; controls.appendChild(clearControl); this.details_.appendChild(summary); // The canvas for drawing cache writes. this.writeCanvas = document.createElement('canvas'); this.writeCanvas.width = media.BAR_WIDTH; this.writeCanvas.height = media.BAR_HEIGHT; this.details_.appendChild(this.writeCanvas); // The canvas for drawing cache reads. this.readCanvas = document.createElement('canvas'); this.readCanvas.width = media.BAR_WIDTH; this.readCanvas.height = media.BAR_HEIGHT; this.details_.appendChild(this.readCanvas); // A tabular representation of the data in the above canvas. this.detailTable_ = document.createElement('table'); this.detailTable_.className = 'cache-table'; this.details_.appendChild(this.detailTable_); } CacheEntry.prototype = { /** * Mark a range of bytes as read from the cache. * @param {int} start The first byte read. * @param {int} length The number of bytes read. */ readBytes: function(start, length) { start = parseInt(start); length = parseInt(length); this.read_.add(start, start + length); this.available_.add(start, start + length); this.sparse = true; }, /** * Mark a range of bytes as written to the cache. * @param {int} start The first byte written. * @param {int} length The number of bytes written. */ writeBytes: function(start, length) { start = parseInt(start); length = parseInt(length); this.written_.add(start, start + length); this.available_.add(start, start + length); this.sparse = true; }, /** * Merge this CacheEntry with another, merging recorded ranges and flags. * @param {CacheEntry} other The CacheEntry to merge into this one. */ merge: function(other) { this.read_.merge(other.read_); this.written_.merge(other.written_); this.available_.merge(other.available_); this.sparse = this.sparse || other.sparse; this.key = this.key || other.key; this.size = this.size || other.size; }, /** * Clear all recorded ranges from this CacheEntry and redraw this.details_. */ clear: function() { this.read_ = new media.DisjointRangeSet; this.written_ = new media.DisjointRangeSet; this.available_ = new media.DisjointRangeSet; this.generateDetails(); }, /** * Helper for drawCacheReadsToCanvas() and drawCacheWritesToCanvas(). * * Accepts the entries to draw, a canvas fill style, and the canvas to * draw on. */ drawCacheEntriesToCanvas: function(entries, fillStyle, canvas) { // Don't bother drawing anything if we don't know the total size. if (!this.size) { return; } var width = canvas.width; var height = canvas.height; var context = canvas.getContext('2d'); var fileSize = this.size; context.fillStyle = '#aaa'; context.fillRect(0, 0, width, height); function drawRange(start, end) { var left = start / fileSize * width; var right = end / fileSize * width; context.fillRect(left, 0, right - left, height); } context.fillStyle = fillStyle; entries.map(function(start, end) { drawRange(start, end); }); }, /** * Draw cache writes to the given canvas. * * It should consist of a horizontal bar with highlighted sections to * represent which parts of a file have been written to the cache. * * e.g. |xxxxxx----------x| */ drawCacheWritesToCanvas: function(canvas) { this.drawCacheEntriesToCanvas(this.written_, '#00a', canvas); }, /** * Draw cache reads to the given canvas. * * It should consist of a horizontal bar with highlighted sections to * represent which parts of a file have been read from the cache. * * e.g. |xxxxxx----------x| */ drawCacheReadsToCanvas: function(canvas) { this.drawCacheEntriesToCanvas(this.read_, '#0a0', canvas); }, /** * Update this.details_ to contain everything we currently know about * this file. */ generateDetails: function() { function makeElement(tag, content) { var toReturn = document.createElement(tag); toReturn.textContent = content; return toReturn; } this.details_.id = this.key; this.summaryText_.textContent = this.key || 'Unknown File'; this.detailTable_.textContent = ''; var header = document.createElement('thead'); var footer = document.createElement('tfoot'); var body = document.createElement('tbody'); this.detailTable_.appendChild(header); this.detailTable_.appendChild(footer); this.detailTable_.appendChild(body); var headerRow = document.createElement('tr'); headerRow.appendChild(makeElement('th', 'Read From Cache')); headerRow.appendChild(makeElement('th', 'Written To Cache')); header.appendChild(headerRow); var footerRow = document.createElement('tr'); var footerCell = document.createElement('td'); footerCell.textContent = 'Out of ' + (this.size || 'unkown size'); footerCell.setAttribute('colspan', 2); footerRow.appendChild(footerCell); footer.appendChild(footerRow); var read = this.read_.map(function(start, end) { return start + ' - ' + end; }); var written = this.written_.map(function(start, end) { return start + ' - ' + end; }); var length = Math.max(read.length, written.length); for (var i = 0; i < length; i++) { var row = document.createElement('tr'); row.appendChild(makeElement('td', read[i] || '')); row.appendChild(makeElement('td', written[i] || '')); body.appendChild(row); } this.drawCacheWritesToCanvas(this.writeCanvas); this.drawCacheReadsToCanvas(this.readCanvas); }, /** * Render this CacheEntry as a <li>. * @return {HTMLElement} A <li> representing this CacheEntry. */ toListItem: function() { this.generateDetails(); var result = document.createElement('li'); result.appendChild(this.details_); return result; } }; return { CacheEntry: CacheEntry }; }); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('media', function() { /** * This class represents a collection of non-intersecting ranges. Ranges * specified by (start, end) can be added and removed at will. It is used to * record which sections of a media file have been cached, e.g. the first and * last few kB plus several MB in the middle. * * Example usage: * someRange.add(0, 100); // Contains 0-100. * someRange.add(150, 200); // Contains 0-100, 150-200. * someRange.remove(25, 75); // Contains 0-24, 76-100, 150-200. * someRange.add(25, 149); // Contains 0-200. */ function DisjointRangeSet() { this.ranges_ = {}; } DisjointRangeSet.prototype = { /** * Deletes all ranges intersecting with (start ... end) and returns the * extents of the cleared area. * @param {int} start The start of the range to remove. * @param {int} end The end of the range to remove. * @param {int} sloppiness 0 removes only strictly overlapping ranges, and * 1 removes adjacent ones. * @return {Object} The start and end of the newly cleared range. */ clearRange: function(start, end, sloppiness) { var ranges = this.ranges_; var result = {start: start, end: end}; for (var rangeStart in this.ranges_) { rangeEnd = this.ranges_[rangeStart]; // A range intersects another if its start lies within the other range // or vice versa. if ((rangeStart >= start && rangeStart <= (end + sloppiness)) || (start >= rangeStart && start <= (rangeEnd + sloppiness))) { delete ranges[rangeStart]; result.start = Math.min(result.start, rangeStart); result.end = Math.max(result.end, rangeEnd); } } return result; }, /** * Adds a range to this DisjointRangeSet. * Joins adjacent and overlapping ranges together. * @param {int} start The beginning of the range to add, inclusive. * @param {int} end The end of the range to add, inclusive. */ add: function(start, end) { if (end < start) return; // Remove all touching ranges. result = this.clearRange(start, end, 1); // Add back a single contiguous range. this.ranges_[Math.min(start, result.start)] = Math.max(end, result.end); }, /** * Combines a DisjointRangeSet with this one. * @param {DisjointRangeSet} ranges A DisjointRangeSet to be squished into * this one. */ merge: function(other) { var ranges = this; other.forEach(function(start, end) { ranges.add(start, end); }); }, /** * Removes a range from this DisjointRangeSet. * Will split existing ranges if necessary. * @param {int} start The beginning of the range to remove, inclusive. * @param {int} end The end of the range to remove, inclusive. */ remove: function(start, end) { if (end < start) return; // Remove instersecting ranges. result = this.clearRange(start, end, 0); // Add back non-overlapping ranges. if (result.start < start) this.ranges_[result.start] = start - 1; if (result.end > end) this.ranges_[end + 1] = result.end; }, /** * Iterates over every contiguous range in this DisjointRangeSet, calling a * function for each (start, end). * @param {function(int, int)} iterator The function to call on each range. */ forEach: function(iterator) { for (var start in this.ranges_) iterator(start, this.ranges_[start]); }, /** * Maps this DisjointRangeSet to an array by calling a given function on the * start and end of each contiguous range, sorted by start. * @param {function(int, int)} mapper Maps a range to an array element. * @return {Array} An array of each mapper(range). */ map: function(mapper) { var starts = []; for (var start in this.ranges_) starts.push(parseInt(start)); starts.sort(function(a, b) { return a - b; }); var ranges = this.ranges_; var results = starts.map(function(s) { return mapper(s, ranges[s]); }); return results; }, /** * Finds the maximum value present in any of the contained ranges. * @return {int} The maximum value contained by this DisjointRangeSet. */ max: function() { var max = -Infinity; for (var start in this.ranges_) max = Math.max(max, this.ranges_[start]); return max; }, }; return { DisjointRangeSet: DisjointRangeSet }; }); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview A class for keeping track of the details of a player. */ var PlayerInfo = (function() { 'use strict'; /** * A class that keeps track of properties on a media player. * @param id A unique id that can be used to identify this player. */ function PlayerInfo(id) { this.id = id; // The current value of the properties for this player. this.properties = {}; // All of the past (and present) values of the properties. this.pastValues = {}; // Every single event in the order in which they were received. this.allEvents = []; this.lastRendered = 0; this.firstTimestamp_ = -1; } PlayerInfo.prototype = { /** * Adds or set a property on this player. * This is the default logging method as it keeps track of old values. * @param timestamp The time in milliseconds since the Epoch. * @param key A String key that describes the property. * @param value The value of the property. */ addProperty: function(timestamp, key, value) { // The first timestamp that we get will be recorded. // Then, all future timestamps are deltas of that. if (this.firstTimestamp_ === -1) { this.firstTimestamp_ = timestamp; } if (typeof key !== 'string') { throw new Error(typeof key + ' is not a valid key type'); } this.properties[key] = value; if (!this.pastValues[key]) { this.pastValues[key] = []; } var recordValue = { time: timestamp - this.firstTimestamp_, key: key, value: value }; this.pastValues[key].push(recordValue); this.allEvents.push(recordValue); }, /** * Adds or set a property on this player. * Does not keep track of old values. This is better for * values that get spammed repeatedly. * @param timestamp The time in milliseconds since the Epoch. * @param key A String key that describes the property. * @param value The value of the property. */ addPropertyNoRecord: function(timestamp, key, value) { this.addProperty(timestamp, key, value); this.allEvents.pop(); } }; return PlayerInfo; }()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Keeps track of all the existing PlayerInfo and * audio stream objects and is the entry-point for messages from the backend. * * The events captured by Manager (add, remove, update) are relayed * to the clientRenderer which it can choose to use to modify the UI. */ var Manager = (function() { 'use strict'; function Manager(clientRenderer) { this.players_ = {}; this.audioComponents_ = []; this.clientRenderer_ = clientRenderer; } Manager.prototype = { /** * Updates an audio-component. * @param componentType Integer AudioComponent enum value; must match values * from the AudioLogFactory::AudioComponent enum. * @param componentId The unique-id of the audio-component. * @param componentData The actual component data dictionary. */ updateAudioComponent: function(componentType, componentId, componentData) { if (!(componentType in this.audioComponents_)) this.audioComponents_[componentType] = {}; if (!(componentId in this.audioComponents_[componentType])) { this.audioComponents_[componentType][componentId] = componentData; } else { for (var key in componentData) { this.audioComponents_[componentType][componentId][key] = componentData[key]; } } this.clientRenderer_.audioComponentAdded( componentType, this.audioComponents_[componentType]); }, /** * Removes an audio-stream from the manager. * @param id The unique-id of the audio-stream. */ removeAudioComponent: function(componentType, componentId) { if (!(componentType in this.audioComponents_) || !(componentId in this.audioComponents_[componentType])) { return; } delete this.audioComponents_[componentType][componentId]; this.clientRenderer_.audioComponentRemoved( componentType, this.audioComponents_[componentType]); }, /** * Adds a player to the list of players to manage. */ addPlayer: function(id) { if (this.players_[id]) { return; } // Make the PlayerProperty and add it to the mapping this.players_[id] = new PlayerInfo(id); this.clientRenderer_.playerAdded(this.players_, this.players_[id]); }, /** * Attempts to remove a player from the UI. * @param id The ID of the player to remove. */ removePlayer: function(id) { var playerRemoved = this.players_[id]; delete this.players_[id]; this.clientRenderer_.playerRemoved(this.players_, playerRemoved); }, updatePlayerInfoNoRecord: function(id, timestamp, key, value) { if (!this.players_[id]) { console.error('[updatePlayerInfo] Id ' + id + ' does not exist'); return; } this.players_[id].addPropertyNoRecord(timestamp, key, value); this.clientRenderer_.playerUpdated(this.players_, this.players_[id], key, value); }, /** * * @param id The unique ID that identifies the player to be updated. * @param timestamp The timestamp of when the change occured. This * timestamp is *not* normalized. * @param key The name of the property to be added/changed. * @param value The value of the property. */ updatePlayerInfo: function(id, timestamp, key, value) { if (!this.players_[id]) { console.error('[updatePlayerInfo] Id ' + id + ' does not exist'); return; } this.players_[id].addProperty(timestamp, key, value); this.clientRenderer_.playerUpdated(this.players_, this.players_[id], key, value); }, parseVideoCaptureFormat_: function(format) { /** * Example: * * format: * "(160x120)@30.000fps, pixel format: PIXEL_FORMAT_I420, storage: CPU" * * formatDict: * {'resolution':'1280x720', 'fps': '30.00', "storage: "CPU" } */ var parts = format.split(', '); var formatDict = {}; for (var i in parts) { var kv = parts[i].split(': '); if (kv.length == 2) { if (kv[0] == 'pixel format') { // The camera does not actually output I420, // so this info is misleading. continue; } formatDict[kv[0]] = kv[1]; } else { kv = parts[i].split("@"); if (kv.length == 2) { formatDict['resolution'] = kv[0].replace(/[)(]/g, ''); // Round down the FPS to 2 decimals. formatDict['fps'] = parseFloat(kv[1].replace(/fps$/, '')).toFixed(2); } } } return formatDict; }, updateVideoCaptureCapabilities: function(videoCaptureCapabilities) { // Parse the video formats to be structured for the table. for (var i in videoCaptureCapabilities) { for (var j in videoCaptureCapabilities[i]['formats']) { videoCaptureCapabilities[i]['formats'][j] = this.parseVideoCaptureFormat_( videoCaptureCapabilities[i]['formats'][j]); } } // The keys of each device to be shown in order of appearance. var videoCaptureDeviceKeys = ['name','formats','captureApi','id']; this.clientRenderer_.redrawVideoCaptureCapabilities( videoCaptureCapabilities, videoCaptureDeviceKeys); } }; return Manager; }()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var ClientRenderer = (function() { var ClientRenderer = function() { this.playerListElement = document.getElementById('player-list'); this.audioPropertiesTable = document.getElementById('audio-property-table').querySelector('tbody'); this.playerPropertiesTable = document.getElementById('player-property-table').querySelector('tbody'); this.logTable = document.getElementById('log').querySelector('tbody'); this.graphElement = document.getElementById('graphs'); this.audioPropertyName = document.getElementById('audio-property-name'); this.selectedPlayer = null; this.selectedAudioComponentType = null; this.selectedAudioComponentId = null; this.selectedAudioCompontentData = null; this.selectedPlayerLogIndex = 0; this.filterFunction = function() { return true; }; this.filterText = document.getElementById('filter-text'); this.filterText.onkeyup = this.onTextChange_.bind(this); this.bufferCanvas = document.createElement('canvas'); this.bufferCanvas.width = media.BAR_WIDTH; this.bufferCanvas.height = media.BAR_HEIGHT; this.clipboardTextarea = document.getElementById('clipboard-textarea'); var clipboardButtons = document.getElementsByClassName('copy-button'); for (var i = 0; i < clipboardButtons.length; i++) { clipboardButtons[i].onclick = this.copyToClipboard_.bind(this); } this.hiddenKeys = ['component_id', 'component_type', 'owner_id']; // Tell CSS to hide certain content prior to making selections. document.body.classList.add(ClientRenderer.Css_.NO_PLAYERS_SELECTED); document.body.classList.add(ClientRenderer.Css_.NO_COMPONENTS_SELECTED); }; /** * CSS classes added / removed in JS to trigger styling changes. * @private @enum {string} */ ClientRenderer.Css_ = { NO_PLAYERS_SELECTED: 'no-players-selected', NO_COMPONENTS_SELECTED: 'no-components-selected', SELECTABLE_BUTTON: 'selectable-button' }; function removeChildren(element) { while (element.hasChildNodes()) { element.removeChild(element.lastChild); } }; function createSelectableButton(id, groupName, text, select_cb) { // For CSS styling. var radioButton = document.createElement('input'); radioButton.classList.add(ClientRenderer.Css_.SELECTABLE_BUTTON); radioButton.type = 'radio'; radioButton.id = id; radioButton.name = groupName; var buttonLabel = document.createElement('label'); buttonLabel.classList.add(ClientRenderer.Css_.SELECTABLE_BUTTON); buttonLabel.setAttribute('for', radioButton.id); buttonLabel.appendChild(document.createTextNode(text)); var fragment = document.createDocumentFragment(); fragment.appendChild(radioButton); fragment.appendChild(buttonLabel); // Listen to 'change' rather than 'click' to keep styling in sync with // button behavior. radioButton.addEventListener('change', function() { select_cb(); }); return fragment; }; function selectSelectableButton(id) { var element = document.getElementById(id); if (!element) { console.error('failed to select button with id: ' + id); return; } element.checked = true; } ClientRenderer.prototype = { /** * Called when an audio component is added to the collection. * @param componentType Integer AudioComponent enum value; must match values * from the AudioLogFactory::AudioComponent enum. * @param components The entire map of components (name -> dict). */ audioComponentAdded: function(componentType, components) { this.redrawAudioComponentList_(componentType, components); // Redraw the component if it's currently selected. if (this.selectedAudioComponentType == componentType && this.selectedAudioComponentId && this.selectedAudioComponentId in components) { // TODO(chcunningham): This path is used both for adding and updating // the components. Split this up to have a separate update method. // At present, this selectAudioComponent call is key to *updating* the // the property table for existing audio components. this.selectAudioComponent_( componentType, this.selectedAudioComponentId, components[this.selectedAudioComponentId]); } }, /** * Called when an audio component is removed from the collection. * @param componentType Integer AudioComponent enum value; must match values * from the AudioLogFactory::AudioComponent enum. * @param components The entire map of components (name -> dict). */ audioComponentRemoved: function(componentType, components) { this.redrawAudioComponentList_(componentType, components); }, /** * Called when a player is added to the collection. * @param players The entire map of id -> player. * @param player_added The player that is added. */ playerAdded: function(players, playerAdded) { this.redrawPlayerList_(players); }, /** * Called when a player is removed from the collection. * @param players The entire map of id -> player. * @param playerRemoved The player that was removed. */ playerRemoved: function(players, playerRemoved) { if (playerRemoved === this.selectedPlayer) { removeChildren(this.playerPropertiesTable); removeChildren(this.logTable); removeChildren(this.graphElement); document.body.classList.add(ClientRenderer.Css_.NO_PLAYERS_SELECTED); } this.redrawPlayerList_(players); }, /** * Called when a property on a player is changed. * @param players The entire map of id -> player. * @param player The player that had its property changed. * @param key The name of the property that was changed. * @param value The new value of the property. */ playerUpdated: function(players, player, key, value) { if (player === this.selectedPlayer) { this.drawProperties_(player.properties, this.playerPropertiesTable); this.drawLog_(); this.drawGraphs_(); } if (key === 'name' || key === 'url') { this.redrawPlayerList_(players); } }, createVideoCaptureFormatTable: function(formats) { if (!formats || formats.length == 0) return document.createTextNode('No formats'); var table = document.createElement('table'); var thead = document.createElement('thead'); var theadRow = document.createElement('tr'); for (var key in formats[0]) { var th = document.createElement('th'); th.appendChild(document.createTextNode(key)); theadRow.appendChild(th); } thead.appendChild(theadRow); table.appendChild(thead); var tbody = document.createElement('tbody'); for (var i=0; i < formats.length; ++i) { var tr = document.createElement('tr') for (var key in formats[i]) { var td = document.createElement('td'); td.appendChild(document.createTextNode(formats[i][key])); tr.appendChild(td); } tbody.appendChild(tr); } table.appendChild(tbody); table.classList.add('video-capture-formats-table'); return table; }, redrawVideoCaptureCapabilities: function(videoCaptureCapabilities, keys) { var copyButtonElement = document.getElementById('video-capture-capabilities-copy-button'); copyButtonElement.onclick = function() { window.prompt('Copy to clipboard: Ctrl+C, Enter', JSON.stringify(videoCaptureCapabilities)) } var videoTableBodyElement = document.getElementById('video-capture-capabilities-tbody'); removeChildren(videoTableBodyElement); for (var component in videoCaptureCapabilities) { var tableRow = document.createElement('tr'); var device = videoCaptureCapabilities[ component ]; for (var i in keys) { var value = device[keys[i]]; var tableCell = document.createElement('td'); var cellElement; if ((typeof value) == (typeof [])) { cellElement = this.createVideoCaptureFormatTable(value); } else { cellElement = document.createTextNode( ((typeof value) == 'undefined') ? 'n/a' : value); } tableCell.appendChild(cellElement) tableRow.appendChild(tableCell); } videoTableBodyElement.appendChild(tableRow); } }, getAudioComponentName_ : function(componentType, id) { var baseName; switch (componentType) { case 0: case 1: baseName = 'Controller'; break; case 2: baseName = 'Stream'; break; default: baseName = 'UnknownType' console.error('Unrecognized component type: ' + componentType); break; } return baseName + ' ' + id; }, getListElementForAudioComponent_ : function(componentType) { var listElement; switch (componentType) { case 0: listElement = document.getElementById( 'audio-input-controller-list'); break; case 1: listElement = document.getElementById( 'audio-output-controller-list'); break; case 2: listElement = document.getElementById( 'audio-output-stream-list'); break; default: console.error('Unrecognized component type: ' + componentType); listElement = null; break; } return listElement; }, redrawAudioComponentList_: function(componentType, components) { // Group name imposes rule that only one component can be selected // (and have its properties displayed) at a time. var buttonGroupName = 'audio-components'; var listElement = this.getListElementForAudioComponent_(componentType); if (!listElement) { console.error('Failed to find list element for component type: ' + componentType); return; } var fragment = document.createDocumentFragment(); for (id in components) { var li = document.createElement('li'); var button_cb = this.selectAudioComponent_.bind( this, componentType, id, components[id]); var friendlyName = this.getAudioComponentName_(componentType, id); li.appendChild(createSelectableButton( id, buttonGroupName, friendlyName, button_cb)); fragment.appendChild(li); } removeChildren(listElement); listElement.appendChild(fragment); if (this.selectedAudioComponentType && this.selectedAudioComponentType == componentType && this.selectedAudioComponentId in components) { // Re-select the selected component since the button was just recreated. selectSelectableButton(this.selectedAudioComponentId); } }, selectAudioComponent_: function( componentType, componentId, componentData) { document.body.classList.remove( ClientRenderer.Css_.NO_COMPONENTS_SELECTED); this.selectedAudioComponentType = componentType; this.selectedAudioComponentId = componentId; this.selectedAudioCompontentData = componentData; this.drawProperties_(componentData, this.audioPropertiesTable); removeChildren(this.audioPropertyName); this.audioPropertyName.appendChild(document.createTextNode( this.getAudioComponentName_(componentType, componentId))); }, redrawPlayerList_: function(players) { // Group name imposes rule that only one component can be selected // (and have its properties displayed) at a time. var buttonGroupName = 'player-buttons'; var fragment = document.createDocumentFragment(); for (id in players) { var player = players[id]; var usableName = player.properties.name || player.properties.url || 'Player ' + player.id; var li = document.createElement('li'); var button_cb = this.selectPlayer_.bind(this, player); li.appendChild(createSelectableButton( id, buttonGroupName, usableName, button_cb)); fragment.appendChild(li); } removeChildren(this.playerListElement); this.playerListElement.appendChild(fragment); if (this.selectedPlayer && this.selectedPlayer.id in players) { // Re-select the selected player since the button was just recreated. selectSelectableButton(this.selectedPlayer.id); } }, selectPlayer_: function(player) { document.body.classList.remove(ClientRenderer.Css_.NO_PLAYERS_SELECTED); this.selectedPlayer = player; this.selectedPlayerLogIndex = 0; this.selectedAudioComponentType = null; this.selectedAudioComponentId = null; this.selectedAudioCompontentData = null; this.drawProperties_(player.properties, this.playerPropertiesTable); removeChildren(this.logTable); removeChildren(this.graphElement); this.drawLog_(); this.drawGraphs_(); }, drawProperties_: function(propertyMap, propertiesTable) { removeChildren(propertiesTable); var sortedKeys = Object.keys(propertyMap).sort(); for (var i = 0; i < sortedKeys.length; ++i) { var key = sortedKeys[i]; if (this.hiddenKeys.indexOf(key) >= 0) continue; var value = propertyMap[key]; var row = propertiesTable.insertRow(-1); var keyCell = row.insertCell(-1); var valueCell = row.insertCell(-1); keyCell.appendChild(document.createTextNode(key)); valueCell.appendChild(document.createTextNode(value)); } }, appendEventToLog_: function(event) { if (this.filterFunction(event.key)) { var row = this.logTable.insertRow(-1); var timestampCell = row.insertCell(-1); timestampCell.classList.add('timestamp'); timestampCell.appendChild(document.createTextNode( util.millisecondsToString(event.time))); row.insertCell(-1).appendChild(document.createTextNode(event.key)); row.insertCell(-1).appendChild(document.createTextNode(event.value)); } }, drawLog_: function() { var toDraw = this.selectedPlayer.allEvents.slice( this.selectedPlayerLogIndex); toDraw.forEach(this.appendEventToLog_.bind(this)); this.selectedPlayerLogIndex = this.selectedPlayer.allEvents.length; }, drawGraphs_: function() { function addToGraphs(name, graph, graphElement) { var li = document.createElement('li'); li.appendChild(graph); li.appendChild(document.createTextNode(name)); graphElement.appendChild(li); } var url = this.selectedPlayer.properties.url; if (!url) { return; } var cache = media.cacheForUrl(url); var player = this.selectedPlayer; var props = player.properties; var cacheExists = false; var bufferExists = false; if (props['buffer_start'] !== undefined && props['buffer_current'] !== undefined && props['buffer_end'] !== undefined && props['total_bytes'] !== undefined) { this.drawBufferGraph_(props['buffer_start'], props['buffer_current'], props['buffer_end'], props['total_bytes']); bufferExists = true; } if (cache) { if (player.properties['total_bytes']) { cache.size = Number(player.properties['total_bytes']); } cache.generateDetails(); cacheExists = true; } if (!this.graphElement.hasChildNodes()) { if (bufferExists) { addToGraphs('buffer', this.bufferCanvas, this.graphElement); } if (cacheExists) { addToGraphs('cache read', cache.readCanvas, this.graphElement); addToGraphs('cache write', cache.writeCanvas, this.graphElement); } } }, drawBufferGraph_: function(start, current, end, size) { var ctx = this.bufferCanvas.getContext('2d'); var width = this.bufferCanvas.width; var height = this.bufferCanvas.height; ctx.fillStyle = '#aaa'; ctx.fillRect(0, 0, width, height); var scale_factor = width / size; var left = start * scale_factor; var middle = current * scale_factor; var right = end * scale_factor; ctx.fillStyle = '#a0a'; ctx.fillRect(left, 0, middle - left, height); ctx.fillStyle = '#aa0'; ctx.fillRect(middle, 0, right - middle, height); }, copyToClipboard_: function() { if (!this.selectedPlayer && !this.selectedAudioCompontentData) { return; } var properties = this.selectedAudioCompontentData || this.selectedPlayer.properties; var stringBuffer = []; for (var key in properties) { var value = properties[key]; stringBuffer.push(key.toString()); stringBuffer.push(': '); stringBuffer.push(value.toString()); stringBuffer.push('\n'); } this.clipboardTextarea.value = stringBuffer.join(''); this.clipboardTextarea.classList.remove('hiddenClipboard'); this.clipboardTextarea.focus(); this.clipboardTextarea.select(); // Hide the clipboard element when it loses focus. this.clipboardTextarea.onblur = function(event) { setTimeout(function(element) { event.target.classList.add('hiddenClipboard'); }, 0); }; }, onTextChange_: function(event) { var text = this.filterText.value.toLowerCase(); var parts = text.split(',').map(function(part) { return part.trim(); }).filter(function(part) { return part.trim().length > 0; }); this.filterFunction = function(text) { text = text.toLowerCase(); return parts.length === 0 || parts.some(function(part) { return text.indexOf(part) != -1; }); }; if (this.selectedPlayer) { removeChildren(this.logTable); this.selectedPlayerLogIndex = 0; this.drawLog_(); } }, }; return ClientRenderer; })(); media.initialize(new Manager(new ClientRenderer())); cr.ui.decorate('tabbox', cr.ui.TabBox); <!doctype html> <html> <!-- Copyright 2015 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <head> <meta charset="utf-8"> <title>Network errors</title> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="chrome://resources/css/roboto.css"> <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css"> <style>/* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { margin: 10px 10px 30px; } ul { line-height: 1.7em; padding-left: 15px; } a { word-break: break-word; }</style> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="strings.js"></script> <script src="network_errors_listing.js"></script> </head> <body> <h1>Network errors</h1> <div id="pages" class="list"></div> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html>// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('errorCodes', function() { 'use strict'; /** * Generate the page content. * @param {Array.<Object>} errorCodes Error codes array consisting of a * numerical error ID and error code string. */ function listErrorCodes(errorCodes) { var errorPageUrl = 'chrome://network-error/'; var errorCodesList = document.createElement('ul'); for (var i = 0; i < errorCodes.length; i++) { var listEl = document.createElement('li'); var errorCodeLinkEl = document.createElement('a'); errorCodeLinkEl.href = errorPageUrl + errorCodes[i].errorId; errorCodeLinkEl.textContent = errorCodes[i].errorCode + ' (' + errorCodes[i].errorId + ')'; listEl.appendChild(errorCodeLinkEl); errorCodesList.appendChild(listEl); } $('pages').appendChild(errorCodesList); } function initialize() { var xhr = new XMLHttpRequest(); xhr.open('GET', 'network-error-data.json'); xhr.addEventListener('load', function(e) { if (xhr.status === 200) { try { var data = JSON.parse(xhr.responseText); listErrorCodes(data['errorCodes']); } catch (e) { $('pages').innerText = 'Could not parse the error codes data. ' + 'Try reloading the page.'; } } }); xhr.send(); } return { initialize: initialize }; }); document.addEventListener('DOMContentLoaded', errorCodes.initialize);/* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { margin: 10px 10px 30px; } ul { line-height: 1.7em; padding-left: 15px; } a { word-break: break-word; }<!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title>ServiceWorker</title> <link rel="stylesheet" href="chrome://resources/css/tabs.css"> <link rel="stylesheet" href="chrome://resources/css/widgets.css"> <style>/* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .serviceworker-summary { background-color: rgb(235, 239, 249); border-top: 1px solid rgb(156, 194, 239); margin-bottom: 6px; margin-top: 12px; padding: 3px; font-weight: bold; } .serviceworker-item { margin-bottom: 15px; margin-top: 6px; position: relative; } .serviceworker-registration { padding: 5px; } .serviceworker-scope { color: rgb(85, 102, 221); display: inline-block; padding-bottom: 1px; padding-top: 4px; text-decoration: none; white-space: nowrap; } .serviceworker-version { padding-bottom: 3px; padding-left: 10px; } .controls a { -webkit-margin-end: 16px; color: #777; } </style> </head> <body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <!-- templates --> <div style="display:none"> <div id="serviceworker-version-template" class="serviceworker-version"> <div class="serviceworker-status"> <span>Installation Status:</span> <span jscontent="$this.status"></span> </div> <div class="serviceworker-running-status"> <span>Running Status:</span> <span jscontent="$this.running_status"></span> </div> <div class="serviceworker-script_url"> <span>Script:</span> <span jscontent="$this.script_url"></span> </div> <div class="serviceworker-vid"> <span>Version ID:</span> <span jscontent="$this.version_id"></span> </div> <div class="serviceworker-pid"> <span>Renderer process ID:</span> <span jscontent="$this.process_id"></span> </div> <div class="serviceworker-tid"> <span>Renderer thread ID:</span> <span jscontent="$this.thread_id"></span> </div> <div class="serviceworker-rid"> <span>DevTools agent route ID:</span> <span jscontent="$this.devtools_agent_route_id"></span> </div> <div> <div>Log:</div> <textarea class="serviceworker-log" jsvalues=".partition_id:$partition_id;.version_id:$this.version_id" rows="3" cols="120" readonly jscontent="$this.log"></textarea> </div> <div class="worker-controls"> <button href="#" class="stop" jsvalues=".cmdArgs:{partition_id:$partition_id,version_id:version_id}" jsdisplay="$this.running_status == 'RUNNING'">Stop</button> <button href="#" class="push" jsvalues=".cmdArgs:{partition_id:$partition_id,version_id:version_id}" jsdisplay="$this.running_status == 'RUNNING'">Push</button> <button href="#" class="inspect" jsvalues=".cmdArgs:{process_id:process_id,devtools_agent_route_id:devtools_agent_route_id}" jsdisplay="$this.running_status == 'RUNNING'">Inspect</button> <span class="operation-status" style="display: none">Running...</span> </div> </div> <div id="serviceworker-registration-template" class="serviceworker-registration"> <div class="serviceworker-scope"> <span>Scope:</span> <span jscontent="scope"></span> </div> <div class="serviceworker-rid"> <span>Registration ID:</span> <span jscontent="registration_id"></span> <span jsdisplay="$this.unregistered">(unregistered)</span> </div> <div jsselect="$this.active"> Active worker: <div transclude="serviceworker-version-template"></div> </div> <div jsselect="$this.waiting"> Waiting worker: <div transclude="serviceworker-version-template"></div> </div> <div class="registration-controls" jsdisplay="!$this.unregistered"> <button href="#" class="unregister" jsvalues=".cmdArgs:{partition_id:$partition_id,scope:scope}"> Unregister </button> <button href="#" class="start" jsdisplay="$this.active.running_status != 'RUNNING'" jsvalues=".cmdArgs:{partition_id:$partition_id,scope:scope}"> Start </button> <span class="operation-status" style="display: none">Running...</span> </div> </div> <div id="serviceworker-list-template" jsvalues="$partition_id:$this.partition_id;.partition_id:$this.partition_id" jsdisplay="$this.stored_registrations.length + $this.unregistered_registrations.length + $this.unregistered_versions.length > 0"> <div class="serviceworker-summary"> <span jsdisplay="$this.partition_path"> <span>Registrations in: </span> <span jscontent="$this.partition_path"></span> </span> <span jsdisplay="!$this.partition_path"> <span>Registrations: Incognito </span> </span> <span jscontent="'(' + $this.stored_registrations.length + ')'"></span> </div> <div class="serviceworker-item" jsselect="$this.stored_registrations"> <div transclude="serviceworker-registration-template"></div> </div> <div class="serviceworker-item" jsselect="$this.unregistered_registrations"> <div transclude="serviceworker-registration-template"></div> </div> <div class="serviceworker-item" jsselect="$this.unregistered_versions"> Unregistered worker: <div transclude="serviceworker-version-template"></div> </div> </div> <div id="serviceworker-options-template"> <div class="checkbox"> <label> <input type="checkbox" class="debug_on_start" jsvalues=".checked:$this.debug_on_start"> <span> Open DevTools window and pause JavaScript execution on Service Worker startup for debugging. </span> </label> </div> </div> </div> <h1>ServiceWorker</h1> <div class="content"> <div id="serviceworker-options"></div> <div id="serviceworker-list"></div> </div> <script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/cr.js"></script> <script src="serviceworker_internals.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> <script src="strings.js"></script> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html> // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('serviceworker', function() { 'use strict'; function initialize() { update(); } function update() { chrome.send('GetOptions'); chrome.send('getAllRegistrations'); } function onOptions(options) { var template; var container = $('serviceworker-options'); if (container.childNodes) { template = container.childNodes[0]; } if (!template) { template = jstGetTemplate('serviceworker-options-template'); container.appendChild(template); } jstProcess(new JsEvalContext(options), template); var inputs = container.querySelectorAll('input[type=\'checkbox\']'); for (var i = 0; i < inputs.length; ++i) { if (!inputs[i].hasClickEvent) { inputs[i].addEventListener('click', (function(event) { chrome.send('SetOption', [event.target.className, event.target.checked]); }).bind(this), false); inputs[i].hasClickEvent = true; } } } function progressNodeFor(link) { return link.parentNode.querySelector('.operation-status'); } // All commands are completed with 'onOperationComplete'. var COMMANDS = ['stop', 'push', 'inspect', 'unregister', 'start']; function commandHandler(command) { return function(event) { var link = event.target; progressNodeFor(link).style.display = 'inline'; sendCommand(command, link.cmdArgs, (function(status) { progressNodeFor(link).style.display = 'none'; }).bind(null, link)); return false; }; }; var commandCallbacks = []; function sendCommand(command, args, callback) { var callbackId = 0; while (callbackId in commandCallbacks) { callbackId++; } commandCallbacks[callbackId] = callback; chrome.send(command, [callbackId, args]); } // Fired from the backend after the command call has completed. function onOperationComplete(status, callbackId) { var callback = commandCallbacks[callbackId]; delete commandCallbacks[callbackId]; if (callback) { callback(status); } update(); } var allLogMessages = {}; // Set log for a worker version. function fillLogForVersion(container, partition_id, version) { if (!version) { return; } if (!(partition_id in allLogMessages)) { allLogMessages[partition_id] = {}; } var logMessages = allLogMessages[partition_id]; if (version.version_id in logMessages) { version.log = logMessages[version.version_id]; } else { version.log = ''; } var logAreas = container.querySelectorAll('textarea.serviceworker-log'); for (var i = 0; i < logAreas.length; ++i) { var logArea = logAreas[i]; if (logArea.partition_id == partition_id && logArea.version_id == version.version_id) { logArea.value = version.log; } } } // Get the unregistered workers. // |unregistered_registrations| will be filled with the registrations which // are in |live_registrations| but not in |stored_registrations|. // |unregistered_versions| will be filled with the versions which // are in |live_versions| but not in |stored_registrations| nor in // |live_registrations|. function getUnregisteredWorkers(stored_registrations, live_registrations, live_versions, unregistered_registrations, unregistered_versions) { var registration_id_set = {}; var version_id_set = {}; stored_registrations.forEach(function(registration) { registration_id_set[registration.registration_id] = true; }); [stored_registrations, live_registrations].forEach(function(registrations) { registrations.forEach(function(registration) { [registration.active, registration.waiting].forEach(function(version) { if (version) { version_id_set[version.version_id] = true; } }); }); }); live_registrations.forEach(function(registration) { if (!registration_id_set[registration.registration_id]) { registration.unregistered = true; unregistered_registrations.push(registration); } }); live_versions.forEach(function(version) { if (!version_id_set[version.version_id]) { unregistered_versions.push(version); } }); } // Fired once per partition from the backend. function onPartitionData(live_registrations, live_versions, stored_registrations, partition_id, partition_path) { var unregistered_registrations = []; var unregistered_versions = []; getUnregisteredWorkers(stored_registrations, live_registrations, live_versions, unregistered_registrations, unregistered_versions); var template; var container = $('serviceworker-list'); // Existing templates are keyed by partition_id. This allows // the UI to be updated in-place rather than refreshing the // whole page. for (var i = 0; i < container.childNodes.length; ++i) { if (container.childNodes[i].partition_id == partition_id) { template = container.childNodes[i]; } } // This is probably the first time we're loading. if (!template) { template = jstGetTemplate('serviceworker-list-template'); container.appendChild(template); } var fillLogFunc = fillLogForVersion.bind(this, container, partition_id); stored_registrations.forEach(function(registration) { [registration.active, registration.waiting].forEach(fillLogFunc); }); unregistered_registrations.forEach(function(registration) { [registration.active, registration.waiting].forEach(fillLogFunc); }); unregistered_versions.forEach(fillLogFunc); jstProcess(new JsEvalContext({ stored_registrations: stored_registrations, unregistered_registrations: unregistered_registrations, unregistered_versions: unregistered_versions, partition_id: partition_id, partition_path: partition_path}), template); for (var i = 0; i < COMMANDS.length; ++i) { var handler = commandHandler(COMMANDS[i]); var links = container.querySelectorAll('button.' + COMMANDS[i]); for (var j = 0; j < links.length; ++j) { if (!links[j].hasClickEvent) { links[j].addEventListener('click', handler, false); links[j].hasClickEvent = true; } } } } function onRunningStateChanged(partition_id, version_id) { update(); } function onErrorReported(partition_id, version_id, process_id, thread_id, error_info) { outputLogMessage(partition_id, version_id, 'Error: ' + JSON.stringify(error_info) + '\n'); } function onConsoleMessageReported(partition_id, version_id, process_id, thread_id, message) { outputLogMessage(partition_id, version_id, 'Console: ' + JSON.stringify(message) + '\n'); } function onVersionStateChanged(partition_id, version_id) { update(); } function onRegistrationStored(scope) { update(); } function onRegistrationDeleted(scope) { update(); } function outputLogMessage(partition_id, version_id, message) { if (!(partition_id in allLogMessages)) { allLogMessages[partition_id] = {}; } var logMessages = allLogMessages[partition_id]; if (version_id in logMessages) { logMessages[version_id] += message; } else { logMessages[version_id] = message; } var logAreas = document.querySelectorAll('textarea.serviceworker-log'); for (var i = 0; i < logAreas.length; ++i) { var logArea = logAreas[i]; if (logArea.partition_id == partition_id && logArea.version_id == version_id) { logArea.value += message; } } } return { initialize: initialize, onOptions: onOptions, onOperationComplete: onOperationComplete, onPartitionData: onPartitionData, onRunningStateChanged: onRunningStateChanged, onErrorReported: onErrorReported, onConsoleMessageReported: onConsoleMessageReported, onVersionStateChanged: onVersionStateChanged, onRegistrationStored: onRegistrationStored, onRegistrationDeleted: onRegistrationDeleted, }; }); document.addEventListener('DOMContentLoaded', serviceworker.initialize); /* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .serviceworker-summary { background-color: rgb(235, 239, 249); border-top: 1px solid rgb(156, 194, 239); margin-bottom: 6px; margin-top: 12px; padding: 3px; font-weight: bold; } .serviceworker-item { margin-bottom: 15px; margin-top: 6px; position: relative; } .serviceworker-registration { padding: 5px; } .serviceworker-scope { color: rgb(85, 102, 221); display: inline-block; padding-bottom: 1px; padding-top: 4px; text-decoration: none; white-space: nowrap; } .serviceworker-version { padding-bottom: 3px; padding-left: 10px; } .controls a { -webkit-margin-end: 16px; color: #777; } <!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title>WebRTC Internals</title> <style>/* Copyright (c) 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .peer-connection-dump-root { font-size: 0.8em; padding-bottom: 3px; } .update-log-container { float: left; width: 50em; overflow: auto; } .ssrc-info-block { color: #999; font-size: 0.8em; } .stats-graph-container { clear: both; margin: 0.5em 0 0.5em 0; } .stats-graph-sub-container { float: left; margin: 0.5em; } .stats-graph-sub-container > div { float: left; } .stats-graph-sub-container > div:first-child { float: none; } .stats-table-container { float: left; padding: 0 0 0 0; width: 50em; overflow: auto; } .stats-table-container >div:first-child { font-size: 0.8em; font-weight: bold; text-align: center; padding: 0 0 1em 0; } .stats-table-active-connection { font-weight: bold; } body { font-family: 'Lucida Grande', sans-serif; } table { border: none; margin: 0 1em 1em 0; } td { border: none; font-size: 0.8em; padding: 0 1em 0.5em 0; min-width: 10em; word-break: break-all; } table > tr { vertical-align: top; } th { border: none; font-size: 0.8em; padding: 0 0 0.5em 0; } .tab-head { background-color: rgb(220, 220, 220); margin: 10px 2px 0 2px; text-decoration: underline; cursor: pointer; display: inline-block; overflow: hidden; width: 20em; height: 3em; } .active-tab-head { background-color: turquoise; font-weight: bold; } .tab-body { border: 1px solid turquoise; border-top-width: 3px; padding: 0 10px 500px 10px; display: none; } .active-tab-body { display: block; } .user-media-request-div-class { background-color: lightgray; margin: 10px 0 10px 0; } .user-media-request-div-class > div { margin: 5px 0 5px 0; } .audio-recordings-info { max-width: 60em; } </style> <script src="chrome://resources/js/util.js"></script> <script src="webrtc_internals.js"></script> </head> <body> <p id='content-root'> </p> </body> </html> // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var USER_MEDIA_TAB_ID = 'user-media-tab-id'; var tabView = null; var ssrcInfoManager = null; var peerConnectionUpdateTable = null; var statsTable = null; var dumpCreator = null; /** A map from peer connection id to the PeerConnectionRecord. */ var peerConnectionDataStore = {}; /** A list of getUserMedia requests. */ var userMediaRequests = []; /** A simple class to store the updates and stats data for a peer connection. */ var PeerConnectionRecord = (function() { /** @constructor */ function PeerConnectionRecord() { /** @private */ this.record_ = { constraints: {}, rtcConfiguration: [], stats: {}, updateLog: [], url: '', }; }; PeerConnectionRecord.prototype = { /** @override */ toJSON: function() { return this.record_; }, /** * Adds the initilization info of the peer connection. * @param {string} url The URL of the web page owning the peer connection. * @param {Array} rtcConfiguration * @param {!Object} constraints Media constraints. */ initialize: function(url, rtcConfiguration, constraints) { this.record_.url = url; this.record_.rtcConfiguration = rtcConfiguration; this.record_.constraints = constraints; }, /** * @param {string} dataSeriesId The TimelineDataSeries identifier. * @return {!TimelineDataSeries} */ getDataSeries: function(dataSeriesId) { return this.record_.stats[dataSeriesId]; }, /** * @param {string} dataSeriesId The TimelineDataSeries identifier. * @param {!TimelineDataSeries} dataSeries The TimelineDataSeries to set to. */ setDataSeries: function(dataSeriesId, dataSeries) { this.record_.stats[dataSeriesId] = dataSeries; }, /** * @param {!Object} update The object contains keys "time", "type", and * "value". */ addUpdate: function(update) { var time = new Date(parseFloat(update.time)); this.record_.updateLog.push({ time: time.toLocaleString(), type: update.type, value: update.value, }); }, }; return PeerConnectionRecord; })(); // The maximum number of data points bufferred for each stats. Old data points // will be shifted out when the buffer is full. var MAX_STATS_DATA_POINT_BUFFER_SIZE = 1000; // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * A TabView provides the ability to create tabs and switch between tabs. It's * responsible for creating the DOM and managing the visibility of each tab. * The first added tab is active by default and the others hidden. */ var TabView = (function() { 'use strict'; /** * @constructor * @param {Element} root The root DOM element containing the tabs. */ function TabView(root) { this.root_ = root; this.ACTIVE_TAB_HEAD_CLASS_ = 'active-tab-head'; this.ACTIVE_TAB_BODY_CLASS_ = 'active-tab-body'; this.TAB_HEAD_CLASS_ = 'tab-head'; this.TAB_BODY_CLASS_ = 'tab-body'; /** * A mapping for an id to the tab elements. * @type {!Object<!TabDom>} * @private */ this.tabElements_ = {}; this.headBar_ = null; this.activeTabId_ = null; this.initializeHeadBar_(); } // Creates a simple object containing the tab head and body elements. function TabDom(h, b) { this.head = h; this.body = b; } TabView.prototype = { /** * Adds a tab with the specified id and title. * @param {string} id * @param {string} title * @return {!Element} The tab body element. */ addTab: function(id, title) { if (this.tabElements_[id]) throw 'Tab already exists: ' + id; var head = document.createElement('span'); head.className = this.TAB_HEAD_CLASS_; head.textContent = title; head.title = title; this.headBar_.appendChild(head); head.addEventListener('click', this.switchTab_.bind(this, id)); var body = document.createElement('div'); body.className = this.TAB_BODY_CLASS_; body.id = id; this.root_.appendChild(body); this.tabElements_[id] = new TabDom(head, body); if (!this.activeTabId_) { this.switchTab_(id); } return this.tabElements_[id].body; }, /** Removes the tab. @param {string} id */ removeTab: function(id) { if (!this.tabElements_[id]) return; this.tabElements_[id].head.parentNode.removeChild( this.tabElements_[id].head); this.tabElements_[id].body.parentNode.removeChild( this.tabElements_[id].body); delete this.tabElements_[id]; if (this.activeTabId_ == id) { this.switchTab_(Object.keys(this.tabElements_)[0]); } }, /** * Switches the specified tab into view. * * @param {string} activeId The id the of the tab that should be switched to * active state. * @private */ switchTab_: function(activeId) { if (this.activeTabId_ && this.tabElements_[this.activeTabId_]) { this.tabElements_[this.activeTabId_].body.classList.remove( this.ACTIVE_TAB_BODY_CLASS_); this.tabElements_[this.activeTabId_].head.classList.remove( this.ACTIVE_TAB_HEAD_CLASS_); } this.activeTabId_ = activeId; if (this.tabElements_[activeId]) { this.tabElements_[activeId].body.classList.add( this.ACTIVE_TAB_BODY_CLASS_); this.tabElements_[activeId].head.classList.add( this.ACTIVE_TAB_HEAD_CLASS_); } }, /** Initializes the bar containing the tab heads. */ initializeHeadBar_: function() { this.headBar_ = document.createElement('div'); this.root_.appendChild(this.headBar_); this.headBar_.style.textAlign = 'center'; }, }; return TabView; })(); // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * A TimelineDataSeries collects an ordered series of (time, value) pairs, * and converts them to graph points. It also keeps track of its color and * current visibility state. * It keeps MAX_STATS_DATA_POINT_BUFFER_SIZE data points at most. Old data * points will be dropped when it reaches this size. */ var TimelineDataSeries = (function() { 'use strict'; /** * @constructor */ function TimelineDataSeries() { // List of DataPoints in chronological order. this.dataPoints_ = []; // Default color. Should always be overridden prior to display. this.color_ = 'red'; // Whether or not the data series should be drawn. this.isVisible_ = true; this.cacheStartTime_ = null; this.cacheStepSize_ = 0; this.cacheValues_ = []; } TimelineDataSeries.prototype = { /** * @override */ toJSON: function() { if (this.dataPoints_.length < 1) return {}; var values = []; for (var i = 0; i < this.dataPoints_.length; ++i) { values.push(this.dataPoints_[i].value); } return { startTime: this.dataPoints_[0].time, endTime: this.dataPoints_[this.dataPoints_.length - 1].time, values: JSON.stringify(values), }; }, /** * Adds a DataPoint to |this| with the specified time and value. * DataPoints are assumed to be received in chronological order. */ addPoint: function(timeTicks, value) { var time = new Date(timeTicks); this.dataPoints_.push(new DataPoint(time, value)); if (this.dataPoints_.length > MAX_STATS_DATA_POINT_BUFFER_SIZE) this.dataPoints_.shift(); }, isVisible: function() { return this.isVisible_; }, show: function(isVisible) { this.isVisible_ = isVisible; }, getColor: function() { return this.color_; }, setColor: function(color) { this.color_ = color; }, getCount: function() { return this.dataPoints_.length; }, /** * Returns a list containing the values of the data series at |count| * points, starting at |startTime|, and |stepSize| milliseconds apart. * Caches values, so showing/hiding individual data series is fast. */ getValues: function(startTime, stepSize, count) { // Use cached values, if we can. if (this.cacheStartTime_ == startTime && this.cacheStepSize_ == stepSize && this.cacheValues_.length == count) { return this.cacheValues_; } // Do all the work. this.cacheValues_ = this.getValuesInternal_(startTime, stepSize, count); this.cacheStartTime_ = startTime; this.cacheStepSize_ = stepSize; return this.cacheValues_; }, /** * Returns the cached |values| in the specified time period. */ getValuesInternal_: function(startTime, stepSize, count) { var values = []; var nextPoint = 0; var currentValue = 0; var time = startTime; for (var i = 0; i < count; ++i) { while (nextPoint < this.dataPoints_.length && this.dataPoints_[nextPoint].time < time) { currentValue = this.dataPoints_[nextPoint].value; ++nextPoint; } values[i] = currentValue; time += stepSize; } return values; } }; /** * A single point in a data series. Each point has a time, in the form of * milliseconds since the Unix epoch, and a numeric value. * @constructor */ function DataPoint(time, value) { this.time = time; this.value = value; } return TimelineDataSeries; })(); // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Get the ssrc if |report| is an ssrc report. * * @param {!Object} report The object contains id, type, and stats, where stats * is the object containing timestamp and values, which is an array of * strings, whose even index entry is the name of the stat, and the odd * index entry is the value. * @return {?string} The ssrc. */ function GetSsrcFromReport(report) { if (report.type != 'ssrc') { console.warn("Trying to get ssrc from non-ssrc report."); return null; } // If the 'ssrc' name-value pair exists, return the value; otherwise, return // the report id. // The 'ssrc' name-value pair only exists in an upcoming Libjingle change. Old // versions use id to refer to the ssrc. // // TODO(jiayl): remove the fallback to id once the Libjingle change is rolled // to Chrome. if (report.stats && report.stats.values) { for (var i = 0; i < report.stats.values.length - 1; i += 2) { if (report.stats.values[i] == 'ssrc') { return report.stats.values[i + 1]; } } } return report.id; }; /** * SsrcInfoManager stores the ssrc stream info extracted from SDP. */ var SsrcInfoManager = (function() { 'use strict'; /** * @constructor */ function SsrcInfoManager() { /** * Map from ssrc id to an object containing all the stream properties. * @type {!Object<!Object<string>>} * @private */ this.streamInfoContainer_ = {}; /** * The string separating attibutes in an SDP. * @type {string} * @const * @private */ this.ATTRIBUTE_SEPARATOR_ = /[\r,\n]/; /** * The regex separating fields within an ssrc description. * @type {RegExp} * @const * @private */ this.FIELD_SEPARATOR_REGEX_ = / .*:/; /** * The prefix string of an ssrc description. * @type {string} * @const * @private */ this.SSRC_ATTRIBUTE_PREFIX_ = 'a=ssrc:'; /** * The className of the ssrc info parent element. * @type {string} * @const */ this.SSRC_INFO_BLOCK_CLASS = 'ssrc-info-block'; } SsrcInfoManager.prototype = { /** * Extracts the stream information from |sdp| and saves it. * For example: * a=ssrc:1234 msid:abcd * a=ssrc:1234 label:hello * * @param {string} sdp The SDP string. */ addSsrcStreamInfo: function(sdp) { var attributes = sdp.split(this.ATTRIBUTE_SEPARATOR_); for (var i = 0; i < attributes.length; ++i) { // Check if this is a ssrc attribute. if (attributes[i].indexOf(this.SSRC_ATTRIBUTE_PREFIX_) != 0) continue; var nextFieldIndex = attributes[i].search(this.FIELD_SEPARATOR_REGEX_); if (nextFieldIndex == -1) continue; var ssrc = attributes[i].substring(this.SSRC_ATTRIBUTE_PREFIX_.length, nextFieldIndex); if (!this.streamInfoContainer_[ssrc]) this.streamInfoContainer_[ssrc] = {}; // Make |rest| starting at the next field. var rest = attributes[i].substring(nextFieldIndex + 1); var name, value; while (rest.length > 0) { nextFieldIndex = rest.search(this.FIELD_SEPARATOR_REGEX_); if (nextFieldIndex == -1) nextFieldIndex = rest.length; // The field name is the string before the colon. name = rest.substring(0, rest.indexOf(':')); // The field value is from after the colon to the next field. value = rest.substring(rest.indexOf(':') + 1, nextFieldIndex); this.streamInfoContainer_[ssrc][name] = value; // Move |rest| to the start of the next field. rest = rest.substring(nextFieldIndex + 1); } } }, /** * @param {string} sdp The ssrc id. * @return {!Object<string>} The object containing the ssrc infomation. */ getStreamInfo: function(ssrc) { return this.streamInfoContainer_[ssrc]; }, /** * Populate the ssrc information into |parentElement|, each field as a * DIV element. * * @param {!Element} parentElement The parent element for the ssrc info. * @param {string} ssrc The ssrc id. */ populateSsrcInfo: function(parentElement, ssrc) { if (!this.streamInfoContainer_[ssrc]) return; parentElement.className = this.SSRC_INFO_BLOCK_CLASS; var fieldElement; for (var property in this.streamInfoContainer_[ssrc]) { fieldElement = document.createElement('div'); parentElement.appendChild(fieldElement); fieldElement.textContent = property + ':' + this.streamInfoContainer_[ssrc][property]; } } }; return SsrcInfoManager; })(); // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // This file contains helper methods to draw the stats timeline graphs. // Each graph represents a series of stats report for a PeerConnection, // e.g. 1234-0-ssrc-abcd123-bytesSent is the graph for the series of bytesSent // for ssrc-abcd123 of PeerConnection 0 in process 1234. // The graphs are drawn as CANVAS, grouped per report type per PeerConnection. // Each group has an expand/collapse button and is collapsed initially. // // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * A TimelineGraphView displays a timeline graph on a canvas element. */ var TimelineGraphView = (function() { 'use strict'; // Maximum number of labels placed vertically along the sides of the graph. var MAX_VERTICAL_LABELS = 6; // Vertical spacing between labels and between the graph and labels. var LABEL_VERTICAL_SPACING = 4; // Horizontal spacing between vertically placed labels and the edges of the // graph. var LABEL_HORIZONTAL_SPACING = 3; // Horizintal spacing between two horitonally placed labels along the bottom // of the graph. var LABEL_LABEL_HORIZONTAL_SPACING = 25; // Length of ticks, in pixels, next to y-axis labels. The x-axis only has // one set of labels, so it can use lines instead. var Y_AXIS_TICK_LENGTH = 10; var GRID_COLOR = '#CCC'; var TEXT_COLOR = '#000'; var BACKGROUND_COLOR = '#FFF'; var MAX_DECIMAL_PRECISION = 2; /** * @constructor */ function TimelineGraphView(divId, canvasId) { this.scrollbar_ = {position_: 0, range_: 0}; this.graphDiv_ = $(divId); this.canvas_ = $(canvasId); // Set the range and scale of the graph. Times are in milliseconds since // the Unix epoch. // All measurements we have must be after this time. this.startTime_ = 0; // The current rightmost position of the graph is always at most this. this.endTime_ = 1; this.graph_ = null; // Horizontal scale factor, in terms of milliseconds per pixel. this.scale_ = 1000; // Initialize the scrollbar. this.updateScrollbarRange_(true); } TimelineGraphView.prototype = { setScale: function(scale) { this.scale_ = scale; }, // Returns the total length of the graph, in pixels. getLength_: function() { var timeRange = this.endTime_ - this.startTime_; // Math.floor is used to ignore the last partial area, of length less // than this.scale_. return Math.floor(timeRange / this.scale_); }, /** * Returns true if the graph is scrolled all the way to the right. */ graphScrolledToRightEdge_: function() { return this.scrollbar_.position_ == this.scrollbar_.range_; }, /** * Update the range of the scrollbar. If |resetPosition| is true, also * sets the slider to point at the rightmost position and triggers a * repaint. */ updateScrollbarRange_: function(resetPosition) { var scrollbarRange = this.getLength_() - this.canvas_.width; if (scrollbarRange < 0) scrollbarRange = 0; // If we've decreased the range to less than the current scroll position, // we need to move the scroll position. if (this.scrollbar_.position_ > scrollbarRange) resetPosition = true; this.scrollbar_.range_ = scrollbarRange; if (resetPosition) { this.scrollbar_.position_ = scrollbarRange; this.repaint(); } }, /** * Sets the date range displayed on the graph, switches to the default * scale factor, and moves the scrollbar all the way to the right. */ setDateRange: function(startDate, endDate) { this.startTime_ = startDate.getTime(); this.endTime_ = endDate.getTime(); // Safety check. if (this.endTime_ <= this.startTime_) this.startTime_ = this.endTime_ - 1; this.updateScrollbarRange_(true); }, /** * Updates the end time at the right of the graph to be the current time. * Specifically, updates the scrollbar's range, and if the scrollbar is * all the way to the right, keeps it all the way to the right. Otherwise, * leaves the view as-is and doesn't redraw anything. */ updateEndDate: function(opt_date) { this.endTime_ = opt_date || (new Date()).getTime(); this.updateScrollbarRange_(this.graphScrolledToRightEdge_()); }, getStartDate: function() { return new Date(this.startTime_); }, /** * Replaces the current TimelineDataSeries with |dataSeries|. */ setDataSeries: function(dataSeries) { // Simply recreates the Graph. this.graph_ = new Graph(); for (var i = 0; i < dataSeries.length; ++i) this.graph_.addDataSeries(dataSeries[i]); this.repaint(); }, /** * Adds |dataSeries| to the current graph. */ addDataSeries: function(dataSeries) { if (!this.graph_) this.graph_ = new Graph(); this.graph_.addDataSeries(dataSeries); this.repaint(); }, /** * Draws the graph on |canvas_|. */ repaint: function() { this.repaintTimerRunning_ = false; var width = this.canvas_.width; var height = this.canvas_.height; var context = this.canvas_.getContext('2d'); // Clear the canvas. context.fillStyle = BACKGROUND_COLOR; context.fillRect(0, 0, width, height); // Try to get font height in pixels. Needed for layout. var fontHeightString = context.font.match(/([0-9]+)px/)[1]; var fontHeight = parseInt(fontHeightString); // Safety check, to avoid drawing anything too ugly. if (fontHeightString.length == 0 || fontHeight <= 0 || fontHeight * 4 > height || width < 50) { return; } // Save current transformation matrix so we can restore it later. context.save(); // The center of an HTML canvas pixel is technically at (0.5, 0.5). This // makes near straight lines look bad, due to anti-aliasing. This // translation reduces the problem a little. context.translate(0.5, 0.5); // Figure out what time values to display. var position = this.scrollbar_.position_; // If the entire time range is being displayed, align the right edge of // the graph to the end of the time range. if (this.scrollbar_.range_ == 0) position = this.getLength_() - this.canvas_.width; var visibleStartTime = this.startTime_ + position * this.scale_; // Make space at the bottom of the graph for the time labels, and then // draw the labels. var textHeight = height; height -= fontHeight + LABEL_VERTICAL_SPACING; this.drawTimeLabels(context, width, height, textHeight, visibleStartTime); // Draw outline of the main graph area. context.strokeStyle = GRID_COLOR; context.strokeRect(0, 0, width - 1, height - 1); if (this.graph_) { // Layout graph and have them draw their tick marks. this.graph_.layout( width, height, fontHeight, visibleStartTime, this.scale_); this.graph_.drawTicks(context); // Draw the lines of all graphs, and then draw their labels. this.graph_.drawLines(context); this.graph_.drawLabels(context); } // Restore original transformation matrix. context.restore(); }, /** * Draw time labels below the graph. Takes in start time as an argument * since it may not be |startTime_|, when we're displaying the entire * time range. */ drawTimeLabels: function(context, width, height, textHeight, startTime) { // Draw the labels 1 minute apart. var timeStep = 1000 * 60; // Find the time for the first label. This time is a perfect multiple of // timeStep because of how UTC times work. var time = Math.ceil(startTime / timeStep) * timeStep; context.textBaseline = 'bottom'; context.textAlign = 'center'; context.fillStyle = TEXT_COLOR; context.strokeStyle = GRID_COLOR; // Draw labels and vertical grid lines. while (true) { var x = Math.round((time - startTime) / this.scale_); if (x >= width) break; var text = (new Date(time)).toLocaleTimeString(); context.fillText(text, x, textHeight); context.beginPath(); context.lineTo(x, 0); context.lineTo(x, height); context.stroke(); time += timeStep; } }, getDataSeriesCount: function() { if (this.graph_) return this.graph_.dataSeries_.length; return 0; }, hasDataSeries: function(dataSeries) { if (this.graph_) return this.graph_.hasDataSeries(dataSeries); return false; }, }; /** * A Graph is responsible for drawing all the TimelineDataSeries that have * the same data type. Graphs are responsible for scaling the values, laying * out labels, and drawing both labels and lines for its data series. */ var Graph = (function() { /** * @constructor */ function Graph() { this.dataSeries_ = []; // Cached properties of the graph, set in layout. this.width_ = 0; this.height_ = 0; this.fontHeight_ = 0; this.startTime_ = 0; this.scale_ = 0; // The lowest/highest values adjusted by the vertical label step size // in the displayed range of the graph. Used for scaling and setting // labels. Set in layoutLabels. this.min_ = 0; this.max_ = 0; // Cached text of equally spaced labels. Set in layoutLabels. this.labels_ = []; } /** * A Label is the label at a particular position along the y-axis. * @constructor */ function Label(height, text) { this.height = height; this.text = text; } Graph.prototype = { addDataSeries: function(dataSeries) { this.dataSeries_.push(dataSeries); }, hasDataSeries: function(dataSeries) { for (var i = 0; i < this.dataSeries_.length; ++i) { if (this.dataSeries_[i] == dataSeries) return true; } return false; }, /** * Returns a list of all the values that should be displayed for a given * data series, using the current graph layout. */ getValues: function(dataSeries) { if (!dataSeries.isVisible()) return null; return dataSeries.getValues(this.startTime_, this.scale_, this.width_); }, /** * Updates the graph's layout. In particular, both the max value and * label positions are updated. Must be called before calling any of the * drawing functions. */ layout: function(width, height, fontHeight, startTime, scale) { this.width_ = width; this.height_ = height; this.fontHeight_ = fontHeight; this.startTime_ = startTime; this.scale_ = scale; // Find largest value. var max = 0, min = 0; for (var i = 0; i < this.dataSeries_.length; ++i) { var values = this.getValues(this.dataSeries_[i]); if (!values) continue; for (var j = 0; j < values.length; ++j) { if (values[j] > max) max = values[j]; else if (values[j] < min) min = values[j]; } } this.layoutLabels_(min, max); }, /** * Lays out labels and sets |max_|/|min_|, taking the time units into * consideration. |maxValue| is the actual maximum value, and * |max_| will be set to the value of the largest label, which * will be at least |maxValue|. Similar for |min_|. */ layoutLabels_: function(minValue, maxValue) { if (maxValue - minValue < 1024) { this.layoutLabelsBasic_(minValue, maxValue, MAX_DECIMAL_PRECISION); return; } // Find appropriate units to use. var units = ['', 'k', 'M', 'G', 'T', 'P']; // Units to use for labels. 0 is '1', 1 is K, etc. // We start with 1, and work our way up. var unit = 1; minValue /= 1024; maxValue /= 1024; while (units[unit + 1] && maxValue - minValue >= 1024) { minValue /= 1024; maxValue /= 1024; ++unit; } // Calculate labels. this.layoutLabelsBasic_(minValue, maxValue, MAX_DECIMAL_PRECISION); // Append units to labels. for (var i = 0; i < this.labels_.length; ++i) this.labels_[i] += ' ' + units[unit]; // Convert |min_|/|max_| back to unit '1'. this.min_ *= Math.pow(1024, unit); this.max_ *= Math.pow(1024, unit); }, /** * Same as layoutLabels_, but ignores units. |maxDecimalDigits| is the * maximum number of decimal digits allowed. The minimum allowed * difference between two adjacent labels is 10^-|maxDecimalDigits|. */ layoutLabelsBasic_: function(minValue, maxValue, maxDecimalDigits) { this.labels_ = []; var range = maxValue - minValue; // No labels if the range is 0. if (range == 0) { this.min_ = this.max_ = maxValue; return; } // The maximum number of equally spaced labels allowed. |fontHeight_| // is doubled because the top two labels are both drawn in the same // gap. var minLabelSpacing = 2 * this.fontHeight_ + LABEL_VERTICAL_SPACING; // The + 1 is for the top label. var maxLabels = 1 + this.height_ / minLabelSpacing; if (maxLabels < 2) { maxLabels = 2; } else if (maxLabels > MAX_VERTICAL_LABELS) { maxLabels = MAX_VERTICAL_LABELS; } // Initial try for step size between conecutive labels. var stepSize = Math.pow(10, -maxDecimalDigits); // Number of digits to the right of the decimal of |stepSize|. // Used for formating label strings. var stepSizeDecimalDigits = maxDecimalDigits; // Pick a reasonable step size. while (true) { // If we use a step size of |stepSize| between labels, we'll need: // // Math.ceil(range / stepSize) + 1 // // labels. The + 1 is because we need labels at both at 0 and at // the top of the graph. // Check if we can use steps of size |stepSize|. if (Math.ceil(range / stepSize) + 1 <= maxLabels) break; // Check |stepSize| * 2. if (Math.ceil(range / (stepSize * 2)) + 1 <= maxLabels) { stepSize *= 2; break; } // Check |stepSize| * 5. if (Math.ceil(range / (stepSize * 5)) + 1 <= maxLabels) { stepSize *= 5; break; } stepSize *= 10; if (stepSizeDecimalDigits > 0) --stepSizeDecimalDigits; } // Set the min/max so it's an exact multiple of the chosen step size. this.max_ = Math.ceil(maxValue / stepSize) * stepSize; this.min_ = Math.floor(minValue / stepSize) * stepSize; // Create labels. for (var label = this.max_; label >= this.min_; label -= stepSize) this.labels_.push(label.toFixed(stepSizeDecimalDigits)); }, /** * Draws tick marks for each of the labels in |labels_|. */ drawTicks: function(context) { var x1; var x2; x1 = this.width_ - 1; x2 = this.width_ - 1 - Y_AXIS_TICK_LENGTH; context.fillStyle = GRID_COLOR; context.beginPath(); for (var i = 1; i < this.labels_.length - 1; ++i) { // The rounding is needed to avoid ugly 2-pixel wide anti-aliased // lines. var y = Math.round(this.height_ * i / (this.labels_.length - 1)); context.moveTo(x1, y); context.lineTo(x2, y); } context.stroke(); }, /** * Draws a graph line for each of the data series. */ drawLines: function(context) { // Factor by which to scale all values to convert them to a number from // 0 to height - 1. var scale = 0; var bottom = this.height_ - 1; if (this.max_) scale = bottom / (this.max_ - this.min_); // Draw in reverse order, so earlier data series are drawn on top of // subsequent ones. for (var i = this.dataSeries_.length - 1; i >= 0; --i) { var values = this.getValues(this.dataSeries_[i]); if (!values) continue; context.strokeStyle = this.dataSeries_[i].getColor(); context.beginPath(); for (var x = 0; x < values.length; ++x) { // The rounding is needed to avoid ugly 2-pixel wide anti-aliased // horizontal lines. context.lineTo( x, bottom - Math.round((values[x] - this.min_) * scale)); } context.stroke(); } }, /** * Draw labels in |labels_|. */ drawLabels: function(context) { if (this.labels_.length == 0) return; var x = this.width_ - LABEL_HORIZONTAL_SPACING; // Set up the context. context.fillStyle = TEXT_COLOR; context.textAlign = 'right'; // Draw top label, which is the only one that appears below its tick // mark. context.textBaseline = 'top'; context.fillText(this.labels_[0], x, 0); // Draw all the other labels. context.textBaseline = 'bottom'; var step = (this.height_ - 1) / (this.labels_.length - 1); for (var i = 1; i < this.labels_.length; ++i) context.fillText(this.labels_[i], x, step * i); } }; return Graph; })(); return TimelineGraphView; })(); var STATS_GRAPH_CONTAINER_HEADING_CLASS = 'stats-graph-container-heading'; var RECEIVED_PROPAGATION_DELTA_LABEL = 'googReceivedPacketGroupPropagationDeltaDebug'; var RECEIVED_PACKET_GROUP_ARRIVAL_TIME_LABEL = 'googReceivedPacketGroupArrivalTimeDebug'; // Specifies which stats should be drawn on the 'bweCompound' graph and how. var bweCompoundGraphConfig = { googAvailableSendBandwidth: {color: 'red'}, googTargetEncBitrateCorrected: {color: 'purple'}, googActualEncBitrate: {color: 'orange'}, googRetransmitBitrate: {color: 'blue'}, googTransmitBitrate: {color: 'green'}, }; // Converts the last entry of |srcDataSeries| from the total amount to the // amount per second. var totalToPerSecond = function(srcDataSeries) { var length = srcDataSeries.dataPoints_.length; if (length >= 2) { var lastDataPoint = srcDataSeries.dataPoints_[length - 1]; var secondLastDataPoint = srcDataSeries.dataPoints_[length - 2]; return (lastDataPoint.value - secondLastDataPoint.value) * 1000 / (lastDataPoint.time - secondLastDataPoint.time); } return 0; }; // Converts the value of total bytes to bits per second. var totalBytesToBitsPerSecond = function(srcDataSeries) { return totalToPerSecond(srcDataSeries) * 8; }; // Specifies which stats should be converted before drawn and how. // |convertedName| is the name of the converted value, |convertFunction| // is the function used to calculate the new converted value based on the // original dataSeries. var dataConversionConfig = { packetsSent: { convertedName: 'packetsSentPerSecond', convertFunction: totalToPerSecond, }, bytesSent: { convertedName: 'bitsSentPerSecond', convertFunction: totalBytesToBitsPerSecond, }, packetsReceived: { convertedName: 'packetsReceivedPerSecond', convertFunction: totalToPerSecond, }, bytesReceived: { convertedName: 'bitsReceivedPerSecond', convertFunction: totalBytesToBitsPerSecond, }, // This is due to a bug of wrong units reported for googTargetEncBitrate. // TODO (jiayl): remove this when the unit bug is fixed. googTargetEncBitrate: { convertedName: 'googTargetEncBitrateCorrected', convertFunction: function (srcDataSeries) { var length = srcDataSeries.dataPoints_.length; var lastDataPoint = srcDataSeries.dataPoints_[length - 1]; if (lastDataPoint.value < 5000) return lastDataPoint.value * 1000; return lastDataPoint.value; } } }; // The object contains the stats names that should not be added to the graph, // even if they are numbers. var statsNameBlackList = { 'ssrc': true, 'googTrackId': true, 'googComponent': true, 'googLocalAddress': true, 'googRemoteAddress': true, 'googFingerprint': true, }; var graphViews = {}; // Returns number parsed from |value|, or NaN if the stats name is black-listed. function getNumberFromValue(name, value) { if (statsNameBlackList[name]) return NaN; return parseFloat(value); } // Adds the stats report |report| to the timeline graph for the given // |peerConnectionElement|. function drawSingleReport(peerConnectionElement, report) { var reportType = report.type; var reportId = report.id; var stats = report.stats; if (!stats || !stats.values) return; for (var i = 0; i < stats.values.length - 1; i = i + 2) { var rawLabel = stats.values[i]; // Propagation deltas are handled separately. if (rawLabel == RECEIVED_PROPAGATION_DELTA_LABEL) { drawReceivedPropagationDelta( peerConnectionElement, report, stats.values[i + 1]); continue; } var rawDataSeriesId = reportId + '-' + rawLabel; var rawValue = getNumberFromValue(rawLabel, stats.values[i + 1]); if (isNaN(rawValue)) { // We do not draw non-numerical values, but still want to record it in the // data series. addDataSeriesPoints(peerConnectionElement, rawDataSeriesId, rawLabel, [stats.timestamp], [stats.values[i + 1]]); continue; } var finalDataSeriesId = rawDataSeriesId; var finalLabel = rawLabel; var finalValue = rawValue; // We need to convert the value if dataConversionConfig[rawLabel] exists. if (dataConversionConfig[rawLabel]) { // Updates the original dataSeries before the conversion. addDataSeriesPoints(peerConnectionElement, rawDataSeriesId, rawLabel, [stats.timestamp], [rawValue]); // Convert to another value to draw on graph, using the original // dataSeries as input. finalValue = dataConversionConfig[rawLabel].convertFunction( peerConnectionDataStore[peerConnectionElement.id].getDataSeries( rawDataSeriesId)); finalLabel = dataConversionConfig[rawLabel].convertedName; finalDataSeriesId = reportId + '-' + finalLabel; } // Updates the final dataSeries to draw. addDataSeriesPoints(peerConnectionElement, finalDataSeriesId, finalLabel, [stats.timestamp], [finalValue]); // Updates the graph. var graphType = bweCompoundGraphConfig[finalLabel] ? 'bweCompound' : finalLabel; var graphViewId = peerConnectionElement.id + '-' + reportId + '-' + graphType; if (!graphViews[graphViewId]) { graphViews[graphViewId] = createStatsGraphView(peerConnectionElement, report, graphType); var date = new Date(stats.timestamp); graphViews[graphViewId].setDateRange(date, date); } // Adds the new dataSeries to the graphView. We have to do it here to cover // both the simple and compound graph cases. var dataSeries = peerConnectionDataStore[peerConnectionElement.id].getDataSeries( finalDataSeriesId); if (!graphViews[graphViewId].hasDataSeries(dataSeries)) graphViews[graphViewId].addDataSeries(dataSeries); graphViews[graphViewId].updateEndDate(); } } // Makes sure the TimelineDataSeries with id |dataSeriesId| is created, // and adds the new data points to it. |times| is the list of timestamps for // each data point, and |values| is the list of the data point values. function addDataSeriesPoints( peerConnectionElement, dataSeriesId, label, times, values) { var dataSeries = peerConnectionDataStore[peerConnectionElement.id].getDataSeries( dataSeriesId); if (!dataSeries) { dataSeries = new TimelineDataSeries(); peerConnectionDataStore[peerConnectionElement.id].setDataSeries( dataSeriesId, dataSeries); if (bweCompoundGraphConfig[label]) { dataSeries.setColor(bweCompoundGraphConfig[label].color); } } for (var i = 0; i < times.length; ++i) dataSeries.addPoint(times[i], values[i]); } // Draws the received propagation deltas using the packet group arrival time as // the x-axis. For example, |report.stats.values| should be like // ['googReceivedPacketGroupArrivalTimeDebug', '[123456, 234455, 344566]', // 'googReceivedPacketGroupPropagationDeltaDebug', '[23, 45, 56]', ...]. function drawReceivedPropagationDelta(peerConnectionElement, report, deltas) { var reportId = report.id; var stats = report.stats; var times = null; // Find the packet group arrival times. for (var i = 0; i < stats.values.length - 1; i = i + 2) { if (stats.values[i] == RECEIVED_PACKET_GROUP_ARRIVAL_TIME_LABEL) { times = stats.values[i + 1]; break; } } // Unexpected. if (times == null) return; // Convert |deltas| and |times| from strings to arrays of numbers. try { deltas = JSON.parse(deltas); times = JSON.parse(times); } catch (e) { console.log(e); return; } // Update the data series. var dataSeriesId = reportId + '-' + RECEIVED_PROPAGATION_DELTA_LABEL; addDataSeriesPoints( peerConnectionElement, dataSeriesId, RECEIVED_PROPAGATION_DELTA_LABEL, times, deltas); // Update the graph. var graphViewId = peerConnectionElement.id + '-' + reportId + '-' + RECEIVED_PROPAGATION_DELTA_LABEL; var date = new Date(times[times.length - 1]); if (!graphViews[graphViewId]) { graphViews[graphViewId] = createStatsGraphView( peerConnectionElement, report, RECEIVED_PROPAGATION_DELTA_LABEL); graphViews[graphViewId].setScale(10); graphViews[graphViewId].setDateRange(date, date); var dataSeries = peerConnectionDataStore[peerConnectionElement.id] .getDataSeries(dataSeriesId); graphViews[graphViewId].addDataSeries(dataSeries); } graphViews[graphViewId].updateEndDate(date); } // Get report types for SSRC reports. Returns 'audio' or 'video' where this type // can be deduced from existing stats labels. Otherwise empty string for // non-SSRC reports or where type (audio/video) can't be deduced. function getSsrcReportType(report) { if (report.type != 'ssrc') return ''; if (report.stats && report.stats.values) { // Known stats keys for audio send/receive streams. if (report.stats.values.indexOf('audioOutputLevel') != -1 || report.stats.values.indexOf('audioInputLevel') != -1) { return 'audio'; } // Known stats keys for video send/receive streams. // TODO(pbos): Change to use some non-goog-prefixed stats when available for // video. if (report.stats.values.indexOf('googFrameRateReceived') != -1 || report.stats.values.indexOf('googFrameRateSent') != -1) { return 'video'; } } return ''; } // Ensures a div container to hold all stats graphs for one track is created as // a child of |peerConnectionElement|. function ensureStatsGraphTopContainer(peerConnectionElement, report) { var containerId = peerConnectionElement.id + '-' + report.type + '-' + report.id + '-graph-container'; var container = $(containerId); if (!container) { container = document.createElement('details'); container.id = containerId; container.className = 'stats-graph-container'; peerConnectionElement.appendChild(container); container.innerHTML ='<summary><span></span></summary>'; container.firstChild.firstChild.className = STATS_GRAPH_CONTAINER_HEADING_CLASS; container.firstChild.firstChild.textContent = 'Stats graphs for ' + report.id; var statsType = getSsrcReportType(report); if (statsType != '') container.firstChild.firstChild.textContent += ' (' + statsType + ')'; if (report.type == 'ssrc') { var ssrcInfoElement = document.createElement('div'); container.firstChild.appendChild(ssrcInfoElement); ssrcInfoManager.populateSsrcInfo(ssrcInfoElement, GetSsrcFromReport(report)); } } return container; } // Creates the container elements holding a timeline graph // and the TimelineGraphView object. function createStatsGraphView( peerConnectionElement, report, statsName) { var topContainer = ensureStatsGraphTopContainer(peerConnectionElement, report); var graphViewId = peerConnectionElement.id + '-' + report.id + '-' + statsName; var divId = graphViewId + '-div'; var canvasId = graphViewId + '-canvas'; var container = document.createElement("div"); container.className = 'stats-graph-sub-container'; topContainer.appendChild(container); container.innerHTML = '<div>' + statsName + '</div>' + '<div id=' + divId + '><canvas id=' + canvasId + '></canvas></div>'; if (statsName == 'bweCompound') { container.insertBefore( createBweCompoundLegend(peerConnectionElement, report.id), $(divId)); } return new TimelineGraphView(divId, canvasId); } // Creates the legend section for the bweCompound graph. // Returns the legend element. function createBweCompoundLegend(peerConnectionElement, reportId) { var legend = document.createElement('div'); for (var prop in bweCompoundGraphConfig) { var div = document.createElement('div'); legend.appendChild(div); div.innerHTML = '<input type=checkbox checked></input>' + prop; div.style.color = bweCompoundGraphConfig[prop].color; div.dataSeriesId = reportId + '-' + prop; div.graphViewId = peerConnectionElement.id + '-' + reportId + '-bweCompound'; div.firstChild.addEventListener('click', function(event) { var target = peerConnectionDataStore[peerConnectionElement.id].getDataSeries( event.target.parentNode.dataSeriesId); target.show(event.target.checked); graphViews[event.target.parentNode.graphViewId].repaint(); }); } return legend; } // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Maintains the stats table. * @param {SsrcInfoManager} ssrcInfoManager The source of the ssrc info. */ var StatsTable = (function(ssrcInfoManager) { 'use strict'; /** * @param {SsrcInfoManager} ssrcInfoManager The source of the ssrc info. * @constructor */ function StatsTable(ssrcInfoManager) { /** * @type {SsrcInfoManager} * @private */ this.ssrcInfoManager_ = ssrcInfoManager; } StatsTable.prototype = { /** * Adds |report| to the stats table of |peerConnectionElement|. * * @param {!Element} peerConnectionElement The root element. * @param {!Object} report The object containing stats, which is the object * containing timestamp and values, which is an array of strings, whose * even index entry is the name of the stat, and the odd index entry is * the value. */ addStatsReport: function(peerConnectionElement, report) { var statsTable = this.ensureStatsTable_(peerConnectionElement, report); if (report.stats) { this.addStatsToTable_(statsTable, report.stats.timestamp, report.stats.values); } }, /** * Ensure the DIV container for the stats tables is created as a child of * |peerConnectionElement|. * * @param {!Element} peerConnectionElement The root element. * @return {!Element} The stats table container. * @private */ ensureStatsTableContainer_: function(peerConnectionElement) { var containerId = peerConnectionElement.id + '-table-container'; var container = $(containerId); if (!container) { container = document.createElement('div'); container.id = containerId; container.className = 'stats-table-container'; var head = document.createElement('div'); head.textContent = 'Stats Tables'; container.appendChild(head); peerConnectionElement.appendChild(container); } return container; }, /** * Ensure the stats table for track specified by |report| of PeerConnection * |peerConnectionElement| is created. * * @param {!Element} peerConnectionElement The root element. * @param {!Object} report The object containing stats, which is the object * containing timestamp and values, which is an array of strings, whose * even index entry is the name of the stat, and the odd index entry is * the value. * @return {!Element} The stats table element. * @private */ ensureStatsTable_: function(peerConnectionElement, report) { var tableId = peerConnectionElement.id + '-table-' + report.id; var table = $(tableId); if (!table) { var container = this.ensureStatsTableContainer_(peerConnectionElement); var details = document.createElement('details'); container.appendChild(details); var summary = document.createElement('summary'); summary.textContent = report.id; details.appendChild(summary); table = document.createElement('table'); details.appendChild(table); table.id = tableId; table.border = 1; table.innerHTML = '<tr><th colspan=2></th></tr>'; table.rows[0].cells[0].textContent = 'Statistics ' + report.id; if (report.type == 'ssrc') { table.insertRow(1); table.rows[1].innerHTML = '<td colspan=2></td>'; this.ssrcInfoManager_.populateSsrcInfo( table.rows[1].cells[0], GetSsrcFromReport(report)); } } return table; }, /** * Update |statsTable| with |time| and |statsData|. * * @param {!Element} statsTable Which table to update. * @param {number} time The number of miliseconds since epoch. * @param {Array<string>} statsData An array of stats name and value pairs. * @private */ addStatsToTable_: function(statsTable, time, statsData) { var date = new Date(time); this.updateStatsTableRow_(statsTable, 'timestamp', date.toLocaleString()); for (var i = 0; i < statsData.length - 1; i = i + 2) { this.updateStatsTableRow_(statsTable, statsData[i], statsData[i + 1]); } }, /** * Update the value column of the stats row of |rowName| to |value|. * A new row is created is this is the first report of this stats. * * @param {!Element} statsTable Which table to update. * @param {string} rowName The name of the row to update. * @param {string} value The new value to set. * @private */ updateStatsTableRow_: function(statsTable, rowName, value) { var trId = statsTable.id + '-' + rowName; var trElement = $(trId); if (!trElement) { trElement = document.createElement('tr'); trElement.id = trId; statsTable.firstChild.appendChild(trElement); trElement.innerHTML = '<td>' + rowName + '</td><td></td>'; } trElement.cells[1].textContent = value; // Highlights the table for the active connection. if (rowName == 'googActiveConnection' && value == true) statsTable.parentElement.classList.add('stats-table-active-connection'); } }; return StatsTable; })(); // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * The data of a peer connection update. * @param {number} pid The id of the renderer. * @param {number} lid The id of the peer conneciton inside a renderer. * @param {string} type The type of the update. * @param {string} value The details of the update. * @constructor */ var PeerConnectionUpdateEntry = function(pid, lid, type, value) { /** * @type {number} */ this.pid = pid; /** * @type {number} */ this.lid = lid; /** * @type {string} */ this.type = type; /** * @type {string} */ this.value = value; }; /** * Maintains the peer connection update log table. */ var PeerConnectionUpdateTable = (function() { 'use strict'; /** * @constructor */ function PeerConnectionUpdateTable() { /** * @type {string} * @const * @private */ this.UPDATE_LOG_ID_SUFFIX_ = '-update-log'; /** * @type {string} * @const * @private */ this.UPDATE_LOG_CONTAINER_CLASS_ = 'update-log-container'; /** * @type {string} * @const * @private */ this.UPDATE_LOG_TABLE_CLASS = 'update-log-table'; } PeerConnectionUpdateTable.prototype = { /** * Adds the update to the update table as a new row. The type of the update * is set to the summary of the cell; clicking the cell will reveal or hide * the details as the content of a TextArea element. * * @param {!Element} peerConnectionElement The root element. * @param {!PeerConnectionUpdateEntry} update The update to add. */ addPeerConnectionUpdate: function(peerConnectionElement, update) { var tableElement = this.ensureUpdateContainer_(peerConnectionElement); var row = document.createElement('tr'); tableElement.firstChild.appendChild(row); var time = new Date(parseFloat(update.time)); row.innerHTML = '<td>' + time.toLocaleString() + '</td>'; if (update.value.length == 0) { row.innerHTML += '<td>' + update.type + '</td>'; return; } row.innerHTML += '<td><details><summary>' + update.type + '</summary></details></td>'; var valueContainer = document.createElement('pre'); var details = row.cells[1].childNodes[0]; details.appendChild(valueContainer); valueContainer.textContent = update.value; }, /** * Makes sure the update log table of the peer connection is created. * * @param {!Element} peerConnectionElement The root element. * @return {!Element} The log table element. * @private */ ensureUpdateContainer_: function(peerConnectionElement) { var tableId = peerConnectionElement.id + this.UPDATE_LOG_ID_SUFFIX_; var tableElement = $(tableId); if (!tableElement) { var tableContainer = document.createElement('div'); tableContainer.className = this.UPDATE_LOG_CONTAINER_CLASS_; peerConnectionElement.appendChild(tableContainer); tableElement = document.createElement('table'); tableElement.className = this.UPDATE_LOG_TABLE_CLASS; tableElement.id = tableId; tableElement.border = 1; tableContainer.appendChild(tableElement); tableElement.innerHTML = '<tr><th>Time</th>' + '<th class="update-log-header-event">Event</th></tr>'; } return tableElement; } }; return PeerConnectionUpdateTable; })(); // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Provides the UI for dump creation. */ var DumpCreator = (function() { /** * @param {Element} containerElement The parent element of the dump creation * UI. * @constructor */ function DumpCreator(containerElement) { /** * The root element of the dump creation UI. * @type {Element} * @private */ this.root_ = document.createElement('details'); this.root_.className = 'peer-connection-dump-root'; containerElement.appendChild(this.root_); var summary = document.createElement('summary'); this.root_.appendChild(summary); summary.textContent = 'Create Dump'; var content = document.createElement('div'); this.root_.appendChild(content); content.innerHTML = '<div><a><button>' + 'Download the PeerConnection updates and stats data' + '</button></a></div>' + '<p><label><input type=checkbox>' + 'Enable diagnostic audio recordings</label></p>' + '<p class=audio-recordings-info>A diagnostic audio recording is used' + ' for analyzing audio problems. It consists of two files and contains' + ' the audio played out from the speaker and recorded from the' + ' microphone and is saved to the local disk. Checking this box will' + ' enable the recording for ongoing WebRTC calls and for future WebRTC' + ' calls. When the box is unchecked or this page is closed, all' + ' ongoing recordings will be stopped and this recording' + ' functionality will be disabled for future WebRTC calls. Recordings' + ' in multiple tabs are supported as well as multiple recordings in' + ' the same tab. When enabling, you select a base filename to which' + ' suffixes will be appended as</p>' + '<p><div><base filename>.<render process ID>' + '.aec_dump.<recording ID></div>' + '<div><base filename>.<render process ID>' + '.source_input.<stream ID>.pcm</div></p>' + '<p class=audio-recordings-info>If recordings are disabled and then' + ' enabled using the same base filename, the files will be appended' + ' to and may become invalid. It is recommended to choose a new base' + ' filename each time or move the produced files before enabling' + ' again.</p>' + '<p><label><input type=checkbox>' + 'Enable diagnostic packet and event recording</label></p>' + '<p class=audio-recordings-info>A diagnostic packet and event' + ' recording can be used for analyzing various issues related to' + ' thread starvation, jitter buffers or bandwidth estimation. Two' + ' types of data are logged. First, incoming and outgoing RTP headers' + ' and RTCP packets are logged. These do not include any audio or' + ' video information, nor any other types of personally identifiable' + ' information (so no IP addresses or URLs). Checking this box will' + ' enable the recording for ongoing WebRTC calls and for future' + ' WebRTC calls. When the box is unchecked or this page is closed,' + ' all ongoing recordings will be stopped and this recording' + ' functionality will be disabled for future WebRTC calls. Recording' + ' in multiple tabs or multiple recordings in the same tab is' + ' currently not supported. When enabling, a filename for the' + ' recording can be selected. If an existing file is selected, it' + ' will be overwritten. </p>'; content.getElementsByTagName('a')[0].addEventListener( 'click', this.onDownloadData_.bind(this)); content.getElementsByTagName('input')[0].addEventListener( 'click', this.onAudioDebugRecordingsChanged_.bind(this)); content.getElementsByTagName('input')[1].addEventListener( 'click', this.onEventLogRecordingsChanged_.bind(this)); } DumpCreator.prototype = { // Mark the diagnostic audio recording checkbox checked. enableAudioDebugRecordings: function() { this.root_.getElementsByTagName('input')[0].checked = true; }, // Mark the diagnostic audio recording checkbox unchecked. disableAudioDebugRecordings: function() { this.root_.getElementsByTagName('input')[0].checked = false; }, // Mark the event log recording checkbox checked. enableEventLogRecordings: function() { this.root_.getElementsByTagName('input')[1].checked = true; }, // Mark the event log recording checkbox unchecked. disableEventLogRecordings: function() { this.root_.getElementsByTagName('input')[1].checked = false; }, /** * Downloads the PeerConnection updates and stats data as a file. * * @private */ onDownloadData_: function() { var dump_object = { 'getUserMedia': userMediaRequests, 'PeerConnections': peerConnectionDataStore, }; var textBlob = new Blob([JSON.stringify(dump_object, null, ' ')], {type: 'octet/stream'}); var URL = window.URL.createObjectURL(textBlob); var anchor = this.root_.getElementsByTagName('a')[0]; anchor.href = URL; anchor.download = 'webrtc_internals_dump.txt'; // The default action of the anchor will download the URL. }, /** * Handles the event of toggling the audio debug recordings state. * * @private */ onAudioDebugRecordingsChanged_: function() { var enabled = this.root_.getElementsByTagName('input')[0].checked; if (enabled) { chrome.send('enableAudioDebugRecordings'); } else { chrome.send('disableAudioDebugRecordings'); } }, /** * Handles the event of toggling the event log recordings state. * * @private */ onEventLogRecordingsChanged_: function() { var enabled = this.root_.getElementsByTagName('input')[1].checked; if (enabled) { chrome.send('enableEventLogRecordings'); } else { chrome.send('disableEventLogRecordings'); } }, }; return DumpCreator; })(); function initialize() { dumpCreator = new DumpCreator($('content-root')); tabView = new TabView($('content-root')); ssrcInfoManager = new SsrcInfoManager(); peerConnectionUpdateTable = new PeerConnectionUpdateTable(); statsTable = new StatsTable(ssrcInfoManager); chrome.send('finishedDOMLoad'); // Requests stats from all peer connections every second. window.setInterval(requestStats, 1000); } document.addEventListener('DOMContentLoaded', initialize); /** Sends a request to the browser to get peer connection statistics. */ function requestStats() { if (Object.keys(peerConnectionDataStore).length > 0) chrome.send('getAllStats'); } /** * A helper function for getting a peer connection element id. * * @param {!Object<number>} data The object containing the pid and lid of the * peer connection. * @return {string} The peer connection element id. */ function getPeerConnectionId(data) { return data.pid + '-' + data.lid; } /** * Extracts ssrc info from a setLocal/setRemoteDescription update. * * @param {!PeerConnectionUpdateEntry} data The peer connection update data. */ function extractSsrcInfo(data) { if (data.type == 'setLocalDescription' || data.type == 'setRemoteDescription') { ssrcInfoManager.addSsrcStreamInfo(data.value); } } /** * A helper function for appending a child element to |parent|. * * @param {!Element} parent The parent element. * @param {string} tag The child element tag. * @param {string} text The textContent of the new DIV. * @return {!Element} the new DIV element. */ function appendChildWithText(parent, tag, text) { var child = document.createElement(tag); child.textContent = text; parent.appendChild(child); return child; } /** * Helper for adding a peer connection update. * * @param {Element} peerConnectionElement * @param {!PeerConnectionUpdateEntry} update The peer connection update data. */ function addPeerConnectionUpdate(peerConnectionElement, update) { peerConnectionUpdateTable.addPeerConnectionUpdate(peerConnectionElement, update); extractSsrcInfo(update); peerConnectionDataStore[peerConnectionElement.id].addUpdate(update); } /** Browser message handlers. */ /** * Removes all information about a peer connection. * * @param {!Object<number>} data The object containing the pid and lid of a peer * connection. */ function removePeerConnection(data) { var element = $(getPeerConnectionId(data)); if (element) { delete peerConnectionDataStore[element.id]; tabView.removeTab(element.id); } } /** * Adds a peer connection. * * @param {!Object} data The object containing the pid, lid, url, * rtcConfiguration, and constraints of a peer connection. */ function addPeerConnection(data) { var id = getPeerConnectionId(data); if (!peerConnectionDataStore[id]) { peerConnectionDataStore[id] = new PeerConnectionRecord(); } peerConnectionDataStore[id].initialize( data.url, data.rtcConfiguration, data.constraints); var peerConnectionElement = $(id); if (!peerConnectionElement) { peerConnectionElement = tabView.addTab(id, data.url + ' [' + id + ']'); } var p = document.createElement('p'); p.textContent = data.url + ', ' + data.rtcConfiguration + ', ' + data.constraints; peerConnectionElement.appendChild(p); return peerConnectionElement; } /** * Adds a peer connection update. * * @param {!PeerConnectionUpdateEntry} data The peer connection update data. */ function updatePeerConnection(data) { var peerConnectionElement = $(getPeerConnectionId(data)); addPeerConnectionUpdate(peerConnectionElement, data); } /** * Adds the information of all peer connections created so far. * * @param {Array<!Object>} data An array of the information of all peer * connections. Each array item contains pid, lid, url, rtcConfiguration, * constraints, and an array of updates as the log. */ function updateAllPeerConnections(data) { for (var i = 0; i < data.length; ++i) { var peerConnection = addPeerConnection(data[i]); var log = data[i].log; if (!log) continue; for (var j = 0; j < log.length; ++j) { addPeerConnectionUpdate(peerConnection, log[j]); } } requestStats(); } /** * Handles the report of stats. * * @param {!Object} data The object containing pid, lid, and reports, where * reports is an array of stats reports. Each report contains id, type, * and stats, where stats is the object containing timestamp and values, * which is an array of strings, whose even index entry is the name of the * stat, and the odd index entry is the value. */ function addStats(data) { var peerConnectionElement = $(getPeerConnectionId(data)); if (!peerConnectionElement) return; for (var i = 0; i < data.reports.length; ++i) { var report = data.reports[i]; statsTable.addStatsReport(peerConnectionElement, report); drawSingleReport(peerConnectionElement, report); } } /** * Adds a getUserMedia request. * * @param {!Object} data The object containing rid {number}, pid {number}, * origin {string}, audio {string}, video {string}. */ function addGetUserMedia(data) { userMediaRequests.push(data); if (!$(USER_MEDIA_TAB_ID)) { tabView.addTab(USER_MEDIA_TAB_ID, 'GetUserMedia Requests'); } var requestDiv = document.createElement('div'); requestDiv.className = 'user-media-request-div-class'; requestDiv.rid = data.rid; $(USER_MEDIA_TAB_ID).appendChild(requestDiv); appendChildWithText(requestDiv, 'div', 'Caller origin: ' + data.origin); appendChildWithText(requestDiv, 'div', 'Caller process id: ' + data.pid); appendChildWithText(requestDiv, 'span', 'Audio Constraints').style.fontWeight = 'bold'; appendChildWithText(requestDiv, 'div', data.audio); appendChildWithText(requestDiv, 'span', 'Video Constraints').style.fontWeight = 'bold'; appendChildWithText(requestDiv, 'div', data.video); } /** * Removes the getUserMedia requests from the specified |rid|. * * @param {!Object} data The object containing rid {number}, the render id. */ function removeGetUserMediaForRenderer(data) { for (var i = userMediaRequests.length - 1; i >= 0; --i) { if (userMediaRequests[i].rid == data.rid) userMediaRequests.splice(i, 1); } var requests = $(USER_MEDIA_TAB_ID).childNodes; for (var i = 0; i < requests.length; ++i) { if (requests[i].rid == data.rid) $(USER_MEDIA_TAB_ID).removeChild(requests[i]); } if ($(USER_MEDIA_TAB_ID).childNodes.length == 0) tabView.removeTab(USER_MEDIA_TAB_ID); } /** * Notification that the audio debug recordings file selection dialog was * cancelled, i.e. recordings have not been enabled. */ function audioDebugRecordingsFileSelectionCancelled() { dumpCreator.disableAudioDebugRecordings(); } /** * Notification that the event log recordings file selection dialog was * cancelled, i.e. recordings have not been enabled. */ function eventLogRecordingsFileSelectionCancelled() { dumpCreator.disableEventLogRecordings(); } /** * Set */ function enableAudioDebugRecordings() { dumpCreator.enableAudioDebugRecordings(); } // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/bindings", [ "mojo/public/js/router", "mojo/public/js/core", ], function(router, core) { var Router = router.Router; var kProxyProperties = Symbol("proxyProperties"); var kStubProperties = Symbol("stubProperties"); // Public proxy class properties that are managed at runtime by the JS // bindings. See ProxyBindings below. function ProxyProperties(receiver) { this.receiver = receiver; } // TODO(hansmuller): remove then after 'Client=' has been removed from Mojom. ProxyProperties.prototype.getLocalDelegate = function() { return this.local && StubBindings(this.local).delegate; } // TODO(hansmuller): remove then after 'Client=' has been removed from Mojom. ProxyProperties.prototype.setLocalDelegate = function(impl) { if (this.local) StubBindings(this.local).delegate = impl; else throw new Error("no stub object"); } function connectionHandle(connection) { return connection && connection.router && connection.router.connector_ && connection.router.connector_.handle_; } ProxyProperties.prototype.close = function() { var handle = connectionHandle(this.connection); if (handle) core.close(handle); } // Public stub class properties that are managed at runtime by the JS // bindings. See StubBindings below. function StubProperties(delegate) { this.delegate = delegate; } StubProperties.prototype.close = function() { var handle = connectionHandle(this.connection); if (handle) core.close(handle); } // The base class for generated proxy classes. function ProxyBase(receiver) { this[kProxyProperties] = new ProxyProperties(receiver); // TODO(hansmuller): Temporary, for Chrome backwards compatibility. if (receiver instanceof Router) this.receiver_ = receiver; } // The base class for generated stub classes. function StubBase(delegate) { this[kStubProperties] = new StubProperties(delegate); } // TODO(hansmuller): remove everything except the connection property doc // after 'Client=' has been removed from Mojom. // Provides access to properties added to a proxy object without risking // Mojo interface name collisions. Unless otherwise specified, the initial // value of all properties is undefined. // // ProxyBindings(proxy).connection - The Connection object that links the // proxy for a remote Mojo service to an optional local stub for a local // service. The value of ProxyBindings(proxy).connection.remote == proxy. // // ProxyBindings(proxy).local - The "local" stub object whose delegate // implements the proxy's Mojo client interface. // // ProxyBindings(proxy).setLocalDelegate(impl) - Sets the implementation // delegate of the proxy's client stub object. This is just shorthand // for |StubBindings(ProxyBindings(proxy).local).delegate = impl|. // // ProxyBindings(proxy).getLocalDelegate() - Returns the implementation // delegate of the proxy's client stub object. This is just shorthand // for |StubBindings(ProxyBindings(proxy).local).delegate|. function ProxyBindings(proxy) { return (proxy instanceof ProxyBase) ? proxy[kProxyProperties] : proxy; } // TODO(hansmuller): remove the remote doc after 'Client=' has been // removed from Mojom. // Provides access to properties added to a stub object without risking // Mojo interface name collisions. Unless otherwise specified, the initial // value of all properties is undefined. // // StubBindings(stub).delegate - The optional implementation delegate for // the Mojo interface stub. // // StubBindings(stub).connection - The Connection object that links an // optional proxy for a remote service to this stub. The value of // StubBindings(stub).connection.local == stub. // // StubBindings(stub).remote - A proxy for the the stub's Mojo client // service. function StubBindings(stub) { return stub instanceof StubBase ? stub[kStubProperties] : stub; } var exports = {}; exports.EmptyProxy = ProxyBase; exports.EmptyStub = StubBase; exports.ProxyBase = ProxyBase; exports.ProxyBindings = ProxyBindings; exports.StubBase = StubBase; exports.StubBindings = StubBindings; return exports; });// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/buffer", function() { var kHostIsLittleEndian = (function () { var endianArrayBuffer = new ArrayBuffer(2); var endianUint8Array = new Uint8Array(endianArrayBuffer); var endianUint16Array = new Uint16Array(endianArrayBuffer); endianUint16Array[0] = 1; return endianUint8Array[0] == 1; })(); var kHighWordMultiplier = 0x100000000; function Buffer(sizeOrArrayBuffer) { if (sizeOrArrayBuffer instanceof ArrayBuffer) this.arrayBuffer = sizeOrArrayBuffer; else this.arrayBuffer = new ArrayBuffer(sizeOrArrayBuffer); this.dataView = new DataView(this.arrayBuffer); this.next = 0; } Object.defineProperty(Buffer.prototype, "byteLength", { get: function() { return this.arrayBuffer.byteLength; } }); Buffer.prototype.alloc = function(size) { var pointer = this.next; this.next += size; if (this.next > this.byteLength) { var newSize = (1.5 * (this.byteLength + size)) | 0; this.grow(newSize); } return pointer; }; function copyArrayBuffer(dstArrayBuffer, srcArrayBuffer) { (new Uint8Array(dstArrayBuffer)).set(new Uint8Array(srcArrayBuffer)); } Buffer.prototype.grow = function(size) { var newArrayBuffer = new ArrayBuffer(size); copyArrayBuffer(newArrayBuffer, this.arrayBuffer); this.arrayBuffer = newArrayBuffer; this.dataView = new DataView(this.arrayBuffer); }; Buffer.prototype.trim = function() { this.arrayBuffer = this.arrayBuffer.slice(0, this.next); this.dataView = new DataView(this.arrayBuffer); }; Buffer.prototype.getUint8 = function(offset) { return this.dataView.getUint8(offset); } Buffer.prototype.getUint16 = function(offset) { return this.dataView.getUint16(offset, kHostIsLittleEndian); } Buffer.prototype.getUint32 = function(offset) { return this.dataView.getUint32(offset, kHostIsLittleEndian); } Buffer.prototype.getUint64 = function(offset) { var lo, hi; if (kHostIsLittleEndian) { lo = this.dataView.getUint32(offset, kHostIsLittleEndian); hi = this.dataView.getUint32(offset + 4, kHostIsLittleEndian); } else { hi = this.dataView.getUint32(offset, kHostIsLittleEndian); lo = this.dataView.getUint32(offset + 4, kHostIsLittleEndian); } return lo + hi * kHighWordMultiplier; } Buffer.prototype.getInt8 = function(offset) { return this.dataView.getInt8(offset); } Buffer.prototype.getInt16 = function(offset) { return this.dataView.getInt16(offset, kHostIsLittleEndian); } Buffer.prototype.getInt32 = function(offset) { return this.dataView.getInt32(offset, kHostIsLittleEndian); } Buffer.prototype.getInt64 = function(offset) { var lo, hi; if (kHostIsLittleEndian) { lo = this.dataView.getUint32(offset, kHostIsLittleEndian); hi = this.dataView.getInt32(offset + 4, kHostIsLittleEndian); } else { hi = this.dataView.getInt32(offset, kHostIsLittleEndian); lo = this.dataView.getUint32(offset + 4, kHostIsLittleEndian); } return lo + hi * kHighWordMultiplier; } Buffer.prototype.getFloat32 = function(offset) { return this.dataView.getFloat32(offset, kHostIsLittleEndian); } Buffer.prototype.getFloat64 = function(offset) { return this.dataView.getFloat64(offset, kHostIsLittleEndian); } Buffer.prototype.setUint8 = function(offset, value) { this.dataView.setUint8(offset, value); } Buffer.prototype.setUint16 = function(offset, value) { this.dataView.setUint16(offset, value, kHostIsLittleEndian); } Buffer.prototype.setUint32 = function(offset, value) { this.dataView.setUint32(offset, value, kHostIsLittleEndian); } Buffer.prototype.setUint64 = function(offset, value) { var hi = (value / kHighWordMultiplier) | 0; if (kHostIsLittleEndian) { this.dataView.setInt32(offset, value, kHostIsLittleEndian); this.dataView.setInt32(offset + 4, hi, kHostIsLittleEndian); } else { this.dataView.setInt32(offset, hi, kHostIsLittleEndian); this.dataView.setInt32(offset + 4, value, kHostIsLittleEndian); } } Buffer.prototype.setInt8 = function(offset, value) { this.dataView.setInt8(offset, value); } Buffer.prototype.setInt16 = function(offset, value) { this.dataView.setInt16(offset, value, kHostIsLittleEndian); } Buffer.prototype.setInt32 = function(offset, value) { this.dataView.setInt32(offset, value, kHostIsLittleEndian); } Buffer.prototype.setInt64 = function(offset, value) { var hi = Math.floor(value / kHighWordMultiplier); if (kHostIsLittleEndian) { this.dataView.setInt32(offset, value, kHostIsLittleEndian); this.dataView.setInt32(offset + 4, hi, kHostIsLittleEndian); } else { this.dataView.setInt32(offset, hi, kHostIsLittleEndian); this.dataView.setInt32(offset + 4, value, kHostIsLittleEndian); } } Buffer.prototype.setFloat32 = function(offset, value) { this.dataView.setFloat32(offset, value, kHostIsLittleEndian); } Buffer.prototype.setFloat64 = function(offset, value) { this.dataView.setFloat64(offset, value, kHostIsLittleEndian); } var exports = {}; exports.Buffer = Buffer; return exports; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/codec", [ "mojo/public/js/unicode", "mojo/public/js/buffer", ], function(unicode, buffer) { var kErrorUnsigned = "Passing negative value to unsigned"; var kErrorArray = "Passing non Array for array type"; var kErrorString = "Passing non String for string type"; var kErrorMap = "Passing non Map for map type"; // Memory ------------------------------------------------------------------- var kAlignment = 8; function align(size) { return size + (kAlignment - (size % kAlignment)) % kAlignment; } function isAligned(offset) { return offset >= 0 && (offset % kAlignment) === 0; } // Constants ---------------------------------------------------------------- var kArrayHeaderSize = 8; var kStructHeaderSize = 8; var kMessageHeaderSize = 24; var kMessageWithRequestIDHeaderSize = 32; var kMapStructPayloadSize = 16; var kStructHeaderNumBytesOffset = 0; var kStructHeaderVersionOffset = 4; var kEncodedInvalidHandleValue = 0xFFFFFFFF; // Decoder ------------------------------------------------------------------ function Decoder(buffer, handles, base) { this.buffer = buffer; this.handles = handles; this.base = base; this.next = base; } Decoder.prototype.align = function() { this.next = align(this.next); }; Decoder.prototype.skip = function(offset) { this.next += offset; }; Decoder.prototype.readInt8 = function() { var result = this.buffer.getInt8(this.next); this.next += 1; return result; }; Decoder.prototype.readUint8 = function() { var result = this.buffer.getUint8(this.next); this.next += 1; return result; }; Decoder.prototype.readInt16 = function() { var result = this.buffer.getInt16(this.next); this.next += 2; return result; }; Decoder.prototype.readUint16 = function() { var result = this.buffer.getUint16(this.next); this.next += 2; return result; }; Decoder.prototype.readInt32 = function() { var result = this.buffer.getInt32(this.next); this.next += 4; return result; }; Decoder.prototype.readUint32 = function() { var result = this.buffer.getUint32(this.next); this.next += 4; return result; }; Decoder.prototype.readInt64 = function() { var result = this.buffer.getInt64(this.next); this.next += 8; return result; }; Decoder.prototype.readUint64 = function() { var result = this.buffer.getUint64(this.next); this.next += 8; return result; }; Decoder.prototype.readFloat = function() { var result = this.buffer.getFloat32(this.next); this.next += 4; return result; }; Decoder.prototype.readDouble = function() { var result = this.buffer.getFloat64(this.next); this.next += 8; return result; }; Decoder.prototype.decodePointer = function() { // TODO(abarth): To correctly decode a pointer, we need to know the real // base address of the array buffer. var offsetPointer = this.next; var offset = this.readUint64(); if (!offset) return 0; return offsetPointer + offset; }; Decoder.prototype.decodeAndCreateDecoder = function(pointer) { return new Decoder(this.buffer, this.handles, pointer); }; Decoder.prototype.decodeHandle = function() { return this.handles[this.readUint32()] || null; }; Decoder.prototype.decodeString = function() { var numberOfBytes = this.readUint32(); var numberOfElements = this.readUint32(); var base = this.next; this.next += numberOfElements; return unicode.decodeUtf8String( new Uint8Array(this.buffer.arrayBuffer, base, numberOfElements)); }; Decoder.prototype.decodeArray = function(cls) { var numberOfBytes = this.readUint32(); var numberOfElements = this.readUint32(); var val = new Array(numberOfElements); if (cls === PackedBool) { var byte; for (var i = 0; i < numberOfElements; ++i) { if (i % 8 === 0) byte = this.readUint8(); val[i] = (byte & (1 << i % 8)) ? true : false; } } else { for (var i = 0; i < numberOfElements; ++i) { val[i] = cls.decode(this); } } return val; }; Decoder.prototype.decodeStruct = function(cls) { return cls.decode(this); }; Decoder.prototype.decodeStructPointer = function(cls) { var pointer = this.decodePointer(); if (!pointer) { return null; } return cls.decode(this.decodeAndCreateDecoder(pointer)); }; Decoder.prototype.decodeArrayPointer = function(cls) { var pointer = this.decodePointer(); if (!pointer) { return null; } return this.decodeAndCreateDecoder(pointer).decodeArray(cls); }; Decoder.prototype.decodeStringPointer = function() { var pointer = this.decodePointer(); if (!pointer) { return null; } return this.decodeAndCreateDecoder(pointer).decodeString(); }; Decoder.prototype.decodeMap = function(keyClass, valueClass) { this.skip(4); // numberOfBytes this.skip(4); // version var keys = this.decodeArrayPointer(keyClass); var values = this.decodeArrayPointer(valueClass); var val = new Map(); for (var i = 0; i < keys.length; i++) val.set(keys[i], values[i]); return val; }; Decoder.prototype.decodeMapPointer = function(keyClass, valueClass) { var pointer = this.decodePointer(); if (!pointer) { return null; } var decoder = this.decodeAndCreateDecoder(pointer); return decoder.decodeMap(keyClass, valueClass); }; // Encoder ------------------------------------------------------------------ function Encoder(buffer, handles, base) { this.buffer = buffer; this.handles = handles; this.base = base; this.next = base; } Encoder.prototype.align = function() { this.next = align(this.next); }; Encoder.prototype.skip = function(offset) { this.next += offset; }; Encoder.prototype.writeInt8 = function(val) { this.buffer.setInt8(this.next, val); this.next += 1; }; Encoder.prototype.writeUint8 = function(val) { if (val < 0) { throw new Error(kErrorUnsigned); } this.buffer.setUint8(this.next, val); this.next += 1; }; Encoder.prototype.writeInt16 = function(val) { this.buffer.setInt16(this.next, val); this.next += 2; }; Encoder.prototype.writeUint16 = function(val) { if (val < 0) { throw new Error(kErrorUnsigned); } this.buffer.setUint16(this.next, val); this.next += 2; }; Encoder.prototype.writeInt32 = function(val) { this.buffer.setInt32(this.next, val); this.next += 4; }; Encoder.prototype.writeUint32 = function(val) { if (val < 0) { throw new Error(kErrorUnsigned); } this.buffer.setUint32(this.next, val); this.next += 4; }; Encoder.prototype.writeInt64 = function(val) { this.buffer.setInt64(this.next, val); this.next += 8; }; Encoder.prototype.writeUint64 = function(val) { if (val < 0) { throw new Error(kErrorUnsigned); } this.buffer.setUint64(this.next, val); this.next += 8; }; Encoder.prototype.writeFloat = function(val) { this.buffer.setFloat32(this.next, val); this.next += 4; }; Encoder.prototype.writeDouble = function(val) { this.buffer.setFloat64(this.next, val); this.next += 8; }; Encoder.prototype.encodePointer = function(pointer) { if (!pointer) return this.writeUint64(0); // TODO(abarth): To correctly encode a pointer, we need to know the real // base address of the array buffer. var offset = pointer - this.next; this.writeUint64(offset); }; Encoder.prototype.createAndEncodeEncoder = function(size) { var pointer = this.buffer.alloc(align(size)); this.encodePointer(pointer); return new Encoder(this.buffer, this.handles, pointer); }; Encoder.prototype.encodeHandle = function(handle) { this.handles.push(handle); this.writeUint32(this.handles.length - 1); }; Encoder.prototype.encodeString = function(val) { var base = this.next + kArrayHeaderSize; var numberOfElements = unicode.encodeUtf8String( val, new Uint8Array(this.buffer.arrayBuffer, base)); var numberOfBytes = kArrayHeaderSize + numberOfElements; this.writeUint32(numberOfBytes); this.writeUint32(numberOfElements); this.next += numberOfElements; }; Encoder.prototype.encodeArray = function(cls, val, numberOfElements, encodedSize) { if (numberOfElements === undefined) numberOfElements = val.length; if (encodedSize === undefined) encodedSize = kArrayHeaderSize + cls.encodedSize * numberOfElements; this.writeUint32(encodedSize); this.writeUint32(numberOfElements); if (cls === PackedBool) { var byte = 0; for (i = 0; i < numberOfElements; ++i) { if (val[i]) byte |= (1 << i % 8); if (i % 8 === 7 || i == numberOfElements - 1) { Uint8.encode(this, byte); byte = 0; } } } else { for (var i = 0; i < numberOfElements; ++i) cls.encode(this, val[i]); } }; Encoder.prototype.encodeStruct = function(cls, val) { return cls.encode(this, val); }; Encoder.prototype.encodeStructPointer = function(cls, val) { if (val == null) { // Also handles undefined, since undefined == null. this.encodePointer(val); return; } var encoder = this.createAndEncodeEncoder(cls.encodedSize); cls.encode(encoder, val); }; Encoder.prototype.encodeArrayPointer = function(cls, val) { if (val == null) { // Also handles undefined, since undefined == null. this.encodePointer(val); return; } var numberOfElements = val.length; if (!Number.isSafeInteger(numberOfElements) || numberOfElements < 0) throw new Error(kErrorArray); var encodedSize = kArrayHeaderSize + ((cls === PackedBool) ? Math.ceil(numberOfElements / 8) : cls.encodedSize * numberOfElements); var encoder = this.createAndEncodeEncoder(encodedSize); encoder.encodeArray(cls, val, numberOfElements, encodedSize); }; Encoder.prototype.encodeStringPointer = function(val) { if (val == null) { // Also handles undefined, since undefined == null. this.encodePointer(val); return; } // Only accepts string primivites, not String Objects like new String("foo") if (typeof(val) !== "string") { throw new Error(kErrorString); } var encodedSize = kArrayHeaderSize + unicode.utf8Length(val); var encoder = this.createAndEncodeEncoder(encodedSize); encoder.encodeString(val); }; Encoder.prototype.encodeMap = function(keyClass, valueClass, val) { var keys = new Array(val.size); var values = new Array(val.size); var i = 0; val.forEach(function(value, key) { values[i] = value; keys[i++] = key; }); this.writeUint32(kStructHeaderSize + kMapStructPayloadSize); this.writeUint32(0); // version this.encodeArrayPointer(keyClass, keys); this.encodeArrayPointer(valueClass, values); } Encoder.prototype.encodeMapPointer = function(keyClass, valueClass, val) { if (val == null) { // Also handles undefined, since undefined == null. this.encodePointer(val); return; } if (!(val instanceof Map)) { throw new Error(kErrorMap); } var encodedSize = kStructHeaderSize + kMapStructPayloadSize; var encoder = this.createAndEncodeEncoder(encodedSize); encoder.encodeMap(keyClass, valueClass, val); }; // Message ------------------------------------------------------------------ var kMessageInterfaceIdOffset = kStructHeaderSize; var kMessageNameOffset = kMessageInterfaceIdOffset + 4; var kMessageFlagsOffset = kMessageNameOffset + 4; var kMessageRequestIDOffset = kMessageFlagsOffset + 8; var kMessageExpectsResponse = 1 << 0; var kMessageIsResponse = 1 << 1; function Message(buffer, handles) { this.buffer = buffer; this.handles = handles; } Message.prototype.getHeaderNumBytes = function() { return this.buffer.getUint32(kStructHeaderNumBytesOffset); }; Message.prototype.getHeaderVersion = function() { return this.buffer.getUint32(kStructHeaderVersionOffset); }; Message.prototype.getName = function() { return this.buffer.getUint32(kMessageNameOffset); }; Message.prototype.getFlags = function() { return this.buffer.getUint32(kMessageFlagsOffset); }; Message.prototype.isResponse = function() { return (this.getFlags() & kMessageIsResponse) != 0; }; Message.prototype.expectsResponse = function() { return (this.getFlags() & kMessageExpectsResponse) != 0; }; Message.prototype.setRequestID = function(requestID) { // TODO(darin): Verify that space was reserved for this field! this.buffer.setUint64(kMessageRequestIDOffset, requestID); }; // MessageBuilder ----------------------------------------------------------- function MessageBuilder(messageName, payloadSize) { // Currently, we don't compute the payload size correctly ahead of time. // Instead, we resize the buffer at the end. var numberOfBytes = kMessageHeaderSize + payloadSize; this.buffer = new buffer.Buffer(numberOfBytes); this.handles = []; var encoder = this.createEncoder(kMessageHeaderSize); encoder.writeUint32(kMessageHeaderSize); encoder.writeUint32(0); // version. encoder.writeUint32(0); // interface ID. encoder.writeUint32(messageName); encoder.writeUint32(0); // flags. encoder.writeUint32(0); // padding. } MessageBuilder.prototype.createEncoder = function(size) { var pointer = this.buffer.alloc(size); return new Encoder(this.buffer, this.handles, pointer); }; MessageBuilder.prototype.encodeStruct = function(cls, val) { cls.encode(this.createEncoder(cls.encodedSize), val); }; MessageBuilder.prototype.finish = function() { // TODO(abarth): Rather than resizing the buffer at the end, we could // compute the size we need ahead of time, like we do in C++. this.buffer.trim(); var message = new Message(this.buffer, this.handles); this.buffer = null; this.handles = null; this.encoder = null; return message; }; // MessageWithRequestIDBuilder ----------------------------------------------- function MessageWithRequestIDBuilder(messageName, payloadSize, flags, requestID) { // Currently, we don't compute the payload size correctly ahead of time. // Instead, we resize the buffer at the end. var numberOfBytes = kMessageWithRequestIDHeaderSize + payloadSize; this.buffer = new buffer.Buffer(numberOfBytes); this.handles = []; var encoder = this.createEncoder(kMessageWithRequestIDHeaderSize); encoder.writeUint32(kMessageWithRequestIDHeaderSize); encoder.writeUint32(1); // version. encoder.writeUint32(0); // interface ID. encoder.writeUint32(messageName); encoder.writeUint32(flags); encoder.writeUint32(0); // padding. encoder.writeUint64(requestID); } MessageWithRequestIDBuilder.prototype = Object.create(MessageBuilder.prototype); MessageWithRequestIDBuilder.prototype.constructor = MessageWithRequestIDBuilder; // MessageReader ------------------------------------------------------------ function MessageReader(message) { this.decoder = new Decoder(message.buffer, message.handles, 0); var messageHeaderSize = this.decoder.readUint32(); this.payloadSize = message.buffer.byteLength - messageHeaderSize; var version = this.decoder.readUint32(); var interface_id = this.decoder.readUint32(); if (interface_id != 0) { throw new Error("Receiving non-zero interface ID. Associated interfaces " + "are not yet supported."); } this.messageName = this.decoder.readUint32(); this.flags = this.decoder.readUint32(); // Skip the padding. this.decoder.skip(4); if (version >= 1) this.requestID = this.decoder.readUint64(); this.decoder.skip(messageHeaderSize - this.decoder.next); } MessageReader.prototype.decodeStruct = function(cls) { return cls.decode(this.decoder); }; // Built-in types ----------------------------------------------------------- // This type is only used with ArrayOf(PackedBool). function PackedBool() { } function Int8() { } Int8.encodedSize = 1; Int8.decode = function(decoder) { return decoder.readInt8(); }; Int8.encode = function(encoder, val) { encoder.writeInt8(val); }; Uint8.encode = function(encoder, val) { encoder.writeUint8(val); }; function Uint8() { } Uint8.encodedSize = 1; Uint8.decode = function(decoder) { return decoder.readUint8(); }; Uint8.encode = function(encoder, val) { encoder.writeUint8(val); }; function Int16() { } Int16.encodedSize = 2; Int16.decode = function(decoder) { return decoder.readInt16(); }; Int16.encode = function(encoder, val) { encoder.writeInt16(val); }; function Uint16() { } Uint16.encodedSize = 2; Uint16.decode = function(decoder) { return decoder.readUint16(); }; Uint16.encode = function(encoder, val) { encoder.writeUint16(val); }; function Int32() { } Int32.encodedSize = 4; Int32.decode = function(decoder) { return decoder.readInt32(); }; Int32.encode = function(encoder, val) { encoder.writeInt32(val); }; function Uint32() { } Uint32.encodedSize = 4; Uint32.decode = function(decoder) { return decoder.readUint32(); }; Uint32.encode = function(encoder, val) { encoder.writeUint32(val); }; function Int64() { } Int64.encodedSize = 8; Int64.decode = function(decoder) { return decoder.readInt64(); }; Int64.encode = function(encoder, val) { encoder.writeInt64(val); }; function Uint64() { } Uint64.encodedSize = 8; Uint64.decode = function(decoder) { return decoder.readUint64(); }; Uint64.encode = function(encoder, val) { encoder.writeUint64(val); }; function String() { }; String.encodedSize = 8; String.decode = function(decoder) { return decoder.decodeStringPointer(); }; String.encode = function(encoder, val) { encoder.encodeStringPointer(val); }; function NullableString() { } NullableString.encodedSize = String.encodedSize; NullableString.decode = String.decode; NullableString.encode = String.encode; function Float() { } Float.encodedSize = 4; Float.decode = function(decoder) { return decoder.readFloat(); }; Float.encode = function(encoder, val) { encoder.writeFloat(val); }; function Double() { } Double.encodedSize = 8; Double.decode = function(decoder) { return decoder.readDouble(); }; Double.encode = function(encoder, val) { encoder.writeDouble(val); }; function PointerTo(cls) { this.cls = cls; } PointerTo.prototype.encodedSize = 8; PointerTo.prototype.decode = function(decoder) { var pointer = decoder.decodePointer(); if (!pointer) { return null; } return this.cls.decode(decoder.decodeAndCreateDecoder(pointer)); }; PointerTo.prototype.encode = function(encoder, val) { if (!val) { encoder.encodePointer(val); return; } var objectEncoder = encoder.createAndEncodeEncoder(this.cls.encodedSize); this.cls.encode(objectEncoder, val); }; function NullablePointerTo(cls) { PointerTo.call(this, cls); } NullablePointerTo.prototype = Object.create(PointerTo.prototype); function ArrayOf(cls, length) { this.cls = cls; this.length = length || 0; } ArrayOf.prototype.encodedSize = 8; ArrayOf.prototype.dimensions = function() { return [this.length].concat( (this.cls instanceof ArrayOf) ? this.cls.dimensions() : []); } ArrayOf.prototype.decode = function(decoder) { return decoder.decodeArrayPointer(this.cls); }; ArrayOf.prototype.encode = function(encoder, val) { encoder.encodeArrayPointer(this.cls, val); }; function NullableArrayOf(cls) { ArrayOf.call(this, cls); } NullableArrayOf.prototype = Object.create(ArrayOf.prototype); function Handle() { } Handle.encodedSize = 4; Handle.decode = function(decoder) { return decoder.decodeHandle(); }; Handle.encode = function(encoder, val) { encoder.encodeHandle(val); }; function NullableHandle() { } NullableHandle.encodedSize = Handle.encodedSize; NullableHandle.decode = Handle.decode; NullableHandle.encode = Handle.encode; function Interface() { } Interface.encodedSize = 8; Interface.decode = function(decoder) { var handle = decoder.decodeHandle(); // Ignore the version field for now. decoder.readUint32(); return handle; }; Interface.encode = function(encoder, val) { encoder.encodeHandle(val); // Set the version field to 0 for now. encoder.writeUint32(0); }; function NullableInterface() { } NullableInterface.encodedSize = Interface.encodedSize; NullableInterface.decode = Interface.decode; NullableInterface.encode = Interface.encode; function MapOf(keyClass, valueClass) { this.keyClass = keyClass; this.valueClass = valueClass; } MapOf.prototype.encodedSize = 8; MapOf.prototype.decode = function(decoder) { return decoder.decodeMapPointer(this.keyClass, this.valueClass); }; MapOf.prototype.encode = function(encoder, val) { encoder.encodeMapPointer(this.keyClass, this.valueClass, val); }; function NullableMapOf(keyClass, valueClass) { MapOf.call(this, keyClass, valueClass); } NullableMapOf.prototype = Object.create(MapOf.prototype); var exports = {}; exports.align = align; exports.isAligned = isAligned; exports.Message = Message; exports.MessageBuilder = MessageBuilder; exports.MessageWithRequestIDBuilder = MessageWithRequestIDBuilder; exports.MessageReader = MessageReader; exports.kArrayHeaderSize = kArrayHeaderSize; exports.kMapStructPayloadSize = kMapStructPayloadSize; exports.kStructHeaderSize = kStructHeaderSize; exports.kEncodedInvalidHandleValue = kEncodedInvalidHandleValue; exports.kMessageHeaderSize = kMessageHeaderSize; exports.kMessageWithRequestIDHeaderSize = kMessageWithRequestIDHeaderSize; exports.kMessageExpectsResponse = kMessageExpectsResponse; exports.kMessageIsResponse = kMessageIsResponse; exports.Int8 = Int8; exports.Uint8 = Uint8; exports.Int16 = Int16; exports.Uint16 = Uint16; exports.Int32 = Int32; exports.Uint32 = Uint32; exports.Int64 = Int64; exports.Uint64 = Uint64; exports.Float = Float; exports.Double = Double; exports.String = String; exports.NullableString = NullableString; exports.PointerTo = PointerTo; exports.NullablePointerTo = NullablePointerTo; exports.ArrayOf = ArrayOf; exports.NullableArrayOf = NullableArrayOf; exports.PackedBool = PackedBool; exports.Handle = Handle; exports.NullableHandle = NullableHandle; exports.Interface = Interface; exports.NullableInterface = NullableInterface; exports.MapOf = MapOf; exports.NullableMapOf = NullableMapOf; return exports; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/connection", [ "mojo/public/js/bindings", "mojo/public/js/connector", "mojo/public/js/core", "mojo/public/js/router", ], function(bindings, connector, core, router) { var Router = router.Router; var EmptyProxy = bindings.EmptyProxy; var EmptyStub = bindings.EmptyStub; var ProxyBindings = bindings.ProxyBindings; var StubBindings = bindings.StubBindings; var TestConnector = connector.TestConnector; var TestRouter = router.TestRouter; // TODO(hansmuller): the proxy receiver_ property should be receiver$ function BaseConnection(localStub, remoteProxy, router) { this.router_ = router; this.local = localStub; this.remote = remoteProxy; this.router_.setIncomingReceiver(localStub); if (this.remote) this.remote.receiver_ = router; // Validate incoming messages: remote responses and local requests. var validateRequest = localStub && localStub.validator; var validateResponse = remoteProxy && remoteProxy.validator; var payloadValidators = []; if (validateRequest) payloadValidators.push(validateRequest); if (validateResponse) payloadValidators.push(validateResponse); this.router_.setPayloadValidators(payloadValidators); } BaseConnection.prototype.close = function() { this.router_.close(); this.router_ = null; this.local = null; this.remote = null; }; BaseConnection.prototype.encounteredError = function() { return this.router_.encounteredError(); }; function Connection( handle, localFactory, remoteFactory, routerFactory, connectorFactory) { var routerClass = routerFactory || Router; var router = new routerClass(handle, connectorFactory); var remoteProxy = remoteFactory && new remoteFactory(router); var localStub = localFactory && new localFactory(remoteProxy); BaseConnection.call(this, localStub, remoteProxy, router); } Connection.prototype = Object.create(BaseConnection.prototype); // The TestConnection subclass is only intended to be used in unit tests. function TestConnection(handle, localFactory, remoteFactory) { Connection.call(this, handle, localFactory, remoteFactory, TestRouter, TestConnector); } TestConnection.prototype = Object.create(Connection.prototype); // Return a handle for a message pipe that's connected to a proxy // for remoteInterface. Used by generated code for outgoing interface& // (request) parameters: the caller is given the generated proxy via // |proxyCallback(proxy)| and the generated code sends the handle // returned by this function. function bindProxy(proxyCallback, remoteInterface) { var messagePipe = core.createMessagePipe(); if (messagePipe.result != core.RESULT_OK) throw new Error("createMessagePipe failed " + messagePipe.result); var proxy = new remoteInterface.proxyClass; var router = new Router(messagePipe.handle0); var connection = new BaseConnection(undefined, proxy, router); ProxyBindings(proxy).connection = connection; if (proxyCallback) proxyCallback(proxy); return messagePipe.handle1; } // Return a handle for a message pipe that's connected to a stub for // localInterface. Used by generated code for outgoing interface // parameters: the caller is given the generated stub via // |stubCallback(stub)| and the generated code sends the handle // returned by this function. The caller is responsible for managing // the lifetime of the stub and for setting it's implementation // delegate with: StubBindings(stub).delegate = myImpl; function bindImpl(stubCallback, localInterface) { var messagePipe = core.createMessagePipe(); if (messagePipe.result != core.RESULT_OK) throw new Error("createMessagePipe failed " + messagePipe.result); var stub = new localInterface.stubClass; var router = new Router(messagePipe.handle0); var connection = new BaseConnection(stub, undefined, router); StubBindings(stub).connection = connection; if (stubCallback) stubCallback(stub); return messagePipe.handle1; } // Return a remoteInterface proxy for handle. Used by generated code // for converting incoming interface parameters to proxies. function bindHandleToProxy(handle, remoteInterface) { if (!core.isHandle(handle)) throw new Error("Not a handle " + handle); var proxy = new remoteInterface.proxyClass; var router = new Router(handle); var connection = new BaseConnection(undefined, proxy, router); ProxyBindings(proxy).connection = connection; return proxy; } // Return a localInterface stub for handle. Used by generated code // for converting incoming interface& request parameters to localInterface // stubs. The caller can specify the stub's implementation of localInterface // like this: StubBindings(stub).delegate = myStubImpl. function bindHandleToStub(handle, localInterface) { if (!core.isHandle(handle)) throw new Error("Not a handle " + handle); var stub = new localInterface.stubClass; var router = new Router(handle); var connection = new BaseConnection(stub, undefined, router); StubBindings(stub).connection = connection; return stub; } var exports = {}; exports.Connection = Connection; exports.TestConnection = TestConnection; exports.bindProxy = bindProxy; exports.bindImpl = bindImpl; exports.bindHandleToProxy = bindHandleToProxy; exports.bindHandleToStub = bindHandleToStub; return exports; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/connector", [ "mojo/public/js/buffer", "mojo/public/js/codec", "mojo/public/js/core", "mojo/public/js/support", ], function(buffer, codec, core, support) { function Connector(handle) { if (!core.isHandle(handle)) throw new Error("Connector: not a handle " + handle); this.handle_ = handle; this.dropWrites_ = false; this.error_ = false; this.incomingReceiver_ = null; this.readWaitCookie_ = null; this.errorHandler_ = null; if (handle) this.waitToReadMore_(); } Connector.prototype.close = function() { if (this.readWaitCookie_) { support.cancelWait(this.readWaitCookie_); this.readWaitCookie_ = null; } if (this.handle_ != null) { core.close(this.handle_); this.handle_ = null; } }; Connector.prototype.accept = function(message) { if (this.error_) return false; if (this.dropWrites_) return true; var result = core.writeMessage(this.handle_, new Uint8Array(message.buffer.arrayBuffer), message.handles, core.WRITE_MESSAGE_FLAG_NONE); switch (result) { case core.RESULT_OK: // The handles were successfully transferred, so we don't own them // anymore. message.handles = []; break; case core.RESULT_FAILED_PRECONDITION: // There's no point in continuing to write to this pipe since the other // end is gone. Avoid writing any future messages. Hide write failures // from the caller since we'd like them to continue consuming any // backlog of incoming messages before regarding the message pipe as // closed. this.dropWrites_ = true; break; default: // This particular write was rejected, presumably because of bad input. // The pipe is not necessarily in a bad state. return false; } return true; }; Connector.prototype.setIncomingReceiver = function(receiver) { this.incomingReceiver_ = receiver; }; Connector.prototype.setErrorHandler = function(handler) { this.errorHandler_ = handler; }; Connector.prototype.encounteredError = function() { return this.error_; }; Connector.prototype.waitToReadMore_ = function() { this.readWaitCookie_ = support.asyncWait(this.handle_, core.HANDLE_SIGNAL_READABLE, this.readMore_.bind(this)); }; Connector.prototype.readMore_ = function(result) { for (;;) { var read = core.readMessage(this.handle_, core.READ_MESSAGE_FLAG_NONE); if (this.handle_ == null) // The connector has been closed. return; if (read.result == core.RESULT_SHOULD_WAIT) { this.waitToReadMore_(); return; } if (read.result != core.RESULT_OK) { this.error_ = true; if (this.errorHandler_) this.errorHandler_.onError(read.result); return; } var messageBuffer = new buffer.Buffer(read.buffer); var message = new codec.Message(messageBuffer, read.handles); if (this.incomingReceiver_) { this.incomingReceiver_.accept(message); } } }; // The TestConnector subclass is only intended to be used in unit tests. It // doesn't automatically listen for input messages. Instead, you need to // call waitForNextMessage to block and wait for the next incoming message. function TestConnector(handle) { Connector.call(this, handle); } TestConnector.prototype = Object.create(Connector.prototype); TestConnector.prototype.waitToReadMore_ = function() { } TestConnector.prototype.waitForNextMessage = function() { var wait = core.wait(this.handle_, core.HANDLE_SIGNAL_READABLE, core.DEADLINE_INDEFINITE); this.readMore_(wait.result); } var exports = {}; exports.Connector = Connector; exports.TestConnector = TestConnector; return exports; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/router", [ "mojo/public/js/codec", "mojo/public/js/core", "mojo/public/js/connector", "mojo/public/js/validator", ], function(codec, core, connector, validator) { var Connector = connector.Connector; var MessageReader = codec.MessageReader; var Validator = validator.Validator; function Router(handle, connectorFactory) { if (!core.isHandle(handle)) throw new Error("Router constructor: Not a handle"); if (connectorFactory === undefined) connectorFactory = Connector; this.connector_ = new connectorFactory(handle); this.incomingReceiver_ = null; this.nextRequestID_ = 0; this.completers_ = new Map(); this.payloadValidators_ = []; this.connector_.setIncomingReceiver({ accept: this.handleIncomingMessage_.bind(this), }); this.connector_.setErrorHandler({ onError: this.handleConnectionError_.bind(this), }); } Router.prototype.close = function() { this.completers_.clear(); // Drop any responders. this.connector_.close(); }; Router.prototype.accept = function(message) { this.connector_.accept(message); }; Router.prototype.reject = function(message) { // TODO(mpcomplete): no way to trasmit errors over a Connection. }; Router.prototype.acceptAndExpectResponse = function(message) { // Reserve 0 in case we want it to convey special meaning in the future. var requestID = this.nextRequestID_++; if (requestID == 0) requestID = this.nextRequestID_++; message.setRequestID(requestID); var result = this.connector_.accept(message); if (!result) return Promise.reject(Error("Connection error")); var completer = {}; this.completers_.set(requestID, completer); return new Promise(function(resolve, reject) { completer.resolve = resolve; completer.reject = reject; }); }; Router.prototype.setIncomingReceiver = function(receiver) { this.incomingReceiver_ = receiver; }; Router.prototype.setPayloadValidators = function(payloadValidators) { this.payloadValidators_ = payloadValidators; }; Router.prototype.encounteredError = function() { return this.connector_.encounteredError(); }; Router.prototype.handleIncomingMessage_ = function(message) { var noError = validator.validationError.NONE; var messageValidator = new Validator(message); var err = messageValidator.validateMessageHeader(); for (var i = 0; err === noError && i < this.payloadValidators_.length; ++i) err = this.payloadValidators_[i](messageValidator); if (err == noError) this.handleValidIncomingMessage_(message); else this.handleInvalidIncomingMessage_(message, err); }; Router.prototype.handleValidIncomingMessage_ = function(message) { if (message.expectsResponse()) { if (this.incomingReceiver_) { this.incomingReceiver_.acceptWithResponder(message, this); } else { // If we receive a request expecting a response when the client is not // listening, then we have no choice but to tear down the pipe. this.close(); } } else if (message.isResponse()) { var reader = new MessageReader(message); var requestID = reader.requestID; var completer = this.completers_.get(requestID); this.completers_.delete(requestID); completer.resolve(message); } else { if (this.incomingReceiver_) this.incomingReceiver_.accept(message); } } Router.prototype.handleInvalidIncomingMessage_ = function(message, error) { this.close(); } Router.prototype.handleConnectionError_ = function(result) { this.completers_.forEach(function(value) { value.reject(result); }); this.close(); }; // The TestRouter subclass is only intended to be used in unit tests. // It defeats valid message handling and delgates invalid message handling. function TestRouter(handle, connectorFactory) { Router.call(this, handle, connectorFactory); } TestRouter.prototype = Object.create(Router.prototype); TestRouter.prototype.handleValidIncomingMessage_ = function() { }; TestRouter.prototype.handleInvalidIncomingMessage_ = function(message, error) { this.validationErrorHandler(error); }; var exports = {}; exports.Router = Router; exports.TestRouter = TestRouter; return exports; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Defines functions for translating between JavaScript strings and UTF8 strings * stored in ArrayBuffers. There is much room for optimization in this code if * it proves necessary. */ define("mojo/public/js/unicode", function() { /** * Decodes the UTF8 string from the given buffer. * @param {ArrayBufferView} buffer The buffer containing UTF8 string data. * @return {string} The corresponding JavaScript string. */ function decodeUtf8String(buffer) { return decodeURIComponent(escape(String.fromCharCode.apply(null, buffer))); } /** * Encodes the given JavaScript string into UTF8. * @param {string} str The string to encode. * @param {ArrayBufferView} outputBuffer The buffer to contain the result. * Should be pre-allocated to hold enough space. Use |utf8Length| to determine * how much space is required. * @return {number} The number of bytes written to |outputBuffer|. */ function encodeUtf8String(str, outputBuffer) { var utf8String = unescape(encodeURIComponent(str)); if (outputBuffer.length < utf8String.length) throw new Error("Buffer too small for encodeUtf8String"); for (var i = 0; i < outputBuffer.length && i < utf8String.length; i++) outputBuffer[i] = utf8String.charCodeAt(i); return i; } /** * Returns the number of bytes that a UTF8 encoding of the JavaScript string * |str| would occupy. */ function utf8Length(str) { var utf8String = unescape(encodeURIComponent(str)); return utf8String.length; } var exports = {}; exports.decodeUtf8String = decodeUtf8String; exports.encodeUtf8String = encodeUtf8String; exports.utf8Length = utf8Length; return exports; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. define("mojo/public/js/validator", [ "mojo/public/js/codec", ], function(codec) { var validationError = { NONE: 'VALIDATION_ERROR_NONE', MISALIGNED_OBJECT: 'VALIDATION_ERROR_MISALIGNED_OBJECT', ILLEGAL_MEMORY_RANGE: 'VALIDATION_ERROR_ILLEGAL_MEMORY_RANGE', UNEXPECTED_STRUCT_HEADER: 'VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER', UNEXPECTED_ARRAY_HEADER: 'VALIDATION_ERROR_UNEXPECTED_ARRAY_HEADER', ILLEGAL_HANDLE: 'VALIDATION_ERROR_ILLEGAL_HANDLE', UNEXPECTED_INVALID_HANDLE: 'VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE', ILLEGAL_POINTER: 'VALIDATION_ERROR_ILLEGAL_POINTER', UNEXPECTED_NULL_POINTER: 'VALIDATION_ERROR_UNEXPECTED_NULL_POINTER', MESSAGE_HEADER_INVALID_FLAGS: 'VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAGS', MESSAGE_HEADER_MISSING_REQUEST_ID: 'VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID', DIFFERENT_SIZED_ARRAYS_IN_MAP: 'VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP', INVALID_UNION_SIZE: 'VALIDATION_ERROR_INVALID_UNION_SIZE', UNEXPECTED_NULL_UNION: 'VALIDATION_ERROR_UNEXPECTED_NULL_UNION', }; var NULL_MOJO_POINTER = "NULL_MOJO_POINTER"; function isStringClass(cls) { return cls === codec.String || cls === codec.NullableString; } function isHandleClass(cls) { return cls === codec.Handle || cls === codec.NullableHandle; } function isInterfaceClass(cls) { return cls === codec.Interface || cls === codec.NullableInterface; } function isNullable(type) { return type === codec.NullableString || type === codec.NullableHandle || type === codec.NullableInterface || type instanceof codec.NullableArrayOf || type instanceof codec.NullablePointerTo; } function Validator(message) { this.message = message; this.offset = 0; this.handleIndex = 0; } Object.defineProperty(Validator.prototype, "offsetLimit", { get: function() { return this.message.buffer.byteLength; } }); Object.defineProperty(Validator.prototype, "handleIndexLimit", { get: function() { return this.message.handles.length; } }); // True if we can safely allocate a block of bytes from start to // to start + numBytes. Validator.prototype.isValidRange = function(start, numBytes) { // Only positive JavaScript integers that are less than 2^53 // (Number.MAX_SAFE_INTEGER) can be represented exactly. if (start < this.offset || numBytes <= 0 || !Number.isSafeInteger(start) || !Number.isSafeInteger(numBytes)) return false; var newOffset = start + numBytes; if (!Number.isSafeInteger(newOffset) || newOffset > this.offsetLimit) return false; return true; } Validator.prototype.claimRange = function(start, numBytes) { if (this.isValidRange(start, numBytes)) { this.offset = start + numBytes; return true; } return false; } Validator.prototype.claimHandle = function(index) { if (index === codec.kEncodedInvalidHandleValue) return true; if (index < this.handleIndex || index >= this.handleIndexLimit) return false; // This is safe because handle indices are uint32. this.handleIndex = index + 1; return true; } Validator.prototype.validateHandle = function(offset, nullable) { var index = this.message.buffer.getUint32(offset); if (index === codec.kEncodedInvalidHandleValue) return nullable ? validationError.NONE : validationError.UNEXPECTED_INVALID_HANDLE; if (!this.claimHandle(index)) return validationError.ILLEGAL_HANDLE; return validationError.NONE; } Validator.prototype.validateInterface = function(offset, nullable) { return this.validateHandle(offset, nullable); } Validator.prototype.validateStructHeader = function(offset, minNumBytes, minVersion) { if (!codec.isAligned(offset)) return validationError.MISALIGNED_OBJECT; if (!this.isValidRange(offset, codec.kStructHeaderSize)) return validationError.ILLEGAL_MEMORY_RANGE; var numBytes = this.message.buffer.getUint32(offset); var version = this.message.buffer.getUint32(offset + 4); // Backward compatibility is not yet supported. if (numBytes < minNumBytes || version < minVersion) return validationError.UNEXPECTED_STRUCT_HEADER; if (!this.claimRange(offset, numBytes)) return validationError.ILLEGAL_MEMORY_RANGE; return validationError.NONE; } Validator.prototype.validateMessageHeader = function() { var err = this.validateStructHeader(0, codec.kMessageHeaderSize, 0); if (err != validationError.NONE) return err; var numBytes = this.message.getHeaderNumBytes(); var version = this.message.getHeaderVersion(); var validVersionAndNumBytes = (version == 0 && numBytes == codec.kMessageHeaderSize) || (version == 1 && numBytes == codec.kMessageWithRequestIDHeaderSize) || (version > 1 && numBytes >= codec.kMessageWithRequestIDHeaderSize); if (!validVersionAndNumBytes) return validationError.UNEXPECTED_STRUCT_HEADER; var expectsResponse = this.message.expectsResponse(); var isResponse = this.message.isResponse(); if (version == 0 && (expectsResponse || isResponse)) return validationError.MESSAGE_HEADER_MISSING_REQUEST_ID; if (isResponse && expectsResponse) return validationError.MESSAGE_HEADER_INVALID_FLAGS; return validationError.NONE; } // Returns the message.buffer relative offset this pointer "points to", // NULL_MOJO_POINTER if the pointer represents a null, or JS null if the // pointer's value is not valid. Validator.prototype.decodePointer = function(offset) { var pointerValue = this.message.buffer.getUint64(offset); if (pointerValue === 0) return NULL_MOJO_POINTER; var bufferOffset = offset + pointerValue; return Number.isSafeInteger(bufferOffset) ? bufferOffset : null; } Validator.prototype.decodeUnionSize = function(offset) { return this.message.buffer.getUint32(offset); }; Validator.prototype.decodeUnionTag = function(offset) { return this.message.buffer.getUint32(offset + 4); }; Validator.prototype.validateArrayPointer = function( offset, elementSize, elementType, nullable, expectedDimensionSizes, currentDimension) { var arrayOffset = this.decodePointer(offset); if (arrayOffset === null) return validationError.ILLEGAL_POINTER; if (arrayOffset === NULL_MOJO_POINTER) return nullable ? validationError.NONE : validationError.UNEXPECTED_NULL_POINTER; return this.validateArray(arrayOffset, elementSize, elementType, expectedDimensionSizes, currentDimension); } Validator.prototype.validateStructPointer = function( offset, structClass, nullable) { var structOffset = this.decodePointer(offset); if (structOffset === null) return validationError.ILLEGAL_POINTER; if (structOffset === NULL_MOJO_POINTER) return nullable ? validationError.NONE : validationError.UNEXPECTED_NULL_POINTER; return structClass.validate(this, structOffset); } Validator.prototype.validateUnion = function( offset, unionClass, nullable) { var size = this.message.buffer.getUint32(offset); if (size == 0) { return nullable ? validationError.NONE : validationError.UNEXPECTED_NULL_UNION; } return unionClass.validate(this, offset); } Validator.prototype.validateNestedUnion = function( offset, unionClass, nullable) { var unionOffset = this.decodePointer(offset); if (unionOffset === null) return validationError.ILLEGAL_POINTER; if (unionOffset === NULL_MOJO_POINTER) return nullable ? validationError.NONE : validationError.UNEXPECTED_NULL_UNION; return this.validateUnion(unionOffset, unionClass, nullable); } // This method assumes that the array at arrayPointerOffset has // been validated. Validator.prototype.arrayLength = function(arrayPointerOffset) { var arrayOffset = this.decodePointer(arrayPointerOffset); return this.message.buffer.getUint32(arrayOffset + 4); } Validator.prototype.validateMapPointer = function( offset, mapIsNullable, keyClass, valueClass, valueIsNullable) { // Validate the implicit map struct: // struct {array<keyClass> keys; array<valueClass> values}; var structOffset = this.decodePointer(offset); if (structOffset === null) return validationError.ILLEGAL_POINTER; if (structOffset === NULL_MOJO_POINTER) return mapIsNullable ? validationError.NONE : validationError.UNEXPECTED_NULL_POINTER; var mapEncodedSize = codec.kStructHeaderSize + codec.kMapStructPayloadSize; var err = this.validateStructHeader(structOffset, mapEncodedSize, 0); if (err !== validationError.NONE) return err; // Validate the keys array. var keysArrayPointerOffset = structOffset + codec.kStructHeaderSize; err = this.validateArrayPointer( keysArrayPointerOffset, keyClass.encodedSize, keyClass, false, [0], 0); if (err !== validationError.NONE) return err; // Validate the values array. var valuesArrayPointerOffset = keysArrayPointerOffset + 8; var valuesArrayDimensions = [0]; // Validate the actual length below. if (valueClass instanceof codec.ArrayOf) valuesArrayDimensions = valuesArrayDimensions.concat(valueClass.dimensions()); var err = this.validateArrayPointer(valuesArrayPointerOffset, valueClass.encodedSize, valueClass, valueIsNullable, valuesArrayDimensions, 0); if (err !== validationError.NONE) return err; // Validate the lengths of the keys and values arrays. var keysArrayLength = this.arrayLength(keysArrayPointerOffset); var valuesArrayLength = this.arrayLength(valuesArrayPointerOffset); if (keysArrayLength != valuesArrayLength) return validationError.DIFFERENT_SIZED_ARRAYS_IN_MAP; return validationError.NONE; } Validator.prototype.validateStringPointer = function(offset, nullable) { return this.validateArrayPointer( offset, codec.Uint8.encodedSize, codec.Uint8, nullable, [0], 0); } // Similar to Array_Data<T>::Validate() // mojo/public/cpp/bindings/lib/array_internal.h Validator.prototype.validateArray = function (offset, elementSize, elementType, expectedDimensionSizes, currentDimension) { if (!codec.isAligned(offset)) return validationError.MISALIGNED_OBJECT; if (!this.isValidRange(offset, codec.kArrayHeaderSize)) return validationError.ILLEGAL_MEMORY_RANGE; var numBytes = this.message.buffer.getUint32(offset); var numElements = this.message.buffer.getUint32(offset + 4); // Note: this computation is "safe" because elementSize <= 8 and // numElements is a uint32. var elementsTotalSize = (elementType === codec.PackedBool) ? Math.ceil(numElements / 8) : (elementSize * numElements); if (numBytes < codec.kArrayHeaderSize + elementsTotalSize) return validationError.UNEXPECTED_ARRAY_HEADER; if (expectedDimensionSizes[currentDimension] != 0 && numElements != expectedDimensionSizes[currentDimension]) { return validationError.UNEXPECTED_ARRAY_HEADER; } if (!this.claimRange(offset, numBytes)) return validationError.ILLEGAL_MEMORY_RANGE; // Validate the array's elements if they are pointers or handles. var elementsOffset = offset + codec.kArrayHeaderSize; var nullable = isNullable(elementType); if (isHandleClass(elementType)) return this.validateHandleElements(elementsOffset, numElements, nullable); if (isInterfaceClass(elementType)) return this.validateInterfaceElements( elementsOffset, numElements, nullable); if (isStringClass(elementType)) return this.validateArrayElements( elementsOffset, numElements, codec.Uint8, nullable, [0], 0); if (elementType instanceof codec.PointerTo) return this.validateStructElements( elementsOffset, numElements, elementType.cls, nullable); if (elementType instanceof codec.ArrayOf) return this.validateArrayElements( elementsOffset, numElements, elementType.cls, nullable, expectedDimensionSizes, currentDimension + 1); return validationError.NONE; } // Note: the |offset + i * elementSize| computation in the validateFooElements // methods below is "safe" because elementSize <= 8, offset and // numElements are uint32, and 0 <= i < numElements. Validator.prototype.validateHandleElements = function(offset, numElements, nullable) { var elementSize = codec.Handle.encodedSize; for (var i = 0; i < numElements; i++) { var elementOffset = offset + i * elementSize; var err = this.validateHandle(elementOffset, nullable); if (err != validationError.NONE) return err; } return validationError.NONE; } Validator.prototype.validateInterfaceElements = function(offset, numElements, nullable) { var elementSize = codec.Interface.encodedSize; for (var i = 0; i < numElements; i++) { var elementOffset = offset + i * elementSize; var err = this.validateInterface(elementOffset, nullable); if (err != validationError.NONE) return err; } return validationError.NONE; } // The elementClass parameter is the element type of the element arrays. Validator.prototype.validateArrayElements = function(offset, numElements, elementClass, nullable, expectedDimensionSizes, currentDimension) { var elementSize = codec.PointerTo.prototype.encodedSize; for (var i = 0; i < numElements; i++) { var elementOffset = offset + i * elementSize; var err = this.validateArrayPointer( elementOffset, elementClass.encodedSize, elementClass, nullable, expectedDimensionSizes, currentDimension); if (err != validationError.NONE) return err; } return validationError.NONE; } Validator.prototype.validateStructElements = function(offset, numElements, structClass, nullable) { var elementSize = codec.PointerTo.prototype.encodedSize; for (var i = 0; i < numElements; i++) { var elementOffset = offset + i * elementSize; var err = this.validateStructPointer(elementOffset, structClass, nullable); if (err != validationError.NONE) return err; } return validationError.NONE; } var exports = {}; exports.validationError = validationError; exports.Validator = Validator; return exports; }); <html> <head> <title>CEF remote debugging</title> <style> </style> <script> function onLoad() { var tabs_list_request = new XMLHttpRequest(); tabs_list_request.open("GET", "/json/list?t=" + new Date().getTime(), true); tabs_list_request.onreadystatechange = onReady; tabs_list_request.send(); } function onReady() { if(this.readyState == 4 && this.status == 200) { if(this.response != null) var responseJSON = JSON.parse(this.response); for (var i = 0; i < responseJSON.length; ++i) appendItem(responseJSON[i]); } } function appendItem(item_object) { var frontend_ref; if (item_object.devtoolsFrontendUrl) { frontend_ref = document.createElement("a"); frontend_ref.href = item_object.devtoolsFrontendUrl; frontend_ref.title = item_object.title; } else { frontend_ref = document.createElement("div"); frontend_ref.title = "The tab already has active debugging session"; } var text = document.createElement("div"); if (item_object.title) text.innerText = item_object.title; else text.innerText = "(untitled tab)"; text.style.cssText = "background-image:url(" + item_object.faviconUrl + ")"; frontend_ref.appendChild(text); var item = document.createElement("p"); item.appendChild(frontend_ref); document.getElementById("items").appendChild(item); } </script> </head> <body onload='onLoad()'> <div id='caption'>Inspectable WebContents</div> <div id='items'></div> </body> </html> // Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c) // 2006-2009 Google Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the name Chromium Embedded // Framework nor the names of its contributors may be used to endorse // or promote products derived from this software without specific prior // written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <!DOCTYPE HTML> <!-- about:version template page --> <html id="t" i18n-values="dir:textdirection;"> <head> <title>About Version</title> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { background-color: white; color: black; font-family: Helvetica,Arial,sans-serif; margin: 0; } #outer { margin-left: auto; margin-right: auto; margin-top: 10px; width: 820px; } #inner { padding-top: 10px; width: 550px; } .label { -webkit-padding-end: 5px; font-size: 0.9em; font-weight: bold; text-align: end; white-space: nowrap; } .label:after { content: ':'; } #logo { float: right; margin-left: 40px; text-align: right; width: 200px; } #company { font-size: 0.7em; text-align: right; } #copyright { font-size: 0.7em; text-align: right; } .value { font-family: monospace; max-width: 430px; padding-left: 5px; } </style> </head> <body> <div id="outer"> <div id="logo"> <div id="company">Chromium Embedded Framework (CEF)</div> <div id="copyright">Copyright © $$YEAR$$ The Chromium Embedded Framework Authors.<br/>All rights reserved.<br/><a href="chrome://license">license</a> | <a href="chrome://credits">credits</a></div> </div> <table id="inner" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="label" valign="top">CEF</td> <td class="value">$$CEF$$</td> </tr> <tr> <td class="label" valign="top">Chromium</td> <td class="value">$$CHROMIUM$$</td> </tr> <tr> <td class="label" valign="top">OS</td> <td class="value">$$OS$$</td> </tr> <tr> <td class="label" valign="top">WebKit</td> <td class="value">$$WEBKIT$$</td> </tr> <tr> <td class="label" valign="top">JavaScript</td> <td class="value">$$JAVASCRIPT$$</td> </tr> <tr><td class="label" valign="top">Flash</td> <td class="value" id="flash">$$FLASH$$</td> </tr> <tr> <td class="label" valign="top">User Agent</td> <td class="value">$$USERAGENT$$</td> </tr> <tr> <td class="label" valign="top">Command Line</td> <td class="value">$$COMMANDLINE$$</td> </tr> <tr> <td class="label" valign="top">Module Path</td> <td class="value">$$MODULEPATH$$</td> </tr> <tr> <td class="label" valign="top">Cache Path</td> <td class="value">$$CACHEPATH$$</td> </tr> </table> </div> </body> </html> // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file defines extension APIs implemented in CEF. // See extensions/common/features/* to understand this file, in particular // feature.h, simple_feature.h, and base_feature_provider.h. { // From chrome/common/extensions/api/_api_features.json. // Required by the PDF extension which is hosted in a guest view. "mimeHandlerViewGuestInternal": { "internal": true, "contexts": "all", "channel": "stable", "matches": ["<all_urls>"] } } { // chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai "manifest_version": 2, "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2QIDAQAB", "name": "<NAME>", "version": "1", "description": "", "offline_enabled": true, "incognito": "split", "permissions": [ "<all_urls>", "resourcesPrivate" ], "mime_types": [ "application/pdf" ], "content_security_policy": "script-src 'self' blob: filesystem: chrome://resources; object-src * blob: filesystem: data:; plugin-types application/x-google-chrome-pdf", "mime_types_handler": "index.html", "web_accessible_resources": [ "*.js", "*.html", "*.css", "*.png" ] } <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no"> <script> function setMessage(msg) { document.getElementById('message').textContent = msg; } function notifyDidFinishLoading() { if (plugin.didFinishLoading) plugin.didFinishLoading(); } </script> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ html, body { -webkit-user-select: none; font-family: sans-serif; height: 100%; margin: 0; overflow: hidden; text-align: center; width: 100%; } h1 { font-size: 10pt; font-weight: normal; padding: 0pt 10pt; visibility: hidden; } #outer:hover h1, #outer:hover #close { visibility: visible; } p { font-size: 8pt; padding: 0pt 14pt; } #outer { align-items: center; border: 1px black solid; box-sizing: border-box; display: flex; height: 100%; justify-content: center; position: absolute; width: 100%; } #close { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAA9UlEQVR4Xu3UsWrCUByH0fMEouiuhrg4xohToJVGH0CHLBncEwfx/VvIFHLJBWmHDvKbv7PcP9f3L/fXwBsApZSRpUpEgbOnxwiReng6x4AvjdrNXRLkibubWqMcB9Yujk7qjhjmtZOji/U4wELuoBwQXa50kFsQA5jK+kQ/l5kSA4ZEK5Fo+3kcCIlGM8ijQEhUqkEeBUKiUPTyl4C5vZ1cbmdv/iqwclXY6aZwtXoFSLQqhVwmkytUWglxAMG7T0yCu4gD0v7ZBKeVxoEwFxIxYBPmIWEzDnyEeUj4HAfYdvmMcGYdsSUGsOzlIbHEv/uV38APrreiBRBIs3QAAAAASUVORK5CYII=) 2x); background-position: right top; background-repeat: no-repeat; cursor: pointer; height: 14px; position: absolute; right: 3px; top: 3px; visibility: hidden; width: 14px; } #close[data-plugin-type='document'] { display: none; } #close:hover { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAqUlEQVR4XqWRMQqEMBBF/1E8Ra6x6V3FRnS9QbCxtJg6Z7CzE9lTiIXXyUb3C8EULixDIMM8Zt4kcDfxM5A45U+cgeXnC1tREgkzAgob3hiq3CUHvGLG4FTQoSgxQGDrzN8WTLBGnx2IVDksen9GH7Z9hA5E6uxABMJyCHDMCEGHzugLQPPlBCBNGq+5YtpnGw1Bv+te15ypljTpVzdak5Opy+z+qf//zQ+Lg+07ay5KsgAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAB4UlEQVR42u2VsWoCQRBAh+MUFP0C1V9QD4NEOxs9xBQHQVCwSJFWVBAtBNXCxk6wTkBJYUTwEwQLC61E8QP0NzZzt5g5726DkC7EYWHZ8T3WndkV2C/jLwn4hwVYBIdLn9vkLp79QcBCTDMiy3w2gQ9XeTYkEHA8vqj2rworXu3HF1YFfSWgp5QFnKVLvYvzDEKEZ5hW70oXOCtcEbQLIkx7+IQtfMBSOjU6XEF4oyOdYInZbXyOuajjDlpNeQgleIUJKUz4BDMledhqOu/AzVSmzZ49CUjCC0yvim98iqtJT2L2jKsqczsdok9XrHNexaww415lnTNwn6CM/KxJIR8bnUZHPhLO6yMoIyk2pNjLewFuE5AiY1KMMQx8Q7hQYFek4AkjxXFe1rsF84I/BTFQMGL+1Lxwl4DwdtM1gjwKohgxyLtG7SYpxALqugOMcfOKN+bFXeBsLB1uulNcRqq7/tt36k41zoL6QlxGjtd6lrahiqCi1iOFYyvXuxY8yzK33VnvUivbLlOlj/jktm0s3YnXrNIXXufHNxuOGasi8S68zkwrlnV8ZcJJsTIUxbLgQcFZWE8N0gau2p40VVcM0gYeFpSRK6445UhBuKiRgiyKw+34rLt59nb1/7+RwReVkaFtqvNBuwAAAABJRU5ErkJggg==) 2x); } #close:active { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAQklEQVR4AWP4TwBSTQGDHcMZIIYAKA9VwRkwtINJgyCaCTAlCBaKAoQ+hFmoCqBKENKkK8C0gpAjCXuTyICiQ2QBAPSwyG3ByZlCAAAAAElFTkSuQmCC) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAA/ElEQVR4Xu3UsWrCUBiG4efGlIBoIMFbcnYolYJ3pg4iKGrGYFTRwaUFhYAekiDt0EG++X2W83N8/3J/DbwBMJJSsdQItcDY1VlCOImzq3Ed8OmicHASB3ns5KBw8VUNpDJrW7uAiJ3sbK1l0mqArpmFTUlQ5jYWZrrUAUSmT0SZm4qoA56JvVhs/5g3A7RLolA85A1ASOTye65NMxASK6syfxGITMzvMxG9CvRkliWwlOm9AsSOcitzU1NzK7mjuBkQvHtLK7iLBiB5PhttJSGpB8I8vM6kDuiHeUjoVwMfYR4SRtUAw1veIZzOjRhSBzCoyKFjgH/3K7+BHzg+Cgw0eSW3AAAAAElFTkSuQmCC) 2x); } </style> <style> body { background-color: rgb(187, 187, 187); } #plugin_icon { opacity: .6; } </style> </head> <body id="t" onload="notifyDidFinishLoading();"> <div i18n-values="title:name" id="outer"> <div id="inner"> <div><img id="plugin_icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAQAAAAk/gHOAAAIhklEQVR4Xr2ZXYidRxnHfzPvxzl7dpPdZLfaZGOzkqQ1kUAtrWkQ1FAI1kJDoSLpjfRGQUUR9K5eibdi9ULJjQjeWCJY0haMNHdS1MYKSqtma82ar2bbTXaTc/bsOe87IwzDAw8PJ3vnvMy7u/P1/Of5mv+86yLwWr381WvPDo+72rNdialO7oNI1KNxuU3GjHhjz9mDZ06PAFzkpcU3XmkerqgocWgQEYfT07VAC0AqAii9dQsB9/cHn/z6FXCv1uffjEc7dCgoBQC4Cfs0Io12LJio2locjpYG/69nHznWdy9+89JPp+jQxVPgcEq8IwJOizJ7NCAsNAETpK2hZfGH3/5+eeXLVQJQUuDxOLYvUWoCZ/wj4EQkqgaZAeC4/BQ/KR77eV10qagSBG0Al6oz4p3SkR2HALCQtZb681/8hXd1kYQ70CZQv2PaHfKAmh2lTQyIQFZ/e6iY9h4vC2oADsQ9NcTAiAF9BoxlTyIOp3arAToZL6HqvBUv6GUvsqvs0TUHOMJhDjBDn8bGj967AJOi/vZ2KPf82TLHCb7A0zzD05xkP5uMzC7FXDZ/mHavABj12R1Mc5IjdAk0VBzkFPu4SyvjJGyteNGkzqNeATAer70YIkfZR0PIwsbs5BAwFpgWihQVjgKRErt7nZ7VsmMeoiWqJQugIcqyNkmjAelMglcoLRgFB1o6xq1aWoLds8DXa9ji75kDTch5rlKCOniucYsa8RoZKSOk2MQeLQQscuWOBedZoxCLwjkuMEspoBJgAkFlAZ2aooJXYtxFB1QSL0AK1vkl38iL1bzGr1hkFk9QlnaWKcgaQZ0tUIposT55mMfhTXbosMkmvTT+Llco2E0HR1Qu3BIJOQQta3DiOwEoRUni09Cyh8Aqq7QJSJkhtLT0OMF0EhGZYS+OQQbdphrTqN1M0WWdMaUyqQagtaB2scUSn05LBoY4+rl/ipIuSFhu8gSf4iZjajxTuFS7+CzgRbaYwWnSYqKjRBQk6YKAx+f3DNATmJ6oF2SOuYmM6R32q6jSviK+oHBNICEOsaFlTnq+CrjbLDLWEUBUY1R2jHgkrg2J1fuUat9SIuv4DFoEqwdCAigQHEHYQIdqG0aIFZ+qPqIKvNGdBhJAfEH4nksQukQrYLIODNSg+KLAkzdoX5AOgUNQIWT5n4yfbCYtSHqtL3iZojyhEBFBCcLsxPBnI3A7g5aW47bsSMnHTrDRHW2/4c/WHfWs0l5GCm6zzv2wjf21eCu8osntDQ0hZ9loWVO0eBnTZIuX1HQobRQoSm7DDWCKXhINe1liKW1qaE9KvCASfIE+m0Cky1Xe4iIrFEQrcJKSJQqe4gYDljjFlzjNMzxMZNPMLJXb5ONnxIiCKd7kVW5QsMgRnmRLRFlfsEEbgJNscR9HmWFMyywnGPFHGnF2laD1zir+yQYt59lggQ43eY9ZHssAJ13xrd93eZ5GSH5DyTHe4wo71Zwy70zxnA6X+RsDujxANxlhhnMcpdJkzrqWucTeVvDGfIQu/Xx6CoR81iuC5uiwmzkKikxkugz4C48TwAbaxBxq80RFZIuQTSEJOiQISZQwHUeFA+Xfyzxu438bPWhCR9a2NmDZSiMERd0cXg2eMeLiNulpmlvMM6CR3n7yCK1B3+g0S0g28+wiqMlDPiMnhwnI1BOMJn7EC/yAf1NDJnqXuEpPG4pSuDJIgq74HA8ReYn/0KMCRtzPPGFSnlTnScjr3eAPLHCDc5zmY7R43uW3rLGgyH1O0EExpi0OcIhpIs9xhsv0iOzmOcJEgiYFJ7aHLWrm6bDBGbrsYpUbwC7RiUDA8ls8BS2Biue5zpiKjzA10QmlgoqYHi6tVDPiFjdpEw+pcFoiJTrrS7BEYpq0X/WItXGUNLQTaVtM/YmqUlPRyiUpCkVCDKFYExR8yDpTmrwq1XmGXGeVfSwkfdnz0uHYIR8BHEgmUJc7gWDukoFG8UGn9jnkZc4xRwXAKZ5giLMsi8iI1mRR5T+aO0bB5tngDk5bWGj8mLP8jiV6FEnIK8DnGSPw5e34BI2l+gJI+YL+PONZzxAsNw78l99wlB1UQKQGVnifBYLiz6kyy6rocDLf9FiHyvdDewJAYIW99Cilr2bIECSwg2jNsUCjVrbJHKGv5rbT0OqJkjnXqClwBGnrUon6dewcYGhuUagWMUR6ZDpAS7AQUj3MBcYUuaUFlpiX0doUe2kzTM2ttBbEF3QJBJt4AMfH+SRXKShyKv4sx7L6tcEAegR9kbexkemrzfaZ6QhuxfS+wjx3icCIQzxKJJg1HA6fnpZctAFsdozq21DBNQbMMRI2mXMbjpLIHlaYwSef38m6fK92+YkMGTFkjVLrUwvXxC3gkeCh4AP+xN7keD2qJAoCLXe4zQpv08n2fZ+bTGfXHDCkzx36DLjDZnp38UCwGgXlCyqxAjiGnKdJ0T9Hl5AvNmNWucYVdrELl6Au8zIfTVQMNujzAWt8yIiaTqo9CoIRHuVQj3JY60SMo0oxPWbE9bT7f0jaqtlPhQfA0/A2FxmnvjI5aYcHxCTgRCz2N+ELimbIpCSs1gEJxrUKdjCj/EgdbhPygTgt6O8L5O9LOroRWIYlSl8xMf/FSdTWuqPQV7WjAOYDJjbr6xaVJ+2V3mq0ZEQtwYI330oFijWDVawWmB4jXDvkAEoutscrTUDVRHX2KbFmeW1AgRQNcPE5esuEcvHXN4+3FKhiVa4EWRqXi7G8BRBAgDYc/D2b5ZGfXftaebi1/z0w1g6gdmGF258RXaJy7tHyd8+y5iI/3vfn17sPdinwRD14u38D2/dEwRGUcRq2lr/3rUcv846LwFvTF1549+TGI0i5l3qxDnZPXdgSmP3rode/c3Zmg0uMXR7kuI85dvD/K3e5lXgd/wNMUxeBJGbvdAAAAABJRU5ErkJggg=="></div> <h1 id="message" i18n-content="message"></h1> </div> <div id="close" i18n-values="title:hide;data-plugin-type:pluginType" onclick="plugin.hide();"> </div> </div> </body> </html> <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no"> <script> window.onload = function() { if (plugin.didFinishLoading) plugin.didFinishLoading(); }; window.onkeydown = function(e) { if (e.keyIdentifier == 'Enter' || e.keyIdentifier == 'U+0020') { plugin.load(); e.preventDefault(); } }; </script> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ html, body { -webkit-user-select: none; font-family: sans-serif; height: 100%; margin: 0; overflow: hidden; text-align: center; width: 100%; } h1 { font-size: 10pt; font-weight: normal; padding: 0pt 10pt; visibility: hidden; } #outer:hover h1, #outer:hover #close { visibility: visible; } p { font-size: 8pt; padding: 0pt 14pt; } #outer { align-items: center; border: 1px black solid; box-sizing: border-box; display: flex; height: 100%; justify-content: center; position: absolute; width: 100%; } #close { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAA9UlEQVR4Xu3UsWrCUByH0fMEouiuhrg4xohToJVGH0CHLBncEwfx/VvIFHLJBWmHDvKbv7PcP9f3L/fXwBsApZSRpUpEgbOnxwiReng6x4AvjdrNXRLkibubWqMcB9Yujk7qjhjmtZOji/U4wELuoBwQXa50kFsQA5jK+kQ/l5kSA4ZEK5Fo+3kcCIlGM8ijQEhUqkEeBUKiUPTyl4C5vZ1cbmdv/iqwclXY6aZwtXoFSLQqhVwmkytUWglxAMG7T0yCu4gD0v7ZBKeVxoEwFxIxYBPmIWEzDnyEeUj4HAfYdvmMcGYdsSUGsOzlIbHEv/uV38APrreiBRBIs3QAAAAASUVORK5CYII=) 2x); background-position: right top; background-repeat: no-repeat; cursor: pointer; height: 14px; position: absolute; right: 3px; top: 3px; visibility: hidden; width: 14px; } #close[data-plugin-type='document'] { display: none; } #close:hover { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAqUlEQVR4XqWRMQqEMBBF/1E8Ra6x6V3FRnS9QbCxtJg6Z7CzE9lTiIXXyUb3C8EULixDIMM8Zt4kcDfxM5A45U+cgeXnC1tREgkzAgob3hiq3CUHvGLG4FTQoSgxQGDrzN8WTLBGnx2IVDksen9GH7Z9hA5E6uxABMJyCHDMCEGHzugLQPPlBCBNGq+5YtpnGw1Bv+te15ypljTpVzdak5Opy+z+qf//zQ+Lg+07ay5KsgAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAB4UlEQVR42u2VsWoCQRBAh+MUFP0C1V9QD4NEOxs9xBQHQVCwSJFWVBAtBNXCxk6wTkBJYUTwEwQLC61E8QP0NzZzt5g5726DkC7EYWHZ8T3WndkV2C/jLwn4hwVYBIdLn9vkLp79QcBCTDMiy3w2gQ9XeTYkEHA8vqj2rworXu3HF1YFfSWgp5QFnKVLvYvzDEKEZ5hW70oXOCtcEbQLIkx7+IQtfMBSOjU6XEF4oyOdYInZbXyOuajjDlpNeQgleIUJKUz4BDMledhqOu/AzVSmzZ49CUjCC0yvim98iqtJT2L2jKsqczsdok9XrHNexaww415lnTNwn6CM/KxJIR8bnUZHPhLO6yMoIyk2pNjLewFuE5AiY1KMMQx8Q7hQYFek4AkjxXFe1rsF84I/BTFQMGL+1Lxwl4DwdtM1gjwKohgxyLtG7SYpxALqugOMcfOKN+bFXeBsLB1uulNcRqq7/tt36k41zoL6QlxGjtd6lrahiqCi1iOFYyvXuxY8yzK33VnvUivbLlOlj/jktm0s3YnXrNIXXufHNxuOGasi8S68zkwrlnV8ZcJJsTIUxbLgQcFZWE8N0gau2p40VVcM0gYeFpSRK6445UhBuKiRgiyKw+34rLt59nb1/7+RwReVkaFtqvNBuwAAAABJRU5ErkJggg==) 2x); } #close:active { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAQklEQVR4AWP4TwBSTQGDHcMZIIYAKA9VwRkwtINJgyCaCTAlCBaKAoQ+hFmoCqBKENKkK8C0gpAjCXuTyICiQ2QBAPSwyG3ByZlCAAAAAElFTkSuQmCC) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAA/ElEQVR4Xu3UsWrCUBiG4efGlIBoIMFbcnYolYJ3pg4iKGrGYFTRwaUFhYAekiDt0EG++X2W83N8/3J/DbwBMJJSsdQItcDY1VlCOImzq3Ed8OmicHASB3ns5KBw8VUNpDJrW7uAiJ3sbK1l0mqArpmFTUlQ5jYWZrrUAUSmT0SZm4qoA56JvVhs/5g3A7RLolA85A1ASOTye65NMxASK6syfxGITMzvMxG9CvRkliWwlOm9AsSOcitzU1NzK7mjuBkQvHtLK7iLBiB5PhttJSGpB8I8vM6kDuiHeUjoVwMfYR4SRtUAw1veIZzOjRhSBzCoyKFjgH/3K7+BHzg+Cgw0eSW3AAAAAElFTkSuQmCC) 2x); } </style> <style> #outer { border: none; cursor: pointer; } #shielding { background-color: rgba(0, 0, 0, 0.5); height: 100%; left: 0px; position: absolute; top: 0px; width: 100%; z-index: 2; } #plugin-icon { opacity: 0.8; max-height: 100%; max-width: 100%; min-width: 0; min-height: 0; } #plugin-icon:hover { opacity: 0.95; } #poster { height: 100%; object-fit: contain; width: 100%; z-index: 1; } #inner-container { align-items: center; display: flex; height: 100%; justify-content: center; left: 0px; max-height: 100%; max-width: 100%; position: absolute; top: 0px; width: 100%; z-index: 2; } </style> <base i18n-values="href:baseurl"> </head> <body> <div i18n-values="title:name" id="outer"> <img id="poster" i18n-values="srcset:poster"> <div id="shielding"></div> <div id="inner-container" i18n-values=".style.width:visibleWidth;.style.height:visibleHeight"> <img id="plugin-icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAA8dJREFUaAXdWs9vEkEUZkvZQloNxJoY40kxJsDNo9GDif+Bf4CHpjEmJPoPeMce1F408dYjQePBgycv3vRG4GBMPREPLSlpCUWggN+3ncVl6PJrZ5a6k0x2Z2fnve/befPmzcwaIbVpGeLCyEsiG5L4Pso9kbu4nkj1CysSaAQ5trm5uV6pVB4eHx+/brVan3u93s9+v19Fbolc5TPW8R2+yzZsK2TIpPFYf6LS6Pb29rX9/f0NgPsIsA3kWVODbSmDsigT2TdCZjabvVyv158D9eGsyMe8f0iZlA0yJrK2FE4mkxer1eoTmMjvMYA8VVE2dVAXmHC8KU1mPp9Pdjqd755QztCYuqgTLJT1TrRYLN7T2Qtu/KiTukGGY8dTiu3t7T2CoqabMh+eN4kBLOjd5kpRQcIHrJNVCDIz94zJLoX4RfaEzK4pzGzqMRPmIFvEmJCRy2ViEg5gsjej2/PTO8lgJ5WJTbjmsePFpA+fJGzR9cQIFq4mZnBWPY8mJX84YhQRwJnhTFSEHXK7mcrNZvMdGjBQ1JqIFb0y4sUMBm3Q7Dl2KpVKd5jx1Xa1MgFWEWgO9UqEEagKxSSBL7WSy+WuIrJ9r0Kmmwxihi4uIwYpJkJxtzZTPxdE7IXVaq1We4bGWkyNmMHAmvGpMIQFzqppmg8GtNTccCXYSCQSb8rl8n2Q+aVG7D8pxEzs9pNlrtam/uQTXnT0iC2f14guUyN2yOcSO7TCpecEfFNXuxChHvY+Te0phCkzNWInB8uWw+HwLWrSnGxTe6vS1AT2JYtIJBK5oZmEU/yfTCbzbWtr62673f7grJjnXmC3xvoaupq7HUrSGNOScaoytSoEr1lMcHNB1uJDWZWpWdhtIj7g1qvCcltQUUe+pFfViHR+xBi82EY8Hn+Be9dodqTl8ANit1wix0ZtuE57ifPKFczMOyDxCtrmJRES2PvskR4WK7uYJZPa4Z8qiMIh3E6lUjuGYVz3qpPYyYHd2+t2uz+8CpyiPXVxQnycTqe/qCBBnQK7RaR7cHDwdQogXl5xmtJLCJrblGQQAjt39q2gcR22Ns8mNMfXUDpjHqEp6VqfNMSO/oCfzjBeaWzl/GojYTzonBwdHX0a0PJ+o82UnNAE5qHDosAsdUk0EJsPJBKY7SCSCcQGHYmEgrJlSi7B2MQmE6RAHCucUoEXC8JBj00mEEdvNplAHIbaZMxCoXDTzwMg6lJ9PG2TCcQPAzYZXv/7XzicZALxU41M6Fz85jR02uNEOOc9NzN4dMz1ObMsX9uPZ38BvwZw6z92PI4AAAAASUVORK5CYII=" /> </div> </div> <script> document.getElementById('poster').onerror = function() { this.hidden = true; }; document.getElementById('outer').onclick = function() { plugin.load(); }; window.resizePoster = function(marginLeft, marginTop, width, height) { var container = document.getElementById('inner-container'); container.style.marginLeft = marginLeft; container.style.marginTop = marginTop; container.style.width = width; container.style.height = height; if (plugin.didFinishIconRepositionForTesting) { // Defer until reflow complete. window.setTimeout(function() { plugin.didFinishIconRepositionForTesting(); }); } }; </script> </body> </html> { "x-version": 26, "google-talk": { "mime_types": [ ], "versions": [ { "version": "0", "status": "requires_authorization", "comment": "'Google Talk Plugin' and 'Google Talk Plugin Video Accelerator' use two completely different versioning schemes, so we can't define a minimum version." } ], "name": "Google Talk", "group_name_matcher": "*Google Talk*" }, "java-runtime-environment": { "mime_types": [ "application/x-java-applet", "application/x-java-applet;jpi-version=1.7.0_05", "application/x-java-applet;version=1.1", "application/x-java-applet;version=1.1.1", "application/x-java-applet;version=1.1.2", "application/x-java-applet;version=1.1.3", "application/x-java-applet;version=1.2", "application/x-java-applet;version=1.2.1", "application/x-java-applet;version=1.2.2", "application/x-java-applet;version=1.3", "application/x-java-applet;version=1.3.1", "application/x-java-applet;version=1.4", "application/x-java-applet;version=1.4.1", "application/x-java-applet;version=1.4.2", "application/x-java-applet;version=1.5", "application/x-java-applet;version=1.6", "application/x-java-applet;version=1.7", "application/x-java-bean", "application/x-java-bean;jpi-version=1.7.0_05", "application/x-java-bean;version=1.1", "application/x-java-bean;version=1.1.1", "application/x-java-bean;version=1.1.2", "application/x-java-bean;version=1.1.3", "application/x-java-bean;version=1.2", "application/x-java-bean;version=1.2.1", "application/x-java-bean;version=1.2.2", "application/x-java-bean;version=1.3", "application/x-java-bean;version=1.3.1", "application/x-java-bean;version=1.4", "application/x-java-bean;version=1.4.1", "application/x-java-bean;version=1.4.2", "application/x-java-bean;version=1.5", "application/x-java-bean;version=1.6", "application/x-java-bean;version=1.7", "application/x-java-vm", "application/x-java-vm-npruntime" ], "versions": [ { "version": "10.45", "status": "requires_authorization", "comment": "Java SE 7u45" } ], "lang": "en-US", "name": "Java(TM)", "help_url": "https://support.google.com/chrome/?p=plugin_java", "url": "http://java.com/download", "displayurl": true, "group_name_matcher": "Java*" }, "ibm-java-runtime-environment": { "mime_types": [ "application/x-java-applet", "application/x-java-applet;jpi-version=1.7.0_05", "application/x-java-applet;version=1.1", "application/x-java-applet;version=1.1.1", "application/x-java-applet;version=1.1.2", "application/x-java-applet;version=1.1.3", "application/x-java-applet;version=1.2", "application/x-java-applet;version=1.2.1", "application/x-java-applet;version=1.2.2", "application/x-java-applet;version=1.3", "application/x-java-applet;version=1.3.1", "application/x-java-applet;version=1.4", "application/x-java-applet;version=1.4.1", "application/x-java-applet;version=1.4.2", "application/x-java-applet;version=1.5", "application/x-java-applet;version=1.6", "application/x-java-applet;version=1.7", "application/x-java-bean", "application/x-java-bean;jpi-version=1.7.0_05", "application/x-java-bean;version=1.1", "application/x-java-bean;version=1.1.1", "application/x-java-bean;version=1.1.2", "application/x-java-bean;version=1.1.3", "application/x-java-bean;version=1.2", "application/x-java-bean;version=1.2.1", "application/x-java-bean;version=1.2.2", "application/x-java-bean;version=1.3", "application/x-java-bean;version=1.3.1", "application/x-java-bean;version=1.4", "application/x-java-bean;version=1.4.1", "application/x-java-bean;version=1.4.2", "application/x-java-bean;version=1.5", "application/x-java-bean;version=1.6", "application/x-java-bean;version=1.7", "application/x-java-vm", "application/x-java-vm-npruntime" ], "versions": [ ], "name": "IBM Java", "group_name_matcher": "*IBM*Java*" }, "realplayer": { "mime_types": [ "audio/vnd.rn-realaudio", "video/vnd.rn-realvideo", "audio/x-pn-realaudio-plugin", "audio/x-pn-realaudio" ], "versions": [ { "version": "15.0.2.71", "status": "requires_authorization", "reference": "http://service.real.com/realplayer/security/02062012_player/en/" } ], "lang": "en-US", "name": "RealPlayer", "help_url": "https://support.google.com/chrome/?p=plugin_real", "url": "http://forms.real.com/real/realone/download.html?type=rpsp_us", "group_name_matcher": "*RealPlayer*" }, "adobe-flash-player": { "mime_types": [ "application/futuresplash", "application/x-shockwave-flash" ], "versions": [ { "version": "20.0.0.306", "status": "requires_authorization", "reference": "https://helpx.adobe.com/security/products/flash-player/apsb16-04.html" } ], "lang": "en-US", "name": "Adobe Flash Player", "help_url": "https://support.google.com/chrome/?p=plugin_flash", "url": "https://support.google.com/chrome/answer/6258784", "displayurl": true, "group_name_matcher": "*Shockwave Flash*" }, "adobe-shockwave": { "mime_types": [ "application/x-director" ], "versions": [ { "version": "12.1.0.150", "status": "requires_authorization", "reference": "https://helpx.adobe.com/security/products/shockwave/apsb14-10.html" } ], "lang": "en-US", "name": "Adobe Shockwave Player", "help_url": "https://support.google.com/chrome/?p=plugin_shockwave", "url": "http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/Shockwave_Installer_Slim.exe", "group_name_matcher": "*Shockwave for Director*" }, "adobe-reader": { "mime_types": [ "application/pdf", "application/vnd.adobe.x-mars", "application/vnd.adobe.xdp+xml", "application/vnd.adobe.xfd+xml", "application/vnd.adobe.xfdf", "application/vnd.fdf" ], "versions": [ { "version": "10.1.13", "status": "requires_authorization", "reference": "https://helpx.adobe.com/security/products/reader/apsb14-28.html" }, { "version": "11", "status": "out_of_date" }, { "version": "11.0.10", "status": "requires_authorization", "reference": "https://helpx.adobe.com/security/products/reader/apsb14-28.html" } ], "lang": "en-US", "name": "Adobe Reader", "help_url": "https://support.google.com/chrome/?p=plugin_pdf", "url": "https://get.adobe.com/reader/", "displayurl": true, "group_name_matcher": "*Adobe Acrobat*" }, "apple-quicktime": { "mime_types": [ "application/sdp", "application/x-mpeg", "application/x-rtsp", "application/x-sdp", "audio/3ggp", "audio/3ggp2", "audio/aac", "audio/ac3", "audio/aiff", "audio/amr", "audio/basic", "audio/mid", "audio/midi", "audio/mp4", "audio/mpeg", "audio/vnd.qcelp", "audio/wav", "audio/x-aac", "audio/x-ac3", "audio/x-aiff", "audio/x-caf", "audio/x-gsm", "audio/x-m4a", "audio/x-m4b", "audio/x-m4p", "audio/x-midi", "audio/x-mpeg", "audio/x-wav", "image/jp2", "image/jpeg2000", "image/jpeg2000-image", "image/pict", "image/png", "image/x-jpeg2000-image", "image/x-macpaint", "image/x-pict", "image/x-png", "image/x-quicktime", "image/x-sgi", "image/x-targa", "video/3ggp", "video/3ggp2", "video/flc", "video/mp4", "video/mpeg", "video/quicktime", "video/sd-video", "video/x-m4v", "video/x-mpeg" ], "versions": [ { "version": "7.7.6", "status": "requires_authorization", "reference": "http://support.apple.com/kb/HT203092" } ], "lang": "en-US", "name": "QuickTime Player", "help_url": "https://support.google.com/chrome/?p=plugin_quicktime", "url": "http://appldnld.apple.com/QuickTime/041-3089.20111026.Sxpr4/QuickTimeInstaller.exe", "group_name_matcher": "*QuickTime Plug-in*" }, "windows-media-player": { "mime_types": [ ], "lang": "en-US", "name": "Windows Media Player", "help_url": "https://support.google.com/chrome/?p=plugin_wmp", "url": "http://www.interoperabilitybridges.com/wmp-extension-for-chrome", "displayurl": true, "group_name_matcher": "*Windows Media Player*" }, "divx-player": { "mime_types": [ "video/divx", "video/x-matroska" ], "versions": [ { "version": "1.4.3.4", "status": "requires_authorization" } ], "lang": "en-US", "name": "DivX Web Player", "help_url": "https://support.google.com/chrome/?p=plugin_divx", "url": "http://download.divx.com/player/divxdotcom/DivXWebPlayerInstaller.exe", "group_name_matcher": "*DivX Web Player*" }, "silverlight": { "mime_types": [ "application/x-silverlight", "application/x-silverlight-2" ], "versions": [ { "version": "5.1.40416.0", "status": "requires_authorization", "reference": "https://support.microsoft.com/kb/3056819" } ], "lang": "en-US", "name": "Silverlight", "url": "http://go.microsoft.com/fwlink/?LinkID=149156", "group_name_matcher": "*Silverlight*" }, "microsoft-office": { "mime_types": [ ], "versions": [ { "version": "0", "status": "requires_authorization", "comment": "Microsoft Office has no version information." } ], "name": "Microsoft Office", "group_name_matcher": "*Microsoft Office*" }, "nvidia-3d": { "mime_types": [ ], "versions": [ { "version": "0", "status": "requires_authorization", "comment": "NVidia 3D has no version information." } ], "name": "NVIDIA 3D", "group_name_matcher": "*NVIDIA 3D*" }, "google-chrome-pdf": { "mime_types": [ ], "versions": [ { "version": "0", "status": "up_to_date", "comment": "Chrome PDF Viewer has no version information." } ], "name": "Chrome PDF Viewer", "group_name_matcher": "*Chrome PDF Viewer*" }, "chromium-pdf": { "mime_types": [ ], "versions": [ { "version": "0", "status": "up_to_date", "comment": "Chrome PDF Viewer has no version information." } ], "name": "Chromium PDF Viewer", "group_name_matcher": "*Chromium PDF Viewer*" }, "google-update": { "mime-types": [ ], "versions": [ { "version": "0", "status": "requires_authorization", "comment": "Google Update plugin is versioned but kept automatically up-to-date" } ], "name": "Google Update", "group_name_matcher": "Google Update" }, "facebook-video-calling": { "mime_types": [ "application/skypesdk-plugin" ], "versions": [ { "version": "0", "status": "requires_authorization", "comment": "We do not track version information for the Facebook Video Calling Plugin." } ], "lang": "en-US", "name": "Facebook Video Calling", "url": "https://www.facebook.com/chat/video/videocalldownload.php", "group_name_matcher": "*Facebook Video*" }, "google-earth": { "mime_types": [ "application/geplugin" ], "versions": [ { "version": "0", "status": "requires_authorization", "comment": "We do not track version information for the Google Earth Plugin." } ], "lang": "en-US", "name": "Google Earth", "url": "http://www.google.com/earth/explore/products/plugin.html", "group_name_matcher": "*Google Earth*" } } <!-- Generated by licenses.py; do not edit. --><!doctype html> <html> <head> <meta charset="utf-8"> <title>Credits</title> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <style> body { background-color: white; font-size: 84%; max-width: 1020px; } .page-title { font-size: 164%; font-weight: bold; } .product { background-color: #c3d9ff; border-radius: 5px; margin-top: 16px; overflow: auto; padding: 2px; } .product .title { float: left; font-size: 110%; font-weight: bold; margin: 3px; } .product .homepage { float: right; margin: 3px; text-align: right; } .product .homepage::after { content: " - "; } .product .show { float: right; margin: 3px; text-align: right; } .licence { background-color: #e8eef7; border-radius: 3px; clear: both; display: none; padding: 16px; } .licence h3 { margin-top: 0; } .licence pre { white-space: pre-wrap; } .dialog #print-link, .dialog .homepage { display: none; } </style> </head> <body> <span class="page-title" style="float:left;">Credits</span> <a id="print-link" href="#" style="float:right;">Print</a> <div style="clear:both; overflow:auto;"><!-- Chromium <3s the following projects --> <div class="product"> <span class="title">Accessibility Audit library, from Accessibility Developer Tools</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://raw.githubusercontent.com/GoogleChrome/accessibility-developer-tools/master/dist/js/axs_testing.js">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Almost Native Graphics Layer Engine</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/angleproject/">homepage</a></span> <div class="licence"> <pre>// Copyright (C) 2002-2013 The ANGLE Project Authors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc. // Ltd., nor the names of their contributors may be used to endorse // or promote products derived from this software without specific // prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Android</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://source.android.com">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Android Crazy Linker</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/chromium/src.git/+/master/third_party/android_crazy_linker/">homepage</a></span> <div class="licence"> <pre>// Copyright 2014 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* * Copyright (C) 2012 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ </pre> </div> </div> <div class="product"> <span class="title">Android Open Source Project - App Compat Library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://android.googlesource.com/platform/frameworks/support">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Android Open Source Project - Settings App</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://android.googlesource.com/platform/packages/apps/Settings/">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Apple sample code</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://developer.apple.com/">homepage</a></span> <div class="licence"> <pre>Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (C) 2009 Apple Inc. All Rights Reserved.</pre> </div> </div> <div class="product"> <span class="title">BSDiff</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.daemonology.net/bsdiff/">homepage</a></span> <div class="licence"> <pre>Copyright 2003-2005 Colin Percival All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted providing that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Blackmagic DeckLink SDK - Mac</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://sw.blackmagicdesign.com/DeckLink/v10.5.2/Blackmagic_DeckLink_SDK_10.5.2.zip?Key-Pair-Id=APKAJTKA3ZJMJRQITVEA&Signature=YRlsDaU0gNjrPNSoPp1IoTBQDavl09RGMnj1exrwAP+jbrNvSX2EuYTqOn2twguM+pQ8W0cqmIl/IHSVnEXJgQB6Eh57x+ba79t9z3fPsD8lb/a6PtK4qlFeqpLK5UBQ9yl18zxtHIZCnBBIeBNoj0G2CxX2Z4IXHVJmZ1KTbECIGaLyj+tBonW+cgIBQ7yw0dQHxGLJD+xzlCrZOXpGRmhJUBs981yLrnfZ7/LirvrHT+8CyzajzEgl9xBB7TFiZUh2DLXf1BvC4NeH0g/OnYRiR7F0VWh/ZiQM/KjCPbn2MajPo5Og0jVjzxYJbIhZf0HhB6ZN0ZI8aaiMMkmHMg==&Expires=1448991563">homepage</a></span> <div class="licence"> <pre>Extracted from mac/include/DeckLinkAPI.h: ** Copyright (c) 2014 Blackmagic Design ** ** Permission is hereby granted, free of charge, to any person or organization ** obtaining a copy of the software and accompanying documentation covered by ** this license (the "Software") to use, reproduce, display, distribute, ** execute, and transmit the Software, and to prepare derivative works of the ** Software, and to permit third-parties to whom the Software is furnished to ** do so, all subject to the following: ** ** The copyright notices in the Software and this entire statement, including ** the above license grant, this restriction and the following disclaimer, ** must be included in all copies of the Software, in whole or in part, and ** all derivative works of the Software, unless such copies or derivative ** works are solely in the form of machine-executable object code generated by ** a source language processor. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ** DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">Braille Translation Library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/liblouis/liblouis">homepage</a></span> <div class="licence"> <pre>(Copied from src/liblouis/liblouis.h.in) /* liblouis Braille Translation and Back-Translation Library Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by The BRLTTY Team Copyright (C) 2004, 2005, 2006, 2009 ViewPlus Technologies, Inc. www.viewplus.com and JJB Software, Inc. www.jjb-software.com liblouis is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. liblouis is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Maintained by John J. Boyer john.boyer@abilitiessoft.com */ </pre> </div> </div> <div class="product"> <span class="title">Breakpad, An open-source multi-platform crash reporting system</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/breakpad/breakpad">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2006, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>. All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. Copyright (c) 1999 Apple Computer, Inc. All rights reserved. @APPLE_LICENSE_HEADER_START@ This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file. The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License. @APPLE_LICENSE_HEADER_END@ Copyright 2007-2008 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Brotli</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/brotli">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Chrome Custom Tabs - Example and Usage</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/external/github.com/GoogleChrome/custom-tabs-client">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. </pre> </div> </div> <div class="product"> <span class="title">ChromeVox</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/google-axs-chrome/">homepage</a></span> <div class="licence"> <pre>// Copyright 2013 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Chromium OS system API</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.chromium.org/chromium-os">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Closure compiler</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://github.com/google/closure-compiler">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Cocoa extension code from Camino</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://caminobrowser.org/">homepage</a></span> <div class="licence"> <pre>/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2002 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ </pre> </div> </div> <div class="product"> <span class="title">Compact Language Detection</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2010 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Compact Language Detection 2</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/CLD2Owners/cld2">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Crashpad</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://crashpad.chromium.org/">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Darwin</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.opensource.apple.com/">homepage</a></span> <div class="licence"> <pre>APPLE PUBLIC SOURCE LICENSE Version 2.0 - August 6, 2003 Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software. Apple Note: In January 2007, Apple changed its corporate name from "Apple Computer, Inc." to "Apple Inc." This change has been reflected below and copyright years updated, but no other changes have been made to the APSL 2.0. 1. General; Definitions. This License applies to any program or other work which Apple Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License: 1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code. 1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications. 1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. 1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You. 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.6 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of the Original Code, any previous Modifications, the combination of Original Code and any previous Modifications, and/or any respective portions thereof. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. 1.7 "Original Code" means (a) the Source Code of a program or other work as originally made available by Apple under this License, including the Source Code of any updates or upgrades to such programs or works made available by Apple under this License, and that has been expressly identified by Apple as such in the header file(s) of such work; and (b) the object code compiled from such Source Code and originally made available by Apple under this License 1.8 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). 1.9 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. 2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions of this License, Apple hereby grants You, effective on the date You accept this License and download the Original Code, a world-wide, royalty-free, non-exclusive license, to the extent of Apple's Applicable Patent Rights and copyrights covering the Original Code, to do the following: 2.1 Unmodified Code. You may use, reproduce, display, perform, internally distribute within Your organization, and Externally Deploy verbatim, unmodified copies of the Original Code, for commercial or non-commercial purposes, provided that in each instance: (a) You must retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Apple as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; and (b) You must include a copy of this License with every copy of Source Code of Covered Code and documentation You distribute or Externally Deploy, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6. 2.2 Modified Code. You may modify Covered Code and use, reproduce, display, perform, internally distribute within Your organization, and Externally Deploy Your Modifications and Covered Code, for commercial or non-commercial purposes, provided that in each instance You also meet all of these conditions: (a) You must satisfy all the conditions of Section 2.1 with respect to the Source Code of the Covered Code; (b) You must duplicate, to the extent it does not already exist, the notice in Exhibit A in each file of the Source Code of all Your Modifications, and cause the modified files to carry prominent notices stating that You changed the files and the date of any change; and (c) If You Externally Deploy Your Modifications, You must make Source Code of all Your Externally Deployed Modifications either available to those to whom You have Externally Deployed Your Modifications, or publicly available. Source Code of Your Externally Deployed Modifications must be released under the terms set forth in this License, including the license grants set forth in Section 3 below, for as long as you Externally Deploy the Covered Code or twelve (12) months from the date of initial External Deployment, whichever is longer. You should preferably distribute the Source Code of Your Externally Deployed Modifications electronically (e.g. download from a web site). 2.3 Distribution of Executable Versions. In addition, if You Externally Deploy Covered Code (Original Code and/or Modifications) in object code, executable form only, You must include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code. 2.4 Third Party Rights. You expressly acknowledge and agree that although Apple and each Contributor grants the licenses to their respective portions of the Covered Code set forth herein, no assurances are provided by Apple or any Contributor that the Covered Code does not infringe the patent or other intellectual property rights of any other entity. Apple and each Contributor disclaim any liability to You for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, You hereby assume sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow You to distribute the Covered Code, it is Your responsibility to acquire that license before distributing the Covered Code. 3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License, You hereby grant to any person or entity receiving or distributing Covered Code under this License a non-exclusive, royalty-free, perpetual, irrevocable license, under Your Applicable Patent Rights and other intellectual property rights (other than patent) owned or controlled by You, to use, reproduce, display, perform, modify, sublicense, distribute and Externally Deploy Your Modifications of the same scope and extent as Apple's licenses under Sections 2.1 and 2.2 above. 4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof. 5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by Apple herein. Modifications and/or Larger Works may require additional patent licenses from Apple which Apple may grant in its sole discretion. 6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the scope of the license granted herein ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Apple or any Contributor. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Apple and every Contributor harmless for any liability incurred by or claims asserted against Apple or such Contributor by reason of any such Additional Terms. 7. Versions of the License. Apple may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Apple. No one other than Apple has the right to modify the terms applicable to Covered Code created under this License. 8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part pre-release, untested, or not fully tested works. The Covered Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Covered Code, or any portion thereof, is at Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Covered Code could lead to death, personal injury, or severe physical or environmental damage. 9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event shall Apple's total liability to You for all damages (other than as may be required by applicable law) under this License exceed the amount of fifty dollars ($50.00). 10. Trademarks. This License does not grant any rights to use the trademarks or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming Server" or any other trademarks, service marks, logos or trade names belonging to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or trade name belonging to any Contributor. You agree not to use any Apple Marks in or as part of the name of products derived from the Original Code or to endorse or promote products derived from the Original Code other than as expressly permitted by and in strict compliance at all times with Apple's third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. 11. Ownership. Subject to the licenses granted under this License, each Contributor retains all rights, title and interest in and to any Modifications made by such Contributor. Apple retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Apple ("Apple Modifications"), and such Apple Modifications will not be automatically subject to this License. Apple may, at its sole discretion, choose to license such Apple Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. 12. Termination. 12.1 Termination. This License and the rights granted hereunder will terminate: (a) automatically without notice from Apple if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; (b) immediately in the event of the circumstances described in Section 13.5(b); or (c) automatically without notice from Apple if You, at any time during the term of this License, commence an action for patent infringement against Apple; provided that Apple did not first commence an action for patent infringement against You in that instance. 12.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification, sublicensing and distribution of the Covered Code. All sublicenses to the Covered Code which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of any party. 13. Miscellaneous. 13.1 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between or among You, Apple or any Contributor, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. 13.3 Independent Development. Nothing in this License will impair Apple's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may develop, produce, market or distribute. 13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. 13.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. 13.6 Dispute Resolution. Any litigation or other dispute resolution between You and Apple relating to this License shall take place in the Northern District of California, and You and Apple hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. 13.7 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exig? que le pr?sent contrat et tous les documents connexes soient r?dig?s en anglais. EXHIBIT A. "Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file. The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License." </pre> </div> </div> <div class="product"> <span class="title">David M. Gay's floating point routines</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.netlib.org/fp/">homepage</a></span> <div class="licence"> <pre>/**************************************************************** * * The author of this software is David M. Gay. * * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. * * Permission to use, copy, modify, and distribute this software for any * purpose without fee is hereby granted, provided that this entire notice * is included in all copies of any software which is or includes a copy * or modification of this software and in all copies of the supporting * documentation for such software. * * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. * ***************************************************************/ </pre> </div> </div> <div class="product"> <span class="title">Error Prone</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://errorprone.info/">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Expat XML Parser</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://sourceforge.net/projects/expat/">homepage</a></span> <div class="licence"> <pre>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">Flot Javascript/JQuery library for creating graphs</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.flotcharts.org">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2007-2013 IOLA and Ole Laursen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">GifPlayer Animated GIF Library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://android-gifview.googlecode.com/svn/!svn/bc/8/trunk/">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Google Cache Invalidation API</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/chromium/src/+/master/third_party/cacheinvalidation/README.chromium">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Google Cardboard</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/googlesamples/cardboard-java/">homepage</a></span> <div class="licence"> <pre> Copyright (c) 2014, Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS </pre> </div> </div> <div class="product"> <span class="title">Google Input Tools</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/googlei18n/google-input-tools.git">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2013 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</pre> </div> </div> <div class="product"> <span class="title">Google Toolbox for Mac</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/google-toolbox-for-mac">homepage</a></span> <div class="licence"> <pre>See src/COPYING </pre> </div> </div> <div class="product"> <span class="title">Hardware Composer Plus</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/chromium/src/third_party/hwcplus/">homepage</a></span> <div class="licence"> <pre>// Copyright 2014 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">IAccessible2 COM interfaces for accessibility</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2">homepage</a></span> <div class="licence"> <pre>/************************************************************************* * * IAccessible2 IDL Specification * * Copyright (c) 2007, 2010 Linux Foundation * Copyright (c) 2006 IBM Corporation * Copyright (c) 2000, 2006 Sun Microsystems, Inc. * All rights reserved. * * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. Neither the name of the Linux Foundation nor the names of its * contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This BSD License conforms to the Open Source Initiative "Simplified * BSD License" as published at: * http://www.opensource.org/licenses/bsd-license.php * * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 * mark may be used in accordance with the Linux Foundation Trademark * Policy to indicate compliance with the IAccessible2 specification. * ************************************************************************/ </pre> </div> </div> <div class="product"> <span class="title">ISimpleDOM COM interfaces for accessibility</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs">homepage</a></span> <div class="licence"> <pre>/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2002 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ </pre> </div> </div> <div class="product"> <span class="title">International Phone Number Library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libphonenumber.googlecode.com/svn/trunk/">homepage</a></span> <div class="licence"> <pre>Copyright (C) 2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">JMake</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/pantsbuild/jmake">homepage</a></span> <div class="licence"> <pre> GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. </pre> </div> </div> <div class="product"> <span class="title">Khronos header files</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.khronos.org/registry">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2007-2010 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials. THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) Copyright (C) 1992 Silicon Graphics, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice including the dates of first publication and either this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Silicon Graphics, Inc. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Silicon Graphics, Inc. </pre> </div> </div> <div class="product"> <span class="title">LCOV - the LTP GCOV extension</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://ltp.sourceforge.net/coverage/lcov.php">homepage</a></span> <div class="licence"> <pre> GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. </pre> </div> </div> <div class="product"> <span class="title">LZMA SDK</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.7-zip.org/sdk.html">homepage</a></span> <div class="licence"> <pre>LZMA SDK is placed in the public domain. </pre> </div> </div> <div class="product"> <span class="title">LevelDB: A Fast Persistent Key-Value Store</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/leveldb.git">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2011 The LevelDB Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">MediaController android sample.</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://android.googlesource.com/platform/development/+/master/samples/Support4Demos/src/com/example/android/supportv4/media/MediaController.java">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">Mojo</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/domokit/mojo">homepage</a></span> <div class="licence"> <pre>// Copyright 2014 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Mozilla Personal Security Manager</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://mxr.mozilla.org/mozilla-central/source/security/manager/">homepage</a></span> <div class="licence"> <pre>/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Netscape security libraries. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ </pre> </div> </div> <div class="product"> <span class="title">NSBezierPath additions from Sean Patrick O'Brien</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.seanpatrickobrien.com/journal/posts/3">homepage</a></span> <div class="licence"> <pre>Copyright 2008 MolokoCacao All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted providing that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">NVidia Control X Extension Library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://cgit.freedesktop.org/~aplattner/nvidia-settings/">homepage</a></span> <div class="licence"> <pre>/* * Copyright (c) 2008 NVIDIA, Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */</pre> </div> </div> <div class="product"> <span class="title">Netscape Plugin Application Programming Interface (NPAPI)</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://mxr.mozilla.org/mozilla-central/source/modules/plugin/base/public/">homepage</a></span> <div class="licence"> <pre>Version: MPL 1.1/GPL 2.0/LGPL 2.1 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is mozilla.org code. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. All Rights Reserved. Contributor(s): Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. </pre> </div> </div> <div class="product"> <span class="title">Netscape Portable Runtime (NSPR)</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.mozilla.org/projects/nspr/">homepage</a></span> <div class="licence"> <pre>/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Netscape Portable Runtime (NSPR). * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998-2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ </pre> </div> </div> <div class="product"> <span class="title">Network Security Services (NSS)</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.mozilla.org/projects/security/pki/nss/">homepage</a></span> <div class="licence"> <pre>/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Netscape security libraries. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1994-2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ </pre> </div> </div> <div class="product"> <span class="title">OTS (OpenType Sanitizer)</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/khaledhosny/ots.git">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2009 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">OpenH264</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.openh264.org/">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2013, Cisco Systems All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre> </div> </div> <div class="product"> <span class="title">OpenMAX DL</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://silver.arm.com/download/Software/Graphics/OX000-BU-00010-r1p0-00bet0/OX000-BU-00010-r1p0-00bet0.tgz">homepage</a></span> <div class="licence"> <pre>Use of this source code is governed by a BSD-style license that can be found in the LICENSE file in the root of the source tree. All contributing project authors may be found in the AUTHORS file in the root of the source tree. The files were originally licensed by ARM Limited. The following files: * dl/api/omxtypes.h * dl/sp/api/omxSP.h are licensed by Khronos: Copyright ? 2005-2008 The Khronos Group Inc. All Rights Reserved. These materials are protected by copyright laws and contain material proprietary to the Khronos Group, Inc. You may use these materials for implementing Khronos specifications, without altering or removing any trademark, copyright or other notice from the specification. Khronos Group makes no, and expressly disclaims any, representations or warranties, express or implied, regarding these materials, including, without limitation, any implied warranties of merchantability or fitness for a particular purpose or non-infringement of any intellectual property. Khronos Group makes no, and expressly disclaims any, warranties, express or implied, regarding the correctness, accuracy, completeness, timeliness, and reliability of these materials. Under no circumstances will the Khronos Group, or any of its Promoters, Contributors or Members or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials. Khronos and OpenMAX are trademarks of the Khronos Group Inc. </pre> </div> </div> <div class="product"> <span class="title">PDFium</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/pdfium/">homepage</a></span> <div class="licence"> <pre>// Copyright 2014 PDFium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">PLY (Python Lex-Yacc)</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.dabeaz.com/ply/ply-3.4.tar.gz">homepage</a></span> <div class="licence"> <pre>PLY (Python Lex-Yacc) Version 3.4 Copyright (C) 2001-2011, David M. Beazley (Dabeaz LLC) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the David Beazley or Dabeaz LLC may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre> </div> </div> <div class="product"> <span class="title">Paul Hsieh's SuperFastHash</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.azillionmonkeys.com/qed/hash.html">homepage</a></span> <div class="licence"> <pre>Paul Hsieh OLD BSD license Copyright (c) 2010, Paul Hsieh All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither my name, Paul Hsieh, nor the names of any other contributors to the code use may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Polymer</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.polymer-project.org">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2012 The Polymer Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Proguard</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://proguard.sourceforge.net/">homepage</a></span> <div class="licence"> <pre> GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. </pre> </div> </div> <div class="product"> <span class="title">Protocol Buffers</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://protobuf.googlecode.com/svn/trunk">homepage</a></span> <div class="licence"> <pre>Copyright 2008, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Code generated by the Protocol Buffer compiler is owned by the owner of the input file used when generating it. This code is not standalone and requires a support library to be linked with it. This support library is itself covered by the above license. </pre> </div> </div> <div class="product"> <span class="title">Quick Color Management System</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/jrmuizel/qcms/tree/v4">homepage</a></span> <div class="licence"> <pre>qcms Copyright (C) 2009 Mozilla Corporation Copyright (C) 1998-2007 Marti Maria Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">SMHasher</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/smhasher/">homepage</a></span> <div class="licence"> <pre>All MurmurHash source files are placed in the public domain. The license below applies to all other code in SMHasher: Copyright (c) 2011 Google, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">Skia</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://skia.org/">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2011 Google Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- third_party/etc1 is under the following license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- Some files under resources are under the following license: Unlimited Commercial Use We try to make it clear that you may use all clipart from Openclipart even for unlimited commercial use. We believe that giving away our images is a great way to share with the world our talents and that will come back around in a better form. May I Use Openclipart for? We put together a small chart of as many possibilities and questions we have heard from people asking how they may use Openclipart. If you have an additional question, please email love@openclipart.org. All Clipart are Released into the Public Domain. Each artist at Openclipart releases all rights to the images they share at Openclipart. The reason is so that there is no friction in using and sharing images authors make available at this website so that each artist might also receive the same benefit in using other artists clipart totally for any possible reason. </pre> </div> </div> <div class="product"> <span class="title">Snappy: A fast compressor/decompressor</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://google.github.io/snappy/">homepage</a></span> <div class="licence"> <pre>Copyright 2011, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Speech Dispatcher</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://devel.freebsoft.org/speechd">homepage</a></span> <div class="licence"> <pre> GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS </pre> </div> </div> <div class="product"> <span class="title">Strongtalk</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.strongtalk.org/">homepage</a></span> <div class="licence"> <pre>Copyright (c) 1994-2006 Sun Microsystems Inc. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Sun Microsystems or the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Sudden Motion Sensor library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.suitable.com/tools/smslib.html">homepage</a></span> <div class="licence"> <pre>SMSLib Sudden Motion Sensor Access Library Copyright (c) 2010 Suitable Systems All rights reserved. Developed by: Daniel Griscom Suitable Systems http://www.suitable.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. - Neither the names of Suitable Systems nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. For more information about SMSLib, see <http://www.suitable.com/tools/smslib.html> or contact Daniel Griscom Suitable Systems 1 Centre Street, Suite 204 Wakefield, MA 01880 (781) 665-0053 </pre> </div> </div> <div class="product"> <span class="title">SwiftShader software renderer.</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://transgaming.com/business/swiftshader">homepage</a></span> <div class="licence"> <pre>This product includes SwiftShader Software GPU Tookit, Copyright(c)2003-2011 TransGaming Inc </pre> </div> </div> <div class="product"> <span class="title">The USB ID Repository</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.linux-usb.org/usb-ids.html">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2012, Linux USB Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. o Neither the name of the Linux USB Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">The library to input, validate, and display addresses.</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/googlei18n/libaddressinput">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">V8 JavaScript Engine</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/v8">homepage</a></span> <div class="licence"> <pre>This license applies to all parts of V8 that are not externally maintained libraries. The externally maintained libraries used by V8 are: - PCRE test suite, located in test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the test suite from PCRE-7.3, which is copyrighted by the University of Cambridge and Google, Inc. The copyright notice and license are embedded in regexp-pcre.js. - Layout tests, located in test/mjsunit/third_party/object-keys. These are based on layout tests from webkit.org which are copyrighted by Apple Computer, Inc. and released under a 3-clause BSD license. - Strongtalk assembler, the basis of the files assembler-arm-inl.h, assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h, assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h. This code is copyrighted by Sun Microsystems Inc. and released under a 3-clause BSD license. - Valgrind client API header, located at third_party/valgrind/valgrind.h This is release under the BSD license. These libraries have their own licenses; we recommend you read them, as their terms may differ from the terms below. Further license information can be found in LICENSE files located in sub-directories. Copyright 2014, the V8 project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Web Animations JS</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/web-animations/web-animations-js">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">WebKit</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://webkit.org/">homepage</a></span> <div class="licence"> <pre>(WebKit doesn't distribute an explicit license. This LICENSE is derived from license text in the source.) Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Alexander Kellett, Alexey Proskuryakov, Alex Mathews, Allan Sandfeld Jensen, Alp Toker, Anders Carlsson, Andrew Wellington, Antti Koivisto, Apple Inc., Arthur Langereis, Baron Schwartz, Bjoern Graf, Brent Fulgham, Cameron Zwarich, Charles Samuels, Christian Dywan, Collabora Ltd., Cyrus Patel, Daniel Molkentin, Dave Maclachlan, David Smith, Dawit Alemayehu, Dirk Mueller, Dirk Schulze, Don Gibson, Enrico Ros, Eric Seidel, Frederik Holljen, Frerich Raabe, Friedmann Kleint, George Staikos, Google Inc., Graham Dennis, Harri Porten, Henry Mason, Hiroyuki Ikezoe, Holger Hans Peter Freyther, IBM, James G. Speth, Jan Alonzo, Jean-Loup Gailly, John Reis, Jonas Witt, Jon Shier, Jonas Witt, Julien Chaffraix, Justin Haygood, Kevin Ollivier, Kevin Watters, Kimmo Kinnunen, Kouhei Sutou, Krzysztof Kowalczyk, Lars Knoll, Luca Bruno, Maks Orlovich, Malte Starostik, Mark Adler, Martin Jones, Marvin Decker, Matt Lilek, Michael Emmel, Mitz Pettel, mozilla.org, Netscape Communications Corporation, Nicholas Shanks, Nikolas Zimmermann, Nokia, Oliver Hunt, Opened Hand, Paul Johnston, Peter Kelly, Pioneer Research Center USA, Rich Moore, Rob Buis, Robin Dunn, Ronald Tschal?r, Samuel Weinig, Simon Hausmann, Staikos Computing Services Inc., Stefan Schimanski, Symantec Corporation, The Dojo Foundation, The Karbon Developers, Thomas Boyer, Tim Copperfield, Tobias Anton, Torben Weis, Trolltech, University of Cambridge, Vaclav Slavik, Waldo Bastian, Xan Lopez, Zack Rusin The terms and conditions vary from file to file, but are one of: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. *OR* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS </pre> </div> </div> <div class="product"> <span class="title">WebM container parser and writer.</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.webmproject.org/code/">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2010, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">WebP image encoder/decoder</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://developers.google.com/speed/webp">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2010, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Additional IP Rights Grant (Patents) ------------------------------------ "These implementations" means the copyrightable works that implement the WebM codecs distributed by Google as part of the WebM Project. Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer, and otherwise run, modify and propagate the contents of these implementations of WebM, where such license applies only to those patent claims, both currently owned by Google and acquired in the future, licensable by Google that are necessarily infringed by these implementations of WebM. This grant does not include claims that would be infringed only as a consequence of further modification of these implementations. If you or your agent or exclusive licensee institute or order or agree to the institution of patent litigation or any other patent enforcement activity against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that any of these implementations of WebM or any code incorporated within any of these implementations of WebM constitute direct or contributory patent infringement, or inducement of patent infringement, then any patent rights granted to you under this License for these implementations of WebM shall terminate as of the date such litigation is filed. </pre> </div> </div> <div class="product"> <span class="title">WebRTC</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.webrtc.org">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2011, The WebRTC project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">Windows Template Library (WTL)</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://wtl.sourceforge.net/">homepage</a></span> <div class="licence"> <pre>Microsoft Permissive License (Ms-PL) Published: October 12, 2006 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor?? patent claims that read directly on its contribution. 2. Grant of Rights (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations (A) No Trademark License- This license does not grant you rights to use any contributors?? name, logo, or trademarks. (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. </pre> </div> </div> <div class="product"> <span class="title">XZ Utils</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://tukaani.org/xz/">homepage</a></span> <div class="licence"> <pre>See http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/xz/COPYING </pre> </div> </div> <div class="product"> <span class="title">blink HTMLTokenizer</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.chromium.org/blink">homepage</a></span> <div class="licence"> <pre>Copyright (C) 2008 Apple Inc. All Rights Reserved. Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ Copyright (C) 2010 Google, Inc. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">boringssl</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://boringssl.googlesource.com/boringssl">homepage</a></span> <div class="licence"> <pre> LICENSE ISSUES ============== The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit. See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core@openssl.org. OpenSSL License --------------- /* ==================================================================== * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */ Original SSLeay License ----------------------- /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ </pre> </div> </div> <div class="product"> <span class="title">bspatch</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/">homepage</a></span> <div class="licence"> <pre>BSD Protection License February 2002 Preamble -------- The Berkeley Software Distribution ("BSD") license has proven very effective over the years at allowing for a wide spread of work throughout both commercial and non-commercial products. For programmers whose primary intention is to improve the general quality of available software, it is arguable that there is no better license than the BSD license, as it permits improvements to be used wherever they will help, without idealogical or metallic constraint. This is of particular value to those who produce reference implementations of proposed standards: The case of TCP/IP clearly illustrates that freely and universally available implementations leads the rapid acceptance of standards -- often even being used instead of a de jure standard (eg, OSI network models). With the rapid proliferation of software licensed under the GNU General Public License, however, the continued success of this role is called into question. Given that the inclusion of a few lines of "GPL-tainted" work into a larger body of work will result in restricted distribution -- and given that further work will likely build upon the "tainted" portions, making them difficult to remove at a future date -- there are inevitable circumstances where authors would, in order to protect their goal of providing for the widespread usage of their work, wish to guard against such "GPL-taint". In addition, one can imagine that companies which operate by producing and selling (possibly closed-source) code would wish to protect themselves against the rise of a GPL-licensed competitor. While under existing licenses this would mean not releasing their code under any form of open license, if a license existed under which they could incorporate any improvements back into their own (commercial) products then they might be far more willing to provide for non-closed distribution. For the above reasons, we put forth this "BSD Protection License": A license designed to retain the freedom granted by the BSD license to use licensed works in a wide variety of settings, both non-commercial and commercial, while protecting the work from having future contributors restrict that freedom. The precise terms and conditions for copying, distribution, and modification follow. BSD PROTECTION LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION ---------------------------------------------------------------- 0. Definitions. a) "Program", below, refers to any program or work distributed under the terms of this license. b) A "work based on the Program", below, refers to either the Program or any derivative work under copyright law. c) "Modification", below, refers to the act of creating derivative works. d) "You", below, refers to each licensee. 1. Scope. This license governs the copying, distribution, and modification of the Program. Other activities are outside the scope of this license; The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program. 2. Verbatim copies. You may copy and distribute verbatim copies of the Program as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 3. Modification and redistribution under closed license. You may modify your copy or copies of the Program, and distribute the resulting derivative works, provided that you meet the following conditions: a) The copyright notice and disclaimer on the Program must be reproduced and included in the source code, documentation, and/or other materials provided in a manner in which such notices are normally distributed. b) The derivative work must be clearly identified as such, in order that it may not be confused with the original work. c) The license under which the derivative work is distributed must expressly prohibit the distribution of further derivative works. 4. Modification and redistribution under open license. You may modify your copy or copies of the Program, and distribute the resulting derivative works, provided that you meet the following conditions: a) The copyright notice and disclaimer on the Program must be reproduced and included in the source code, documentation, and/or other materials provided in a manner in which such notices are normally distributed. b) You must clearly indicate the nature and date of any changes made to the Program. The full details need not necessarily be included in the individual modified files, provided that each modified file is clearly marked as such and instructions are included on where the full details of the modifications may be found. c) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 5. Implied acceptance. You may not copy or distribute the Program or any derivative works except as expressly provided under this license. Consequently, any such action will be taken as implied acceptance of the terms of this license. 6. NO WARRANTY. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. </pre> </div> </div> <div class="product"> <span class="title">chromite</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/chromiumos/chromite">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">class-dump</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/nygard/class-dump">homepage</a></span> <div class="licence"> <pre>(Copied from the README.) -------------------------------------------------------------------------------- This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files. Copyright (C) 1997-1998, 2000-2001, 2004-2013 Steve Nygard. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Contact ------- You may contact the author by: e-mail: nygard at gmail.com</pre> </div> </div> <div class="product"> <span class="title">d3</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/mbostock/d3">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2010-2014, Michael Bostock All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name Michael Bostock may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">dom-distiller-js</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/chromium/dom-distiller">homepage</a></span> <div class="licence"> <pre>Copyright 2014 The Chromium Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Parts of the following directories are available under Apache v2.0 src/de Copyright (c) 2009-2011 Christian Kohlsch?tter third_party/gwt_exporter Copyright 2007 Timepedia.org third_party/gwt-2.5.1 Copyright 2008 Google java/org/chromium/distiller/dev Copyright 2008 Google Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS </pre> </div> </div> <div class="product"> <span class="title">drawElements Quality Program</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://source.android.com/devices/graphics/testing.html">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">dynamic annotations</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/data-race-test/wiki/DynamicAnnotations">homepage</a></span> <div class="licence"> <pre>/* Copyright (c) 2008-2009, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * --- * Author: Kostya Serebryany */ </pre> </div> </div> <div class="product"> <span class="title">etc1</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://source.android.com/">homepage</a></span> <div class="licence"> <pre>/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */</pre> </div> </div> <div class="product"> <span class="title">fdlibm</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.netlib.org/fdlibm/">homepage</a></span> <div class="licence"> <pre>Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. </pre> </div> </div> <div class="product"> <span class="title">ffmpeg</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://ffmpeg.org/">homepage</a></span> <div class="licence"> <pre>#FFmpeg: Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to FFmpeg. Some optional parts of FFmpeg are licensed under the GNU General Public License version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of these parts are used by default, you have to explicitly pass `--enable-gpl` to configure to activate them. In this case, FFmpeg's license changes to GPL v2+. Specifically, the GPL parts of FFmpeg are: - libpostproc - optional x86 optimizations in the files - `libavcodec/x86/flac_dsp_gpl.asm` - `libavcodec/x86/idct_mmx.c` - `libavfilter/x86/vf_removegrain.asm` - libutvideo encoding/decoding wrappers in `libavcodec/libutvideo*.cpp` - the X11 grabber in `libavdevice/x11grab.c` - the swresample test app in `libswresample/swresample-test.c` - the `texi2pod.pl` tool - the following filters in libavfilter: - `f_ebur128.c` - `vf_blackframe.c` - `vf_boxblur.c` - `vf_colormatrix.c` - `vf_cover_rect.c` - `vf_cropdetect.c` - `vf_delogo.c` - `vf_eq.c` - `vf_find_rect.c` - `vf_fspp.c` - `vf_geq.c` - `vf_histeq.c` - `vf_hqdn3d.c` - `vf_interlace.c` - `vf_kerndeint.c` - `vf_mcdeint.c` - `vf_mpdecimate.c` - `vf_owdenoise.c` - `vf_perspective.c` - `vf_phase.c` - `vf_pp.c` - `vf_pp7.c` - `vf_pullup.c` - `vf_sab.c` - `vf_smartblur.c` - `vf_repeatfields.c` - `vf_spp.c` - `vf_stereo3d.c` - `vf_super2xsai.c` - `vf_tinterlace.c` - `vf_uspp.c` - `vsrc_mptestsrc.c` Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then the configure parameter `--enable-version3` will activate this licensing option for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts, `COPYING.GPLv3` to learn the exact legal terms that apply in this case. There are a handful of files under other licensing terms, namely: * The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for licensing details. Specifically note that you must credit the IJG in the documentation accompanying your program if you only distribute executables. You must also indicate any changes including additions and deletions to those three files in the documentation. * `tests/reference.pnm` is under the expat license. external libraries ================== FFmpeg can be combined with a number of external libraries, which sometimes affect the licensing of binaries resulting from the combination. compatible libraries -------------------- The following libraries are under GPL: - frei0r - libcdio - librubberband - libutvideo - libvidstab - libx264 - libx265 - libxavs - libxvid When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by passing `--enable-gpl` to configure. The OpenCORE and VisualOn libraries are under the Apache License 2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of those licenses. So to combine these libraries with FFmpeg, the license version needs to be upgraded by passing `--enable-version3` to configure. incompatible libraries ---------------------- The Fraunhofer AAC library, FAAC and aacplus are under licenses which are incompatible with the GPLv2 and v3. We do not know for certain if their licenses are compatible with the LGPL. If you wish to enable these libraries, pass `--enable-nonfree` to configure. But note that if you enable any of these libraries the resulting binary will be under a complex license mix that is more restrictive than the LGPL and that may result in additional obligations. It is possible that these restrictions cause the resulting binary to be unredistributeable. ******************************************************************************** libavcodec/arm/vp8dsp_armv6.S VP8 ARMv6 optimisations Copyright (c) 2010 Google Inc. Copyright (c) 2010 Rob Clark <rob@ti.com> Copyright (c) 2011 Mans Rullgard <mans@mansr.com> This file is part of FFmpeg. FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA This code was partially ported from libvpx, which uses this license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************** libavformat/oggparsespeex.c Copyright (C) 2008 Reimar D?ffinger Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************** libavcodec/x86/xvididct.asm XVID MPEG-4 VIDEO CODEC Conversion from gcc syntax to x264asm syntax with modifications by Christophe Gisquet <christophe.gisquet@gmail.com> =========== SSE2 inverse discrete cosine transform =========== Copyright(C) 2003 Pascal Massimino <skal@planet-d.net> Conversion to gcc syntax with modifications by Alexander Strange <astrange@ithinksw.com> Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid. Vertical pass is an implementation of the scheme: Loeffler C., Ligtenberg A., and Moschytz C.S.: Practical Fast 1D DCT Algorithm with Eleven Multiplications, Proc. ICASSP 1989, 988-991. Horizontal pass is a double 4x4 vector/matrix multiplication, (see also Intel's Application Note 922: http://developer.intel.com/vtune/cbts/strmsimd/922down.htm Copyright (C) 1999 Intel Corporation) More details at http://skal.planet-d.net/coding/dct.html ======= MMX and XMM forward discrete cosine transform ======= Copyright(C) 2001 Peter Ross <pross@xvid.org> Originally provided by Intel at AP-922 http://developer.intel.com/vtune/cbts/strmsimd/922down.htm (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm) but in a limited edition. New macro implements a column part for precise iDCT The routine precision now satisfies IEEE standard 1180-1990. Copyright(C) 2000-2001 Peter Gubanov <peter@elecard.net.ru> Rounding trick Copyright(C) 2000 Michel Lespinasse <walken@zoy.org> http://www.elecard.com/peter/idct.html http://www.linuxvideo.org/mpeg2dec/ These examples contain code fragments for first stage iDCT 8x8 (for rows) and first stage DCT 8x8 (for columns) conversion to gcc syntax by Michael Niedermayer ====================================================================== This file is part of FFmpeg. FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ******************************************************************************** libavcodec/arm/jrevdct_arm.S C-like prototype : void j_rev_dct_arm(DCTBLOCK data) With DCTBLOCK being a pointer to an array of 64 'signed shorts' Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************** libswresample/version.h Version macros. This file is part of libswresample libswresample is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libswresample is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libswresample; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ******************************************************************************** libavcodec/faandct.c Floating point AAN DCT this implementation is based upon the IJG integer AAN DCT (see jfdctfst.c) Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at> Copyright (c) 2003 Roman Shaposhnik Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************************** libavformat/oggparsetheora.c Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************** libswresample/swresample.h Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at) This file is part of libswresample libswresample is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libswresample is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libswresample; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ******************************************************************************** libavcodec/jfdctfst.c libavcodec/jfdctint_template.c libavcodec/jrevdct.c This file is part of the Independent JPEG Group's software. The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (C) 1994-1996, Thomas G. Lane. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. ******************************************************************************** libavcodec/fft_fixed_32.c libavcodec/fft_init_table.c libavcodec/fft_table.h libavcodec/mdct_fixed_32.c libavcodec/mips/aacdec_mips.c libavcodec/mips/aacdec_mips.h libavcodec/mips/aacpsdsp_mips.c libavcodec/mips/aacsbr_mips.c libavcodec/mips/aacsbr_mips.h libavcodec/mips/amrwbdec_mips.h libavcodec/mips/compute_antialias_fixed.h libavcodec/mips/compute_antialias_float.h libavcodec/mips/lsp_mips.h libavcodec/mips/sbrdsp_mips.c libavutil/fixed_dsp.c libavutil/fixed_dsp.h libavutil/mips/float_dsp_mips.c libavutil/mips/libm_mips.h libavutil/softfloat_tables.h Copyright (c) 2012 MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the MIPS Technologies, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Authors: Branimir Vasic (bvasic@mips.com) Darko Laus (darko@mips.com) Djordje Pesut (djordje@mips.com) Goran Cordasic (goran@mips.com) Nedeljko Babic (nedeljko.babic imgtec com) Mirjana Vulin (mvulin@mips.com) Stanislav Ocovaj (socovaj@mips.com) Zoran Lukic (zoranl@mips.com) ******************************************************************************** libavformat/oggdec.c libavformat/oggdec.h libavformat/oggparseogm.c libavformat/oggparsevorbis.c Copyright (C) 2005 Michael Ahlberg, M??ns Rullg??rd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************** GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it!</pre> </div> </div> <div class="product"> <span class="title">fips181</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.adel.nursat.kz/apg/">homepage</a></span> <div class="licence"> <pre>Copyright (c) 1999, 2000, 2001, 2002 Adel I. Mirzazhanov. All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3.The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">flac</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz/download">homepage</a></span> <div class="licence"> <pre>Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">fontconfig</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/fontconfig/">homepage</a></span> <div class="licence"> <pre>fontconfig/COPYING Copyright ? 2000,2001,2002,2003,2004,2006,2007 Keith Packard Copyright ? 2005 Patrick Lam Copyright ? 2009 Roozbeh Pournader Copyright ? 2008,2009 Red Hat, Inc. Copyright ? 2008 Danilo ?egan Copyright ? 2012 Google, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the author(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The authors make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">google-glog's symbolization library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/glog">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2006, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">google-jstemplate</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/google-jstemplate/">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">google-safe-browsing</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/google-safe-browsing/">homepage</a></span> <div class="licence"> <pre>Copyright 2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">harfbuzz-ng</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://harfbuzz.org">homepage</a></span> <div class="licence"> <pre>HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. For parts of HarfBuzz that are licensed under different licenses see individual files names COPYING in subdirectories where applicable. Copyright ? 2010,2011,2012 Google, Inc. Copyright ? 2012 Mozilla Foundation Copyright ? 2011 Codethink Limited Copyright ? 2008,2010 Nokia Corporation and/or its subsidiary(-ies) Copyright ? 2009 Keith Stribley Copyright ? 2009 Martin Hosken and SIL International Copyright ? 2007 Chris Wilson Copyright ? 2006 Behdad Esfahbod Copyright ? 2005 David Turner Copyright ? 2004,2007,2008,2009,2010 Red Hat, Inc. Copyright ? 1998-2004 David Turner and Werner Lemberg For full copyright notices consult the individual files in the package. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. </pre> </div> </div> <div class="product"> <span class="title">hunspell</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://hunspell.sourceforge.net/">homepage</a></span> <div class="licence"> <pre>GPL 2.0/LGPL 2.1/MPL 1.1 tri-license The contents of this software may be used under the terms of the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL", see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the intl/ directory) the Mozilla Public License Version 1.1 or later (the "MPL", see COPYING.MPL). Software distributed under these licenses is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences for the specific language governing rights and limitations under the licenses. </pre> </div> </div> <div class="product"> <span class="title">iccjpeg</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.ijg.org">homepage</a></span> <div class="licence"> <pre>LICENSE extracted from IJG's jpeg distribution: ----------------------------------------------- In plain English: 1. We don't promise that this software works. (But if you find any bugs, please let us know!) 2. You can use this software for whatever you want. You don't have to pay us. 3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in your documentation that you've used the IJG code. In legalese: The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. </pre> </div> </div> <div class="product"> <span class="title">icu</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://site.icu-project.org/">homepage</a></span> <div class="licence"> <pre>ICU License - ICU 1.8.1 and later COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1995-2014 International Business Machines Corporation and others All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. ___________________________________________________________________ All trademarks and registered trademarks mentioned herein are the property of their respective owners. ___________________________________________________________________ Third-Party Software Licenses This section contains third-party software notices and/or additional terms for licensed third-party software components included within ICU libraries. 1. Unicode Data Files and Software COPYRIGHT AND PERMISSION NOTICE Copyright ? 1991-2014 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that (a) this copyright and permission notice appear with all copies of the Data Files or Software, (b) this copyright and permission notice appear in associated documentation, and (c) there is clear notice in each modified Data File or in the Software as well as in the documentation associated with the Data File(s) or Software that the data or software has been modified. THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) # The Google Chrome software developed by Google is licensed under the BSD li cense. Other software included in this distribution is provided under other licen ses, as set forth below. # # The BSD License # http://opensource.org/licenses/bsd-license.php # Copyright (C) 2006-2008, Google Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modifi cation, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, th is list of conditions and the following disclaimer. # Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. # Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I S" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPL IED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLA IMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIR ECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDIN G, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF L IABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O F THE POSSIBILITY OF SUCH DAMAGE. # # # The word list in cjdict.txt are generated by combining three word lists l isted # below with further processing for compound word breaking. The frequency i s generated # with an iterative training against Google web corpora. # # * Libtabe (Chinese) # - https://sourceforge.net/project/?group_id=1519 # - Its license terms and conditions are shown below. # # * IPADIC (Japanese) # - http://chasen.aist-nara.ac.jp/chasen/distribution.html # - Its license terms and conditions are shown below. # # ---------COPYING.libtabe ---- BEGIN-------------------- # # /* # * Copyrighy (c) 1999 TaBE Project. # * Copyright (c) 1999 Pai-Hsiang Hsiao. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * . Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * . Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in # * the documentation and/or other materials provided with the # * distribution. # * . Neither the name of the TaBE Project nor the names of its # * contributors may be used to endorse or promote products derived # * from this software without specific prior written permission. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # * OF THE POSSIBILITY OF SUCH DAMAGE. # */ # # /* # * Copyright (c) 1999 Computer Systems and Communication Lab, # * Institute of Information Science, Academia Sinica. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * . Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * . Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in # * the documentation and/or other materials provided with the # * distribution. # * . Neither the name of the Computer Systems and Communication Lab # * nor the names of its contributors may be used to endorse or # * promote products derived from this software without specific # * prior written permission. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # * OF THE POSSIBILITY OF SUCH DAMAGE. # */ # # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 # # ---------------COPYING.libtabe-----END----------------------------------- - # # # ---------------COPYING.ipadic-----BEGIN---------------------------------- -- # # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science # and Technology. All Rights Reserved. # # Use, reproduction, and distribution of this software is permitted. # Any copy of this software, whether in its original form or modified, # must include both the above copyright notice and the following # paragraphs. # # Nara Institute of Science and Technology (NAIST), # the copyright holders, disclaims all warranties with regard to this # software, including all implied warranties of merchantability and # fitness, in no event shall NAIST be liable for # any special, indirect or consequential damages or any damages # whatsoever resulting from loss of use, data or profits, whether in an # action of contract, negligence or other tortuous action, arising out # of or in connection with the use or performance of this software. # # A large portion of the dictionary entries # originate from ICOT Free Software. The following conditions for ICOT # Free Software applies to the current dictionary as well. # # Each User may also freely distribute the Program, whether in its # original form or modified, to any third party or parties, PROVIDED # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear # on, or be attached to, the Program, which is distributed substantially # in the same form as set out herein and that such intended # distribution, if actually made, will neither violate or otherwise # contravene any of the laws and regulations of the countries having # jurisdiction over the User or the intended distribution itself. # # NO WARRANTY # # The program was produced on an experimental basis in the course of the # research and development conducted during the project and is provided # to users as so produced on an experimental basis. Accordingly, the # program is provided without any warranty whatsoever, whether express, # implied, statutory or otherwise. The term "warranty" used herein # includes, but is not limited to, any warranty of the quality, # performance, merchantability and fitness for a particular purpose of # the program and the nonexistence of any infringement or violation of # any right of any third party. # # Each user of the program will agree and understand, and be deemed to # have agreed and understood, that there is no warranty whatsoever for # the program and, accordingly, the entire risk arising from or # otherwise connected with the program is assumed by the user. # # Therefore, neither ICOT, the copyright holder, or any other # organization that participated in or was otherwise related to the # development of the program and their respective officials, directors, # officers and other employees shall be held liable for any and all # damages, including, without limitation, general, special, incidental # and consequential damages, arising out of or otherwise in connection # with the use or inability to use the program or any product, material # or result produced or otherwise obtained by using the program, # regardless of whether they have been advised of, or otherwise had # knowledge of, the possibility of such damages at any time during the # project or thereafter. Each user will be deemed to have agreed to the # foregoing by his or her commencement of use of the program. The term # "use" as used herein includes, but is not limited to, the use, # modification, copying and distribution of the program and the # production of secondary products from the program. # # In the case where the program, whether in its original form or # modified, was distributed or delivered to or received by a user from # any person, organization or entity other than ICOT, unless it makes or # grants independently of ICOT any specific warranty to the user in # writing, such person, organization or entity, will also be exempted # from and not be held liable to the user for any such damages as noted # above as far as the program is concerned. # # ---------------COPYING.ipadic-----END------------------------------------ 3. Lao Word Break Dictionary Data (laodict.txt) # Copyright (c) 2013 International Business Machines Corporation # and others. All Rights Reserved. # # Project: http://code.google.com/p/lao-dictionary/ # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICEN SE.txt # (copied below) # # This file is derived from the above dictionary, with slight modifications . # ------------------------------------------------------------------------- ------- # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modifi cation, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright no tice, this # list of conditions and the following disclaimer. Redistributions in binary # form must reproduce the above copyright notice, this list of cond itions and # the following disclaimer in the documentation and/or other materi als # provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I S" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP LIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIA BLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA MAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC ES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED A ND ON # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ------------------------------------------------------------------------- ------- 4. Burmese Word Break Dictionary Data (burmesedict.txt) # Copyright (c) 2014 International Business Machines Corporation # and others. All Rights Reserved. # # This list is part of a project hosted at: # github.com/kanyawtech/myanmar-karen-word-lists # # ------------------------------------------------------------------------- ------- # Copyright (c) 2013, LeRoy Benjamin Sharon # All rights reserved. # # Redistribution and use in source and binary forms, with or without modifi cation, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright notic e, this # list of conditions and the following disclaimer in the documentation an d/or # other materials provided with the distribution. # # Neither the name Myanmar Karen Word Lists, nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I S" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP LIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIA BLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA MAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC ES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED A ND ON # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ------------------------------------------------------------------------- ------- 5. Time Zone Database ICU uses the public domain data and code derived from Time Zone Database for its time zone support. The ownership of the TZ database is explained in BCP 175: Procedure for Maintaining the Time Zone Database section 7. 7. Database Ownership The TZ database itself is not an IETF Contribution or an IETF document. Rather it is a pre-existing and regularly updated work that is in the public domain, and is intended to remain in the public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do not apply to the TZ Database or contributions that individuals make to it. Should any claims be made and substantiated against the TZ Database, the organization that is providing the IANA Considerations defined in this RFC, under the memorandum of understanding with the IETF, currently ICANN, may act in accordance with all competent court orders. No ownership claims will be made by ICANN or the IETF Trust on the database or the code. Any person making a contribution to the database or code waives all rights to future claims in that contribution or in the TZ Database. </pre> </div> </div> <div class="product"> <span class="title">ijar</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/bazel/tree/master/third_party/ijar">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">jsoncpp</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/open-source-parsers/jsoncpp">homepage</a></span> <div class="licence"> <pre>The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... The author (Baptiste Lepilleur) explicitly disclaims copyright in all jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is released under the terms of the MIT License (see below). In jurisdictions which recognize Public Domain property, the user of this software may choose to accept it either as 1) Public Domain, 2) under the conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License The full text of the MIT License follows: ======================================================================== Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ======================================================================== (END LICENSE TEXT) The MIT license is compatible with both the GPL and commercial software, affording one all of the rights of Public Domain with the minor nuisance of being required to keep the above copyright notice and license text in the source code. Note also that by accepting the Public Domain "license" you can re-license your copy using whatever license you like. </pre> </div> </div> <div class="product"> <span class="title">libcxx</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libcxx.llvm.org/">homepage</a></span> <div class="licence"> <pre>============================================================================== libc++ License ============================================================================== The libc++ library is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. As a user of this code you may choose to use it under either license. As a contributor, you agree to allow your code to be used under both. Full text of the relevant licenses is included below. ============================================================================== University of Illinois/NCSA Open Source License Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ============================================================================== Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">libcxx</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libcxx.llvm.org/">homepage</a></span> <div class="licence"> <pre>============================================================================== libc++ License ============================================================================== The libc++ library is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. As a user of this code you may choose to use it under either license. As a contributor, you agree to allow your code to be used under both. Full text of the relevant licenses is included below. ============================================================================== University of Illinois/NCSA Open Source License Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ============================================================================== Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">libcxxabi</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libcxxabi.llvm.org/">homepage</a></span> <div class="licence"> <pre>============================================================================== libc++abi License ============================================================================== The libc++abi library is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. As a user of this code you may choose to use it under either license. As a contributor, you agree to allow your code to be used under both. Full text of the relevant licenses is included below. ============================================================================== University of Illinois/NCSA Open Source License Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ============================================================================== Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">libevent</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libevent.org/">homepage</a></span> <div class="licence"> <pre>Libevent is available for use under the following license, commonly known as the 3-clause (or "modified") BSD license: ============================== Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu> Copyright (c) 2007-2010 Niels Provos and Nick Mathewson Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ============================== Portions of Libevent are based on works by others, also made available by them under the three-clause BSD license above. The copyright notices are available in the corresponding source files; the license is as above. Here's a list: log.c: Copyright (c) 2000 Dug Song <dugsong@monkey.org> Copyright (c) 1993 The Regents of the University of California. strlcpy.c: Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> win32.c: Copyright (c) 2003 Michael A. Davis <mike@datanerds.net> evport.c: Copyright (c) 2007 Sun Microsystems min_heap.h: Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com> tree.h: Copyright 2002 Niels Provos <provos@citi.umich.edu> </pre> </div> </div> <div class="product"> <span class="title">libexif</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libexif.sourceforge.net/">homepage</a></span> <div class="licence"> <pre> GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! </pre> </div> </div> <div class="product"> <span class="title">libjingle</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.webrtc.org">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2013, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre> </div> </div> <div class="product"> <span class="title">libjpeg</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.ijg.org/">homepage</a></span> <div class="licence"> <pre>(Copied from the README.) -------------------------------------------------------------------------------- The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are aware, there are no patent restrictions on the remaining code. The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by all standard GIF decoders. We are required to state that "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated." -------------------------------------------------------------------------------- jconfig.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license. jmorecfg.h contains modifications, which are distributed under the Netscape Public License. </pre> </div> </div> <div class="product"> <span class="title">libjpeg-turbo</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://sourceforge.net/projects/libjpeg-turbo/">homepage</a></span> <div class="licence"> <pre>libjpeg-turbo is licensed under a non-restrictive, BSD-style license (see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and associated test programs bear a similar license, which is reproduced below: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the libjpeg-turbo Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">libpng</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libpng.org/">homepage</a></span> <div class="licence"> <pre> This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is included in the libpng distribution, the latter shall prevail. COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence. pngusr.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license. This code is released under the libpng license. libpng versions 1.0.7, July 1, 2000, through 1.2.54, November 12, 2015, are Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors: Simon-Pierre Cadieux Eric S. Raymond Cosmin Truta Gilles Vollant and with the following additions to the disclaimer: There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from libpng-0.96, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors: Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, and are distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: John Bowler Kevin Bracey Sam Bushell Magnus Holmgren Greg Roelofs Tom Tanner libpng versions 0.5, May 1995, through 0.88, January 1996, are Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals: Andreas Dilger Dave Martindale Guy Eric Schalnat Paul Schmidt Tim Wegner The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions: 1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution. The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: printf("%s", png_get_copyright(NULL)); Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative. OSI has not addressed the additional disclaimers inserted at version 1.0.7. Glenn Randers-Pehrson glennrp at users.sourceforge.net November 12, 2015 </pre> </div> </div> <div class="product"> <span class="title">libsecret</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://git.gnome.org/browse/libsecret/">homepage</a></span> <div class="licence"> <pre> GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it!</pre> </div> </div> <div class="product"> <span class="title">libsrtp</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/cisco/libsrtp">homepage</a></span> <div class="licence"> <pre>/* * * Copyright (c) 2001-2006 Cisco Systems, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the Cisco Systems, Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ </pre> </div> </div> <div class="product"> <span class="title">libudev</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/systemd/">homepage</a></span> <div class="licence"> <pre> GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! </pre> </div> </div> <div class="product"> <span class="title">libusbx</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://libusb.org">homepage</a></span> <div class="licence"> <pre> GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! </pre> </div> </div> <div class="product"> <span class="title">libva</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://freedesktop.org/wiki/Software/vaapi">homepage</a></span> <div class="licence"> <pre> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">libvpx</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.webmproject.org">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2010, The WebM Project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google, nor the WebM Project, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">libxml</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://xmlsoft.org">homepage</a></span> <div class="licence"> <pre>Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">libxslt</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://xmlsoft.org/XSLT">homepage</a></span> <div class="licence"> <pre>Licence for libxslt except libexslt ---------------------------------------------------------------------- Copyright (C) 2001-2002 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from him. ---------------------------------------------------------------------- Licence for libexslt ---------------------------------------------------------------------- Copyright (C) 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the authors shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from him. ---------------------------------------------------------------------- </pre> </div> </div> <div class="product"> <span class="title">libyuv</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/libyuv/">homepage</a></span> <div class="licence"> <pre>Copyright 2011 The LibYuv Project Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">linux-syscall-support</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/linux-syscall-support/">homepage</a></span> <div class="licence"> <pre>// Copyright 2015 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">mach_override</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/rentzsch/mach_override">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2003-2012 Jonathan 'Wolf' Rentzsch: http://rentzsch.com Some rights reserved: http://opensource.org/licenses/mit mach_override includes a copy of libudis86, licensed as follows: Copyright (c) 2002-2009 Vivek Thampi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">markdown, a text-to-HTML conversion tool for web writers</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://pypi.python.org/pypi/Markdown">homepage</a></span> <div class="licence"> <pre>Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) Copyright 2004 Manfred Stienstra (the original version) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE PYTHON MARKDOWN PROJECT ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY CONTRIBUTORS TO THE PYTHON MARKDOWN PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">mesa</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.mesa3d.org/">homepage</a></span> <div class="licence"> <pre>The default Mesa license is as follows: Copyright (C) 1999-2007 Brian Paul All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Some parts of Mesa are copyrighted under the GNU LGPL. See the Mesa/docs/COPYRIGHT file for details. The following is the standard GNU copyright file. ---------------------------------------------------------------------- GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! </pre> </div> </div> <div class="product"> <span class="title">minigbm</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://chromium.googlesource.com/chromiumos/platform/minigbm">homepage</a></span> <div class="licence"> <pre>// Copyright 2014 The Chromium OS Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">modp base64 decoder</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/client9/stringencoders">homepage</a></span> <div class="licence"> <pre> * MODP_B64 - High performance base64 encoder/decoder * Version 1.3 -- 17-Mar-2006 * http://modp.com/release/base64 * * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the modp.com nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">mt19937ar</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html">homepage</a></span> <div class="licence"> <pre> A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">native client</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://code.google.com/p/nativeclient">homepage</a></span> <div class="licence"> <pre>Copyright 2008, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">newlib-extras</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="ftp://sourceware.org/pub/newlib/newlib-2.0.0.tar.gz">homepage</a></span> <div class="licence"> <pre> README for newlib-2.0.0 release (mostly cribbed from the README in the gdb-4.13 release) This is `newlib', a simple ANSI C library, math library, and collection of board support packages. The newlib and libgloss subdirectories are a collection of software from several sources, each wi6h their own copyright and license. See the file COPYING.NEWLIB for details. The rest of the release tree is under either the GNU GPL or LGPL licenses. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Unpacking and Installation -- quick overview ========================== When you unpack the newlib-2.0.0.tar.gz file, you'll find a directory called `newlib-2.0.0', which contains: COPYING config/ install-sh* mpw-configure COPYING.LIB config-ml.in libgloss/ mpw-install COPYING.NEWLIB config.guess* mkinstalldirs* newlib/ CYGNUS config.sub* move-if-change* symlink-tree* ChangeLog configure* mpw-README texinfo/ Makefile.in configure.in mpw-build.in README etc/ mpw-config.in To build NEWLIB, you must follow the instructions in the section entitled "Compiling NEWLIB". This will configure and build all the libraries and crt0 (if one exists). If `configure' can't determine your host system type, specify one as its argument, e.g., sun4 or sun4sol2. NEWLIB is most often used in cross environments. NOTE THAT YOU MUST HAVE ALREADY BUILT AND INSTALLED GCC and BINUTILS. More Documentation ================== Newlib documentation is available on the net via: http://sourceware.org/newlib/docs.html All the documentation for NEWLIB comes as part of the machine-readable distribution. The documentation is written in Texinfo format, which is a documentation system that uses a single source file to produce both on-line information and a printed manual. You can use one of the Info formatting commands to create the on-line version of the documentation and TeX (or `texi2roff') to typeset the printed version. If you want to format these Info files yourself, you need one of the Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'. If you want to typeset and print copies of this manual, you need TeX, a program to print its DVI output files, and `texinfo.tex', the Texinfo definitions file. TeX is a typesetting program; it does not print files directly, but produces output files called DVI files. To print a typeset document, you need a program to print DVI files. If your system has TeX installed, chances are it has such a program. The precise command to use depends on your system; `lpr -d' is common; another (for PostScript devices) is `dvips'. The DVI print command may require a file name without any extension or a `.dvi' extension. TeX also requires a macro definitions file called `texinfo.tex'. This file tells TeX how to typeset a document written in Texinfo format. On its own, TeX cannot read, much less typeset a Texinfo file. `texinfo.tex' is distributed with NEWLIB and is located in the `newlib-VERSION-NUMBER/texinfo' directory. Compiling NEWLIB ================ To compile NEWLIB, you must build it in a directory separate from the source directory. If you want to run NEWLIB versions for several host or target machines, you need a different `newlib' compiled for each combination of host and target. `configure' is designed to make this easy by allowing you to generate each configuration in a separate subdirectory. If your `make' program handles the `VPATH' feature correctly (like GNU `make') running `make' in each of these directories builds the `newlib' libraries specified there. To build `newlib' in a specific directory, run `configure' with the `--srcdir' option to specify where to find the source. (You also need to specify a path to find `configure' itself from your working directory. If the path to `configure' would be the same as the argument to `--srcdir', you can leave out the `--srcdir' option; it will be assumed.) For example, with version 2.0.0, you can build NEWLIB in a separate directory for a Sun 4 cross m68k-aout environment like this: cd newlib-2.0.0 mkdir ../newlib-m68k-aout cd ../newlib-m68k-aout ../newlib-2.0.0/configure --host=sun4 --target=m68k-aout make When `configure' builds a configuration using a remote source directory, it creates a tree for the binaries with the same structure (and using the same names) as the tree under the source directory. In the example, you'd find the Sun 4 library `libiberty.a' in the directory `newlib-m68k-aout/libiberty', and NEWLIB itself in `newlib-m68k-aout/newlib'. When you run `make' to build a program or library, you must run it in a configured directory--whatever directory you were in when you called `configure' (or one of its subdirectories). The `Makefile' that `configure' generates in each source directory also runs recursively. If you type `make' in a source directory such as `newlib-2.0.0' (or in a separate configured directory configured with `--srcdir=PATH/newlib-2.0.0'), you will build all the required libraries. When you have multiple hosts or targets configured in separate directories, you can run `make' on them in parallel (for example, if they are NFS-mounted on each of the hosts); they will not interfere with each other. Specifying names for hosts and targets ====================================== The specifications used for hosts and targets in the `configure' script are based on a three-part naming scheme, but some short predefined aliases are also supported. The full naming scheme encodes three pieces of information in the following pattern: ARCHITECTURE-VENDOR-OS For example, you can use the alias `sun4' as a HOST argument or in a `--target=TARGET' option. The equivalent full name is `sparc-sun-sunos4'. The `configure' script accompanying NEWLIB does not provide any query facility to list all supported host and target names or aliases. `configure' calls the Bourne shell script `config.sub' to map abbreviations to full names; you can read the script, if you wish, or you can use it to test your guesses on abbreviations--for example: % sh config.sub sun4 sparc-sun-sunos4.1.1 % sh config.sub sun3 m68k-sun-sunos4.1.1 % sh config.sub decstation mips-dec-ultrix4.2 % sh config.sub hp300bsd m68k-hp-bsd % sh config.sub i386v i386-pc-sysv % sh config.sub i786v Invalid configuration `i786v': machine `i786v' not recognized The Build, Host and Target Concepts in newlib ============================================= The build, host and target concepts are defined for gcc as follows: build: the platform on which gcc is built. host: the platform on which gcc is run. target: the platform for which gcc generates code. Since newlib is a library, the target concept does not apply to it, and the build, host, and target options given to the top-level configure script must be changed for newlib's use. The options are shifted according to these correspondences: gcc's build platform has no equivalent in newlib. gcc's host platform is newlib's build platform. gcc's target platform is newlib's host platform. and as mentioned before, newlib has no concept of target. `configure' options =================== Here is a summary of the `configure' options and arguments that are most often useful for building NEWLIB. `configure' also has several other options not listed here. configure [--help] [--prefix=DIR] [--srcdir=PATH] [--target=TARGET] HOST You may introduce options with a single `-' rather than `--' if you prefer; but you may abbreviate option names if you use `--'. `--help' Display a quick summary of how to invoke `configure'. `--prefix=DIR' Configure the source to install programs and files in directory `DIR'. `--exec-prefix=DIR' Configure the source to install host-dependent files in directory `DIR'. `--srcdir=PATH' *Warning: using this option requires GNU `make', or another `make' that compatibly implements the `VPATH' feature. Use this option to make configurations in directories separate from the NEWLIB source directories. Among other things, you can use this to build (or maintain) several configurations simultaneously, in separate directories. `configure' writes configuration specific files in the current directory, but arranges for them to use the source in the directory PATH. `configure' will create directories under the working directory in parallel to the source directories below PATH. `--norecursion' Configure only the directory level where `configure' is executed; do not propagate configuration to subdirectories. `--target=TARGET' Configure NEWLIB for running on the specified TARGET. There is no convenient way to generate a list of all available targets. `HOST ...' Configure NEWLIB to be built using a cross compiler running on the specified HOST. There is no convenient way to generate a list of all available hosts. To fit diverse usage models, NEWLIB supports a group of configuration options so that library features can be turned on/off according to target system's requirements. One feature can be enabled by specifying `--enable-FEATURE=yes' or `--enable-FEATURE'. Or it can be disable by `--enable-FEATURE=no' or `--disable-FEATURE'. `--enable-newlib-io-pos-args' Enable printf-family positional arg support. Disabled by default, but some hosts enable it in configure.host. `--enable-newlib-io-c99-formats' Enable C99 support in IO functions like printf/scanf. Disabled by default, but some hosts enable it in configure.host. `--enable-newlib-register-fini' Enable finalization function registration using atexit. Disabled by default. `--enable-newlib-io-long-long' Enable long long type support in IO functions like printf/scanf. Disabled by default, but many hosts enable it in configure.host. `--enable-newlib-io-long-double' Enable long double type support in IO functions printf/scanf. Disabled by default, but some hosts enable it in configure.host. `--enable-newlib-mb' Enable multibyte support. Disabled by default. `--enable-newlib-iconv-encodings' Enable specific comma-separated list of bidirectional iconv encodings to be built-in. Disabled by default. `--enable-newlib-iconv-from-encodings' Enable specific comma-separated list of \"from\" iconv encodings to be built-in. Disabled by default. `--enable-newlib-iconv-to-encodings' Enable specific comma-separated list of \"to\" iconv encodings to be built-in. Disabled by default. `--enable-newlib-iconv-external-ccs' Enable capabilities to load external CCS files for iconv. Disabled by default. `--disable-newlib-atexit-dynamic-alloc' Disable dynamic allocation of atexit entries. Most hosts and targets have it enabled in configure.host. `--enable-newlib-reent-small' Enable small reentrant struct support. Disabled by default. `--disable-newlib-fvwrite-in-streamio' NEWLIB implements the vector buffer mechanism to support stream IO buffering required by C standard. This feature is possibly unnecessary for embedded systems which won't change file buffering with functions like `setbuf' or `setvbuf'. The buffering mechanism still acts as default for STDIN/STDOUT/STDERR even if this option is specified. Enabled by default. `--disable-newlib-fseek-optimization' Disable fseek optimization. It can decrease code size of application calling `fseek`. Enabled by default. `--disable-newlib-wide-orient' C99 states that each stream has an orientation, wide or byte. This feature is possibly unnecessary for embedded systems which only do byte input/output operations on stream. It can decrease code size by disable the feature. Enabled by default. `--enable-newlib-nano-malloc' NEWLIB has two implementations of malloc family's functions, one in `mallocr.c' and the other one in `nano-mallocr.c'. This options enables the nano-malloc implementation, which is for small systems with very limited memory. Note that this implementation does not support `--enable-malloc-debugging' any more. Disabled by default. `--disable-newlib-unbuf-stream-opt' NEWLIB does optimization when `fprintf to write only unbuffered unix file'. It creates a temorary buffer to do the optimization that increases stack consumption by about `BUFSIZ' bytes. This option disables the optimization and saves size of text and stack. Enabled by default. `--enable-multilib' Build many library versions. Enabled by default. `--enable-target-optspace' Optimize for space. Disabled by default. `--enable-malloc-debugging' Indicate malloc debugging requested. Disabled by default. `--enable-newlib-multithread' Enable support for multiple threads. Enabled by default. `--enable-newlib-iconv' Enable iconv library support. Disabled by default. `--enable-newlib-elix-level' Supply desired elix library level (1-4). Please refer to HOWTO for more information about this option. Set to level 0 by default. `--disable-newlib-io-float' Disable printf/scanf family float support. Enabled by default. `--disable-newlib-supplied-syscalls' Disable newlib from supplying syscalls. Enabled by default. `--enable-lite-exit' Enable lite exit, a size-reduced implementation of exit that doesn't invoke clean-up functions such as _fini or global destructors. Disabled by default. Running the Testsuite ===================== To run newlib's testsuite, you'll need a site.exp in your home directory which points dejagnu to the proper baseboards directory and the proper exp file for your target. Before running make check-target-newlib, set the DEJAGNU environment variable to point to ~/site.exp. Here is a sample site.exp: # Make sure we look in the right place for the board description files. if ![info exists boards_dir] { set boards_dir {} } lappend boards_dir "your dejagnu/baseboards here" verbose "Global Config File: target_triplet is $target_triplet" 2 global target_list case "$target_triplet" in { { "mips-*elf*" } { set target_list "mips-sim" } default { set target_list { "unix" } } } mips-sim refers to an exp file in the baseboards directory. You'll need to add the other targets you're testing to the case statement. Now type make check-target-newlib in the top-level build directory to run the testsuite. Shared newlib ============= newlib uses libtool when it is being compiled natively (with --target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu host. This allows newlib to be compiled as a shared library. To configure newlib, do the following from your build directory: $(source_dir)/src/configure --with-newlib --prefix=$(install_dir) configure will recognize that host == target == i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using libtool. By default, libtool will build shared and static versions of newlib. To compile a program against shared newlib, do the following (where target_install_dir = $(install_dir)/i[34567]86-pc-linux-gnu): gcc -nostdlib $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm -lgcc To run the program, make sure that $(target_install_dir)/lib is listed in the LD_LIBRARY_PATH environment variable. To create a static binary linked against newlib, do the following: gcc -nostdlib -static $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm libtool can be instructed to produce only static libraries. To build newlib as a static library only, do the following from your build directory: $(source_dir)/src/configure --with-newlib --prefix=$(install_dir) --disable-shared Regenerating Configuration Files ================================ At times you will need to make changes to configure.in and Makefile.am files. This will mean that configure and Makefile.in files will need to be regenerated. At the top level of newlib is the file: acinclude.m4. This file contains the definition of the NEWLIB_CONFIGURE macro which is used by all configure.in files in newlib. You will notice that each directory in newlib containing a configure.in file also contains an aclocal.m4 file. This file is generated by issuing: aclocal -I${relative_path_to_toplevel_newlib_dir} -I${relative_path_to_toplevel_src_dir} The first relative directory is to access acinclude.m4. The second relative directory is to access libtool information in the top-level src directory. For example, to regenerate aclocal.m4 in newlib/libc/machine/arm: aclocal -I ../../.. -I ../../../.. Note that if the top level acinclude.m4 is altered, every aclocal.m4 file in newlib should be regenerated. If the aclocal.m4 file is regenerated due to a change in acinclude.m4 or if a configure.in file is modified, the corresponding configure file in the directory must be regenerated using autoconf. No parameters are necessary. In the previous example, we would issue: autoconf from the newlib/libc/machine/arm directory. If you have regenerated a configure file or if you have modified a Makefile.am file, you will need to regenerate the appropriate Makefile.in file(s). For newlib, automake is a bit trickier. First of all, all Makefile.in files in newlib (and libgloss) are generated using the --cygnus option of automake. Makefile.in files are generated from the nearest directory up the chain which contains a configure.in file. In most cases, this is the same directory containing configure.in, but there are exceptions. For example, the newlib/libc directory has a number of subdirectories that do not contain their own configure.in files (e.g. stdio). For these directories, you must issue the automake command from newlib/libc which is the nearest parent directory that contains a configure.in. When you issue the automake command, you specify the subdirectory for the Makefile.in you are regenerating. For example: automake --cygnus stdio/Makefile stdlib/Makefile Note how multiple Makefile.in files can be created in the same step. You would not specify machine/Makefile or sys/Makefile in the previous example because both of these subdirectories contain their own configure.in files. One would change to each of these subdirectories and in turn issue: automake --cygnus Makefile Let's say you create a new machine directory XXXX off of newlib/libc/machine. After creating a new configure.in and Makefile.am file, you would issue: aclocal -I ../../.. autoconf automake --cygnus Makefile from newlib/libc/machine/XXXX It is strongly advised that you use an adequate version of autotools. For this latest release, the following were used: autoconf 2.68, aclocal 1.11.6, and automake 1.11.6. Reporting Bugs ============== The correct address for reporting bugs found in NEWLIB is "newlib@sourceware.org". Please email all bug reports to that address. Please include the NEWLIB version number (e.g., newlib-2.0.0), and how you configured it (e.g., "sun4 host and m68k-aout target"). Since NEWLIB supports many different configurations, it is important that you be precise about this. Archives of the newlib mailing list are on-line, see http://sourceware.org/ml/newlib/ </pre> </div> </div> <div class="product"> <span class="title">ocmock</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/erikdoe/ocmock">homepage</a></span> <div class="licence"> <pre> Copyright (c) 2004-2012 by Mulle Kybernetik. All rights reserved. Permission to use, copy, modify and distribute this software and its documentation is hereby granted, provided that both the copyright notice and this permission notice appear in all copies of the software, derivative works or modified versions, and any portions thereof, and that both notices appear in supporting documentation, and that credit is given to Mulle Kybernetik in all documents and publicity pertaining to direct or indirect use of this code or its derivatives. THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF ANY DERIVATIVE WORK.</pre> </div> </div> <div class="product"> <span class="title">open-vcdiff</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/open-vcdiff">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2008 The open-vcdiff Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">opus</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://git.xiph.org/?p=opus.git">homepage</a></span> <div class="licence"> <pre>Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Opus is subject to the royalty-free patent licenses which are specified at: Xiph.Org Foundation: https://datatracker.ietf.org/ipr/1524/ Microsoft Corporation: https://datatracker.ietf.org/ipr/1914/ Broadcom Corporation: https://datatracker.ietf.org/ipr/1526/ </pre> </div> </div> <div class="product"> <span class="title">pyelftools</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://bitbucket.org/eliben/pyelftools">homepage</a></span> <div class="licence"> <pre>pyelftools is in the public domain (see below if you need more details). pyelftools uses the construct library for structured parsing of a binary stream. construct is packaged in pyelftools/construct - see its LICENSE file for the license. ------------------------------------------------------------------------------- This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org/> </pre> </div> </div> <div class="product"> <span class="title">re2 - an efficient, principled regular expression library</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/re2">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2009 The RE2 Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">sfntly</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/googlei18n/sfntly">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2011 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">simplejson</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/simplejson/simplejson">homepage</a></span> <div class="licence"> <pre>Copyright (c) 2006 Bob Ippolito Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">sqlite</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://sqlite.org/">homepage</a></span> <div class="licence"> <pre>The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: May you do good and not evil. May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give. </pre> </div> </div> <div class="product"> <span class="title">talloc</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://talloc.samba.org/talloc/doc/html/index.html">homepage</a></span> <div class="licence"> <pre> Unix SMB/CIFS implementation. Samba temporary memory allocation functions Copyright (C) Andrew Tridgell 2004-2005 Copyright (C) Stefan Metzmacher 2006 ** NOTE! The following LGPL license applies to the talloc ** library. This does NOT imply that all of Samba is released ** under the LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <http://www.gnu.org/licenses/>. </pre> </div> </div> <div class="product"> <span class="title">tcmalloc</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://gperftools.googlecode.com/">homepage</a></span> <div class="licence"> <pre>// Copyright (c) 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">tlslite</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://trevp.net/tlslite/">homepage</a></span> <div class="licence"> <pre> TLS Lite includes code from different sources. All code is either dedicated to the public domain by its authors, or available under a BSD-style license. In particular: - Code written by Trevor Perrin, Kees Bos, Sam Rushing, Dimitris Moraitis, Marcelo Fernandez, Martin von Loewis, Dave Baggett, and Yngve Pettersen is available under the following terms: This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Code written by Bram Cohen (rijndael.py) was dedicated to the public domain by its author. See rijndael.py for details. - Code written by Google is available under the following terms: Copyright (c) 2008, The Chromium Authors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">url_parse</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp">homepage</a></span> <div class="licence"> <pre>Copyright 2007, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------- The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is licensed separately as follows: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is mozilla.org code. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. All Rights Reserved. Contributor(s): Darin Fisher (original author) Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. </pre> </div> </div> <div class="product"> <span class="title">usrsctp</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://github.com/sctplab/usrsctp">homepage</a></span> <div class="licence"> <pre>(Copied from the COPYRIGHT file of https://code.google.com/p/sctp-refimpl/source/browse/trunk/COPYRIGHT) -------------------------------------------------------------------------------- Copyright (c) 2001, 2002 Cisco Systems, Inc. Copyright (c) 2002-12 Randall R. Stewart Copyright (c) 2002-12 Michael Tuexen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">v4l-utils</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://git.linuxtv.org/v4l-utils.git">homepage</a></span> <div class="licence"> <pre> GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. ^L Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ^L GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. ^L Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. ^L 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. ^L 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. ^L 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. ^L 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ^L How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! </pre> </div> </div> <div class="product"> <span class="title">valgrind</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://valgrind.org">homepage</a></span> <div class="licence"> <pre> Notice that the following BSD-style license applies to the Valgrind header files used by Chromium (valgrind.h and memcheck.h). However, the rest of Valgrind is licensed under the terms of the GNU General Public License, version 2, unless otherwise indicated. ---------------------------------------------------------------- Copyright (C) 2000-2008 Julian Seward. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </div> </div> <div class="product"> <span class="title">wayland</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://wayland.freedesktop.org/">homepage</a></span> <div class="licence"> <pre>Copyright ? 2008-2012 Kristian H?gsberg Copyright ? 2010-2012 Intel Corporation Copyright ? 2011 Benjamin Franzke Copyright ? 2012 Collabora, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- The above is the version of the MIT "Expat" License used by X.org: http://cgit.freedesktop.org/xorg/xserver/tree/COPYING </pre> </div> </div> <div class="product"> <span class="title">wayland-protocols</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://wayland.freedesktop.org/">homepage</a></span> <div class="licence"> <pre>Copyright ? 2008-2013 Kristian H?gsberg Copyright ? 2010-2013 Intel Corporation Copyright ? 2013 Rafael Antognolli Copyright ? 2013 Jasper St. Pierre Copyright ? 2014 Jonas ?dahl Copyright ? 2014 Jason Ekstrand Copyright ? 2014-2015 Collabora, Ltd. Copyright ? 2015 Red Hat Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- The above is the version of the MIT "Expat" License used by X.org: http://cgit.freedesktop.org/xorg/xserver/tree/COPYING </pre> </div> </div> <div class="product"> <span class="title">woff2</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="https://github.com/google/woff2">homepage</a></span> <div class="licence"> <pre> Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </pre> </div> </div> <div class="product"> <span class="title">x86inc</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://git.videolan.org/?p=x264.git;a=blob;f=common/x86/x86inc.asm">homepage</a></span> <div class="licence"> <pre>;***************************************************************************** ;* x86inc.asm ;***************************************************************************** ;* Copyright (C) 2005-2011 x264 project ;* ;* Authors: Loren Merritt <lorenm@u.washington.edu> ;* Anton Mitrofanov <BugMaster@narod.ru> ;* Jason Garrett-Glaser <darkshikari@gmail.com> ;* ;* Permission to use, copy, modify, and/or distribute this software for any ;* purpose with or without fee is hereby granted, provided that the above ;* copyright notice and this permission notice appear in all copies. ;* ;* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ;* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ;* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ;* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ;* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ;***************************************************************************** ; This is a header file for the x264ASM assembly language, which uses ; NASM/YASM syntax combined with a large number of macros to provide easy ; abstraction between different calling conventions (x86_32, win64, linux64). ; It also has various other useful features to simplify writing the kind of ; DSP functions that are most often used in x264. ; Unlike the rest of x264, this file is available under an ISC license, as it ; has significant usefulness outside of x264 and we want it to be available ; to the largest audience possible. Of course, if you modify it for your own ; purposes to add a new feature, we strongly encourage contributing a patch ; as this feature might be useful for others as well. Send patches or ideas ; to x264-devel@videolan.org . </pre> </div> </div> <div class="product"> <span class="title">xdg-mime</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://freedesktop.org">homepage</a></span> <div class="licence"> <pre>Licensed under the Academic Free License version 2.0 (below) Or under the following terms: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -------------------------------------------------------------------------------- Academic Free License v. 2.0 -------------------------------------------------------------------------------- This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: Licensed under the Academic Free License version 2.0 1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: a) to reproduce the Original Work in copies; b) to prepare derivative works ("Derivative Works") based upon the Original Work; c) to distribute copies of the Original Work and Derivative Works to the public; d) to perform the Original Work publicly; and e) to display the Original Work publicly. 2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. 5) This section intentionally omitted. 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. 9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, for patent infringement (i) against Licensor with respect to a patent applicable to software or (ii) against any entity with respect to a patent applicable to the Original Work (but excluding combinations of the Original Work with other software or hardware). 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. 12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. </pre> </div> </div> <div class="product"> <span class="title">xdg-user-dirs</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/xdg-user-dirs">homepage</a></span> <div class="licence"> <pre> Copyright (c) 2007 Red Hat, inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">xdg-utils</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://portland.freedesktop.org/wiki/">homepage</a></span> <div class="licence"> <pre># # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. </pre> </div> </div> <div class="product"> <span class="title">yasm</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://www.tortall.net/projects/yasm/">homepage</a></span> <div class="licence"> <pre>Yasm is Copyright (c) 2001-2010 Peter Johnson and other Yasm developers. Yasm developers and/or contributors include: Peter Johnson Michael Urman Brian Gladman (Visual Studio build files, other fixes) Stanislav Karchebny (options parser) Mathieu Monnier (SSE4 instruction patches, NASM preprocessor additions) Anonymous "NASM64" developer (NASM preprocessor fixes) Stephen Polkowski (x86 instruction patches) Henryk Richter (Mach-O object format) Ben Skeggs (patches, bug reports) Alexei Svitkine (GAS preprocessor) Samuel Thibault (TASM parser and frontend) ----------------------------------- Yasm licensing overview and summary ----------------------------------- Note: This document does not provide legal advice nor is it the actual license of any part of Yasm. See the individual licenses for complete details. Consult a lawyer for legal advice. The primary license of Yasm is the 2-clause BSD license. Please use this license if you plan on submitting code to the project. Yasm has absolutely no warranty; not even for merchantibility or fitness for a particular purpose. ------- Libyasm ------- Libyasm is 2-clause or 3-clause BSD licensed, with the exception of bitvect, which is triple-licensed under the Artistic license, GPL, and LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also means that libyasm is free for binary-only distribution as long as the terms of the 3-clause BSD license and Artistic license (as it applies to bitvect) are fulfilled. ------- Modules ------- The modules are 2-clause or 3-clause BSD licensed. --------- Frontends --------- The frontends are 2-clause BSD licensed. ------------- License Texts ------------- The full text of all licenses are provided in separate files in the source distribution. Each source file may include the entire license (in the case of the BSD and Artistic licenses), or may reference the GPL or LGPL license file. BSD.txt - 2-clause and 3-clause BSD licenses Artistic.txt - Artistic license GNU_GPL-2.0 - GNU General Public License GNU_LGPL-2.0 - GNU Library General Public License </pre> </div> </div> <div class="product"> <span class="title">zlib</span> <a class="show" href="#">show license</a> <span class="homepage"><a href="http://zlib.net/">homepage</a></span> <div class="licence"> <pre>/* zlib.h -- interface of the 'zlib' general purpose compression library version 1.2.4, March 14th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler */ mozzconf.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license. </pre> </div> </div> </div> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://credits/credits.js"></script> </body> </html> // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. function $(id) { return document.getElementById(id); } function toggle(o) { var licence = o.nextSibling; while (licence.className != 'licence') { if (!licence) return false; licence = licence.nextSibling; } if (licence.style && licence.style.display == 'block') { licence.style.display = 'none'; o.textContent = 'show license'; } else { licence.style.display = 'block'; o.textContent = 'hide license'; } return false; } document.addEventListener('DOMContentLoaded', function() { if (cr.isChromeOS) { var keyboardUtils = document.createElement('script'); keyboardUtils.src = 'chrome://credits/keyboard_utils.js'; document.body.appendChild(keyboardUtils); } var links = document.querySelectorAll('a.show'); for (var i = 0; i < links.length; ++i) { links[i].onclick = function() { return toggle(this); }; } $('print-link').onclick = function() { window.print(); return false; }; }); <!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title i18n-content="crashesTitle"></title> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <link rel="stylesheet" href="chrome://resources/css/widgets.css"> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { margin: 20px; } h1 { -webkit-padding-start: 75px; background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OHB4IiB2aWV3Ym94PSIwIDAgNDggNDgiIGZpbGw9Im5vbmUiPgogIDxwYXRoIHN0cm9rZT0iIzVhNWE1YSIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBkPSJNMS41IDguNSB2MzQgaDQ1IHYtMjggbS0zLTMgaC0xMCB2LTMgbS0zLTMgaC0xMCBtMTUgNiBoLTE4IHYtMyBtLTMtMyBoLTEwIi8+CiAgPHBhdGggc3Ryb2tlPSIjNWE1YTVhIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIGQ9Ik0xMiAzNSBoMiBtMi0yIGgxMiBtMiAyIGgzIG0yIDIgaDMgTTExIDIxIGwwIDAgbTAgNCBoMCBtNCAwIGgwIG0wLTQgaDAgbS0yIDIgaDAgTTMzIDIxIGwwIDAgbTAgNCBoMCBtNCAwIGgwIG0wLTQgaDAgbS0yIDIgaDAiLz4KPC9zdmc+Cg==); background-position: left; background-repeat: no-repeat; font-size: 156%; font-weight: bold; margin: 0; padding-bottom: 20px; padding-top: 20px; } html[dir=rtl] h1 { background-position: right; } #countBanner { background-color: rgb(235, 239, 250); border: 1px solid #bbb; border-radius: 2px; font-size: 100%; padding: 4px; } #crashList h3 { font-size: 100%; } #crashList > div > * { margin: 0.75em 0; } #crashList a:visited { color: #666; } #crashList > div:not(:last-child) { border-bottom: 1px solid #bbb; } #disabledMode h2 { color: rgb(141, 51, 42); font-size: 125%; } </style> <script src="chrome://resources/js/action_link.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="chrome://crashes/strings.js"></script> <script src="chrome://crashes/crashes.js"></script> </head> <body> <header><h1 i18n-content="crashesTitle"></h1></header> <div id="crashUploadStatus" hidden> <a is="action-link" role="button" id="uploadCrashes" i18n-content="uploadCrashesLinkText"></a> </div> <div id="enabledMode"> <h2 id="countBanner"></h2> <div id="crashList"></div> <p id="noCrashes" i18n-content="noCrashesMessage" hidden></p> </div> <div id="disabledMode" hidden> <h2 i18n-content="disabledHeader"></h2> <p i18n-values=".innerHTML:disabledMessage"></p> </div> <script src="chrome://resources/js/i18n_template.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> </body> </html> // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /* Id for tracking automatic refresh of crash list. */ var refreshCrashListId = undefined; /** * Requests the list of crashes from the backend. */ function requestCrashes() { chrome.send('requestCrashList'); } /** * Callback from backend with the list of crashes. Builds the UI. * @param {boolean} enabled Whether or not crash reporting is enabled. * @param {boolean} dynamicBackend Whether the crash backend is dynamic. * @param {array} crashes The list of crashes. * @param {string} version The browser version. */ function updateCrashList(enabled, dynamicBackend, crashes, version) { $('countBanner').textContent = loadTimeData.getStringF('crashCountFormat', crashes.length); var crashSection = $('crashList'); $('enabledMode').hidden = !enabled; $('disabledMode').hidden = enabled; $('crashUploadStatus').hidden = !enabled || !dynamicBackend; if (!enabled) return; // Clear any previous list. crashSection.textContent = ''; var productName = loadTimeData.getString('shortProductName'); for (var i = 0; i < crashes.length; i++) { var crash = crashes[i]; if (crash['local_id'] == '') crash['local_id'] = productName; var crashBlock = document.createElement('div'); var title = document.createElement('h3'); title.textContent = loadTimeData.getStringF('crashHeaderFormat', crash['id'], crash['local_id']); crashBlock.appendChild(title); var date = document.createElement('p'); date.textContent = loadTimeData.getStringF('crashTimeFormat', crash['time']); crashBlock.appendChild(date); var linkBlock = document.createElement('p'); var link = document.createElement('a'); var commentLines = [ 'Chrome Version: ' + version, // TODO(tbreisacher): fill in the OS automatically? 'Operating System: e.g., "Windows 7", "Mac OSX 10.6"', '', 'URL (if applicable) where crash occurred:', '', 'Can you reproduce this crash?', '', 'What steps will reproduce this crash? (or if it\'s not ' + 'reproducible, what were you doing just before the crash)?', '', '1.', '2.', '3.', '', '*Please note that issues filed with no information filled in ' + 'above will be marked as WontFix*', '', '****DO NOT CHANGE BELOW THIS LINE****', 'report_id:' + crash.id ]; var params = { template: 'Crash Report', comment: commentLines.join('\n'), }; var href = 'https://code.google.com/p/chromium/issues/entry'; for (var param in params) { href = appendParam(href, param, params[param]); } link.href = href; link.target = '_blank'; link.textContent = loadTimeData.getString('bugLinkText'); linkBlock.appendChild(link); crashBlock.appendChild(linkBlock); crashSection.appendChild(crashBlock); } $('noCrashes').hidden = crashes.length != 0; } /** * Request crashes get uploaded in the background. */ function requestCrashUpload() { // Don't need locking with this call because the system crash reporter // has locking built into itself. chrome.send('requestCrashUpload'); // Trigger a refresh in 5 seconds. Clear any previous requests. clearTimeout(refreshCrashListId); refreshCrashListId = setTimeout(requestCrashes, 5000); } document.addEventListener('DOMContentLoaded', function() { $('uploadCrashes').onclick = requestCrashUpload; requestCrashes(); }); <!DOCTYPE html> <html i18n-values="dir:textdirection;.style.fontSize:fontsize"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width"> <title i18n-content="tabTitle"></title> <style>/* Copyright 2015 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ body { background-color: rgb(206, 52, 38); font-size: 125%; } button { background-color: rgb(206, 52, 38); border: 1px solid white; box-sizing: border-box; color: #fff; cursor: pointer; float: right; font-size: .875em; height: 36px; margin: -6px 0 0; padding: 8px 24px; transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1); width: 48%; } [dir='rtl'] button { float: left; } button:active { background-color: rgb(206, 52, 38); border-color: rgba(255, 255, 255, .6); } button:hover { box-shadow: 0 2px 3px rgba(0, 0, 0, .5); } h1 { -webkit-margin-after: 16px; color: white; font-size: 1.6em; font-weight: normal; line-height: 1.25em; } .icon { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAABoVBMVEX///+Li4v////////y8vL09PTbRDf99fTt7e3u7u7v7+/s7Ozx8fHw8PDy8vL99PPSQTXZdGv19fX09PTXzMzm5ubh4eHgW1Dl5eXd3d3c3NzXzczr6+vbV0zp6enZ2dng4OD29vbz8/PYYFXZV0zaYVbjbWP219TRQTTXdGzjb2T////43Nn++/rib2Tq6ura2trngHf76OfTQjXaYVf66Obk19bX19fe3t7o6Oji4uLk5OTeU0f119TYQzbb29vngXjjbmTZQzbWQjbXQzbZRDfaRDfn5+fbV0vj4+PVQjXf39/Y2Njgcmney8rqk4zdysn43drcysjcUETa1tbadGvaV0vaWEzZYVbibmXc2NjfzMvi0M7mfHPYYVbhzszd2dnZx8XieXDkc2nWX1Xacmne2trZdGzbcWjj0c/XTUHX1NPVX1Xg3NzYdGvYXFHZ1dXWTUHgzczUX1Xh3d3XdWzWXFHaVkvXxcTVTEHhbmXTXlXi3t7ayMbVXFLgbmXUTEDXYFXSXlTXzMvk4ODUXFHWbGPWzMvk4eHZioP39/enVsGTAAAABnRSTlMAAOQk5ye8yu+CAAACRUlEQVR4XrXWRZMbMQCEUWc3mTEyLDNjmJmZmZmZmTm/Oo6zmvGO+3NsVaVv6sM7qVUK/dc0N03USFOzrcOSvcMSO/YSOyzZOyyxYy+xwxI7thI79hI7LFk4IIFjIYFjIYFjIYFjIYFjIYFjIYFjI7Gz6PJSVafOHiQJnBanRUipYWfNpJJKEDmOkFIbHUdLBhKOkQKOkQSEji/5TjmHAxJC+x1HSCXHZG+d0NTCCkk4SzpiDLEknOV7wgzVllLjs5yenghDLAlnwfqogKS0oUISTnt7FCGWhoXT1pYgiCXprNidAAgkdHp74wCBhE6xmAQIJHRW7UwSxLfAGRLO6tb++iB33IeevxBOayEnIHBMdlwUTmF7TkDkGOmtcFZ2ZwUEjknXIeF0z88KiBwjHRBOZ2efgJQzdNWX9gknFv7FkDu9zeREx+2Md+g6LZxwxEDC2WpyrrSLBxnvePyRcKIEuSc3mQyUd3HkqFccO1/tJAByX60zGZjZxamMVw2eqXIAct9vMfno7eJCxisHbwaduIYubTa5kvf3de26V98IOgCN3Nr1N3fylTu9e2+mvr8s6CThEzHycPGfPM7P3vuTp+X6WbUzl741a1+m0+nXAadYfDNWqt8JZ14IpQ+jnz5Xvz9fxka/goPSt+/qHfvxExyWJmLyHSugw1K4QYelSKMOSw06LEUbdFhK/MOZE6pbqu0IiKR4LUdBLLEDEElJcgBiqR8chFgChyCWcuAQxFIWHIRYkg5DLPUJB6HaknAQss9vujRej+7mJ38AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMAAADQmBKKAAACLlBMVEX///+Li4v////09PTX09P+/Pzw8PDy8vLx8fHbRDfz8/P++/r19fX29vba2trb29v39/fp6enY2Njo6Ojq6ure3t7r6+vh4eHi4uLX19fu7u7t7e3g4ODn5+fd3d3k5OTl5eXf39/c3Nz09PT4+PjbnZjanJfaV0zcnpnQQTTv7+/bRTjZ2dnm5ubcSz/s7Ozgzczcn5nVQzbYxsTj4+PZV0zX1NPqwr/bV0zZRDfXZ17cn5rbycfxwb365eTYcWnmgnrSQTXbV0vfWU7ac2rWQjbTQTXxtK/66ObTQjXgW1DngHfaRDfmf3fltrLbSj3ngXj2z8vRQTX76OfZQzf++/vngnnws67ZQzbl3dzWQzfYQzbiz83cysjRQTTlgnnZcmnacmnaRTjngnr////mf3bWcWjkgnnXcWney8nXRDfUQjXZaF7XQzbWRjrZm5bWcWnVQjXfWU3YRDfaeHDZRDj429nZRTjZnJbaWEzbSj7XxcTZmJLbRzr2z8zYVkvk0dDhzsz5+fnZmpXj0c/kgXnlhX7iamDZx8XezMrbnpjbWEzfzMvVcWjYcmnUQzbYaF7qwb7mfHPUcWjbnpnYwsDXaF7mgnnURTnanJbUcGjTQjbURjnwwb3SRDjyu7bUb2fSQjbayMbRRDji0M7Tb2fZV0vRQjbWZ17RRDfdysnTb2bTQzbRQjXWZ13QRDfce3PSb2bQQjXVZ13PQzfRb2bUZ17ox8Tm4+PVRjm1uiRfAAAABHRSTlMAAIiOSsna/gAABMxJREFUeF7t2EOXZkkYReGs7PtZadvOsm22bdu2bdu2+e/61lnVVZkro+p7d98YxKDONGLwrD18a/zt+Gov/9+rDcvDRdzDRWF5uIh7uCgsDxdxDxeF5eEi7uGisDxcxD1cFJaHi7iHi8LycBH3cFFYHi7iHi4KzMNF3MNF3BOUiHu4KCiPREF5JAKegETyBCSSJyCRPAGJ5AlIJE9AInkCEskTkEiegETyBCSSJyCRPAGJ5AlIJE9AInlCEXHPxt0EULgTirjn1r1AVLhi5kEm4p5cTiKjJ5ebOYWKqEcis4eJBKIeicweiRgIeyQyeyRCIO6RyOjR7l1FQGbPNlGMosKBub9PWoVA3COR1SPRKwjEPRIZPKARAsljFsmDRBz00WTOLirsyzl2e9oXSNvlFJ1m92xf2Z7mIC4CnvaGNAdxkdkTgySCIC4CnoapLAB5ERVOPqZnqpzlIC4CnnIly0FcZPbEoIEMB3GR3VORCIASiM6weAbiZTiIi4wegXoyHMRFtj7y9DTnMYiLXrX1kae5P09BXAT6NEuEQFxk7yNPf1cegJCI95Gnq3UQgJCI95GnVSIAQiLeJ17bIAAhEe8jT9vyIgAxEe8jUG/RF0g7azJJn9izXCIAIiLeJ+b09vYVAQiKeJ/Y0zdd9AlKPeXyPPCGuU8Mmi75A6XOzDk3ep+5T7zuEgFxj0TLrH1iT3djCYC4R9u6zNwnBtWXCIh7JHra1Eeexsb6OgLiHok+tfWRp76pjoC4R6L1tj7yNLXUARD3aKvX2/rI0yIRAFGPRBeY+8SbHUIg7pHI2EegWARA3CPRt7Y+8nR2DnGQPJe5AJfcP+kSXWPrI09nx6MC+fGsbH/MLbL1kaejQyDo2bzfsYsP3hNuutTxsvoZWx95JgTy5WlocIqee97cZwKC5Fnj2Iv/3RPuvsvxes9iax8Ikud0xzYduSeM3OF4H11s7DORhqDUW2c7NsdTLr+zxvFj9BFbnzQEpS46z7F5nkpl5DbHnxXnm/oYQNhTGTiKyNAHglJX3eDY1QvvGyPXOv6t+NzQJ5sVyKNHoJ5hl+jLx6v0gaDUEzscuzly3jeGz3X8fejhqn2yGTvoSbfHfd9wi36u2icDQBtuvGXBroyOet8YXrrg9/XnVO0DQBK5Pe77xrNLkUd9AEiif66btxeiY943xl6a9/tlS598XqBaq+j9PXP2WlTlvvH693N+v2nqkz+hhone3nl470ZV7xtj7x3+vdbURx4k+uDDLYf2cWS4b4x9cuj3WtCHiU787FTti8h031j3lX5/Dfpg0TcXxvsuMt5/lvwQ//6R9OGin8bHf4nM958lv47/xvpw0e9/ROA+tu5P2IeL/orQfexv2oeL0u3oPsb7cJG5jzy8DxdN+e6TWFT22ye5KOu1jxeRxz6eRAO++ngTeemzqMafKNOTvM8igbyJmhP3EcijKGkfgXyK8v2J+gjkWdSVoA8AAVFrgj4C+RYNJugDQETUlqAPAAFRgj4ARES8DwJxUbEX9qEgLupDfTiIi6ZRHw7iItaHg7iom/ThIC4qNaI+HMRFrA8HcVE96sNBXNRE+nAQF9W1oD4cxEWsDwdx0Szpw0FcNAT6AFASEegDQElEoA8HHd+/v8Kzy1dcjqoAAAAASUVORK5CYII=) 2x); background-repeat: no-repeat; background-size: 100%; height: 72px; margin: 0 0 40px; width: 72px; } .interstitial-wrapper { box-sizing: border-box; font-size: 1em; line-height: 1.6em; margin: 100px auto 0; max-width: 600px; width: 100%; } .nav-wrapper { margin-top: 51px; } .nav-wrapper::after { clear: both; content: ''; display: table; width: 100%; } p { color: white; } #primary-button { background-color: white; color: rgb(206, 52, 38); float: left; } @media (max-width: 700px) { .interstitial-wrapper { padding: 0 10%; } } @media (max-height: 600px) { .interstitial-wrapper { margin-top: 13%; } } @media (max-width: 400px) { button, [dir='rtl'] button { font-size: 1em; } .interstitial-wrapper { padding: 0 5%; } .nav-wrapper { margin-top: 30px; } } </style> <script>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Assertion support. */ /** * Verify |condition| is truthy and return |condition| if so. * @template T * @param {T} condition A condition to check for truthiness. Note that this * may be used to test whether a value is defined or not, and we don't want * to force a cast to Boolean. * @param {string=} opt_message A message to show on failure. * @return {T} A non-null |condition|. */ function assert(condition, opt_message) { if (!condition) { var message = 'Assertion failed'; if (opt_message) message = message + ': ' + opt_message; var error = new Error(message); var global = function() { return this; }(); if (global.traceAssertionsForTesting) console.warn(error.stack); throw error; } return condition; } /** * Call this from places in the code that should never be reached. * * For example, handling all the values of enum with a switch() like this: * * function getValueFromEnum(enum) { * switch (enum) { * case ENUM_FIRST_OF_TWO: * return first * case ENUM_LAST_OF_TWO: * return last; * } * assertNotReached(); * return document; * } * * This code should only be hit in the case of serious programmer error or * unexpected input. * * @param {string=} opt_message A message to show when this is hit. */ function assertNotReached(opt_message) { assert(false, opt_message || 'Unreachable code hit'); } /** * @param {*} value The value to check. * @param {function(new: T, ...)} type A user-defined constructor. * @param {string=} opt_message A message to show when this is hit. * @return {T} * @template T */ function assertInstanceof(value, type, opt_message) { assert(value instanceof type, opt_message || value + ' is not a[n] ' + (type.name || typeof type)); return value; } /** * Alias for document.getElementById. * @param {string} id The ID of the element to find. * @return {HTMLElement} The found element or null if not found. */ function $(id) { return document.getElementById(id); } /** * Add an accessible message to the page that will be announced to * users who have spoken feedback on, but will be invisible to all * other users. It's removed right away so it doesn't clutter the DOM. * @param {string} msg The text to be pronounced. */ function announceAccessibleMessage(msg) { var element = document.createElement('div'); element.setAttribute('aria-live', 'polite'); element.style.position = 'relative'; element.style.left = '-9999px'; element.style.height = '0px'; element.innerText = msg; document.body.appendChild(element); window.setTimeout(function() { document.body.removeChild(element); }, 0); } /** * Calls chrome.send with a callback and restores the original afterwards. * @param {string} name The name of the message to send. * @param {!Array} params The parameters to send. * @param {string} callbackName The name of the function that the backend calls. * @param {!Function} callback The function to call. */ function chromeSend(name, params, callbackName, callback) { var old = global[callbackName]; global[callbackName] = function() { // restore global[callbackName] = old; var args = Array.prototype.slice.call(arguments); return callback.apply(global, args); }; chrome.send(name, params); } /** * Returns the scale factors supported by this platform for webui * resources. * @return {Array} The supported scale factors. */ function getSupportedScaleFactors() { var supportedScaleFactors = []; if (cr.isMac || cr.isChromeOS || cr.isWindows || cr.isLinux) { // All desktop platforms support zooming which also updates the // renderer's device scale factors (a.k.a devicePixelRatio), and // these platforms has high DPI assets for 2.0x. Use 1x and 2x in // image-set on these platforms so that the renderer can pick the // closest image for the current device scale factor. supportedScaleFactors.push(1); supportedScaleFactors.push(2); } else { // For other platforms that use fixed device scale factor, use // the window's device pixel ratio. // TODO(oshima): Investigate if Android/iOS need to use image-set. supportedScaleFactors.push(window.devicePixelRatio); } return supportedScaleFactors; } /** * Generates a CSS url string. * @param {string} s The URL to generate the CSS url for. * @return {string} The CSS url string. */ function url(s) { // http://www.w3.org/TR/css3-values/#uris // Parentheses, commas, whitespace characters, single quotes (') and double // quotes (") appearing in a URI must be escaped with a backslash var s2 = s.replace(/(\(|\)|\,|\s|\'|\"|\\)/g, '\\$1'); // WebKit has a bug when it comes to URLs that end with \ // https://bugs.webkit.org/show_bug.cgi?id=28885 if (/\\\\$/.test(s2)) { // Add a space to work around the WebKit bug. s2 += ' '; } return 'url("' + s2 + '")'; } /** * Returns the URL of the image, or an image set of URLs for the profile avatar. * Default avatars have resources available for multiple scalefactors, whereas * the GAIA profile image only comes in one size. * * @param {string} path The path of the image. * @return {string} The url, or an image set of URLs of the avatar image. */ function getProfileAvatarIcon(path) { var chromeThemePath = 'chrome://theme'; var isDefaultAvatar = (path.slice(0, chromeThemePath.length) == chromeThemePath); return isDefaultAvatar ? imageset(path + '@scalefactorx'): url(path); } /** * Generates a CSS -webkit-image-set for a chrome:// url. * An entry in the image set is added for each of getSupportedScaleFactors(). * The scale-factor-specific url is generated by replacing the first instance of * 'scalefactor' in |path| with the numeric scale factor. * @param {string} path The URL to generate an image set for. * 'scalefactor' should be a substring of |path|. * @return {string} The CSS -webkit-image-set. */ function imageset(path) { var supportedScaleFactors = getSupportedScaleFactors(); var replaceStartIndex = path.indexOf('scalefactor'); if (replaceStartIndex < 0) return url(path); var s = ''; for (var i = 0; i < supportedScaleFactors.length; ++i) { var scaleFactor = supportedScaleFactors[i]; var pathWithScaleFactor = path.substr(0, replaceStartIndex) + scaleFactor + path.substr(replaceStartIndex + 'scalefactor'.length); s += url(pathWithScaleFactor) + ' ' + scaleFactor + 'x'; if (i != supportedScaleFactors.length - 1) s += ', '; } return '-webkit-image-set(' + s + ')'; } /** * Parses query parameters from Location. * @param {Location} location The URL to generate the CSS url for. * @return {Object} Dictionary containing name value pairs for URL */ function parseQueryParams(location) { var params = {}; var query = unescape(location.search.substring(1)); var vars = query.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); params[pair[0]] = pair[1]; } return params; } /** * Creates a new URL by appending or replacing the given query key and value. * Not supporting URL with username and password. * @param {Location} location The original URL. * @param {string} key The query parameter name. * @param {string} value The query parameter value. * @return {string} The constructed new URL. */ function setQueryParam(location, key, value) { var query = parseQueryParams(location); query[encodeURIComponent(key)] = encodeURIComponent(value); var newQuery = ''; for (var q in query) { newQuery += (newQuery ? '&' : '?') + q + '=' + query[q]; } return location.origin + location.pathname + newQuery + location.hash; } /** * @param {Node} el A node to search for ancestors with |className|. * @param {string} className A class to search for. * @return {Element} A node with class of |className| or null if none is found. */ function findAncestorByClass(el, className) { return /** @type {Element} */(findAncestor(el, function(el) { return el.classList && el.classList.contains(className); })); } /** * Return the first ancestor for which the {@code predicate} returns true. * @param {Node} node The node to check. * @param {function(Node):boolean} predicate The function that tests the * nodes. * @return {Node} The found ancestor or null if not found. */ function findAncestor(node, predicate) { var last = false; while (node != null && !(last = predicate(node))) { node = node.parentNode; } return last ? node : null; } function swapDomNodes(a, b) { var afterA = a.nextSibling; if (afterA == b) { swapDomNodes(b, a); return; } var aParent = a.parentNode; b.parentNode.replaceChild(a, b); aParent.insertBefore(b, afterA); } /** * Disables text selection and dragging, with optional whitelist callbacks. * @param {function(Event):boolean=} opt_allowSelectStart Unless this function * is defined and returns true, the onselectionstart event will be * surpressed. * @param {function(Event):boolean=} opt_allowDragStart Unless this function * is defined and returns true, the ondragstart event will be surpressed. */ function disableTextSelectAndDrag(opt_allowSelectStart, opt_allowDragStart) { // Disable text selection. document.onselectstart = function(e) { if (!(opt_allowSelectStart && opt_allowSelectStart.call(this, e))) e.preventDefault(); }; // Disable dragging. document.ondragstart = function(e) { if (!(opt_allowDragStart && opt_allowDragStart.call(this, e))) e.preventDefault(); }; } /** * TODO(dbeam): DO NOT USE. THIS IS DEPRECATED. Use an action-link instead. * Call this to stop clicks on <a href="#"> links from scrolling to the top of * the page (and possibly showing a # in the link). */ function preventDefaultOnPoundLinkClicks() { document.addEventListener('click', function(e) { var anchor = findAncestor(/** @type {Node} */(e.target), function(el) { return el.tagName == 'A'; }); // Use getAttribute() to prevent URL normalization. if (anchor && anchor.getAttribute('href') == '#') e.preventDefault(); }); } /** * Check the directionality of the page. * @return {boolean} True if Chrome is running an RTL UI. */ function isRTL() { return document.documentElement.dir == 'rtl'; } /** * Get an element that's known to exist by its ID. We use this instead of just * calling getElementById and not checking the result because this lets us * satisfy the JSCompiler type system. * @param {string} id The identifier name. * @return {!HTMLElement} the Element. */ function getRequiredElement(id) { return assertInstanceof($(id), HTMLElement, 'Missing required element: ' + id); } /** * Query an element that's known to exist by a selector. We use this instead of * just calling querySelector and not checking the result because this lets us * satisfy the JSCompiler type system. * @param {string} selectors CSS selectors to query the element. * @param {(!Document|!DocumentFragment|!Element)=} opt_context An optional * context object for querySelector. * @return {!HTMLElement} the Element. */ function queryRequiredElement(selectors, opt_context) { var element = (opt_context || document).querySelector(selectors); return assertInstanceof(element, HTMLElement, 'Missing required element: ' + selectors); } // Handle click on a link. If the link points to a chrome: or file: url, then // call into the browser to do the navigation. document.addEventListener('click', function(e) { if (e.defaultPrevented) return; var el = e.target; if (el.nodeType == Node.ELEMENT_NODE && el.webkitMatchesSelector('A, A *')) { while (el.tagName != 'A') { el = el.parentElement; } if ((el.protocol == 'file:' || el.protocol == 'about:') && (e.button == 0 || e.button == 1)) { chrome.send('navigateToUrl', [ el.href, el.target, e.button, e.altKey, e.ctrlKey, e.metaKey, e.shiftKey ]); e.preventDefault(); } } }); /** * Creates a new URL which is the old URL with a GET param of key=value. * @param {string} url The base URL. There is not sanity checking on the URL so * it must be passed in a proper format. * @param {string} key The key of the param. * @param {string} value The value of the param. * @return {string} The new URL. */ function appendParam(url, key, value) { var param = encodeURIComponent(key) + '=' + encodeURIComponent(value); if (url.indexOf('?') == -1) return url + '?' + param; return url + '&' + param; } /** * Creates a CSS -webkit-image-set for a favicon request. * @param {string} url The url for the favicon. * @param {number=} opt_size Optional preferred size of the favicon. * @param {string=} opt_type Optional type of favicon to request. Valid values * are 'favicon' and 'touch-icon'. Default is 'favicon'. * @return {string} -webkit-image-set for the favicon. */ function getFaviconImageSet(url, opt_size, opt_type) { var size = opt_size || 16; var type = opt_type || 'favicon'; return imageset( 'chrome://' + type + '/size/' + size + '@scalefactorx/' + url); } /** * Creates a new URL for a favicon request for the current device pixel ratio. * The URL must be updated when the user moves the browser to a screen with a * different device pixel ratio. Use getFaviconImageSet() for the updating to * occur automatically. * @param {string} url The url for the favicon. * @param {number=} opt_size Optional preferred size of the favicon. * @param {string=} opt_type Optional type of favicon to request. Valid values * are 'favicon' and 'touch-icon'. Default is 'favicon'. * @return {string} Updated URL for the favicon. */ function getFaviconUrlForCurrentDevicePixelRatio(url, opt_size, opt_type) { var size = opt_size || 16; var type = opt_type || 'favicon'; return 'chrome://' + type + '/size/' + size + '@' + window.devicePixelRatio + 'x/' + url; } /** * Creates an element of a specified type with a specified class name. * @param {string} type The node type. * @param {string} className The class name to use. * @return {Element} The created element. */ function createElementWithClassName(type, className) { var elm = document.createElement(type); elm.className = className; return elm; } /** * webkitTransitionEnd does not always fire (e.g. when animation is aborted * or when no paint happens during the animation). This function sets up * a timer and emulate the event if it is not fired when the timer expires. * @param {!HTMLElement} el The element to watch for webkitTransitionEnd. * @param {number} timeOut The maximum wait time in milliseconds for the * webkitTransitionEnd to happen. */ function ensureTransitionEndEvent(el, timeOut) { var fired = false; el.addEventListener('webkitTransitionEnd', function f(e) { el.removeEventListener('webkitTransitionEnd', f); fired = true; }); window.setTimeout(function() { if (!fired) cr.dispatchSimpleEvent(el, 'webkitTransitionEnd', true); }, timeOut); } /** * Alias for document.scrollTop getter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @return {number} The Y document scroll offset. */ function scrollTopForDocument(doc) { return doc.documentElement.scrollTop || doc.body.scrollTop; } /** * Alias for document.scrollTop setter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @param {number} value The target Y scroll offset. */ function setScrollTopForDocument(doc, value) { doc.documentElement.scrollTop = doc.body.scrollTop = value; } /** * Alias for document.scrollLeft getter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @return {number} The X document scroll offset. */ function scrollLeftForDocument(doc) { return doc.documentElement.scrollLeft || doc.body.scrollLeft; } /** * Alias for document.scrollLeft setter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @param {number} value The target X scroll offset. */ function setScrollLeftForDocument(doc, value) { doc.documentElement.scrollLeft = doc.body.scrollLeft = value; } /** * Replaces '&', '<', '>', '"', and ''' characters with their HTML encoding. * @param {string} original The original string. * @return {string} The string with all the characters mentioned above replaced. */ function HTMLEscape(original) { return original.replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } /** * Shortens the provided string (if necessary) to a string of length at most * |maxLength|. * @param {string} original The original string. * @param {number} maxLength The maximum length allowed for the string. * @return {string} The original string if its length does not exceed * |maxLength|. Otherwise the first |maxLength| - 1 characters with '...' * appended. */ function elide(original, maxLength) { if (original.length <= maxLength) return original; return original.substring(0, maxLength - 1) + '\u2026'; } </script> <script>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This file defines a singleton which provides access to all data * that is available as soon as the page's resources are loaded (before DOM * content has finished loading). This data includes both localized strings and * any data that is important to have ready from a very early stage (e.g. things * that must be displayed right away). */ /** @type {!LoadTimeData} */ var loadTimeData; // Expose this type globally as a temporary work around until // https://github.com/google/closure-compiler/issues/544 is fixed. /** @constructor */ function LoadTimeData() {} (function() { 'use strict'; LoadTimeData.prototype = { /** * Sets the backing object. * * Note that there is no getter for |data_| to discourage abuse of the form: * * var value = loadTimeData.data()['key']; * * @param {Object} value The de-serialized page data. */ set data(value) { expect(!this.data_, 'Re-setting data.'); this.data_ = value; }, /** * Returns a JsEvalContext for |data_|. * @returns {JsEvalContext} */ createJsEvalContext: function() { return new JsEvalContext(this.data_); }, /** * @param {string} id An ID of a value that might exist. * @return {boolean} True if |id| is a key in the dictionary. */ valueExists: function(id) { return id in this.data_; }, /** * Fetches a value, expecting that it exists. * @param {string} id The key that identifies the desired value. * @return {*} The corresponding value. */ getValue: function(id) { expect(this.data_, 'No data. Did you remember to include strings.js?'); var value = this.data_[id]; expect(typeof value != 'undefined', 'Could not find value for ' + id); return value; }, /** * As above, but also makes sure that the value is a string. * @param {string} id The key that identifies the desired string. * @return {string} The corresponding string value. */ getString: function(id) { var value = this.getValue(id); expectIsType(id, value, 'string'); return /** @type {string} */ (value); }, /** * Returns a formatted localized string where $1 to $9 are replaced by the * second to the tenth argument. * @param {string} id The ID of the string we want. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {string} The formatted string. */ getStringF: function(id, var_args) { var value = this.getString(id); if (!value) return ''; var varArgs = arguments; return value.replace(/\$[$1-9]/g, function(m) { return m == '$$' ? '$' : varArgs[m[1]]; }); }, /** * As above, but also makes sure that the value is a boolean. * @param {string} id The key that identifies the desired boolean. * @return {boolean} The corresponding boolean value. */ getBoolean: function(id) { var value = this.getValue(id); expectIsType(id, value, 'boolean'); return /** @type {boolean} */ (value); }, /** * As above, but also makes sure that the value is an integer. * @param {string} id The key that identifies the desired number. * @return {number} The corresponding number value. */ getInteger: function(id) { var value = this.getValue(id); expectIsType(id, value, 'number'); expect(value == Math.floor(value), 'Number isn\'t integer: ' + value); return /** @type {number} */ (value); }, /** * Override values in loadTimeData with the values found in |replacements|. * @param {Object} replacements The dictionary object of keys to replace. */ overrideValues: function(replacements) { expect(typeof replacements == 'object', 'Replacements must be a dictionary object.'); for (var key in replacements) { this.data_[key] = replacements[key]; } } }; /** * Checks condition, displays error message if expectation fails. * @param {*} condition The condition to check for truthiness. * @param {string} message The message to display if the check fails. */ function expect(condition, message) { if (!condition) { console.error('Unexpected condition on ' + document.location.href + ': ' + message); } } /** * Checks that the given value has the given type. * @param {string} id The id of the value (only used for error message). * @param {*} value The value to check the type on. * @param {string} type The type we expect |value| to be. */ function expectIsType(id, value, type) { expect(typeof value == type, '[' + value + '] (' + id + ') is not a ' + type); } expect(!loadTimeData, 'should only include this file once'); loadTimeData = new LoadTimeData; })(); </script> <script>// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Must match the commands handled by // DataReductionProxyBlockingPage::CommandReceived. var DRP_CMD_PROCEED = 'proceed'; var DRP_CMD_TAKE_ME_BACK = 'takeMeBack'; </script> <script>// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var expandedDetails = false; var keyPressState = 0; /* * A convenience method for sending commands to the parent page. * @param {string} cmd The command to send. */ function sendCommand(cmd) { window.domAutomationController.setAutomationId(1); window.domAutomationController.send(cmd); } function setupEvents() { $('primary-button').addEventListener('click', function() { sendCommand(DRP_CMD_TAKE_ME_BACK); }); $('secondary-button').addEventListener('click', function() { sendCommand(DRP_CMD_PROCEED); }); preventDefaultOnPoundLinkClicks(); } document.addEventListener('DOMContentLoaded', setupEvents); </script> </head> <body id="body" i18n-values=".style.fontFamily:fontfamily"> <div class="interstitial-wrapper"> <div class="icon" id="icon"></div> <div id="main-message"> <h1 i18n-content="heading"></h1> <p i18n-values=".innerHTML:primaryParagraph"></p> <p i18n-values=".innerHTML:secondaryParagraph"></p> </div> <div class="nav-wrapper"> <button i18n-content="primaryButtonText" id="primary-button"></button> <button i18n-content="secondaryButtonText" id="secondary-button"></button> </div> </div> </body> </html><!DOCTYPE HTML> <!-- Copyright 2013 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <html> <head> <meta charset="utf-8"> <title i18n-content="domDistillerTitle"></title> <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css"> <link rel="stylesheet" href="chrome://resources/css/overlay.css"> <style>/* Copyright 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ a:visited { color: orange; } .hidden { visibility: hidden; } </style> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/cr/ui/overlay.js"></script> <script src="about_dom_distiller.js"></script> <script src="strings.js"></script> </head> <body> <div id="mainContent"> <div id="list-section"> <header> <h1 id="listTitle" i18n-content="domDistillerTitle"></h1> </header> <div id="add-entry"> <label for="article_url" i18n-content="addArticleUrl"></label> <input type="text" id="article_url" /> <br/> <button id="addbutton" i18n-content="addArticleAddButtonLabel"></button> <button id="viewbutton" i18n-content="viewUrlButtonLabel"></button> <span id="add-entry-error" i18n-content="addArticleFailedLabel"></span> <span id="view-url-error" i18n-content="viewUrlFailedLabel"></span> </div> <div id="update-list"> <form> <button id="refreshbutton" i18n-content="refreshButtonLabel"></button> <span id="entries-list-loading" i18n-content="loadingEntries"></span> </form> </div> <ul id="entries-list"> </ul> </div> </div> <script src="chrome://resources/js/i18n_template.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> </body> </html> /* Copyright 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ a:visited { color: orange; } .hidden { visibility: hidden; } // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var domDistiller = { /** * Callback from the backend with the list of entries to display. * This call will build the entries section of the DOM distiller page, or hide * that section if there are none to display. * @param {!Array<string>} entries The entries. */ onReceivedEntries: function(entries) { $('entries-list-loading').classList.add('hidden'); if (!entries.length) $('entries-list').classList.add('hidden'); var list = $('entries-list'); domDistiller.removeAllChildren(list); for (var i = 0; i < entries.length; i++) { var listItem = document.createElement('li'); var link = document.createElement('a'); var entry_id = entries[i].entry_id; link.setAttribute('id', 'entry-' + entry_id); link.setAttribute('href', '#'); link.innerText = entries[i].title; link.addEventListener('click', function(event) { domDistiller.onSelectArticle(event.target.id.substr("entry-".length)); }, true); listItem.appendChild(link); list.appendChild(listItem); } }, /** * Callback from the backend when adding an article failed. */ onArticleAddFailed: function() { $('add-entry-error').classList.remove('hidden'); }, /** * Callback from the backend when viewing a URL failed. */ onViewUrlFailed: function() { $('view-url-error').classList.remove('hidden'); }, removeAllChildren: function(root) { while(root.firstChild) { root.removeChild(root.firstChild); } }, /** * Sends a request to the browser process to add the URL specified to the list * of articles. */ onAddArticle: function() { $('add-entry-error').classList.add('hidden'); var url = $('article_url').value; chrome.send('addArticle', [url]); }, /** * Sends a request to the browser process to view a distilled version of the * URL specified. */ onViewUrl: function() { $('view-url-error').classList.add('hidden'); var url = $('article_url').value; chrome.send('viewUrl', [url]); }, /** * Sends a request to the browser process to view a distilled version of the * selected article. */ onSelectArticle: function(articleId) { chrome.send('selectArticle', [articleId]); }, /* All the work we do on load. */ onLoadWork: function() { $('list-section').classList.remove('hidden'); $('entries-list-loading').classList.add('hidden'); $('add-entry-error').classList.add('hidden'); $('view-url-error').classList.add('hidden'); $('refreshbutton').addEventListener('click', function(event) { domDistiller.onRequestEntries(); }, false); $('addbutton').addEventListener('click', function(event) { domDistiller.onAddArticle(); }, false); $('viewbutton').addEventListener('click', function(event) { domDistiller.onViewUrl(); }, false); domDistiller.onRequestEntries(); }, onRequestEntries: function() { $('entries-list-loading').classList.remove('hidden'); chrome.send('requestEntries'); }, } document.addEventListener('DOMContentLoaded', domDistiller.onLoadWork); <!DOCTYPE HTML> <!-- Copyright 2014 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="theme-color" id="theme-color"> <title>$1</title> <!-- Placeholder for CSS. --> $2 <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> </head> <body class="$3"> <div id="contentWrap"> <div id="mainContent"> <article> <header id="articleHeader"> <div id="titleCollapse"> <div class="verticalCenterOuter"> <div class="verticalCenterInner"> <h1 id="titleHolder"><noscript>$4</noscript></h1> </div> </div> </div> </header> <div id="content"><noscript>$5</noscript></div> </article> <div id="loadingIndicator" class="visible"> <!-- SVG material loading spinner. --> $6 </div> </div> <a data-original-url="$7" id="closeReaderView">$8</a> </div> <div id="feedbackContainer" class="footerFeedback hidden"> <div class="feedbackContent"> <div id="feedbackQuestion"></div> <div class="feedbackButtonWrap"> <a class="feedbackButton" id="feedbackNo"></a> <a class="feedbackButton" id="feedbackYes"></a> </div> </div> <div class="clear"></div> </div> </body> </html> // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This variable will be changed by iOS scripts. var distiller_on_ios = false; function addToPage(html) { var div = document.createElement('div'); div.innerHTML = html; document.getElementById('content').appendChild(div); fillYouTubePlaceholders(); if (typeof navigate_on_initial_content_load !== 'undefined' && navigate_on_initial_content_load) { navigate_on_initial_content_load = false; setTimeout(function() { window.location = window.location + "#loaded"; }, 0); } } function fillYouTubePlaceholders() { var placeholders = document.getElementsByClassName('embed-placeholder'); for (var i = 0; i < placeholders.length; i++) { if (!placeholders[i].hasAttribute('data-type') || placeholders[i].getAttribute('data-type') != 'youtube' || !placeholders[i].hasAttribute('data-id')) { continue; } var embed = document.createElement('iframe'); var url = 'http://www.youtube.com/embed/' + placeholders[i].getAttribute('data-id'); embed.setAttribute('class', 'youtubeIframe'); embed.setAttribute('src', url); embed.setAttribute('type', 'text/html'); embed.setAttribute('frameborder', '0'); var parent = placeholders[i].parentElement; var container = document.createElement('div'); container.setAttribute('class', 'youtubeContainer'); container.appendChild(embed); parent.replaceChild(container, placeholders[i]); } } function showLoadingIndicator(isLastPage) { document.getElementById('loadingIndicator').className = isLastPage ? 'hidden' : 'visible'; } // Sets the title. function setTitle(title) { var holder = document.getElementById('titleHolder'); holder.textContent = title; document.title = title; } // Set the text direction of the document ('ltr', 'rtl', or 'auto'). function setTextDirection(direction) { document.body.setAttribute('dir', direction); } // Maps JS Font Family to CSS class and then changes body class name. // CSS classes must agree with distilledpage.css. function useFontFamily(fontFamily) { var cssClass; if (fontFamily == "serif") { cssClass = "serif"; } else if (fontFamily == "monospace") { cssClass = "monospace"; } else { cssClass = "sans-serif"; } // Relies on the classname order of the body being Theme class, then Font // Family class. var themeClass = document.body.className.split(" ")[0]; document.body.className = themeClass + " " + cssClass; } // Maps JS theme to CSS class and then changes body class name. // CSS classes must agree with distilledpage.css. function useTheme(theme) { var cssClass; if (theme == "sepia") { cssClass = "sepia"; } else if (theme == "dark") { cssClass = "dark"; } else { cssClass = "light"; } // Relies on the classname order of the body being Theme class, then Font // Family class. var fontFamilyClass = document.body.className.split(" ")[1]; document.body.className = cssClass + " " + fontFamilyClass; updateToolbarColor(); } function updateToolbarColor() { // Relies on the classname order of the body being Theme class, then Font // Family class. var themeClass = document.body.className.split(" ")[0]; var toolbarColor; if (themeClass == "sepia") { toolbarColor = "#BF9A73"; } else if (themeClass == "dark") { toolbarColor = "#1A1A1A"; } else { toolbarColor = "#F5F5F5"; } document.getElementById('theme-color').content = toolbarColor; } function useFontScaling(scaling) { pincher.useFontScaling(scaling); } /** * Show the distiller feedback form. * @param questionText The i18n text for the feedback question. * @param yesText The i18n text for the feedback answer 'YES'. * @param noText The i18n text for the feedback answer 'NO'. */ function showFeedbackForm(questionText, yesText, noText) { // If the distiller is running on iOS, do not show the feedback form. This // variable is set in distiller_viewer.cc before this function is run. if (distiller_on_ios) return; document.getElementById('feedbackYes').innerText = yesText; document.getElementById('feedbackNo').innerText = noText; document.getElementById('feedbackQuestion').innerText = questionText; document.getElementById('feedbackContainer').classList.remove("hidden"); } // Add a listener to the "View Original" link to report opt-outs. document.getElementById('closeReaderView').addEventListener('click', function(e) { if (distiller) { distiller.closePanel(true); } }, true); document.getElementById('feedbackYes').addEventListener('click', function(e) { if (distiller) { distiller.sendFeedback(true); } document.getElementById('feedbackContainer').className += " fadeOut"; }, true); document.getElementById('feedbackNo').addEventListener('click', function(e) { if (distiller) { distiller.sendFeedback(false); } document.getElementById('feedbackContainer').className += " fadeOut"; }, true); document.getElementById('feedbackContainer').addEventListener('animationend', function(e) { var feedbackContainer = document.getElementById('feedbackContainer'); feedbackContainer.classList.remove("fadeOut"); document.getElementById('contentWrap').style.paddingBottom = window.getComputedStyle(feedbackContainer).height; feedbackContainer.className += " hidden"; setTimeout(function() { // Close the gap where the feedback form was. var contentWrap = document.getElementById('contentWrap'); contentWrap.style.transition = '0.5s'; contentWrap.style.paddingBottom = ''; }, 0); }, true); document.getElementById('contentWrap').addEventListener('transitionend', function(e) { var contentWrap = document.getElementById('contentWrap'); contentWrap.style.transition = ''; }, true); updateToolbarColor(); var pincher = (function() { 'use strict'; // When users pinch in Reader Mode, the page would zoom in or out as if it // is a normal web page allowing user-zoom. At the end of pinch gesture, the // page would do text reflow. These pinch-to-zoom and text reflow effects // are not native, but are emulated using CSS and JavaScript. // // In order to achieve near-native zooming and panning frame rate, fake 3D // transform is used so that the layer doesn't repaint for each frame. // // After the text reflow, the web content shown in the viewport should // roughly be the same paragraph before zooming. // // The control point of font size is the html element, so that both "em" and // "rem" are adjusted. // // TODO(wychen): Improve scroll position when elementFromPoint is body. var pinching = false; var fontSizeAnchor = 1.0; var focusElement = null; var focusPos = 0; var initClientMid; var clampedScale = 1; var lastSpan; var lastClientMid; var scale = 1; var shiftX; var shiftY; // The zooming speed relative to pinching speed. var FONT_SCALE_MULTIPLIER = 0.5; var MIN_SPAN_LENGTH = 20; // The font size is guaranteed to be in px. var baseSize = parseFloat(getComputedStyle(document.documentElement).fontSize); var refreshTransform = function() { var slowedScale = Math.exp(Math.log(scale) * FONT_SCALE_MULTIPLIER); clampedScale = Math.max(0.5, Math.min(2.0, fontSizeAnchor * slowedScale)); // Use "fake" 3D transform so that the layer is not repainted. // With 2D transform, the frame rate would be much lower. document.body.style.transform = 'translate3d(' + shiftX + 'px,' + shiftY + 'px, 0px)' + 'scale(' + clampedScale/fontSizeAnchor + ')'; }; function saveCenter(clientMid) { // Try to preserve the pinching center after text reflow. // This is accurate to the HTML element level. focusElement = document.elementFromPoint(clientMid.x, clientMid.y); var rect = focusElement.getBoundingClientRect(); initClientMid = clientMid; focusPos = (initClientMid.y - rect.top) / (rect.bottom - rect.top); } function restoreCenter() { var rect = focusElement.getBoundingClientRect(); var targetTop = focusPos * (rect.bottom - rect.top) + rect.top + document.body.scrollTop - (initClientMid.y + shiftY); document.body.scrollTop = targetTop; } function endPinch() { pinching = false; document.body.style.transformOrigin = ''; document.body.style.transform = ''; document.documentElement.style.fontSize = clampedScale * baseSize + "px"; restoreCenter(); var img = document.getElementById('fontscaling-img'); if (!img) { img = document.createElement('img'); img.id = 'fontscaling-img'; img.style.display = 'none'; document.body.appendChild(img); } img.src = "/savefontscaling/" + clampedScale; } function touchSpan(e) { var count = e.touches.length; var mid = touchClientMid(e); var sum = 0; for (var i = 0; i < count; i++) { var dx = (e.touches[i].clientX - mid.x); var dy = (e.touches[i].clientY - mid.y); sum += Math.hypot(dx, dy); } // Avoid very small span. return Math.max(MIN_SPAN_LENGTH, sum/count); } function touchClientMid(e) { var count = e.touches.length; var sumX = 0; var sumY = 0; for (var i = 0; i < count; i++) { sumX += e.touches[i].clientX; sumY += e.touches[i].clientY; } return {x: sumX/count, y: sumY/count}; } function touchPageMid(e) { var clientMid = touchClientMid(e); return {x: clientMid.x - e.touches[0].clientX + e.touches[0].pageX, y: clientMid.y - e.touches[0].clientY + e.touches[0].pageY}; } return { handleTouchStart: function(e) { if (e.touches.length < 2) return; e.preventDefault(); var span = touchSpan(e); var clientMid = touchClientMid(e); if (e.touches.length > 2) { lastSpan = span; lastClientMid = clientMid; refreshTransform(); return; } scale = 1; shiftX = 0; shiftY = 0; pinching = true; fontSizeAnchor = parseFloat(getComputedStyle(document.documentElement).fontSize) / baseSize; var pinchOrigin = touchPageMid(e); document.body.style.transformOrigin = pinchOrigin.x + 'px ' + pinchOrigin.y + 'px'; saveCenter(clientMid); lastSpan = span; lastClientMid = clientMid; refreshTransform(); }, handleTouchMove: function(e) { if (!pinching) return; if (e.touches.length < 2) return; e.preventDefault(); var span = touchSpan(e); var clientMid = touchClientMid(e); scale *= touchSpan(e) / lastSpan; shiftX += clientMid.x - lastClientMid.x; shiftY += clientMid.y - lastClientMid.y; refreshTransform(); lastSpan = span; lastClientMid = clientMid; }, handleTouchEnd: function(e) { if (!pinching) return; e.preventDefault(); var span = touchSpan(e); var clientMid = touchClientMid(e); if (e.touches.length >= 2) { lastSpan = span; lastClientMid = clientMid; refreshTransform(); return; } endPinch(); }, handleTouchCancel: function(e) { if (!pinching) return; endPinch(); }, reset: function() { scale = 1; shiftX = 0; shiftY = 0; clampedScale = 1; document.documentElement.style.fontSize = clampedScale * baseSize + "px"; }, status: function() { return { scale: scale, clampedScale: clampedScale, shiftX: shiftX, shiftY: shiftY }; }, useFontScaling: function(scaling) { saveCenter({x: window.innerWidth/2, y: window.innerHeight/2}); shiftX = 0; shiftY = 0; document.documentElement.style.fontSize = scaling * baseSize + "px"; clampedScale = scaling; restoreCenter(); } }; }()); window.addEventListener('touchstart', pincher.handleTouchStart, false); window.addEventListener('touchmove', pincher.handleTouchMove, false); window.addEventListener('touchend', pincher.handleTouchEnd, false); window.addEventListener('touchcancel', pincher.handleTouchCancel, false); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Applies DomDistillerJs to the content of the page and returns a // DomDistillerResults (as a javascript object/dict). (function(options, stringify_output) { try { function initialize() { // This include will be processed at build time by grit. (function () {var $gwt_version = "2.7.0";var $wnd = window; /* our linker */var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '31ECD93EA90FDB418AB718EDF76F7F9E';var aa=2147483647,ba={3:1,12:1},da={3:1,14:1,12:1},ea={3:1,4:1},ha={3:1,5:1,7:1,4:1},ia={9:1,18:1,3:1,11:1,8:1},g={3:1,5:1,15:1,7:1,4:1,13:1},ja={43:1},ka={25:1},la={3:1,29:1},ma={3:1,11:1,8:1,27:1},na={3:1,5:1,4:1},_,oa,pa={};function qa(){}function sa(a){function b(){}b.prototype=a||{};return new b}function k(){} function m(a,b,c){var d=pa[a],e=d instanceof Array?d[0]:null;d&&!e?_=d:(_=pa[a]=b?sa(pa[b]):{},_.cM=c,_.constructor=_,!b&&(_.tM=qa));for(d=3;d<arguments.length;++d)arguments[d].prototype=_;e&&(_.cZ=e)}function ta(){}function wa(a,b){return xa(a)?a===b:Ca(a)?a.eQ(b):(Da(a),a===b)}function Ea(a){return xa(a)?n:Ca(a)?a.cZ:Da(a)?a.cZ:Ia} function Ma(a){if(xa(a)){Na();var b=":"+a,c=Oa[b];if(null!=c)a=c;else{c=Pa[b];if(null==c){var d,e,f;d=0;e=a.length;f=e-4;for(c=0;c<f;)d=a.charCodeAt(c+3)+31*(a.charCodeAt(c+2)+31*(a.charCodeAt(c+1)+31*(a.charCodeAt(c)+31*d))),d=~~d,c+=4;for(;c<e;)d*=31,f=c++,f=a.charCodeAt(f),d+=f;c=~~d}256==Qa&&(Pa=Oa,Oa={},Qa=0);++Qa;a=Oa[b]=c}}else a=Ca(a)?a.hC():(Da(a),a.$H||(a.$H=++Ra));return a}m(1,null,{},ta);_.eQ=function(a){return this===a};_.gC=function(){return this.cZ}; _.hC=function(){return this.$H||(this.$H=++Ra)};_.tS=function(){var a=Sa(Ea(this))+"@",b;b=(Ma(this)>>>0).toString(16);return a+b};_.toString=function(){return this.tS()};$a={3:1,217:1,11:1,2:1};!Array.isArray&&(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});function ab(a){return a.toString?a.toString():"[JavaScriptObject]"}function Ca(a){return!Array.isArray(a)&&a.tM===qa}function q(a,b){return null!=a&&(xa(a)&&!!$a[b]||a.cM&&!!a.cM[b])} function Da(a){return Array.isArray(a)&&a.tM===qa}function xa(a){return"string"===typeof a}function s(a){return null==a?null:a}function bb(a){return~~Math.max(Math.min(a,aa),-2147483648)}var $a;function cb(a){if(null==a.n)if(a.B()){var b=a.c;b.C()?a.n="["+b.k:b.B()?a.n="["+b.w():a.n="[L"+b.w()+";";a.b=b.v()+"[]";a.j=b.A()+"[]"}else{var b=a.g,c=a.d,c=c.split("/");a.n=db(".",[b,db("$",c)]);a.b=db(".",[b,db(".",c)]);a.j=c[c.length-1]}}function Sa(a){cb(a);return a.n}function eb(a){cb(a);return a.j} function fb(){this.i=Rb++;this.a=this.k=this.b=this.d=this.g=this.j=this.n=null}function Ub(a){var b;b=new fb;b.n="Class$"+(a?"S"+a:""+b.i);b.b=b.n;b.j=b.n;return b}function t(a){var b;b=Ub(a);Vb(a,b);return b}function u(a,b){var c;c=Ub(a);Vb(a,c);c.f=b?8:0;c.e=b;return c}function Wb(){var a;a=Ub(null);a.f=2;return a}function v(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.u(b))}function db(a,b){for(var c=0;!b[c]||""==b[c];)c++;for(var d=b[c++];c<b.length;c++)b[c]&&""!=b[c]&&(d+=a+b[c]);return d} function Vb(a,b){if(a){b.k=a;var c=b.C()?null:pa[b.k];c?c.cZ=b:pa[a]=[b]}}m(73,1,{},fb);_.u=function(a){var b;b=new fb;b.f=4;1<a?b.c=v(this,a-1):b.c=this;return b};_.v=function(){cb(this);return this.b};_.w=function(){return Sa(this)};_.A=function(){return eb(this)};_.B=function(){return 0!=(this.f&4)};_.C=function(){return 0!=(this.f&1)};_.tS=function(){return(0!=(this.f&2)?"interface ":0!=(this.f&1)?"":"class ")+(cb(this),this.n)};_.f=0;_.i=0;var Rb=1,Xb=t(1),Ia=t(0);t(73);m(12,1,ba);_.q=function(){return this.e}; _.tS=function(){var a,b;a=Sa(this.cZ);b=this.q();return null!=b?a+": "+b:a};t(12);function Yb(a){this.e=a;Zb(this,this.e)}m(14,12,da,Yb);t(14);m(21,14,da);t(21);m(99,21,da);t(99);function jc(){jc=k;rc=new ta}function sc(a){jc();this.e=null;this.a="";this.b=a;this.a=""}m(36,99,{36:1,3:1,14:1,12:1},sc); _.q=function(){var a;null==this.c&&(a=s(this.b)===s(rc)?null:this.b,this.d=null==a?"null":null==a||xa(a)||a.tM===qa?xa(a)?"String":Sa(Ea(a)):null==a?null:a.name,this.a=this.a+": "+(null==a||xa(a)||a.tM===qa?a+"":null==a?null:a.message),this.c="("+this.d+") "+this.a);return this.c};_.r=function(){return s(this.b)===s(rc)?null:this.b};var rc;t(36);m(193,1,{});t(193);function tc(a){$wnd.setTimeout(function(){throw a;},0)}function uc(){0!=vc&&(vc=0);wc=-1}var vc=0,Ra=0,xc=0,wc=-1; function yc(){yc=k;zc=new Ac}function Ac(){}function Bc(a,b){var c,d,e;d=0;for(e=a.length;d<e;d++){c=a[d];try{if(c[1]){if(c[0].Hb()){var f=b;!f&&(f=[]);f[f.length]=c;b=f}}else c[0].Hb()}catch(h){if(h=Cc(h),q(h,12))c=h,tc(q(c,36)?c.r():c);else throw Dc(h);}}return b}m(151,193,{},Ac);var zc;t(151);function Ec(){Ec=k;var a,b;b=!(Error.stackTraceLimit||"stack"in Error());a=new Fc;Gc=b?new Hc:a}function Zb(a,b){Ec();Gc.s(a,b)}var Gc;m(205,1,{});t(205);function Hc(){}m(109,205,{},Hc); _.s=function(a,b){var c={};a.fnStack=[];for(var d=arguments.callee.caller;d;){Ec();var e;if(!(e=d.name)){e=d;var f=/function(?:\s+([\w$]+))?\s*\(/.exec(d.toString());e=e.name=f&&f[1]||"anonymous"}a.fnStack.push(e);e=":"+e;if(f=c[e]){var h,l;h=0;for(l=f.length;h<l;h++)if(f[h]===d)return}(f||(c[e]=[])).push(d);d=d.caller}};t(109);function Ic(){Ic=k;Error.stackTraceLimit=64}m(206,205,{}); _.s=function(a,b){function c(a){if(!("stack"in a))try{throw a;}catch(b){}return a}var d;"string"==typeof b?d=c(Error(b)):b instanceof Object&&"stack"in b?d=b:d=c(Error());a.__gwt$backingJsError=d};t(206);function Fc(){Ic()}m(110,206,{},Fc);t(110);function x(a){if(!a)throw new Jc;}function y(a,b){if(0>a||a>=b)throw new Kc("Index: "+a+", Size: "+b);}function Lc(a){if(null==a)throw new Mc;}function Vc(a,b){if(0>a||a>b)throw new Kc("Index: "+a+", Size: "+b);} function Yc(a){var b,c,d,e,f;b="Enum constant undefined: %s";c=new fd;for(d=f=0;d<a.length;){e=b.indexOf("%s",f);if(-1==e)break;f=b.substr(f,e-f);c.a+=f;f=a[d++];c.a+=f;f=e+2}b=b.substr(f,b.length-f);c.a+=b;if(d<a.length){c.a+=" [";b=a[d++];for(c.a+=b;d<a.length;)c.a+=", ",b=a[d++],c.a+=b;c.a+="]"}return c.a}function md(a,b){return null==a[b]?null:String(a[b])}function z(a,b){return a.getAttribute(b)||""}function B(a){(a=a.parentNode)&&1==a.nodeType||(a=null);return a} function C(a,b){this.a=a;this.b=b}m(8,1,{3:1,11:1,8:1});_.t=function(a){return this.b-a.b};_.eQ=function(a){return this===a};_.hC=function(){return this.$H||(this.$H=++Ra)};_.tS=function(){return null!=this.a?this.a:""+this.b};_.b=0;t(8);function nd(){nd=k;od=new pd;qd=new rd;sd=new td;ud=new vd;wd=new xd;yd=new zd;Ad=new Bd;Cd=new Dd;Ed=new Fd;Gd=new Hd;Id=new Zd;ge=new pe;qe=new re;se=new te;ue=new ve;we=new xe;ye=new ze;Ae=new Be} function Ce(){nd();return D(v(De,1),ha,9,0,[od,qd,sd,ud,wd,yd,Ad,Cd,Ed,Gd,Id,ge,qe,se,ue,we,ye,Ae])}m(9,8,ia);var qd,ye,sd,od,yd,we,wd,Ad,Cd,Ed,ud,Ae,Gd,Id,ge,se,ue,qe,De=u(9,Ce);function pd(){C.call(this,"DEFAULT",0)}m(158,9,ia,pd);u(158,null);function Hd(){C.call(this,"SE_RESIZE",9)}m(167,9,ia,Hd);u(167,null);function Zd(){C.call(this,"SW_RESIZE",10)}m(168,9,ia,Zd);u(168,null);function pe(){C.call(this,"S_RESIZE",11)}m(169,9,ia,pe);u(169,null);function re(){C.call(this,"W_RESIZE",12)} m(170,9,ia,re);u(170,null);function te(){C.call(this,"TEXT",13)}m(171,9,ia,te);u(171,null);function ve(){C.call(this,"WAIT",14)}m(172,9,ia,ve);u(172,null);function xe(){C.call(this,"HELP",15)}m(173,9,ia,xe);u(173,null);function ze(){C.call(this,"COL_RESIZE",16)}m(174,9,ia,ze);u(174,null);function Be(){C.call(this,"ROW_RESIZE",17)}m(175,9,ia,Be);u(175,null);function rd(){C.call(this,"AUTO",1)}m(159,9,ia,rd);u(159,null);function td(){C.call(this,"CROSSHAIR",2)}m(160,9,ia,td);u(160,null); function vd(){C.call(this,"POINTER",3)}m(161,9,ia,vd);u(161,null);function xd(){C.call(this,"MOVE",4)}m(162,9,ia,xd);u(162,null);function zd(){C.call(this,"E_RESIZE",5)}m(163,9,ia,zd);u(163,null);function Bd(){C.call(this,"NE_RESIZE",6)}m(164,9,ia,Bd);u(164,null);function Dd(){C.call(this,"NW_RESIZE",7)}m(165,9,ia,Dd);u(165,null);function Fd(){C.call(this,"N_RESIZE",8)}m(166,9,ia,Fd);u(166,null); function Ee(){Ee=k;var a=Ce(),b,c,d,e;b={};d=0;for(e=a.length;d<e;++d)c=a[d],b[":"+(null!=c.a?c.a:""+c.b)]=c;Fe=b}var Fe;function Ge(a,b){var c;c=a.slice(0,b);D(Ea(a),a.cM,a.__elementTypeId$,a.__elementTypeCategory$,c);return c}function He(a,b){var c;c=Ie(0,b);D(Ea(a),a.cM,a.__elementTypeId$,a.__elementTypeCategory$,c);return c}function G(a,b,c,d,e){d=Ie(e,d);D(v(a,1),b,c,e,d);return d}function Je(a){return Ke(n,[na,g],[13,2],4,a,0,2)} function Ke(a,b,c,d,e,f,h){var l,p,r,A;r=e[f];l=(p=f==h-1)?d:0;A=Ie(l,r);D(v(a,h-f),b[f],c[f],l,A);if(!p)for(++f,l=0;l<r;++l)A[l]=Ke(a,b,c,d,e,f,h);return A}function D(a,b,c,d,e){e.cZ=a;e.cM=b;e.tM=qa;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e}function Ie(a,b){var c=Array(b),d;switch(a){case 6:d={l:0,m:0,h:0};break;case 7:d=0;break;case 8:d=!1;break;default:return c}for(var e=0;e<b;++e)c[e]=d;return c}function Dc(a){return q(a,36)&&s(a.b)!==s((jc(),rc))?s(a.b)===s(rc)?null:a.b:a} function Cc(a){var b;if(q(a,12))return a;b=a&&a.__gwt$exception;if(!b&&(b=new sc(a),Zb(b,a),a&&"object"==typeof a))try{a.__gwt$exception=b}catch(c){}return b}function Le(){var a;a=navigator.userAgent.toLowerCase();var b=$doc.documentMode;a=-1!=a.indexOf("webkit")?"safari":-1!=a.indexOf("msie")&&10<=b&&11>b?"ie10":-1!=a.indexOf("msie")&&9<=b&&11>b?"ie9":-1!=a.indexOf("msie")&&8<=b&&11>b?"ie8":-1!=a.indexOf("gecko")||11<=b?"gecko1_8":"unknown";if("safari"!==a)throw new Me(a);}m(57,12,ba);t(57); m(22,57,ba);t(22);function Me(a){this.e=""+("Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (safari) does not match the runtime user.agent value ("+a+").\nExpect more errors.");Zb(this,this.e)}m(98,22,ba,Me);t(98);m(58,1,{});_.tS=function(){return this.a};t(58);function Kc(a){Yb.call(this,a)}m(30,21,da,Kc);t(30);function Ne(){Zb(this,this.e)}m(178,30,da,Ne);t(178);function Oe(){Oe=k;Pe=new Qe(!1);Re=new Qe(!0)}function Qe(a){this.a=a}m(45,1,{3:1,45:1,11:1},Qe); _.t=function(a){var b=this.a;return b==a.a?0:b?1:-1};_.eQ=function(a){return q(a,45)&&a.a==this.a};_.hC=function(){return this.a?1231:1237};_.tS=function(){return""+this.a};_.a=!1;var Pe,Re;t(45);function Se(a){this.a=a}m(34,1,{3:1,34:1,11:1},Se);_.t=function(a){return this.a-a.a};_.eQ=function(a){return q(a,34)&&a.a==this.a};_.hC=function(){return this.a};_.tS=function(){return String.fromCharCode(this.a)};_.a=0;var $e=t(34);function bf(){bf=k;kf=G($e,ha,34,128,0)}var kf;m(72,1,{3:1,72:1});t(72); function lf(a){Yb.call(this,a)}m(23,21,{3:1,14:1,23:1,12:1},lf);t(23);function Cf(){Zb(this,this.e)}m(179,21,da,Cf);t(179);function Df(a){this.a=a}function Qf(a){var b,c;return-129<a&&128>a?(b=a+128,c=(Tf(),Uf)[b],!c&&(c=Uf[b]=new Df(a)),c):new Df(a)}m(35,72,{3:1,11:1,35:1,72:1},Df);_.t=function(a){var b=this.a;a=a.a;return b<a?-1:b>a?1:0};_.eQ=function(a){return q(a,35)&&a.a==this.a};_.hC=function(){return this.a};_.tS=function(){return""+this.a};_.a=0;var Yf=t(35); function Tf(){Tf=k;Uf=G(Yf,ha,35,256,0)}var Uf;function Zf(a,b){return a<b?a:b}function Mc(){Zb(this,this.e)}function $f(a){Yb.call(this,a)}m(51,21,da,Mc,$f);t(51);function yg(a,b){var c;c=b.length;return a.substr(a.length-c,c)===b}function H(a,b){return null==b?!1:a==b?!0:a.length==b.length&&a.toLowerCase()==b.toLowerCase()}function zg(a){return!a.length} function Ag(a,b,c){var d;65536<=b?(d=56320+(b-65536&1023)&65535,b=String.fromCharCode(55296+(b-65536>>10&1023)&65535)+String.fromCharCode(d)):b=String.fromCharCode(b&65535);return a.lastIndexOf(b,c)}function Bg(a,b,c,d,e){if(null==c)throw new Mc;if(0>b||0>d||0>=e||b+e>a.length||d+e>c.length)return!1;a=a.substr(b,e);c=c.substr(d,e);return a===c}function Cg(a){var b=(160).toString(16),b="\\u"+"0000".substring(b.length)+b;return a.replace(RegExp(b,"g"),String.fromCharCode(32))} function Dg(a,b){var c;c=Eg("");return a.replace(RegExp(b,"g"),c)}function Fg(a,b){var c;c=Eg("");return a.replace(RegExp(b),c)} function Gg(a,b){for(var c=RegExp(b,"g"),d=[],e=0,f=a,h=null;;){var l=c.exec(f);if(null==l||""==f){d[e]=f;break}else d[e]=f.substring(0,l.index),f=f.substring(l.index+l[0].length,f.length),c.lastIndex=0,h==f&&(d[e]=f.substring(0,1),f=f.substring(1)),h=f,e++}if(0<a.length){for(c=d.length;0<c&&""==d[c-1];)--c;c<d.length&&d.splice(c,d.length-c)}c=G(n,g,2,d.length,4);for(e=0;e<d.length;++e)c[e]=d[e];return c}function Hg(a,b){return a.substr(0,b.length)===b} function Ig(a,b){return a.substr(b,a.length-b)}function Jg(a,b,c){return a.substr(b,c-b)}function Kg(a){return 0==a.length||" "<a[0]&&" "<a[a.length-1]?a:a.replace(/^[\u0000-\u0020]*|[\u0000-\u0020]*$/g,"")}function Eg(a){var b;for(b=0;0<=(b=a.indexOf("\\",b));)36==a.charCodeAt(b+1)?a=a.substr(0,b)+"$"+Ig(a,++b):a=a.substr(0,b)+Ig(a,++b);return a}var n=t(2);function Na(){Na=k;Pa={};Oa={}}var Pa,Qa=0,Oa;function Lg(){this.a=""}function fd(){this.a=""}function Mg(a){this.a=a}m(37,58,{217:1},Lg,fd,Mg); t(37);function Ng(a){Yb.call(this,a)}m(52,21,da,Ng);t(52);function Og(a,b){var c,d,e;Lc(b);c=!1;for(e=b.D();e.Q();)d=e.R(),c|=a.F(d);return c}function Pg(a){var b,c,d,e;e=new Mg("[");b=!1;for(d=a.D();d.Q();)c=d.R(),b?e.a+=", ":b=!0,e.a+=c===a?"(this Collection)":""+c;e.a+="]";return e.a}m(208,1,{});_.F=function(){throw new Ng("Add not supported on this collection");};_.G=function(a){return Og(this,a)}; _.H=function(a){a:{var b,c;for(c=this.D();c.Q();)if(b=c.R(),s(a)===s(b)||null!=a&&wa(a,b)){a=!0;break a}a=!1}return a};_.I=function(){return 0==this.J()};_.K=function(){return this.L(G(Xb,ea,1,this.J(),3))};_.L=function(a){var b,c,d;d=this.J();a.length<d&&(a=He(a,d));c=this.D();for(b=0;b<d;++b)a[b]=c.R();a.length>d&&(a[d]=null);return a};_.tS=function(){return Pg(this)};t(208);function Qg(a,b){var c,d,e;c=b.W();e=b.X();d=a.P(c);return!(s(e)===s(d)||null!=e&&wa(e,d))||null==d&&!a.N(c)?!1:!0} function Rg(a,b){var c,d,e;for(d=a.O().D();d.Q();)if(c=d.R(),e=c.W(),s(b)===s(e)||null!=b&&wa(b,e))return c;return null}function Sg(a,b){return b===a?"(this Map)":""+b}function Tg(a){return a?a.X():null}m(207,1,ja);_.M=function(a){return Qg(this,a)};_.N=function(a){return!!Rg(this,a)};_.eQ=function(a){var b;if(a===this)return!0;if(!q(a,43)||this.J()!=a.J())return!1;for(b=a.O().D();b.Q();)if(a=b.R(),!this.M(a))return!1;return!0};_.P=function(a){return Tg(Rg(this,a))};_.hC=function(){return Ug(this.O())}; _.J=function(){return this.O().J()};_.tS=function(){var a,b,c,d;d=new Mg("{");a=!1;for(c=this.O().D();c.Q();)b=c.R(),a?d.a+=", ":a=!0,d.a+=Sg(this,b.W()),d.a+="\x3d",b=Sg(this,b.X()),d.a+=b;d.a+="}";return d.a};t(207);function Vg(a,b){return xa(b)?J(a,b):!!Wg(a.a,b)}function Xg(a,b){return xa(b)?K(a,b):Tg(Wg(a.a,b))}function K(a,b){return null==b?Tg(Wg(a.a,null)):a.c.db(b)}function J(a,b){return null==b?!!Wg(a.a,null):void 0!==a.c.db(b)}function Yg(a,b,c){return xa(b)?L(a,b,c):Zg(a.a,b,c)} function L(a,b,c){return null==b?Zg(a.a,null,c):a.c.gb(b,c)}function $g(a){ah();a.a=bh.ab();a.a.b=a;a.c=bh.bb();a.c.b=a;a.b=0;ch(a)}m(111,207,ja);_.N=function(a){return Vg(this,a)};_.O=function(){return new dh(this)};_.P=function(a){return Xg(this,a)};_.J=function(){return this.b};_.b=0;t(111);m(209,208,ka);_.eQ=function(a){if(a===this)a=!0;else if(q(a,25)&&a.J()==this.J())a:{var b;Lc(a);for(b=a.D();b.Q();)if(a=b.R(),!this.H(a)){a=!1;break a}a=!0}else a=!1;return a};_.hC=function(){return Ug(this)}; t(209);function dh(a){this.a=a}m(61,209,ka,dh);_.H=function(a){return q(a,24)?Qg(this.a,a):!1};_.D=function(){return new eh(this.a)};_.J=function(){return this.a.b};t(61);function fh(a){if(a.a.Q())return!0;if(a.a!=a.b)return!1;a.a=a.c.a.$();return a.a.Q()}function gh(a){if(a._gwt_modCount!=a.c._gwt_modCount)throw new hh;return x(fh(a)),a.a.R()}function eh(a){this.c=a;this.a=this.b=this.c.c.$();this._gwt_modCount=a._gwt_modCount}m(62,1,{},eh);_.Q=function(){return fh(this)};_.R=function(){return gh(this)}; t(62);m(210,208,{29:1});_.S=function(){throw new Ng("Add not supported on this list");};_.F=function(a){this.S(this.J(),a);return!0};_.eQ=function(a){var b,c,d;if(a===this)return!0;if(!q(a,29)||this.J()!=a.J())return!1;d=a.D();for(b=this.D();b.Q();)if(a=b.R(),c=d.R(),!(s(a)===s(c)||null!=a&&wa(a,c)))return!1;return!0};_.hC=function(){var a,b,c;c=1;for(b=this.D();b.Q();)a=b.R(),c=31*c+(null!=a?Ma(a):0),c=~~c;return c};_.D=function(){return new M(this)}; _.U=function(){throw new Ng("Remove not supported on this list");};t(210);function ih(a){if(-1==a.c)throw new Cf;a.d.U(a.c);a.b=a.c;a.c=-1}function M(a){this.d=a}m(6,1,{},M);_.Q=function(){return this.b<this.d.J()};_.R=function(){return x(this.b<this.d.J()),this.d.T(this.c=this.b++)};_.V=function(){ih(this)};_.b=0;_.c=-1;t(6);function jh(a,b){this.d=this.a=a;Vc(b,a.b.length);this.b=b}m(40,6,{},jh);t(40);function kh(a,b){y(b,a.b);return N(a.c,a.a+b)} function lh(a,b,c){var d=a.b.length;if(0>b)throw new Kc("fromIndex: "+b+" \x3c 0");if(c>d)throw new Kc("toIndex: "+c+" \x3e size "+d);if(b>c)throw new lf("fromIndex: "+b+" \x3e toIndex: "+c);this.c=a;this.a=b;this.b=c-b}m(65,210,{29:1},lh);_.S=function(a,b){Vc(a,this.b);mh(this.c,this.a+a,b);++this.b};_.T=function(a){return kh(this,a)};_.U=function(a){y(a,this.b);a=this.c.U(this.a+a);--this.b;return a};_.J=function(){return this.b};_.a=0;_.b=0;t(65); function nh(a){a=new eh((new dh(a.a)).a);return new oh(a)}function ph(a){this.a=a}m(63,209,ka,ph);_.H=function(a){return Vg(this.a,a)};_.D=function(){return nh(this)};_.J=function(){return this.a.b};t(63);function oh(a){this.a=a}m(112,1,{},oh);_.Q=function(){return fh(this.a)};_.R=function(){return gh(this.a).W()};t(112);function qh(a,b){var c;c=a.d;a.d=b;return c}m(46,1,{46:1,24:1});_.eQ=function(a){return q(a,24)?rh(this.c,a.W())&&rh(this.d,a.X()):!1};_.W=function(){return this.c};_.X=function(){return this.d}; _.hC=function(){return sh(this.c)^sh(this.d)};_.Y=function(a){return qh(this,a)};_.tS=function(){return this.c+"\x3d"+this.d};t(46);function th(a,b){this.c=a;this.d=b}m(47,46,{46:1,47:1,24:1},th);t(47);m(213,1,{24:1});_.eQ=function(a){return q(a,24)?rh(this.W(),a.W())&&rh(this.X(),a.X()):!1};_.hC=function(){return sh(this.W())^sh(this.X())};_.tS=function(){return this.W()+"\x3d"+this.X()};t(213);function uh(a,b){var c;c=vh(a,b.W());return!!c&&rh(c.d,b.X())}m(216,207,ja); _.M=function(a){return uh(this,a)};_.N=function(a){return!!vh(this,a)};_.O=function(){return new wh(this)};_.P=function(a){return Tg(vh(this,a))};t(216);function wh(a){this.a=a}m(96,209,ka,wh);_.H=function(a){return q(a,24)&&uh(this.a,a)};_.D=function(){return new xh(this.a)};_.J=function(){return this.a.b};t(96);function yh(a){a=new xh((new zh(a.a)).a);return new Ah(a)}function Bh(a){this.a=a}m(188,209,ka,Bh);_.H=function(a){return!!vh(this.a,a)};_.D=function(){return yh(this)};_.J=function(){return this.a.b}; t(188);function Ah(a){this.a=a}m(189,1,{},Ah);_.Q=function(){return this.a.a.Q()};_.R=function(){return this.a.a.R().W()};t(189);function Ch(a,b){var c;c=Dh(a,b);try{return x(c.b!=c.d.c),c.c=c.b,c.b=c.b.a,++c.a,c.c.c}catch(d){d=Cc(d);if(q(d,53))throw new Kc("Can't get element "+b);throw Dc(d);}}m(211,210,{29:1});_.S=function(a,b){var c;c=Dh(this,a);Eh(c.d,b,c.b.b,c.b);++c.a;c.c=null};_.T=function(a){return Ch(this,a)};_.D=function(){return Dh(this,0)}; _.U=function(a){var b,c;b=Dh(this,a);try{return c=(x(b.b!=b.d.c),b.c=b.b,b.b=b.b.a,++b.a,b.c.c),Fh(b),c}catch(d){d=Cc(d);if(q(d,53))throw new Kc("Can't remove element "+a);throw Dc(d);}};t(211);function mh(a,b,c){Vc(b,a.b.length);a.b.splice(b,0,c)}function O(a,b){a.b[a.b.length]=b;return!0} function Gh(a,b){var c;c=b.K();if(0==c.length)return!1;var d=c,e=a.b,f=a.b.length;c=c.length;var h=0;d===e&&(d=d.slice(h,h+c),h=0);for(var l=h,h=h+c;l<h;){var p=Math.min(l+1E4,h);c=p-l;Array.prototype.splice.apply(e,[f,0].concat(d.slice(l,p)));l=p;f+=c}return!0}function N(a,b){y(b,a.b.length);return a.b[b]}function Hh(a,b){for(var c=0;c<a.b.length;++c)if(rh(b,a.b[c]))return c;return-1}function Ih(a,b){var c;c=(y(b,a.b.length),a.b[b]);a.b.splice(b,1);return c} function Jh(a,b,c){y(b,a.b.length);a.b[b]=c}function Kh(a,b){var c,d;d=a.b.length;b.length<d&&(b=He(b,d));for(c=0;c<d;++c)b[c]=a.b[c];b.length>d&&(b[d]=null);return b}function P(){this.b=G(Xb,ea,1,0,3)}m(10,210,la,P);_.S=function(a,b){mh(this,a,b)};_.F=function(a){return O(this,a)};_.G=function(a){return Gh(this,a)};_.H=function(a){return-1!=Hh(this,a)};_.T=function(a){return N(this,a)};_.I=function(){return 0==this.b.length};_.U=function(a){return Ih(this,a)};_.J=function(){return this.b.length}; _.K=function(){return Ge(this.b,this.b.length)};_.L=function(a){return Kh(this,a)};t(10);function Ug(a){var b,c;c=0;for(b=a.D();b.Q();)a=b.R(),c+=null!=a?Ma(a):0,c=~~c;return c}function Lh(){Lh=k}function Mh(a,b){Lc(a);Lc(b);return xa(a)?a==b?0:a<b?-1:1:a.t(b)}m(192,1,{},function(){});t(192);function ch(a){a._gwt_modCount=(a._gwt_modCount|0)+1}function hh(){Zb(this,this.e)}m(190,21,da,hh);t(190);function Nh(){Zb(this,this.e)}m(86,21,da,Nh);t(86);function Oh(a,b){return Ph(a.a,b)?a.b[b.b]:null} function Qh(a,b,c){Uh(a.a,b);$h(a,b.b,c)}function $h(a,b,c){var d;d=a.b[b];a.b[b]=c;return d}function bi(a){var b;this.a=(b=a.e&&a.e(),new Ii(b,He(b,b.length)));this.b=G(Xb,ea,1,this.a.a.length,3)}m(152,207,ja,bi);_.N=function(a){return Ph(this.a,a)};_.O=function(){return new Ji(this)};_.P=function(a){return Oh(this,a)};_.J=function(){return this.a.c};t(152);function Ji(a){this.a=a}m(88,209,ka,Ji);_.H=function(a){return q(a,24)?Qg(this.a,a):!1};_.D=function(){return new Ki(this.a)};_.J=function(){return this.a.a.c}; t(88);function Ki(a){this.c=a;this.a=new Li(this.c.a)}m(89,1,{},Ki);_.Q=function(){return Qi(this.a)};_.R=function(){return this.b=$i(this.a),new aj(this.c,this.b)};t(89);function aj(a,b){this.b=a;this.a=b}m(90,213,{24:1},aj);_.W=function(){return this.a};_.X=function(){return this.b.b[this.a.b]};_.Y=function(a){return $h(this.b,this.a.b,a)};t(90);m(215,209,ka);t(215);function Uh(a,b){var c;Lc(b);c=b.b;return a.b[c]?!1:(a.b[c]=b,++a.c,!0)}function Ph(a,b){return q(b,8)&&!!b&&a.b[b.b]==b} function Ii(a,b){this.a=a;this.b=b;this.c=0}m(180,215,ka,Ii);_.F=function(a){return Uh(this,a)};_.H=function(a){return Ph(this,a)};_.D=function(){return new Li(this)};_.J=function(){return this.c};_.c=0;t(180);function bj(a){var b;++a.a;for(b=a.c.a.length;a.a<b&&!a.c.b[a.a];++a.a);}function Qi(a){return a.a<a.c.a.length}function $i(a){return x(a.a<a.c.a.length),a.b=a.a,bj(a),a.c.b[a.b]}function Li(a){this.c=a;bj(this)}m(91,1,{},Li);_.Q=function(){return Qi(this)};_.R=function(){return $i(this)}; _.a=-1;_.b=-1;t(91);function oj(a,b){return s(a)===s(b)||null!=a&&wa(a,b)}function pj(){$g(this)}m(19,111,{3:1,43:1},pj);t(19);function Q(a,b){return null==Yg(a.a,b,a)}function R(a,b){return Vg(a.a,b)}function Aj(){this.a=new pj}m(17,209,{3:1,25:1},Aj);_.F=function(a){return Q(this,a)};_.H=function(a){return R(this,a)};_.I=function(){return 0==this.a.b};_.D=function(){return nh(new ph(this.a))};_.J=function(){return this.a.b};_.tS=function(){return Pg(new ph(this.a))};t(17); function Wg(a,b){var c,d,e,f;c=null==b?"0":""+~~Ma(b);d=a.a[c]||[];e=0;for(f=d.length;e<f;++e)if(c=d[e],oj(b,c.W()))return c;return null}function Zg(a,b,c){var d,e,f,h;d=null==b?"0":""+~~Ma(b);e=a.a;d=e[d]||(e[d]=[]);f=0;for(h=d.length;f<h;++f)if(e=d[f],oj(b,e.W()))return e.Y(c);d[d.length]=new th(b,c);a=a.b;++a.b;ch(a);return null}function Bj(){this.a=this.Z()}m(87,1,{},Bj);_.Z=function(){return Object.create(null)};_.$=function(){return new Cj(this)};t(87); function Dj(a){if(a.c<a.a.length)return!0;if(a.b<a.d.length-1){var b=a.d[++a.b];a.a=a.f.a[b];a.c=0;return!0}return!1}function Cj(a){this.f=a;this.d=Object.getOwnPropertyNames(this.f.a);this.a=G(Ej,ea,24,0,0)}m(150,1,{},Cj);_.Q=function(){return Dj(this)};_.R=function(){return x(Dj(this)),this.e=this.a[this.c++],this.e};_.b=-1;_.c=0;_.e=null;t(150);function Fj(){Bj.call(this)}m(148,87,{},Fj);_.Z=function(){return{}}; _.$=function(){var a=this._(),b=this.a,c;for(c in b)if(c==parseInt(c,10))for(var d=b[c],e=0,f=d.length;e<f;++e)a.F(d[e]);return a.D()};_._=function(){return new Gj(this)};t(148);function Gj(a){this.a=a;P.call(this)}m(149,10,la,Gj);_.U=function(a){a=Ih(this,a);a:{var b=this.a,c=a.W(),d,e,f,h;f=null==c?"0":""+~~Ma(c);d=b.a[f]||[];for(h=0;h<d.length;h++)if(e=d[h],oj(c,e.W())){1==d.length?delete b.a[f]:d.splice(h,1);b=b.b;--b.b;ch(b);e.X();break a}}return a};t(149);function Hj(){}m(145,1,{},Hj); _.ab=function(){return new Bj};_.bb=function(){return new Ij};t(145);function ah(){ah=k;var a,b;if(b=Object.create&&Object.getOwnPropertyNames)b=Object.create(null),void 0!==b.__proto__||0!=Object.getOwnPropertyNames(b).length?b=!1:(b.__proto__=42,b=42!==b.__proto__?!1:!0);bh=b?(a=Object.create(null),a.__proto__=42,0==Object.getOwnPropertyNames(a).length)?new Jj:new Hj:new Kj}var bh;function Jj(){}m(147,145,{},Jj);_.bb=function(){return new Lj};t(147);function Kj(){}m(146,145,{},Kj);_.ab=function(){return new Fj}; _.bb=function(){return new Mj};t(146);function Nj(a,b,c){var d;d=a.a[b];if(void 0===d){var e=a.b;++e.b;ch(e)}a.a[b]=void 0===c?null:c;return d}function Oj(a,b){var c;c=a.a[b];if(void 0!==c){delete a.a[b];var d=a.b;--d.b;ch(d)}return c}function Ij(){this.a=this.cb()}m(68,1,{},Ij);_.cb=function(){return Object.create(null)};_.$=function(){var a;a=this.eb();return new Pj(this,a)};_.db=function(a){return this.a[a]};_.eb=function(){return Object.getOwnPropertyNames(this.a)}; _.fb=function(a){return new Qj(this,a)};_.gb=function(a,b){return Nj(this,a,b)};_.hb=function(a){return Oj(this,a)};t(68);function Pj(a,b){this.b=a;this.c=b}m(131,1,{},Pj);_.Q=function(){return this.a<this.c.length};_.R=function(){return x(this.a<this.c.length),new Qj(this.b,this.c[this.a++])};_.a=0;t(131);function Qj(a,b){this.a=a;this.b=b}m(81,213,{24:1},Qj);_.W=function(){return this.b};_.X=function(){return this.a.db(this.b)};_.Y=function(a){return this.a.gb(this.b,a)};t(81); function Mj(){Ij.call(this)}m(128,68,{},Mj);_.cb=function(){return{}};_.$=function(){var a=this.ib(),b;for(b in this.a)if(58==b.charCodeAt(0)){var c=this.fb(b.substring(1));a.F(c)}return a.D()};_.db=function(a){return this.a[":"+a]};_.ib=function(){return new Rj(this)};_.gb=function(a,b){return Nj(this,":"+a,b)};_.hb=function(a){return Oj(this,":"+a)};t(128);function Rj(a){this.a=a;P.call(this)}m(130,10,la,Rj);_.U=function(a){var b;return b=Ih(this,a),Oj(this.a,":"+b.W()),b};t(130); function Lj(){Ij.call(this)}m(129,68,{},Lj);_.eb=function(){var a;a=Object.getOwnPropertyNames(this.a);void 0!==this.a.__proto__&&(a[a.length]="__proto__");return a};t(129);function Sj(a,b){Eh(a,b,a.c.b,a.c);return!0}function Eh(a,b,c,d){var e;e=new Tj;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b}function Dh(a,b){var c,d;Vc(b,a.b);if(b>=a.b>>1)for(d=a.c,c=a.b;c>b;--c)d=d.b;else for(d=a.a.a,c=0;c<b;++c)d=d.a;return new Uj(a,b,d)} function Vj(){this.a=new Tj;this.c=new Tj;this.a.a=this.c;this.c.b=this.a;this.a.b=this.c.a=null;this.b=0}m(77,211,la,Vj);_.F=function(a){return Sj(this,a)};_.J=function(){return this.b};_.b=0;t(77);function Fh(a){var b;if(!a.c)throw new Cf;b=a.c.a;var c=a.d,d=a.c;d.a.b=d.b;d.b.a=d.a;d.a=d.b=null;d.c=null;--c.b;a.b==a.c?a.b=b:--a.a;a.c=null}function Uj(a,b,c){this.d=a;this.b=c;this.a=b}m(113,1,{},Uj);_.Q=function(){return this.b!=this.d.c}; _.R=function(){return x(this.b!=this.d.c),this.c=this.b,this.b=this.b.a,++this.a,this.c.c};_.V=function(){Fh(this)};_.a=0;_.c=null;t(113);function Tj(){}m(64,1,{},Tj);t(64);var Ej=Wb();function Jc(){Zb(this,this.e)}m(53,21,{3:1,14:1,12:1,53:1},Jc);t(53);function rh(a,b){return s(a)===s(b)||null!=a&&wa(a,b)}function sh(a){return null!=a?Ma(a):0}function Wj(a,b){if(0>a||a>=b)throw new Ne;}m(124,210,la);_.S=function(a,b){Wj(a,this.a.b.length+1);mh(this.a,a,b)};_.F=function(a){return O(this.a,a)}; _.G=function(a){return Gh(this.a,a)};_.H=function(a){return-1!=Hh(this.a,a)};_.T=function(a){return Wj(a,this.a.b.length),N(this.a,a)};_.I=function(){return 0==this.a.b.length};_.D=function(){return new M(this.a)};_.U=function(a){return Wj(a,this.a.b.length),this.a.U(a)};_.J=function(){return this.a.b.length};_.K=function(){var a=this.a;return Ge(a.b,a.b.length)};_.L=function(a){return Kh(this.a,a)};_.tS=function(){return Pg(this.a)};t(124); function Xj(a){var b;b=a.a.b.length;if(0<b)return Wj(b-1,a.a.b.length),a.a.U(b-1);throw new Nh;}function Yj(){this.a=new P}m(79,124,la,Yj);t(79);function vh(a,b){var c,d;for(d=a.a;d;){c=Mh(b,d.c);if(0==c)return d;c=0>c?0:1;d=d.a[c]}return null}function Zj(a,b,c,d,e,f,h,l){var p;if(d){(p=d.a[0])&&Zj(a,b,c,p,e,f,h,l);p=d.c;var r,A;c.jb()&&(r=Mh(p,e),0>r||!f&&0==r)||c.kb()&&(A=Mh(p,h),0<A||!l&&0==A)||b.F(d);(d=d.a[1])&&Zj(a,b,c,d,e,f,h,l)}} function ak(a,b,c,d){var e,f;if(b){e=Mh(c.c,b.c);if(0==e)return d.d=qh(b,c.d),d.b=!0,b;e=0>e?0:1;b.a[e]=ak(a,b.a[e],c,d);bk(b.a[e])&&(bk(b.a[1-e])?(b.b=!0,b.a[0].b=!1,b.a[1].b=!1):bk(b.a[e].a[e])?b=ck(b,1-e):bk(b.a[e].a[1-e])&&(b=(f=1-(1-e),b.a[f]=ck(b.a[f],f),ck(b,1-e))))}else return c;return b}function bk(a){return!!a&&a.b}function ck(a,b){var c,d;c=1-b;d=a.a[c];a.a[c]=d.a[b];d.a[b]=a;a.b=!0;d.b=!1;return d}function dk(){this.a=null;Lh()}m(95,216,{3:1,43:1},dk);_.O=function(){return new zh(this)}; _.J=function(){return this.b};_.b=0;t(95);function xh(a){var b=(ek(),fk),c;c=new P;Zj(a,c,b,a.a,null,!1,null,!1);this.a=new jh(c,0)}m(71,1,{},xh);_.Q=function(){return this.a.Q()};_.R=function(){return this.a.R()};t(71);function zh(a){this.a=a}m(97,96,ka,zh);t(97);function gk(a,b){th.call(this,a,b);this.a=G(hk,ea,56,2,0);this.b=!0}m(56,47,{46:1,47:1,24:1,56:1},gk);_.b=!1;var hk=t(56);function ik(){}m(184,1,{},ik); _.tS=function(){return"State: mv\x3d"+this.c+" value\x3d"+this.d+" done\x3d"+this.a+" found\x3d"+this.b};_.a=!1;_.b=!1;_.c=!1;t(184);function ek(){ek=k;fk=new jk("All",0);kk=new lk;mk=new nk;ok=new pk}function jk(a,b){C.call(this,a,b)}m(27,8,ma,jk);_.jb=function(){return!1};_.kb=function(){return!1};var fk,kk,mk,ok,qk=u(27,function(){ek();return D(v(qk,1),ha,27,0,[fk,kk,mk,ok])});function lk(){C.call(this,"Head",1)}m(185,27,ma,lk);_.kb=function(){return!0};u(185,null); function nk(){C.call(this,"Range",2)}m(186,27,ma,nk);_.jb=function(){return!0};_.kb=function(){return!0};u(186,null);function pk(){C.call(this,"Tail",3)}m(187,27,ma,pk);_.jb=function(){return!0};u(187,null);function rk(a){this.a=new dk;Og(this,a)}m(92,209,{3:1,25:1},rk);_.F=function(a){var b=this.a,c=(Oe(),Pe);a=new gk(a,c);c=new ik;b.a=ak(b,b.a,a,c);c.b||++b.b;b.a.b=!1;return null==c.d};_.H=function(a){return!!vh(this.a,a)};_.D=function(){return yh(new Bh(this.a))};_.J=function(){return this.a.b}; t(92); function sk(a){var b;if(!(0<a.a.b)){b=tk(a.f);!b.length||Sj(a.a,b);b=a.a;var c;var d=$doc.title,e=$doc.documentElement,f;c=f="";n==n?f=c=d:e&&(d=e.getElementsByTagName("TITLE"),0<d.length&&(f=c=d[0].textContent));if(""==f)c="";else{S();if(/ [\|\-] /i.test(f))f=c.replace(RegExp("(.*)[\\|\\-] .*","gi"),"$1"),3>uk.Ab(f)&&(f=c.replace(RegExp("[^\\|\\-]*[\\|\\-](.*)","gi"),"$1"));else if(-1!=f.indexOf(": "))f=c.replace(RegExp(".*:(.*)","gi"),"$1"),3>uk.Ab(f)&&(f=c.replace(RegExp("[^:]*[:](.*)","gi"),"$1")); else if(e&&(150<f.length||15>f.length)){f=e.getElementsByTagName("H1");e="";for(d=0;d<f.length&&!e.length;d++)e=f[d].innerText;f=e;!f.length&&(f=c)}f=vk(f);4>=uk.Ab(f)&&(f=c);c=f}Sj(b,c);n==n&&Sj(a.a,$doc.title)}}function wk(a){var b,c;this.b=a;this.a=new Vj;this.e=(b={},b[6]=[],b);this.d=(c={},c);this.c=new P;b=T();this.f=new xk(a,this.e);a=T()-b;if(void 0==a)throw new TypeError;this.e[1]=a;this.g=""}m(100,1,{},wk);t(100);function yk(){}m(101,1,{},yk);t(101); function zk(a){var b,c,d,e,f,h,l,p,r,A,$,Rh,gb,Sh,Lm,Th,fa,Te,Ue,Mm,Nm;A=T();var Om=$doc.documentElement.textContent,Pm,Qm;S();uk=(Pm=RegExp("[\\u3040-\\uA4CF]","g"),Qm=RegExp("[\\uAC00-\\uD7AF]","g"),Pm.test(Om)?new Ak:Qm.test(Om)?new Bk:new Ck);p=(Sh={},Sh[10]=[],Sh);c=new wk($doc.documentElement);var Tm=(sk(c),Ch(c.a,0));if(void 0==Tm)throw new TypeError;p[1]=Tm;var Vh;if(void 0!=a[2]){if(void 0===a[2])throw new TypeError;Vh=a[2]}else Vh=0;Dk=Vh;U("DomDistiller debug level: "+Dk);b=(Lm={},Lm); var Wh;if(Wh=void 0!=a[1]){if(void 0===a[1])throw new TypeError;Wh=a[1]}var Um=Wh,$b,Jd,Xh,Kd,Nc,Vm,hb,Yh,Ld,Wm,Ve;Nc=T();Yh=new yk;Ld=new Ek;Wm=new Fk(Ld);var Zh;var Zm=c.b,Oc;Oc=Zm.getElementsByTagName("ARTICLE");if(1==Oc.length)Zh=Oc[0];else{Oc=Zm.querySelectorAll('[itemscope][itemtype*\x3d"Article"],[itemscope][itemtype*\x3d"Post"]');var We;if(0<Oc.length){var Xe=Oc,Ye,Ze;if(0==Xe.length)We=null;else{Ze=Xe[0];for(Ye=1;Ye<Xe.length;Ye++)Ze=Gk(Ze,Xe[Ye]);We=Ze}}else We=null;Zh=We}$b=(Ve=Zh,!Ve&& (Ve=c.b),Hk(new Ik(Wm),Ve),Yh.a=(Jk(Ld,Ld.d),Ld.b),sk(c),Yh);var an=T()-Nc;if(void 0==an)throw new TypeError;c.e[2]=an;Nc=T();var E;var ya=$b.a,Md,af,ra,ai,Pc;Pc=new P;b:{var Nd;for(Nd=0;Nd<ya.a.b.length;Nd++)if(q(N(ya.a,Nd),33)){ra=Nd;break b}ra=ya.a.b.length}if(ra!=ya.a.b.length){ai=af=N(ya.a,ra).d;Md=new Kk(ya.a,ra);for(++ra;ra<ya.a.b.length;ra++)q(N(ya.a,ra),33)&&(af=N(ya.a,ra).d,af==ai?Lk(Md,new Kk(ya.a,ra)):(Pc.b[Pc.b.length]=Md,ai=af,Md=new Kk(ya.a,ra)));Pc.b[Pc.b.length]=Md}E=new Mk(Pc);var zq= c.a,I;Nk(E,!0,"Start");var Aq=(Ok(),E),ci,ib;for(ib=new M(Aq.a);ib.b<ib.d.J();){ci=(x(ib.b<ib.d.J()),ib.d.T(ib.c=ib.b++));var di;var ei=ci,cf=void 0;14<ei.d?di=!1:(cf=vk(ei.g),di=8<=cf.length?Pk.test(cf):1==ei.c?"Comment"===cf:!1);di&&Q(ci.b,"STRICTLY_NOT_CONTENT")}var fi=new Qk(zq),df,jb,za;if(fi.a)for(jb=new M(E.a);jb.b<jb.d.J();)df=(x(jb.b<jb.d.J()),jb.d.T(jb.c=jb.b++)),za=df.g,za=Cg(za),za=Dg(za,"'"),za=Kg(za).toLowerCase(),R(fi.a,za)&&Q(df.b,"de.l3s.boilerpipe/TITLE"),za=Kg(za.replace(Rk,"")), R(fi.a,za)&&Q(df.b,"de.l3s.boilerpipe/TITLE");var Od,ef,Aa,Pd,Qd,Fa,Ta;Fa=E.a;if(0==Fa.b.length)I=!1;else{ef=!1;for(Aa=0;Aa<Fa.b.length;Aa++)Qd=0==Aa?null:(y(Aa-1,Fa.b.length),Fa.b[Aa-1]),Od=(y(Aa,Fa.b.length),Fa.b[Aa]),Pd=Aa+1==Fa.b.length?null:(y(Aa+1,Fa.b.length),Fa.b[Aa+1]),ef|=(0.333333>=Od.c?!Qd||0.555556>=Qd.c?16>=Od.d?!Pd||15>=Pd.d?!Qd||4>=Qd.d?Ta=!1:Ta=!0:Ta=!0:Ta=!0:40>=Od.d?!Pd||17>=Pd.d?Ta=!1:Ta=!0:Ta=!0:Ta=!1,Sk(Od,Ta));I=ef}Nk(E,I,"Classification Complete");var Bq=(Tk(),Uk),gi,jn,hi, ff,kn,gf,kb;gi=!1;kb=new M(E.a);a:for(;kb.b<kb.d.J();)if(gf=(x(kb.b<kb.d.J()),kb.d.T(kb.c=kb.b++)),gf.a)for(hi=Bq.a,ff=0,kn=hi.length;ff<kn;++ff)if(jn=hi[ff],R(gf.b,jn)){Sk(gf,!1);gi=!0;continue a}I=gi;Nk(E,I,"Ignore Strictly Not Content blocks");var ii=Vk();ii.e=0.5;ii.d=10;I=Wk(Xk(ii),E);Nk(E,I,"SimilarSiblingContentExpansion: Cross headings");var hf=Vk();hf.c=!0;hf.e=0;hf.d=10;I=Wk(Xk(hf),E);Nk(E,I,"SimilarSiblingContentExpansion: Mixed tags");var jf,lb,on,Rd,Ba,ji;ji=E.a;if(2>ji.b.length)I=!1; else{jf=!1;Rd=new jh(ji,0);for(lb=Rd.R();Rd.Q();)if(Ba=lb,lb=Rd.R(),R(Ba.b,"de.l3s.boilerpipe/HEADING")&&!(R(Ba.b,"STRICTLY_NOT_CONTENT")||R(lb.b,"STRICTLY_NOT_CONTENT")||R(Ba.b,"de.l3s.boilerpipe/TITLE")||R(lb.b,"de.l3s.boilerpipe/TITLE")))if(lb.a){jf=!0;on=Ba.a;Lk(Ba,lb);lb=Ba;Rd.V();var pn=Ba;R(pn.b,"de.l3s.boilerpipe/HEADING")&&pn.b.a.c.hb("de.l3s.boilerpipe/HEADING");on||Q(Ba.b,"BOILERPLATE_HEADING_FUSED")}else Ba.a&&(jf=!0,Sk(Ba,!1));I=jf}Nk(E,I,"HeadingFusion");I=Yk((Zk(),$k),E);Nk(E,I,"BlockProximityFusion: Distance 1"); var Cq=(al(),bl),ki,Ua,li,vn;vn=E.a;ki=!1;for(Ua=new M(vn);Ua.b<Ua.d.J();)li=(x(Ua.b<Ua.d.J()),Ua.d.T(Ua.c=Ua.b++)),li.a||null!=Cq.a&&R(li.b,"de.l3s.boilerpipe/TITLE")||(ih(Ua),ki=!0);I=ki;Nk(E,I,"BlockFilter");I=Yk(cl,E);Nk(E,I,"BlockProximityFusion: Same level content-only");var Dq=(dl(),el),mi,mb,Sd,ni,oi,Ga,nb,ob,Qc;Qc=E.a;if(2>Qc.b.length)I=!1;else{ni=-1;mb=null;mi=0;Sd=-1;for(ob=new M(Qc);ob.b<ob.d.J();)Ga=(x(ob.b<ob.d.J()),ob.d.T(ob.c=ob.b++)),Ga.a&&(oi=Ga.d,oi>ni&&(mb=Ga,ni=oi,Sd=mi)),++mi; for(nb=new M(Qc);nb.b<nb.d.J();)Ga=(x(nb.b<nb.d.J()),nb.d.T(nb.c=nb.b++)),Ga==mb?(Sk(Ga,!0),Q(Ga.b,"de.l3s.boilerpipe/VERY_LIKELY_CONTENT")):(Sk(Ga,!1),Q(Ga.b,"de.l3s.boilerpipe/MIGHT_BE_CONTENT"));if(Dq.a&&-1!=Sd){var Eq=Sd,pb,zn,pi,qi;qi=B(fl(N(mb.j,N(mb.i,mb.i.b.length-1).a)));for(pi=new jh(Qc,Eq+1);pi.Q();)pb=pi.R(),zn=B(gl(N(pb.j,N(pb.i,0).a))),B(qi)==B(zn)&&(Sk(pb,!0),Q(pb.b,"SIBLING_OF_MAIN_CONTENT"),qi=B(fl(N(pb.j,N(pb.i,pb.i.b.length-1).a))));var Fq=Sd,qb,An,ri,Rc;ri=B(gl(N(mb.j,N(mb.i,0).a))); for(Rc=new jh(Qc,Fq);0<Rc.b;)qb=(x(0<Rc.b),N(Rc.a,Rc.c=--Rc.b)),An=B(fl(N(qb.j,N(qb.i,qb.i.b.length-1).a))),B(ri)==B(An)&&(Sk(qb,!0),Q(qb.b,"SIBLING_OF_MAIN_CONTENT"),ri=B(gl(N(qb.j,N(qb.i,0).a))))}I=!0}Nk(E,I,"Keep Largest Block");var mf,ac,nf,Sc,rb,sb,Td;nf=0;ac=Td=-1;for(sb=new M(E.a);sb.b<sb.d.J();)Sc=(x(sb.b<sb.d.J()),sb.d.T(sb.c=sb.b++)),-1==ac&&R(Sc.b,"de.l3s.boilerpipe/TITLE")&&(Td=nf,ac=-1),-1==ac&&Sc.a&&(ac=nf),++nf;if(ac<=Td||-1==Td)I=!1;else{mf=!1;for(rb=new M(new lh(E.a,Td,ac));rb.b< rb.d.J();)Sc=(x(rb.b<rb.d.J()),rb.d.T(rb.c=rb.b++)),R(Sc.b,"de.l3s.boilerpipe/MIGHT_BE_CONTENT")&&(mf|=Sk(Sc,!0));I=mf}Nk(E,I,"Expand Title to Content");var si,of,Va,tb,ub;si=!1;of=-1;for(ub=new M(E.a);ub.b<ub.d.J();)if(Va=(x(ub.b<ub.d.J()),ub.d.T(ub.c=ub.b++)),Va.a&&R(Va.b,"de.l3s.boilerpipe/VERY_LIKELY_CONTENT")){of=Va.f;break}if(-1==of)I=!1;else{for(tb=new M(E.a);tb.b<tb.d.J();)Va=(x(tb.b<tb.d.J()),tb.d.T(tb.c=tb.b++)),!Va.a&&100<=Va.d&&Va.f==of&&(Sk(Va,!0),si=!0);I=si}Nk(E,I,"Largest Block Same Tag Level -\x3e Content"); var ti,pf,Wa,vb;ti=!1;pf=aa;for(vb=new M(E.a);vb.b<vb.d.J();)Wa=(x(vb.b<vb.d.J()),vb.d.T(vb.c=vb.b++)),Wa.a&&R(Wa.b,"de.l3s.boilerpipe/VERY_LIKELY_CONTENT")?pf=Wa.f:Wa.f>pf&&R(Wa.b,"de.l3s.boilerpipe/MIGHT_BE_CONTENT")&&R(Wa.b,"de.l3s.boilerpipe/LI")&&0==Wa.c?(Sk(Wa,!0),ti=!0):pf=aa;I=ti;Nk(E,I,"List at end filter");var Gq=c.d,ui,qf,vi,wb;qf=0;for(wb=new M(E.a);wb.b<wb.d.J();)vi=(x(wb.b<wb.d.J()),wb.d.T(wb.c=wb.b++)),vi.a&&(qf+=vi.d);ui=qf;if(void 0==ui)throw new TypeError;Gq[1]=ui;var Hq,xb;for(xb= new M(E.a);xb.b<xb.d.J();){var rf=Hq=(x(xb.b<xb.d.J()),xb.d.T(xb.c=xb.b++)),Bn=void 0,yb=void 0,wi=void 0;if(rf.a)for(yb=new M(rf.i);yb.b<yb.d.J();)Bn=(x(yb.b<yb.d.J()),yb.d.T(yb.c=yb.b++)),wi=N(rf.j,Bn.a),wi.p=!0,R(rf.b,"de.l3s.boilerpipe/TITLE")&&Q(wi.e,"de.l3s.boilerpipe/TITLE")}var sf,zb,tf;tf=!1;for(zb=new M($b.a.a);zb.b<zb.d.J();)sf=(x(zb.b<zb.d.J()),zb.d.T(zb.c=zb.b++)),sf.p?tf=!0:q(sf,33)?tf=!1:tf&&(sf.p=!0);var Iq=$b.a,uf,bc,Ab,Tc;uf=new P;Tc=null;for(Ab=new M(Iq.a);Ab.b<Ab.d.J();)if(bc= (x(Ab.b<Ab.d.J()),Ab.d.T(Ab.c=Ab.b++)),q(bc,48))if(bc.p)break;else O(uf,bc);else!Tc&&q(bc,33)&&bc.p&&(Tc=bc);var Ud,xi,yi,Vd,Cn,vf,Bb,Uc;if(0!=uf.b.length){yi=null;Tc&&(yi=N(Tc.a,Tc.c));Cn=(Uc=new P,O(Uc,new hl),O(Uc,new il),O(Uc,new jl(yi)),O(Uc,new kl),Uc);Ud=null;xi=0;for(Bb=new M(uf);Bb.b<Bb.d.J();){vf=(x(Bb.b<Bb.d.J()),Bb.d.T(Bb.c=Bb.b++));var wf=void 0,Hn=void 0,Cb=void 0,Wd=void 0;if(vf){Wd=0;wf=vf.a;for(Cb=new M(Cn);Cb.b<Cb.d.J();)Hn=(x(Cb.b<Cb.d.J()),Cb.d.T(Cb.c=Cb.b++)),Wd+=Hn.Fb(wf);2> Dk||(wf?U("FINAL SCORE: "+Wd+" : "+z(wf,"src")):U("Null image attempting to be scored!"));Vd=Wd}else Vd=0;26<=Vd&&(!Ud||xi<Vd)&&(Ud=vf,xi=Vd)}Ud&&(Ud.p=!0)}var Jq=$b.a,xf,Db,Ha,Xd,zi,Ai,In,Yd;Ha=!1;zi=-1;Xd=new Yj;for(Db=new M(Jq.a);Db.b<Db.d.J();)xf=(x(Db.b<Db.d.J()),Db.d.T(Db.c=Db.b++)),q(xf,49)?(Yd=xf,Yd.b==(ll(),ml)?(Yd.p=Ha,O(Xd.a,Yd),Ha=!1):(Ai=Xj(Xd),(Ha|=zi>=Xd.a.b.length)&&(zi=Xd.a.b.length-1),In=Ai.p,Ai.p=Ha,Yd.p=Ha,Ha=In)):Ha||(Ha=xf.p);var Kq=$b.a,yf,Eb,Bi;Bi=new P;for(Eb=new M(Kq.a);Eb.b< Eb.d.J();)yf=(x(Eb.b<Eb.d.J()),Eb.d.T(Eb.c=Eb.b++)),q(yf,48)&&yf.p&&O(Bi,yf);for(hb=new M(Bi);hb.b<hb.d.J();)Vm=(x(hb.b<hb.d.J()),hb.d.T(hb.c=hb.b++)),O(c.c,Vm.b);var Jn=T()-Nc;if(void 0==Jn)throw new TypeError;c.e[3]=Jn;Nc=T();var Ci,Fb,Wc;Wc=new Lg;for(Fb=new M($b.a.a);Fb.b<Fb.d.J();)if(Ci=(x(Fb.b<Fb.d.J()),Fb.d.T(Fb.c=Fb.b++)),Ci.p){var Lq=Ci.Db(Um);Wc.a+=Lq;Um&&(Wc.a+="\n")}Xh=Wc.a;var Kn=T()-Nc;if(void 0==Kn)throw new TypeError;c.e[4]=Kn;if(4<=Dk){for(Kd=0;Kd<c.e[6].length;Kd++){var Ln=c.e;if(Kd>= Ln[6].length)throw new RangeError;Jd=Ln[6][Kd];if(void 0===Jd[1])throw new TypeError;var Mq="Timing: "+Jd[1]+" \x3d ";if(void 0===Jd[2])throw new TypeError;U(Mq+Jd[2])}var Mn=c.e;if(void 0===Mn[1])throw new TypeError;var Nq="Timing: MarkupParsingTime \x3d "+Mn[1]+"\nTiming: DocumentConstructionTime \x3d ",Nn=c.e;if(void 0===Nn[2])throw new TypeError;var Oq=Nq+Nn[2]+"\nTiming: ArticleProcessingTime \x3d ",On=c.e;if(void 0===On[3])throw new TypeError;var Pq=Oq+On[3]+"\nTiming: FormattingTime \x3d ", Pn=c.e;if(void 0===Pn[4])throw new TypeError;U(Pq+Pn[4])}if(void 0==Xh)throw new TypeError;b[1]=Xh;if(void 0==b)throw new TypeError;p[2]=b;var Qn=((null==c.g||!c.g.length)&&(c.g="auto"),c.g);if(void 0==Qn)throw new TypeError;p[9]=Qn;for(gb=new M(c.c);gb.b<gb.d.J();){Rh=(x(gb.b<gb.d.J()),gb.d.T(gb.c=gb.b++));var Qq=(Th={},p[10].push(Th),Th);if(void 0==Rh)throw new TypeError;Qq[1]=Rh}var Di;if(void 0!=a[3]){if(void 0===a[3])throw new TypeError;Di=a[3]}else Di=$doc.URL;h=Di;$=c.e;r=T();var Ei;if(void 0!= a[4]){if(void 0===a[4])throw new TypeError;Ei=a[4]}else Ei="next";if("pagenum"===Ei){nl();fa=new ol($);var Fi;var Tn=$doc.documentElement,Gi,Hi,Xc,zf,Af,Un,Bf;Bf=T();fa.b=h.replace(pl,"");fa.d=ql(fa.b);if(fa.d){Hi=rl(sl(Tn,h));Gi=Tn.getElementsByTagName("A");for(Xc=0;Xc<Gi.length;)Af=Gi[Xc],(Un=tl(fa,Af,Hi))?(ul(fa.a),vl(fa,Af,!1,!0,null),wl(fa.a,Un.a),fa.c=0,vl(fa,Af,!1,!1,Hi),Xc+=1+fa.c):++Xc;var $d=fa.a;0!=$d.a.b.length&&0==N($d.a,$d.a.b.length-1).b.b.length&&$d.a.U($d.a.b.length-1);xl(Bf,fa.e, "PageParameterParser");Bf=T();var Rq=fa.a,Xn=fa.b,Zc,cc,Ef,Gb,Ff,Gf;if(Ff=ql(Xn)){Ff.d.username="";Ff.d.password="";cc=new yl;for(Gb=new M(Rq.a);Gb.b<Gb.d.J();)if(Ef=(x(Gb.b<Gb.d.J()),Gb.d.T(Gb.c=Gb.b++)),!(2>Ef.b.b.length)){for(var ua=Ef.b,Sq=0>Ef.a,Mi=Ff,Tq=cc.a?cc.a.d:"",$c=void 0,Yn=void 0,Hb=void 0,$c=0,Hb=new M(ua);Hb.b<Hb.d.J();)Yn=(x(Hb.b<Hb.d.J()),Hb.d.T(Hb.c=Hb.b++)),!Yn.b.length||++$c;if(0==$c)Gf=null;else{if(Sq)for(var dc=ua,ad=void 0,bd=void 0,Zn=void 0,bd=0,ad=dc.b.length-1;bd<ad;++bd, --ad)Zn=(y(bd,dc.b.length),dc.b[bd]),Jh(dc,bd,(y(ad,dc.b.length),dc.b[ad])),Jh(dc,ad,Zn);2==ua.b.length&&1==$c&&1==(y(0,ua.b.length),ua.b[0]).a&&2==(y(1,ua.b.length),ua.b[1]).a&&(zg((y(0,ua.b.length),ua.b[0]).b)?Jh(ua,0,new zl(1,ab(Mi.d))):Jh(ua,1,new zl(2,ab(Mi.d))),++$c);var Hf;if(2<=$c){for(var Ja=ua,$n=Mi,Uq=Tq,ec=void 0,Ni=void 0,cd=void 0,If=void 0,Oi=void 0,Ib=void 0,fc=void 0,dd=void 0,Jb=void 0,ae=void 0,Ka=void 0,Jf=void 0,ao=void 0,Kf=void 0,be=void 0,bo=void 0,Kb=void 0,ce=void 0,ce=0, Kb=new M(Ja);Kb.b<Kb.d.J();)bo=(x(Kb.b<Kb.d.J()),Kb.d.T(Kb.c=Kb.b++)),bo.a==ce+1&&++ce;if(28<=ce&&31>=ce)Hf=null;else{Oi="";ae=new Al;Jf=G(Bl,ea,66,Ja.b.length,0);for(fc=0;fc<Ja.b.length;fc++)if(Jb=(y(fc,Ja.b.length),Ja.b[fc]),Jb.b.length&&(be=ql(Jb.b),Jf[fc]=be)){be.d.username="";be.d.password="";var eo=be,Wq=Jb.a,Xq=fc,Yq=ae,de=void 0,Pi=void 0,ee=void 0,Lf=void 0,gc=eo,Mf=void 0,ed=void 0,Nf=void 0,Of=void 0;if(null==gc.b)if(Of=gc.d.search,Of.length)for(Mf=(S(),Gg(Of.substr(1,Of.length-1),"\\\x26")), gc.b=Je([Mf.length,2]),ed=0;ed<Mf.length;ed++)Nf=Gg(Mf[ed],"\x3d"),gc.b[ed][0]=Nf[0],gc.b[ed][1]=1<Nf.length?Nf[1]:"";else gc.b=Je([0,2]);Lf=gc.b;if(0!=Lf.length)for(de=0;de<Lf.length;de++){Pi=Lf[de];try{ee=new Cl(eo,0==de,Pi[0],Pi[1])}catch(Pf){if(Pf=Cc(Pf),q(Pf,23))ee=null;else throw Dc(Pf);}ee&&Dl(Yq,ee,new El(Wq,ee.a,Xq))}1==Jb.a&&(Oi=Jb.b)}if(0==ae.a.b)for(Ib=0;Ib<Ja.b.length;Ib++)if(Jb=(y(Ib,Ja.b.length),Ja.b[Ib]),Jf[Ib]){var hc=Jf[Ib],Zq=Jb.a,$q=Ib,ar=ae,Ri=void 0,Si=void 0,ho=void 0,Ti=void 0, Ui=void 0,fe=void 0,io=void 0,Ti=(null==hc.c&&(hc.c=Fl(hc.d)),hc.c);if(Ti.length&&Gl(Ti))for(io=ab(hc.d),Ui=hc.d.origin.length,!Hl&&(Hl=RegExp("(\\d+)","gi")),Hl.lastIndex=Ui;;){Ri=Hl.exec(io);if(!Ri)break;Si=Hl.lastIndex;ho=Si-Ri[1].length;try{fe=new Il(hc,Ui,ho,Si)}catch(Rf){if(Rf=Cc(Rf),q(Rf,23))fe=null;else throw Dc(Rf);}fe&&Dl(ar,fe,new El(Zq,fe.a,$q))}}Kf=new yl;for(cd=new eh((new dh(ae.a)).a);fh(cd);){if(cd._gwt_modCount!=cd.c._gwt_modCount)throw new hh;Ni=(x(fh(cd)),cd.a.R());ao=Ni.W();dd= Ni.X();if(!(ao===Uq||100<dd.a.b.length)&&dd.b.zb($n)){e:{var Vi=dd.b,ic=dd.a,Lb=Ja,Wi=Oi,Xa=void 0,Xi=void 0,he=void 0,lo=void 0,Yi=void 0,Mb=void 0,La=void 0,mo=void 0,ie=void 0,Zi=void 0;if(2<=ic.b.length)if(ie=Jl(ic,Lb),ie.a&&ie.b&&Kl(Lb,ie)){lo=Ll(ic);Xa=new P;for(Mb=new M(ic);Mb.b<Mb.d.J();)Yi=(x(Mb.b<Mb.d.J()),Mb.d.T(Mb.c=Mb.b++)),O(Xa,new zl(Yi.a,N(Lb,Yi.c).b));Ka=new Ml((Nl(),Ol),Vi.tS(),Xa,lo,ie.c)}else Ka=null;else{if(1==ic.b.length&&Wi.length&&(La=(y(0,ic.b.length),ic.b[0]),mo=2==La.a&& 1==La.c,Zi=3==La.a&&2==La.c&&2==(y(1,Lb.b.length),Lb.b[1]).a,1==(y(0,Lb.b.length),Lb.b[0]).a&&(mo||Zi)&&Vi.yb(Wi))){he=La.b-La.a;0==he||1==he?Xi=1:(Xi=La.b,he=0);Xa=new P;O(Xa,new zl(1,Wi));O(Xa,new zl(La.a,N(Lb,La.c).b));Ka=new Ml((Nl(),Ol),Vi.tS(),Xa,new Pl(Xi,he),Zi?(y(1,Xa.b.length),Xa.b[1]).b:"");break e}Ka=null}}if(Ka){var ec=(!Ql&&(Ql=/\/$/),$n.d.href.replace(Ql,"")),je;e:{var gd=Ka,cj=ec,er=Ja,hd=void 0,Sf=void 0,Nb=void 0;if(2>gd.a.b.length||1==N(gd.a,0).a||cj.length>=N(gd.a,0).b.length)je= !1;else{for(hd=0;hd<gd.a.b.length;hd++){var dj;(dj=N(gd.a,hd).a!=hd+2)||(dj=N(gd.a,hd).b===cj);if(dj){je=!1;break e}}for(Nb=new M(er);Nb.b<Nb.d.J();)if(Sf=(x(Nb.b<Nb.d.J()),Nb.d.T(Nb.c=Nb.b++)),1==Sf.a&&Sf.b.length&&Sf.b!==cj){je=!1;break e}je=!0}}je?mh(Ka.a,0,new zl(1,ec)):dd.b.yb(ec)&&(If=N(Ka.a,0),2==If.a&&If.b!==ec&&ec.length<If.b.length&&mh(Ka.a,0,new zl(1,ec)));Rl(Kf,new Sl(Ka))}}}Hf=Kf.a?Kf:null}}else Hf=null;Gf=Hf}Gf&&Rl(cc,Gf)}if(cc.a){cc.b&&3<=Dk&&U("Detected multiple page patterns");Zc= cc.a;var ej,fj,Ob;if(!Zc.c.length&&0!=Zc.a.b.length)for(ej=!1,Ob=new M(Zc.a);Ob.b<Ob.d.J();){fj=(x(Ob.b<Ob.d.J()),Ob.d.T(Ob.c=Ob.b++));if(ej){Zc.c=fj.b;break}fj.b===Xn&&(ej=!0)}zf=Zc}else zf=new Tl}else zf=new Tl;xl(Bf,fa.e,"PageParameterDetector");Fi=zf}else Fi=new Tl;l=Fi;e={};f=l.c;if(f.length){if(void 0==f)throw new TypeError;e[1]=f}if(void 0==e)throw new TypeError;p[3]=e;3<=Dk&&U("paging by pagenum: "+Ul(l))}else{3<=Dk&&U("paging by next");Vl();Te={};var qo=$doc.documentElement,kc,gj,hj,ij,jj, Ya,kj,ke,F,Pb,ga,lj,w,Qb,id,Vf,le,mj,jd,kd,ld,Wf,Xf,ro,Za,nj,so,to;3<=Dk&&$g(Wl);Ya=(S(),h.replace(RegExp("\\/[^/]*$","gi"),""));so=h.replace(RegExp("\\/$","gi"),"");kc=qo.getElementsByTagName("A");Xf=new Aj;hj=new Aj;ij=rl(sl(qo,h));var fr=Gg(h,":\\/\\/")[0]+"://",uo,me=h,me=(S(),Gg(me,":\\/\\/"))[1];uo=-1==me.indexOf("/")?me:Gg(me,"\\/")[0];gj=fr+uo+"/";var gr="^"+gj.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$\x26")+".*\\d";ro=RegExp(gr,"i");for(ke=0;ke<kc.length;ke++)if(F=kc[ke],to=z(F,"href"), ij.setAttribute("href",to),ga=ij.href,ro.test(ga))if(nj=(F.offsetWidth||0)|0,kj=(F.offsetHeight||0)|0,0==nj||0==kj)V(F,"ignored: sz\x3d"+nj+"x"+kj);else if(Xl(F))if(ga=ga.replace(Yl,""),V(F,"-\x3e "+ga),H(ga,so)||H(ga,Ya))V(F,"ignored: same as current or folder url "+Ya);else if(Qb=F.innerText,25<Qb.length)V(F,"ignored: link text too long");else if(Zl.test(Qb))V(F,"ignored: one of extra"),Q(hj,ga);else if(lj=ga,ga.substr(0,Ya.length)===Ya&&(lj=Ig(ga,Ya.length)),$l.test(lj)){w=new am(ke,Qb,ga);Q(Xf, w);0!=ga.indexOf(Ya)&&(w.d-=25,V(F,"score\x3d"+w.d+": not part of folder url "+Ya));Pb=Qb+" "+(F.className||"")+" "+F.id;V(F,"txt+class+id\x3d"+Pb);bm.test(Pb)&&(w.d+=50,V(F,"score\x3d"+w.d+": has next"));cm.test(Pb)&&(w.d+=25,V(F,"score\x3d"+w.d+": has pag* word"));dm.test(Pb)&&!bm.test(w.c)&&(w.d-=65,V(F,"score\x3d"+w.d+": has first|last but no next regex"));if(em.test(Pb)||Zl.test(Pb))w.d-=50,V(F,"score\x3d"+w.d+": has neg or extra regex");fm.test(Pb)&&(w.d-=200,V(F,"score\x3d"+w.d+": has opp of next regex")); Vf=Wf=!1;for(kd=B(F);kd&&(!Wf||!Vf);)ld=(kd.className||"")+" "+kd.id,!Wf&&cm.test(ld)&&(w.d+=25,Wf=!0,V(F,"score\x3d"+w.d+": posParent - "+ld)),Vf||!em.test(ld)||gm.test(ld)||(w.d-=25,Vf=!0,V(F,"score\x3d"+w.d+": negParent - "+ld)),kd=B(kd);if(hm.test(ga)||cm.test(ga))w.d+=25,V(F,"score\x3d"+w.d+": has paging info");Zl.test(ga)&&(w.d-=15,V(F,"score\x3d"+w.d+": has extra regex"));10<Qb.length&&(w.d-=Qb.length,V(F,"score\x3d"+w.d+": text too long"));id=im(Qb);0<id&&(1==id?w.d-=10:w.d+=0>10-id?0:10- id,V(F,"score\x3d"+w.d+": linktxt is a num ("+id+")"));for(var lc=h,mc=ga,Co=F,nc=void 0,ag=void 0,bg=void 0,nc=gj.length;nc<Zf(lc.length,mc.length)&&lc.charCodeAt(nc)==mc.charCodeAt(nc);nc++);lc=Jg(lc,nc,lc.length);mc=Jg(mc,nc,mc.length);V(Co,"remains: "+lc+", "+mc);ag=im(mc);bg=im(lc);V(Co,"remains: "+bg+", "+ag);(jj=0<bg&&0<ag?Qf(ag-bg):null)&&1==jj.a&&(w.d+=25,V(F,"score\x3d"+w.d+": diff \x3d "+jj))}else V(F,"ignored: no number beyond folder url "+Ya);else V(F,"ignored: invisible");else V(F,"ignored: not prefix + num"); Za=null;if(0!=Xf.a.b)for(mj=nh(new ph(Xf.a));fh(mj.a);)le=gh(mj.a).W(),R(hj,le.a)||50<=le.d&&(!Za||Za.d<le.d)&&(Za=le);jd=null;if(Za){var hr=Za.a;S();jd=hr.replace(RegExp("\\/$","gi"),"");V(kc[Za.b],"found: score\x3d"+Za.d+", txt\x3d["+Za.c+"], "+jd)}if(3<=Dk){var ne,cg,Sb,oe,dg;U("numLinks\x3d"+kc.length+", found next: "+(null!=jd?jd:"null"));for(ne=0;ne<kc.length;ne++){cg=kc[ne];Sb=cg.innerText;dg=(S(),Gg(Sb,"\\s+"));Sb="";for(oe=0;oe<dg.length;oe++)Sb+=dg[oe],oe<dg.length-1&&(Sb+=" ");U(ne+")"+ cg.href+", txt\x3d["+Sb+"], dbg\x3d["+Xg(Wl,cg)+"]")}}Ue=jd;if(null!=Ue){if(void 0==Ue)throw new TypeError;Te[1]=Ue}if(void 0==Te)throw new TypeError;p[3]=Te}xl(r,$,"Pagination");var ca=c.f,oc,Tb,eg,fg,pc,qc,qj,va,rj,sj,tj;va=(rj={},rj[9]=[],rj);var gg,hg;hg=!1;for(gg=0;gg<ca.a.b.length&&!hg;gg++)hg=N(ca.a,gg).wb();if(!hg){var Do=tk(ca);if(void 0==Do)throw new TypeError;va[1]=Do;var uj,ig,jg;jg="";for(ig=0;ig<ca.a.b.length&&!jg.length;ig++)jg=N(ca.a,ig).ub();uj=jg;if(void 0==uj)throw new TypeError; va[2]=uj;var vj,kg,lg;lg="";for(kg=0;kg<ca.a.b.length&&!lg.length;kg++)lg=N(ca.a,kg).vb();vj=lg;if(void 0==vj)throw new TypeError;va[3]=vj;var wj,mg,ng;mg="";for(ng=0;ng<ca.a.b.length&&!mg.length;ng++)mg=N(ca.a,ng).qb();wj=mg;if(void 0==wj)throw new TypeError;va[4]=wj;var xj,og,pg;pg="";for(og=0;og<ca.a.b.length&&!pg.length;og++)pg=N(ca.a,og).sb();xj=pg;if(void 0==xj)throw new TypeError;va[5]=xj;var yj,qg,rg;qg="";for(rg=0;rg<ca.a.b.length&&!qg.length;rg++)qg=N(ca.a,rg).pb();yj=qg;if(void 0==yj)throw new TypeError; va[6]=yj;var zj,sg,tg;sg="";for(tg=0;tg<ca.a.b.length&&!sg.length;tg++)sg=N(ca.a,tg).ob();zj=sg;if(void 0==zj)throw new TypeError;va[7]=zj;var ug,vg;ug=null;for(vg=0;vg<ca.a.b.length&&!ug;vg++)ug=N(ca.a,vg).nb();if(oc=ug){Tb=(sj={},sj[5]=[],sj);var Eo=oc.d;if(void 0==Eo)throw new TypeError;Tb[1]=Eo;var Fo=oc.c;if(void 0==Fo)throw new TypeError;Tb[2]=Fo;var Go=oc.b;if(void 0==Go)throw new TypeError;Tb[3]=Go;var Ho=oc.e;if(void 0==Ho)throw new TypeError;Tb[4]=Ho;for(fg=0;fg<oc.a.length;fg++)Tb[5].push(oc.a[fg]); if(void 0==Tb)throw new TypeError;va[8]=Tb}var wg,xg;xg=null;for(wg=0;wg<ca.a.b.length&&!(xg=N(ca.a,wg).rb(),0<xg.length);wg++);qj=xg;for(eg=0;eg<qj.length;eg++){pc=qj[eg];qc=(tj={},va[9].push(tj),tj);var Io=pc.e;if(void 0==Io)throw new TypeError;qc[1]=Io;var Jo=pc.c;if(void 0==Jo)throw new TypeError;qc[2]=Jo;var Ko=pc.d;if(void 0==Ko)throw new TypeError;qc[3]=Ko;var Lo=pc.a;if(void 0==Lo)throw new TypeError;qc[4]=Lo;var Mo=pc.f;if(void 0==Mo)throw new TypeError;qc[5]=Mo;var No=pc.b;if(void 0==No)throw new TypeError; qc[6]=No}}if(void 0==va)throw new TypeError;p[5]=va;var Oo=T()-A;if(void 0==Oo)throw new TypeError;$[5]=Oo;if(void 0==$)throw new TypeError;p[6]=$;var Po=c.d;if(void 0==Po)throw new TypeError;p[8]=Po;d=(Mm={},Mm);var Qo=(Nm=jm,jm="",Nm);if(void 0==Qo)throw new TypeError;d[1]=Qo;if(void 0==d)throw new TypeError;p[7]=d;return p}m(204,1,{},function(){});t(204);function Gk(a,b){var c;for(c=a;c&&!c.contains(b);)c=c.parentNode;return c} function km(a){var b;for(b=new P;a;)b.b[b.b.length]=a,a=a.parentNode;return b}function T(){return"undefined"!==typeof distiller_on_ios&&distiller_on_ios||!window.performance?Date.now():window.performance.now()}function lm(a,b){var c;if(null==a)return!1;c=$doc.createElement("a");c.href=a;return yg("."+md(c,"host"),"."+b)}function Xl(a){var b;b=getComputedStyle(a,null);a=parseFloat(b.opacity);return!("none"===b.display||"hidden"===b.visibility||0==a)} function mm(a){var b,c,d;b=a.getElementsByTagName("A");for(c=0;c<b.length;c++)d=b[c],d.href.length&&(d.href=d.href);d=a.getElementsByTagName("VIDEO");for(b=0;b<d.length;b++)c=d[b],c.poster.length&&(c.poster=c.poster);nm(a);b=a.querySelectorAll("IMG[SRCSET]");for(a=0;a<b.length;a++)om(b[a])}function nm(a){a=a.querySelectorAll("img,source,track,video");for(var b in a)a[b].src&&(a[b].src=a[b].src)} function om(a){var b,c,d,e;c=z(a,"srcset");if(""==c)a.removeAttribute("srcset");else{d=a.src;e=(S(),c.split(","));for(c=0;c<e.length;c++)b=vk(e[c]),b.length&&(b=Gg(b," "),a.src=b[0],b[0]=a.src,e[c]=pm(b," "));c=pm(e,", ");a.setAttribute("srcset",c);a.src=d}} function qm(a){var b,c,d,e;if(null==a||!a.length)return new pj;e=new pj;a=Gg(a,"\x26");for(c=0;c<a.length;c++);c=0;for(d=a.length;c<d;++c)if(b=a[c],b=Gg(b,"\x3d"),1<b.length){var f=e,h=b[0];if(null==b[1])throw new $f("encodedURL cannot be null");L(f,h,decodeURI(b[1]))}return e}function rm(a,b,c){var d,e,f;e=0;for(f=c.length;e<f;++e)d=c[e],a.tagName!==d&&"*"!==d||a.removeAttribute(b);d=0;for(e=c.length;d<e;++d);c=pm(c,", ");c=a.querySelectorAll(c);for(a=0;a<c.length;a++)c[a].removeAttribute(b)} function sm(a){var b,c,d;b=a.attributes;for(c=0;c<b.length;)d=b[c].nodeName,"src"===d||"alt"===d||"srcset"===d||"dir"===d||"title"===d?++c:a.removeAttribute(d)}function tm(a){this.a=a}m(103,1,{},tm);_.lb=function(){};_.mb=function(a){switch(a.nodeType){case 3:return O(this.a,a),!1;case 1:if(!Xl(a))return!1;O(this.a,a);return!0;default:return!1}};t(103); function Hk(a,b){var c,d;if(a.a.mb(b)){if(d=b.firstChild)for(;d!=b;){c=!1;if(a.a.mb(d)){if(c=d.firstChild){d=c;continue}c=!0}for(;d!=b;){c&&a.a.lb(d);if(c=d.nextSibling){d=c;break}d=d.parentNode;c=!0}}a.a.lb(b)}}function Ik(a){this.a=a}m(59,1,{},Ik);t(59);function um(a){var b;a.b="";(b=a.j.querySelector(".byline-name"))&&(a.b=b.textContent)}function vm(a){this.j=a;this.a=a.getElementsByTagName("META")}m(121,1,{},vm); _.nb=function(){var a,b;a=new wm;if(null==this.d){var c;this.d="";if(b=this.j.querySelector(".dateline"))this.d=b.textContent;else for(b=0;b<this.a.length;b++)if(c=this.a[b],H(c.name,"displaydate")){this.d=c.content;break}}a.d=this.d;b=(null==this.b&&um(this),this.b);a.a=b.length?D(v(n,1),g,2,4,[b]):G(n,g,2,0,4);return a};_.ob=function(){return null==this.b&&um(this),this.b}; _.pb=function(){if(null==this.c){var a,b;this.c="";for(a=0;a<this.a.length;a++)if(b=this.a[a],H(b.name,"copyright")){this.c=b.content;break}}return this.c};_.qb=function(){return""}; _.rb=function(){if(!this.f){var a,b,c,d,e;this.f=new P;a=this.j.getElementsByTagName("IMG");for(c=0;c<a.length;c++){e=a[c];var f=d=b=void 0,h=void 0;b=void 0;b=B(e);if(H("FIGURE",b.tagName)){if(d=b.getElementsByTagName("FIGCAPTION"),h=d.length,b="",0<h&&2>=h)for(f=0;f<h&&!b.length;f++)b=d[f].innerText}else b="";(d=null!=b&&b.length)||(d=d=void 0,d=e.width,400>d?d=!1:(d/=e.height,d=1.3<=d&&3>=d));d&&(d=new xm,d.e=e.src,d.a=b,d.f=e.width,d.b=e.height,O(this.f,d))}}return Kh(this.f,G(ym,ea,28,this.f.b.length, 0))};_.sb=function(){if(null==this.i){var a,b,c;this.i="";a=this.j.getElementsByTagName("*");for(c=0;c<a.length&&!this.i.length;c++)b=a[c],this.i=z(b,"publisher"),!this.i.length&&(this.i=z(b,"source_organization"))}return this.i};_.tb=function(){if(null==this.k){var a,b;this.k="";if(0!=this.a.length&&(a=this.j.getElementsByTagName("TITLE"),0!=a.length))for(a=0;a<this.a.length;a++)if(b=this.a[a],H(b.name,"title")){this.k=b.content;break}}return this.k};_.ub=function(){return""};_.vb=function(){return""}; _.wb=function(){if(!this.e){var a,b;this.e=!0;for(a=0;a<this.a.length;a++)if(b=this.a[a],H(b.name,"IE_RM_OFF")){this.g=H(b.content,"true");break}}return this.g};_.a=null;_.b=null;_.c=null;_.d=null;_.e=!1;_.f=null;_.g=!1;_.i=null;_.j=null;_.k=null;t(121);function im(a){return parseInt(a,10)|0}function xl(a,b,c){var d;if(b){b=(d={},b[6].push(d),d);if(void 0==c)throw new TypeError;b[1]=c;a=T()-a;if(void 0==a)throw new TypeError;b[2]=a}} function U(a){null==a&&(a="");-1==a.indexOf("[0;")&&-1==a.indexOf("[1;")||(a+="\u001b[0m");zm||null==$wnd.console||"function"!=typeof $wnd.console.log&&"object"!=typeof $wnd.console.log||$wnd.console.log(a);jm+=a+"\n"}var Dk=0,jm="",zm=!1;function tk(a){var b,c;c="";for(b=0;b<a.a.b.length&&!c.length;b++)c=N(a.a,b).tb();return c} function xk(a,b){var c,d;this.b=b;this.a=new P;d=T();var e=this.b;Am();var f,h;try{h=T(),f=new Bm(a,e),xl(h,e,"OpenGraphProtocolParser.parse"),c=f}catch(l){if(l=Cc(l),q(l,14))c=null;else throw Dc(l);}c&&O(this.a,c);xl(d,this.b,"OpenGraphProtocolParser");d=T();O(this.a,new Cm(a,this.b));xl(d,this.b,"SchemaOrgParserAccessor");d=T();O(this.a,new vm(a));xl(d,this.b,"IEReadingViewParser")}m(108,1,{},xk);t(108);function wm(){}m(60,1,{},wm);_.a=null;_.b="";_.c="";_.d="";_.e="";t(60);function xm(){} m(28,1,{28:1},xm);_.a="";_.b=0;_.c="";_.d="";_.e="";_.f=0;var ym=t(28);function ul(a){if(0==a.a.b.length||0!=N(a.a,a.a.b.length-1).b.b.length)O(a.a,new Dm),a.b=null}function wl(a,b){var c,d,e;d=N(a.a,a.a.b.length-1);0==d.b.b.length?(O(d.b,b),a.b=b):(c=b.a-a.b.a,c=0==c?0:0>c?-1:1,c!=d.a?0!=d.a&&(d=(e=new Dm,O(a.a,e),e),0!=c&&O(d.b,a.b)):0==c&&(d.b.b=G(Xb,ea,1,0,3)),O(d.b,b),a.b=b,d.a=c)}function Em(){this.a=new P}m(125,1,{},Em);_.b=null;t(125);function Dm(){this.b=new P}m(80,1,{},Dm);_.a=0;t(80); function Fm(a){this.b=new Gm(a);this.a=new P;this.d=new P}m(191,1,{},Fm);_.lb=function(){this.a.U(this.a.b.length-1);this.d.U(this.d.b.length-1)};_.mb=function(a){if(!this.b.a)return!1;O(this.a,a);O(this.d,null);1==this.d.b.length&&(this.c=new Hm(a),Jh(this.d,0,this.c));if(Im(this.b,a))for(a=0;a<this.a.b.length;a++)if(null==N(this.d,a)){Jh(this.d,a,new Hm(N(this.a,a)));var b=N(this.d,a-1),c=N(this.d,a);Sj(b.a,c)}return!0};t(191); function Jm(a){var b,c;c=a.b.cloneNode(!1);for(a=Dh(a.a,0);a.b!=a.d.c;)b=(x(a.b!=a.d.c),a.c=a.b,a.b=a.b.a,++a.a,a.c.c),b=Jm(b),c.appendChild(b);return c}function Km(a){var b,c;c=a.b.cloneNode(!1);1==a.b.nodeType&&(b=getComputedStyle(a.b,null).direction,!b.length&&(b="auto"),c.setAttribute("dir",b));for(a=Dh(a.a,0);a.b!=a.d.c;)b=(x(a.b!=a.d.c),a.c=a.b,a.b=a.b.a,++a.a,a.c.c),b=Km(b),c.appendChild(b);return c}function Hm(a){this.b=a;this.a=new Vj}m(70,1,{},Hm);t(70); function Am(){Am=k;Rm=RegExp("((\\w+):\\s+(http:\\/\\/ogp.me\\/ns(\\/\\w+)*#))\\s*","gi");Sm=/^xmlns:(\w+)/i;Xm=/^http:\/\/ogp.me\/ns(\/\w+)*#/i}function Ym(a,b,c){null!=c&&c.length?(c=c.substr(1,c.length-1),"profile"===c?Qh(a.c,($m(),bn),b):"article"===c&&Qh(a.c,($m(),cn),b)):Qh(a.c,($m(),dn),b)} function Bm(a,b){var c,d;this.b=new en;this.d=new fn;this.a=new gn;this.e=D(v(hn,1),ea,20,0,[new ln("title",($m(),dn),null),new ln("type",dn,null),new ln("url",dn,null),new ln("description",dn,null),new ln("site_name",dn,null),new ln("image",dn,this.b),new ln("image:",dn,this.b),new ln("first_name",bn,this.d),new ln("last_name",bn,this.d),new ln("section",cn,this.a),new ln("published_time",cn,this.a),new ln("modified_time",cn,this.a),new ln("expiration_time",cn,this.a),new ln("author",cn,this.a)]); this.f=new pj;this.c=new bi(mn);this.g=b;d=T();var e,f,h;c="";H("HTML",a.tagName)&&(c=z(a,"prefix"));c.length||(h=a.getElementsByTagName("HEAD"),1==h.length&&(c=z(h[0],"prefix")));if(c.length)for(Rm.lastIndex=0;;){h=Rm.exec(c);if(!h)break;Ym(this,h[2],h[4])}else for(c=a.attributes,h=0;h<c.length;h++)if(f=c[h],e=f.nodeName.toLowerCase(),e=Sm.exec(e))f=f.nodeValue,(f=Xm.exec(f))&&Ym(this,e[1],f[1]);null==Oh(this.c,($m(),dn))&&Qh(this.c,dn,"og");null==Oh(this.c,bn)&&Qh(this.c,bn,"profile");null==Oh(this.c, cn)&&Qh(this.c,cn,"article");xl(d,this.g,"OpenGraphProtocolParser.findPrefixes");d=T();var l,p;e="";for(h=new Ki((new Ji(this.c)).a);Qi(h.a);)c=(h.b=$i(h.a),new aj(h.c,h.b)),e+='meta[property^\x3d"'+c.b.b[c.a.b]+'"],';e=Jg(e,0,e.length-1);c=a.querySelectorAll(e);for(h=0;h<c.length;h++)for(f=c[h],p=z(f,"property").toLowerCase(),e=0;e<this.e.length;e++)l=Oh(this.c,this.e[e].c)+":",Hg(p,l+this.e[e].a)&&(p=Ig(p,l.length),l=!0,this.e[e].b&&(l=this.e[e].b.xb(p,f.content,this.f)),l&&L(this.f,this.e[e].a, f.content));xl(d,this.g,"OpenGraphProtocolParser.parseMetaTags");d=T();c=this.b;if(0!=c.a.b.length)for(h=c.a.b.length-1;0<=h;h--)e=N(c.a,h)[0],null!=e&&e.length||c.a.U(h);xl(d,this.g,"OpenGraphProtocolParser.imageParser.verify");d=T();c=Oh(this.c,dn)+":";if(!(J(this.f,"title")?K(this.f,"title"):"").length)throw new Yb('Required "'+c+'title" property is missing.');if(!(J(this.f,"type")?K(this.f,"type"):"").length)throw new Yb('Required "'+c+'type" property is missing.');if(!(J(this.f,"url")?K(this.f, "url"):"").length)throw new Yb('Required "'+c+'url" property is missing.');if(0==nn(this.b).length)throw new Yb('Required "'+c+'image" property is missing.');xl(d,this.g,"OpenGraphProtocolParser.checkRequired")}m(116,1,{},Bm); _.nb=function(){var a;a=new wm;a.d=J(this.f,"published_time")?K(this.f,"published_time"):"";a.c=J(this.f,"modified_time")?K(this.f,"modified_time"):"";a.b=J(this.f,"expiration_time")?K(this.f,"expiration_time"):"";a.e=J(this.f,"section")?K(this.f,"section"):"";var b;b=this.a;b=Kh(b.a,G(n,g,2,b.a.b.length,4));a.a=b;return a.e.length||a.d.length||a.c.length||a.b.length||0!=a.a.length?a:null}; _.ob=function(){var a;var b=this.f;this.d.b?(a=b.c.db("first_name"),null==a&&(a=""),b=b.c.db("last_name"),null!=b&&a.length&&b.length&&(a+=" "),a+=b):a="";return a};_.pb=function(){return""};_.qb=function(){return J(this.f,"description")?K(this.f,"description"):""};_.rb=function(){return nn(this.b)};_.sb=function(){return J(this.f,"site_name")?K(this.f,"site_name"):""};_.tb=function(){return J(this.f,"title")?K(this.f,"title"):""}; _.ub=function(){var a;a=J(this.f,"type")?K(this.f,"type"):"";return H(a,"article")?"Article":""};_.vb=function(){return J(this.f,"url")?K(this.f,"url"):""};_.wb=function(){return!1};var Sm,Xm,Rm;t(116);function gn(){this.b=!1;this.a=new P}m(119,1,{},gn);_.xb=function(a,b,c){this.b||(c=c.c.db("type"),this.b=null!=c&&H(c,"article"));return this.b?"author"===a?(O(this.a,b),!1):!0:!1};_.b=!1;t(119); function nn(a){var b,c,d,e;e=G(ym,ea,28,a.a.b.length,0);for(b=0;b<a.a.b.length;b++)c=N(a.a,b),d=new xm,e[b]=d,d.e=null!=c[1]&&c[1].length?c[1]:c[0],null!=c[2]&&(d.c=c[2]),null!=c[3]&&(d.d=c[3]),null!=c[4]&&(d.f=im(c[4])),null!=c[5]&&(d.b=im(c[5]));return e}function en(){this.b=D(v(n,1),g,2,4,"image image:url image:secure_url image:type image:width image:height".split(" "));this.a=new P}m(117,1,{},en); _.xb=function(a,b){var c,d;if("image"===a)d=G(n,g,2,this.b.length,4),d[0]=b,O(this.a,d);else for(0==this.a.b.length?(d=G(n,g,2,this.b.length,4),O(this.a,d)):d=N(this.a,this.a.b.length-1),c=1;c<this.b.length;c++)if(a===this.b[c]){d[c]=b;break}return!1};t(117);function $m(){$m=k;dn=new qn("OG",0);bn=new qn("PROFILE",1);cn=new qn("ARTICLE",2)}function qn(a,b){C.call(this,a,b)}m(41,8,{3:1,11:1,8:1,41:1},qn);var cn,dn,bn,mn=u(41,function(){$m();return D(v(mn,1),ha,41,0,[dn,bn,cn])}); function fn(){this.b=this.a=!1}m(118,1,{},fn);_.xb=function(a,b,c){this.a||(a=c.c.db("type"),this.b=null!=a&&H(a,"profile"),this.a=!0);return this.b};_.a=!1;_.b=!1;t(118);function ln(a,b,c){this.a=a;this.c=b;this.b=c}m(20,1,{20:1},ln);_.a=null;_.b=null;var hn=t(20);function Im(a,b){if(b!=a.a)return!1;a.a=a.b.Q()?a.b.R():null;return!0}function Gm(a){this.b=a.D();a.I()||(this.a=this.b.R())}m(94,1,{},Gm);t(94);function El(a,b,c){this.a=a;this.b=b;this.c=c}m(93,1,{},El);_.a=0;_.b=0;_.c=0;t(93); function Ul(a){var b,c,d;d="Type: "+a.e+"\nPageInfo: "+a.a.b.length;d+="\npattern: "+a.d;for(c=new M(a.a);c.b<c.d.J();)b=(x(c.b<c.d.J()),c.d.T(c.c=c.b++)),d+="\n "+("pg"+b.a+": "+b.b);return d+="\nformula: "+(a.b?rn(a.b):"null")+"\nnextPagingUrl: "+a.c}function Tl(){this.e=(Nl(),sn);this.a=new P}function Ml(a,b,c,d,e){this.e=(Nl(),sn);this.e=a;this.d=b;this.a=c;this.b=d;this.c=e} function Ll(a){var b,c,d,e;if(2>a.b.length)return null;c=(y(0,a.b.length),a.b[0]);b=(y(1,a.b.length),a.b[1]);if(d=2==a.b.length)d=c.a,e=b.a,d=4<(d>e?d:e);if(d)return null;d=b.a-c.a;if(0==d)return null;b=~~((b.b-c.b)/d);if(0==b)return null;c=c.b-b*c.a;if(0!=c&&c!=-b)return null;for(d=2;d<a.b.length;d++)if(e=(y(d,a.b.length),a.b[d]),e.b!=b*e.a+c)return null;return new Pl(b,c)} function Jl(a,b){var c,d,e,f,h,l,p,r;r=new tn;f=c=e=-1;p=new Aj;for(l=new M(a);l.b<l.d.J();){h=(x(l.b<l.d.J()),l.d.T(l.c=l.b++));d=h.c;if(-1==c)e=d;else if(d!=c+1){if(d<=c||d!=c+2||-1!=f)return r;f=d-1}if(!Q(p,Qf(h.b)))return r;c=d}r.a=!0;if(-1!=f){if(0>=f||f>=b.b.length-1)return r;c=(y(f,b.b.length),b.b[f]).a;(y(f-1,b.b.length),b.b[f-1]).a==c-1&&(y(f+1,b.b.length),b.b[f+1]).a==c+1&&(r.b=!0,r.c=(y(f+1,b.b.length),b.b[f+1]).b);return r}if((0==e||1==e)&&1==(y(0,b.b.length),b.b[0]).a&&2==(y(1,b.b.length), b.b[1]).a||2==e&&3==(y(2,b.b.length),b.b[2]).a&&zg((y(1,b.b.length),b.b[1]).b)&&!zg((y(0,b.b.length),b.b[0]).b))return r.b=!0,r;f=b.b.length;if((c==f-1||c==f-2)&&(y(f-2,b.b.length),b.b[f-2]).a+1==(y(f-1,b.b.length),b.b[f-1]).a)return r.b=!0,r;for(e+=1;e<c;e++)if((y(e-1,b.b.length),b.b[e-1]).a+2==(y(e+1,b.b.length),b.b[e+1]).a){r.b=!0;break}return r} function Kl(a,b){var c,d,e,f;if(1>=a.b.length)return!1;c=(y(0,a.b.length),a.b[0]);if(1!=c.a&&!c.b.length)return!1;d=!1;for(f=new M(a);f.b<f.d.J();)if(e=(x(f.b<f.d.J()),f.d.T(f.c=f.b++)),e.b.length)d&&!b.c.length&&(b.c=e.b);else{if(d)return!1;d=!0}if(2==a.b.length)return c.a+1==(y(1,a.b.length),a.b[1]).a;for(d=1;d<a.b.length;d++)if(c=(y(d,a.b.length),a.b[d]),e=(y(d-1,a.b.length),a.b[d-1]),1!=c.a-e.a&&(1!=d&&d!=a.b.length-1||!c.b.length||!e.b.length))return!1;return!0}m(38,1,{},Tl,Ml);_.tS=function(){return Ul(this)}; _.b=null;_.c="";_.d="";t(38);function rn(a){return"coefficient\x3d"+a.a+", delta\x3d"+a.b}function Pl(a,b){this.a=a;this.b=b}m(74,1,{},Pl);_.tS=function(){return rn(this)};_.a=0;_.b=0;t(74);function zl(a,b){this.a=a;this.b=b}m(26,1,{},zl);_.tS=function(){return"pg"+this.a+": "+this.b};_.a=0;t(26);function tn(){}m(102,1,{},tn);_.a=!1;_.b=!1;_.c="";t(102);function Nl(){Nl=k;sn=new un("UNSET",0);Ol=new un("PAGE_NUMBER",1);wn=new un("UNKNOWN",2)}function un(a,b){C.call(this,a,b)} m(39,8,{3:1,11:1,8:1,39:1},un);var Ol,wn,sn,xn=u(39,function(){Nl();return D(v(xn,1),ha,39,0,[sn,Ol,wn])}); function yn(){W||(W=new Aj,Q(W,"baixar-gratis"),Q(W,"category"),Q(W,"content"),Q(W,"day"),Q(W,"date"),Q(W,"definition"),Q(W,"etiket"),Q(W,"film-seyret"),Q(W,"key"),Q(W,"keys"),Q(W,"keyword"),Q(W,"label"),Q(W,"news"),Q(W,"q"),Q(W,"query"),Q(W,"rating"),Q(W,"s"),Q(W,"search"),Q(W,"seasons"),Q(W,"search_keyword"),Q(W,"search_query"),Q(W,"sortby"),Q(W,"subscriptions"),Q(W,"tag"),Q(W,"tags"),Q(W,"video"),Q(W,"videos"),Q(W,"w"),Q(W,"wiki"))}var W=null,Hl=null; function Rl(a,b){var c;if(a.a){c=a.a;var d=b.a;c=c.b&&!d.b?1:!c.b&&d.b?-1:c.e==d.e?0:c.e==(Nl(),Ol)?1:d.e==Ol?-1:0;-1==c?(a.a=b.a,a.b=b.b):0==c&&(a.b=!0)}else a.a=b.a,a.b=b.b}function yl(){}function Sl(a){this.a=a}m(67,1,{},yl,Sl);_.a=null;_.b=!1;t(67);function Dl(a,b,c){var d;d=b.tS();J(a.a,d)?O(K(a.a,d).a,c):L(a.a,d,new Dn(b,c))}function Al(){this.a=new pj}m(126,1,{},Al);t(126);function Dn(a,b){this.b=a;this.a=new P;O(this.a,b)}m(127,1,{},Dn);t(127);function nl(){nl=k;pl=/\/$/} function vl(a,b,c,d,e){var f;f=c?b:d?b.previousSibling:b.nextSibling;if(!f)return f=b.parentNode,!En&&(En=/(BODY)|(HTML)/),En.test(f.nodeName)?!1:vl(a,f,!1,d,e);c=!1;switch(f.nodeType){case 3:b=f.nodeValue;if(!b.length||(S(),0==uk.Ab(b)))break;b=f.nodeValue;var h,l,p;if(Gl(b)){Fn?Fn.lastIndex=0:Fn=RegExp("(\\S*[\\w\u00c0-\u1fff\u2c00-\ud7ff]\\S*)","gi");!Gn&&(Gn=/^[\W_]*(\d+)[\W_]*$/i);for(h=!1;;){l=Fn.exec(b);if(!l)break;1>=l.length||(l=l[1],p=Gn.exec(l),l=-1,p&&1<p.length&&(l=Rn(p[1])),0<=l&&100>= l?(wl(a.a,new zl(l,"")),h=!0):ul(a.a))}b=h}else ul(a.a),b=!1;if(d||!b)return!1;break;case 1:if(b=f,H("A",b.tagName)){if(d)return!1;++a.c;(b=tl(a,b,e))?(wl(a.a,b.a),b=!0):(ul(a.a),b=!1);if(!b)return!1;break}default:if(!f.hasChildNodes())break;c=!0;d?f=f.lastChild:f=f.firstChild}return vl(a,f,c,d,e)} function tl(a,b,c){var d,e,f,h;if(!Xl(b))return null;h=vk(b.innerText);h=Dg(h,"[()\\[\\]{}]");h=Kg(h);h=Rn(h);if(!(0<=h&&100>=h))return null;d=z(b,"href");d.length?(c.setAttribute("href",d),f=c.href):f="";d=!f.length;e=!1;c=null;if(!d){e="javascript:"===f.substr(0,11);c=ql(f);if(!c||!e&&!H(c.d.host,a.d.d.host))return null;c.d.hash=""}if(!(a=d||e)){b=getComputedStyle(b,null);b=b.cursor.toUpperCase();nd();a=(Ee(),Fe);Lc(b);a=a[":"+b];b=D(v(Xb,1),ea,1,3,[b]);if(!a)throw new lf(Yc(b));a=a==(nd(),se)}return a? new Sn(h,""):new Sn(h,ab(c.d).replace(pl,""))}function ol(a){this.a=new Em;this.e=a}m(106,1,{},ol);_.b="";_.c=0;_.d=null;var pl,En=null,Gn=null,Fn=null;t(106);function Sn(a,b){this.a=new zl(a,b)}m(76,1,{},Sn);t(76); function Vl(){Vl=k;bm=RegExp("(next|weiter|continue|\x3e([^\\|]|$)|\u00bb([^\\|]|$))","i");fm=RegExp("(prev|early|old|new|\x3c|\u00ab)","i");gm=/article|body|content|entry|hentry|main|page|pagination|post|text|blog|story/i;em=RegExp("combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|shoutbox|sidebar|sponsor|shopping|tags|tool|widget","i");Zl=RegExp("print|archive|comment|discuss|e[\\-]?mail|share|reply|all|login|sign|single|as one|article|post|\u7bc7","i"); cm=/pag(e|ing|inat)/i;hm=/p(a|g|ag)?(e|ing|ination)?(=|\/)[0-9]{1,2}$/i;dm=/(first|last)/i;Yl=/\/?(#.*)?$/;$l=/\d/;Wl=new pj}function V(a,b){var c;3>Dk||(c="",Vg(Wl,a)&&(c=Xg(Wl,a)),!c.length||(c+="; "),Yg(Wl,a,c+b))}function rl(a){Vl();var b,c;c=$doc.implementation.createHTMLDocument();b=c.createElement("base");b.href=a;(c.head||c.getElementsByTagName("head")[0]).appendChild(b);a=c.createElement("a");c.body.appendChild(a);return a} function sl(a,b){Vl();var c,d;d=a.getElementsByTagName("BASE");if(0==d.length)return b;c=rl(b);d=z(d[0],"href");c.setAttribute("href",d);return c.href}var Zl,dm,Yl,hm,em,bm,$l,cm,gm,fm,Wl;function am(a,b,c){this.b=a;this.d=0;this.c=b;this.a=c}m(107,1,{},am);_.b=-1;_.d=0;t(107);function Vn(a){var b;null==a.a&&(b=(null==a.c&&(a.c=Fl(a.d)),a.c),b.length?a.a=(S(),Gg(b,"\\/")):a.a=G(n,g,2,0,4));return a.a}function Wn(a){this.d=a} function ql(a){var b;try{b=new URL(a)}catch(c){b=null}return b?new Wn(b):null}m(66,1,{66:1},Wn);_.tS=function(){return ab(this.d)};_.a=null;_.b=null;var Ql=_.c=null,Bl=t(66);function Fl(a){a=a.pathname.replace(/;.*$/,"");a=a.replace(/^\//,"");return a.replace(/\/$/,"")}function co(a){var b,c;if(2>a.b)return!1;c=Vn(a.g);if(4!=c[a.b].length)return!1;b=Rn(c[a.b-1]);return 0<b&&12>=b&&(a=Rn(c[a.b-2]),1970<a&&3E3>a)?!0:!1} function fo(a,b){var c,d,e,f;f=b.length;e=f-a.f.length;if(!Hg(b,a.e))return!1;c=a.c;for(d=Zf(a.d,e);c<d&&b.charCodeAt(c)==a.i.charCodeAt(c);c++);if(c==e){if(d=c+1==a.d)d=a.i.charCodeAt(c),128>d?(e=(bf(),kf)[d],!e&&(e=kf[d]=new Se(d)),d=e):d=new Se(d),d=/[-_;,]/.test(d);if(d||c+a.f.length==f)return!0}else if(c==a.d&&0<=Rn(b.substr(c,e-c)))return!0;return!1} function Il(a,b,c,d){var e;a=ab(a.d);a:{if(47==a.charCodeAt(c-1)&&b<c-1&&(e=a.substr(d,a.length-d).toLowerCase(),!go&&(go=/(.s?html?)?$/i),go.test(e)&&(!jo&&(jo=/([^/]*)\/$/i),b=a.substr(b+1,c-(b+1)),(b=jo.exec(b))&&1<b.length&&(yn(),R(W,b[1].toLowerCase()))))){b=!0;break a}b=!1}if(b)throw new lf("Bad last numeric path component");e=a.substr(c,d-c);b=Rn(e);if(0>b)throw new lf("Value in path component is an invalid number: "+e);d=a.substr(0,c)+"[*!]"+a.substr(d,a.length-d);this.g=ql(d);if(!this.g)throw new lf("Invalid URL: "+ d);this.i=d;this.a=b;this.d=c;this.c=Ag(this.i,47,this.d);c=Vn(this.g);for(this.b=0;this.b<c.length&&-1==c[this.b].indexOf("[*!]");this.b++);this.e=Jg(this.i,0,this.c);d=this.i.length;c=d-this.d-4;0!=c&&(this.f=Ig(this.i,d-c))}m(183,1,{},Il); _.yb=function(a){if(this.f.length&&!yg(a,this.f))a=!1;else if(47==this.i.charCodeAt(this.d-1))a:{var b,c,d,e;e=a.length;c=this.f.length;d=a.length-c;b=Ag(this.g.d.pathname,47,this.c-1-this.g.d.origin.length);if(-1!=b&&(b+=this.g.d.origin.length,b+c==e)){a=Bg(a,0,this.i,0,b);break a}Hg(a,this.e)?(b=this.c+c,a=b==e?!0:b>e||47!=a.charCodeAt(this.c)?!1:0<=Rn(Jg(a,this.c+1,d))):a=!1}else a=fo(this,a);return a}; _.zb=function(a){var b,c;b=Vn(a).length;c=Vn(this.g).length;if(b>c)return!1;if(1==b&&1==c){c=Vn(a)[0];a=Vn(this.g)[0];var d;if(c.length&&a.length)for(d=Zf(c.length,a.length),b=0;b<d&&c.charCodeAt(b)==a.charCodeAt(b);b++);else b=0;d=b;var e,f,h;e=0;f=c.length-1;for(h=a.length-1;f>d&&h>d&&c.charCodeAt(f)==a.charCodeAt(h);--f,--h,e++);return 2*(e+b)>=c.length}a:{e=Vn(a);d=Vn(this.g);b=!1;for(c=a=0;a<e.length&&c<d.length;++a,c++)if(a==this.b&&!b)b=!0,e.length<d.length&&--a;else if(!H(e[a],d[c])){a=!1; break a}a=!0}return!a||co(this)?!1:!0};_.tS=function(){return this.i};_.a=0;_.b=-1;_.c=0;_.d=0;_.f="";var go=null,jo=null;t(183); function Cl(a,b,c,d){var e;if(!c.length)throw new lf("Empty query name");if(!d.length)throw new lf("Empty query value");if(!ko(d))throw new lf("Query value has non-digits: "+d);yn();if(R(W,c.toLowerCase()))throw new lf("Query name is bad page param name: "+c);e=Rn(d);if(0>e)throw new lf("Query value is an invalid number: "+d);b=(b?"?":"\x26")+c+"\x3d";a=a.d.href.replace(b+d,b+"[*!]");this.i=ql(a);if(!this.i)throw new lf("Invalid URL: "+a);this.j=a;this.a=e;this.c=a.indexOf("[*!]");this.e=Ag(this.j, 63,this.c-1);this.b=Ag(this.j,38,this.c-1);-1==this.b&&(this.b=this.e);!no&&(no=/\/$/);this.d=Jg(this.j,0,this.b).replace(no,"");e=this.j.length;this.g=e-this.c-4;0!=this.g&&(this.f=Ig(this.j,e-this.g+1))}m(182,1,{},Cl); _.yb=function(a){var b,c;if(0!=this.g&&!yg(a,this.f))return!1;c=a.length-this.g;if(!Hg(a,this.d))return!1;if(this.b==c||c==this.b-1&&47==this.j.charCodeAt(c))return!0;b=Jg(a,this.b,c).toLowerCase();!oo&&(oo=/^\/|(.html?)$/i);return oo.test(b)?!0:Bg(a,this.b,this.j,this.b,this.c-this.b)?0<=Rn(Jg(a,this.c,c)):!1};_.zb=function(a){a=(null==a.c&&(a.c=Fl(a.d)),a.c);var b=this.i;null==b.c&&(b.c=Fl(b.d));return H(a,b.c)};_.tS=function(){return this.j};_.a=0;_.b=0;_.c=0;_.e=0;_.f="";_.g=0; var no=null,oo=null;t(182); function po(){po=k;vo=new pj;L(vo,"http://schema.org/ImageObject",(wo(),xo));L(vo,"http://schema.org/Article",yo);L(vo,"http://schema.org/BlogPosting",yo);L(vo,"http://schema.org/NewsArticle",yo);L(vo,"http://schema.org/ScholarlyArticle",yo);L(vo,"http://schema.org/TechArticle",yo);L(vo,"http://schema.org/Person",zo);L(vo,"http://schema.org/Organization",Ao);L(vo,"http://schema.org/Corporation",Ao);L(vo,"http://schema.org/EducationalOrganization",Ao);L(vo,"http://schema.org/GovernmentOrganization",Ao); L(vo,"http://schema.org/NGO",Ao);Bo=new pj;L(Bo,"IMG","SRC");L(Bo,"AUDIO","SRC");L(Bo,"EMBED","SRC");L(Bo,"IFRAME","SRC");L(Bo,"SOURCE","SRC");L(Bo,"TRACK","SRC");L(Bo,"VIDEO","SRC");L(Bo,"A","HREF");L(Bo,"LINK","HREF");L(Bo,"AREA","HREF");L(Bo,"META","CONTENT");L(Bo,"TIME","DATETIME");L(Bo,"OBJECT","DATA");L(Bo,"DATA","VALUE");L(Bo,"METER","VALUE")}function Ro(a){var b,c,d;b=new P;for(c=0;c<a.c.b.length;c++)d=N(a.c,c),d.c==(wo(),yo)&&O(b,d);return b} function So(a,b,c){var d,e,f,h,l;e=null;d=b.hasAttribute("ITEMSCOPE")&&b.hasAttribute("ITEMTYPE");if(c){var p;f=z(b,"ITEMPROP");f.length?(p=(S(),Gg(f,"\\s+")),f=0<p.length?p:D(v(n,1),g,2,4,[f])):f=G(n,g,2,0,4)}else f=G(n,g,2,0,4);if(d){a:{var r;switch((r=z(b,"ITEMTYPE"),J(vo,r)?K(vo,r):(wo(),To)).b){case 0:e=new Uo;break;case 1:e=new Vo;break;case 2:e=new Wo;break;case 3:e=new Xo;break;case 4:e=new Yo;break;default:e=null;break a}}!e||e.c==(wo(),To)||c&&c.c==(wo(),To)&&0!=f.length||(O(a.c,e),Yg(a.b, b,e))}if(0<f.length&&c.c!=(wo(),To)&&(!e||e.c!=(wo(),To)))for(a=0;a<f.length;a++)e?J(c.a,f[a])&&L(c.a,f[a],e):(d=c,r=f[a],p=(h="",l=b.tagName,J(Bo,l)&&(h=z(b,K(Bo,l))),!h.length&&(h=b.textContent),h),J(d.b,r)&&!K(d.b,r).length&&L(d.b,r,p))} function Zo(a,b){po();var c;this.c=new P;this.b=new pj;this.d=b;c=T();var d,e,f,h,l;d=a.querySelectorAll("[ITEMPROP],[ITEMSCOPE]");So(this,a,null);for(f=0;f<d.length;f++){for(var p=e=d[f],r=void 0,A=void 0,A=null,r=e;r;){r=B(r);if(!r)break;if(r.hasAttribute("ITEMSCOPE")&&r.hasAttribute("ITEMTYPE")){Vg(this.b,r)&&(A=Xg(this.b,r));break}}So(this,p,A)}d=a.querySelectorAll("A[rel\x3dauthor],LINK[rel\x3dauthor]");for(f=0;f<d.length;f++)e=d[f],!this.a.length&&(this.a=(h="",l=e.tagName,(H(l,"A")||H(l,"LINK"))&& H(z(e,"REL"),"author")&&(h=e.textContent),h));xl(c,this.d,"SchemaOrgParser.parse")}function $o(a,b){po();var c;c=a;a.length&&b.length&&(c+=" ");return c+b}m(132,1,{},Zo);_.a="";var Bo,vo;t(132);function ap(a,b){return J(a.b,b)?K(a.b,b):""}function bp(a){this.c=a;this.b=new pj;this.a=new pj;L(this.b,"name","");L(this.b,"url","");L(this.b,"description","");L(this.b,"image","")}m(42,1,{});t(42); function cp(a,b){var c,d,e,f;c=J(a.b,b)?K(a.b,b):"";if(c.length)return c;(d=J(a.a,b)?K(a.a,b):null)&&(d.c==(wo(),zo)?c=(e=J(d.b,"name")?K(d.b,"name"):"",e.length?e:$o(J(d.b,"givenName")?K(d.b,"givenName"):"",J(d.b,"familyName")?K(d.b,"familyName"):"")):d.c==Ao&&(c=(f=J(d.b,"name")?K(d.b,"name"):"",f.length?f:J(d.b,"legalName")?K(d.b,"legalName"):"")));return c} function Vo(){bp.call(this,(wo(),yo));L(this.b,"headline","");L(this.b,"publisher","");L(this.b,"copyrightHolder","");L(this.b,"copyrightYear","");L(this.b,"dateModified","");L(this.b,"datePublished","");L(this.b,"author","");L(this.b,"creator","");L(this.b,"articleSection","");Yg(this.a,"publisher",null);Yg(this.a,"copyrightHolder",null);Yg(this.a,"author",null);Yg(this.a,"creator",null);Yg(this.a,"associatedMedia",null);Yg(this.a,"encoding",null)}m(134,42,{},Vo);t(134); function Uo(){bp.call(this,(wo(),xo));L(this.b,"contentUrl","");L(this.b,"encodingFormat","");L(this.b,"caption","");L(this.b,"representativeOfPage","");L(this.b,"width","");L(this.b,"height","")}m(133,42,{},Uo);t(133);function Xo(){bp.call(this,(wo(),Ao));L(this.b,"legalName","")}m(136,42,{},Xo);t(136);function Wo(){bp.call(this,(wo(),zo));L(this.b,"familyName","");L(this.b,"givenName","")}m(135,42,{},Wo);t(135); function wo(){wo=k;xo=new dp("IMAGE",0);yo=new dp("ARTICLE",1);zo=new dp("PERSON",2);Ao=new dp("ORGANIZATION",3);To=new dp("UNSUPPORTED",4)}function dp(a,b){C.call(this,a,b)}m(31,8,{3:1,11:1,8:1,31:1},dp);var yo,xo,Ao,zo,To,ep=u(31,function(){wo();return D(v(ep,1),ha,31,0,[xo,yo,zo,Ao,To])});function Yo(){bp.call(this,(wo(),To))}m(137,42,{},Yo);t(137);function Cm(a,b){this.a=new Zo(a,b)}m(120,1,{},Cm); _.nb=function(){var a;a=Ro(this.a);if(0==a.b.length)a=null;else{a=(y(0,a.b.length),a.b[0]);var b,c;b=new wm;b.d=J(a.b,"datePublished")?K(a.b,"datePublished"):"";b.c=J(a.b,"dateModified")?K(a.b,"dateModified"):"";b.e=J(a.b,"articleSection")?K(a.b,"articleSection"):"";c=cp(a,"author");!c.length&&(c=cp(a,"creator"));b.a=c.length?D(v(n,1),g,2,4,[c]):G(n,g,2,0,4);a=b}return a}; _.ob=function(){var a,b;b="";a=Ro(this.a);0!=a.b.length&&(a=(y(0,a.b.length),a.b[0]),b=cp(a,"author"),!b.length&&(b=cp(a,"creator")));return b.length?b:this.a.a};_.pb=function(){var a;a=Ro(this.a);0==a.b.length?a="":(a=(y(0,a.b.length),a.b[0]),a=$o(J(a.b,"copyrightYear")?K(a.b,"copyrightYear"):"",cp(a,"copyrightHolder")),a=a.length?"Copyright "+a:a);return a};_.qb=function(){var a;a=Ro(this.a);return 0==a.b.length?"":ap((y(0,a.b.length),a.b[0]),"description")}; _.rb=function(){var a,b,c,d,e,f,h,l;h=new P;b=Ro(this.a);c=null;for(d=0;d<b.b.length;d++){a=(y(d,b.b.length),b.b[d]);if(!c&&(c=(e=J(a.a,"associatedMedia")?K(a.a,"associatedMedia"):null,!e&&(e=J(a.a,"encoding")?K(a.a,"encoding"):null),e&&e.c==(wo(),xo)?e:null)))continue;var p=f=void 0,p=J(a.b,"image")?K(a.b,"image"):"";p.length?(f=new xm,f.e=p,a=f):a=null;a&&(h.b[h.b.length]=a)}d=this.a;b=new P;for(a=0;a<d.c.b.length;a++)e=N(d.c,a),e.c==(wo(),xo)&&O(b,e);d=!1;for(e=0;e<b.b.length;e++)f=(y(e,b.b.length), b.b[e]),a=(l=new xm,l.e=J(f.b,"contentUrl")?K(f.b,"contentUrl"):"",!l.e.length&&(l.e=J(f.b,"url")?K(f.b,"url"):""),l.d=J(f.b,"encodingFormat")?K(f.b,"encodingFormat"):"",l.a=J(f.b,"caption")?K(f.b,"caption"):"",l.f=im(J(f.b,"width")?K(f.b,"width"):""),l.b=im(J(f.b,"height")?K(f.b,"height"):""),l),f==c||!d&&H(J(f.b,"representativeOfPage")?K(f.b,"representativeOfPage"):"","true")?(d=!0,Vc(0,h.b.length),h.b.splice(0,0,a)):h.b[h.b.length]=a;return Kh(h,G(ym,ea,28,h.b.length,0))}; _.sb=function(){var a,b;b="";a=Ro(this.a);0!=a.b.length&&(a=(y(0,a.b.length),a.b[0]),b=cp(a,"publisher"),!b.length&&(b=cp(a,"copyrightHolder")));return b};_.tb=function(){var a,b,c;c="";a=Ro(this.a);for(b=0;b<a.b.length&&!c.length;b++)c=ap((y(b,a.b.length),a.b[b]),"headline");for(b=0;b<a.b.length&&!c.length;b++)c=ap((y(b,a.b.length),a.b[b]),"name");return c};_.ub=function(){return 0==Ro(this.a).b.length?"":"Article"}; _.vb=function(){var a;a=Ro(this.a);return 0==a.b.length?"":ap((y(0,a.b.length),a.b[0]),"url")};_.wb=function(){return!1};t(120);function S(){S=k;uk=new Ak}function Gl(a){S();return/\d/.test(a)}function ko(a){S();return/^\d+$/.test(a)}function fp(a){S();return!/\S/.test(a)}function pm(a,b){S();return a.join(b)}function vk(a){S();return a.trim()}function Rn(a){S();return a.length&&ko(a)?im(a):-1}var uk;function Ck(){}m(105,1,{},Ck); _.Ab=function(a){return(a=a.match(/(\S*[\w\u00C0-\u1FFF]\S*)/g))?a.length:0};t(105);function Ak(){}m(75,1,{},Ak);_.Ab=function(a){var b=a.match(/(\S*[\w\u00C0-\u1FFF\uAC00-\uD7AF]\S*)/g),c=b?b.length:0,b=a.match(/([\u3040-\uA4CF])/g);return c+=Math.ceil(0.55*(b?b.length:0))};t(75);function Bk(){}m(104,1,{},Bk);_.Ab=function(a){return(a=a.match(/(\S*[\w\u00C0-\u1FFF\uAC00-\uD7AF]\S*)/g))?a.length:0};t(104); function gp(){gp=k;hp=new pj;L(hp,"COLGROUP",(Oe(),Pe));L(hp,"COL",Pe);L(hp,"TH",Re);ip=new pj;L(ip,"EMBED",Pe);L(ip,"OBJECT",Pe);L(ip,"APPLET",Pe);L(ip,"IFRAME",Pe);jp=new Aj;Q(jp,"grid");Q(jp,"treegrid");kp=new Aj;Q(kp,"gridcell");Q(kp,"columnheader");Q(kp,"row");Q(kp,"rowgroup");Q(kp,"rowheader");lp=new Aj;Q(lp,"application");Q(lp,"banner");Q(lp,"complementary");Q(lp,"contentinfo");Q(lp,"form");Q(lp,"main");Q(lp,"navigation");Q(lp,"search")} function mp(a,b){var c,d,e;for(d=new M(a);d.b<d.d.J();)if(c=(x(d.b<d.d.J()),d.d.T(d.c=d.b++)),e=c.tagName,null==e?Wg(b.a,null):void 0!==b.c.db(e))return!(null==e?Tg(Wg(b.a,null)):b.c.db(e)).a||np(c);return!1}function np(a){a=a.innerText;return!!a.length&&!fp(a)}function X(a,b,c){2<=Dk&&U(a+b+" -\x3e "+c);return c} function op(a){gp();var b,c,d,e,f,h,l,p;pp();for(f=B(a);f;){if(H("INPUT",f.tagName)||H(z(f,"contenteditable"),"true"))return X(qp,"",(Y(),rp));f=B(f)}f=z(a,"role").toLowerCase();if("presentation"===f)return X(sp,"_"+f,(Y(),rp));if(R(jp,f)||R(lp,f))return X(sp,"_"+f,(Y(),tp));f=new P;h=a.getElementsByTagName("*");if(0<a.getElementsByTagName("TABLE").length)for(e=0;e<h.length;e++)for(c=h[e],d=B(c);d;){if(H("TABLE",d.tagName)){d==a&&(f.b[f.b.length]=c);break}d=B(d)}else for(e=0;e<h.length;e++)O(f,h[e]); for(h=new M(f);h.b<h.d.J();)if(b=(x(h.b<h.d.J()),h.d.T(h.c=h.b++)),c=z(b,"role").toLowerCase(),R(kp,c)||R(lp,c))return X(up,"_"+c,(Y(),tp));if("0"===z(a,"datatable"))return X(vp,"",(Y(),rp));if(0<a.getElementsByTagName("TABLE").length)return X(wp,"",(Y(),rp));h=a.rows;if(1>=h.length)return X(xp,"",(Y(),rp));c=null;for(d=b=0;d<h.length;d++)e=h[d].cells,e.length>b&&(b=e.length,c=e);d=c;if(!d||1>=d.length)return X(yp,"",(Y(),rp));if((c=a.caption)&&np(c)||a.tHead||a.tFoot||mp(f,hp))return X(zp,"",(Y(), tp));c=new P;for(e=new M(f);e.b<e.d.J();)b=(x(e.b<e.d.J()),e.d.T(e.c=e.b++)),H("TD",b.tagName)&&(c.b[c.b.length]=b);for(e=new M(c);e.b<e.d.J();){b=(x(e.b<e.d.J()),e.d.T(e.c=e.b++));if(b.hasAttribute("abbr")||b.hasAttribute("headers")||b.hasAttribute("scope"))return X(Ap,"",(Y(),tp));b=b.getElementsByTagName("*");if(1==b.length&&H("ABBR",b[0].tagName))return X(Bp,"",(Y(),tp))}e=a.ownerDocument.documentElement;b=(e.offsetWidth||0)|0;if(0<b&&((a.offsetWidth||0)|0)>0.95*b){p=!1;b=e.getElementsByTagName("META"); for(l=0;l<b.length&&!p;l++)p=b[l],p=H(p.name,"viewport");if(!p)return X(Cp,"",(Y(),rp))}if(a.hasAttribute("summary"))return X(Dp,"",(Y(),tp));if(5<=d.length)return X(Ep,"",(Y(),tp));for(d=new M(c);d.b<d.d.J();)if(b=(x(d.b<d.d.J()),d.d.T(d.c=d.b++)),b=getComputedStyle(b,null).borderStyle,b.length&&"none"!==b&&"hidden"!==b)return X(Fp,"_"+b,(Y(),tp));l=null;for(b=0;b<h.length;b++)if(d=getComputedStyle(h[b],null).backgroundColor,null==l)l=d;else if(!H(l,d))return X(Gp,"",(Y(),tp));if(20<=h.length)return X(Hp, "",(Y(),tp));if(10>=c.b.length)return X(Ip,"",(Y(),rp));if(mp(f,ip))return X(Jp,"",(Y(),rp));f=(e.offsetHeight||0)|0;return 0<f&&((a.offsetHeight||0)|0)>0.9*f?X(Kp,"",(Y(),rp)):X(Lp,"",(Y(),tp))}var lp,kp,jp,hp,ip; function pp(){pp=k;qp=new Z("INSIDE_EDITABLE_AREA",0);sp=new Z("ROLE_TABLE",1);up=new Z("ROLE_DESCENDANT",2);vp=new Z("DATATABLE_0",3);zp=new Z("CAPTION_THEAD_TFOOT_COLGROUP_COL_TH",4);Ap=new Z("ABBR_HEADERS_SCOPE",5);Bp=new Z("ONLY_HAS_ABBR",6);Cp=new Z("MORE_95_PERCENT_DOC_WIDTH",7);Dp=new Z("SUMMARY",8);wp=new Z("NESTED_TABLE",9);xp=new Z("LESS_EQ_1_ROW",10);yp=new Z("LESS_EQ_1_COL",11);Ep=new Z("MORE_EQ_5_COLS",12);Fp=new Z("CELLS_HAVE_BORDER",13);Gp=new Z("DIFFERENTLY_COLORED_ROWS",14);Hp=new Z("MORE_EQ_20_ROWS", 15);Ip=new Z("LESS_EQ_10_CELLS",16);Jp=new Z("EMBED_OBJECT_APPLET_IFRAME",17);Kp=new Z("MORE_90_PERCENT_DOC_HEIGHT",18);Lp=new Z("DEFAULT",19);Mp=new Z("UNKNOWN",20)}function Z(a,b){C.call(this,a,b)}m(16,8,{3:1,11:1,8:1,16:1},Z);var Ap,zp,Fp,vp,Lp,Gp,Jp,qp,Ip,yp,xp,Kp,Cp,Hp,Ep,wp,Bp,up,sp,Dp,Mp,Np=u(16,function(){pp();return D(v(Np,1),ha,16,0,[qp,sp,up,vp,zp,Ap,Bp,Cp,Dp,wp,xp,yp,Ep,Fp,Gp,Hp,Ip,Jp,Kp,Lp,Mp])});function Y(){Y=k;tp=new Op("DATA",0);rp=new Op("LAYOUT",1)} function Op(a,b){C.call(this,a,b)}m(54,8,{3:1,11:1,8:1,54:1},Op);var tp,rp,Pp=u(54,function(){Y();return D(v(Pp,1),ha,54,0,[tp,rp])});function Qp(a,b){var c;c=Rp(b);a.appendChild(c);return c}function Rp(a){var b;b=a.cloneNode(!1);1==a.nodeType&&(a=getComputedStyle(a,null).direction,!a.length&&(a="auto"),b.setAttribute("dir",a));return b}function Sp(a,b){var c;c=a.parentNode;c||(c=Rp(b),c.appendChild(a));return c}function Tp(a){return gl(N(a.j,N(a.i,0).a))}function Up(a,b){return R(a.b,b)} function Lk(a,b){a.g+="\n";a.g+=b.g;a.d+=b.d;a.e+=b.e;a.c=0==a.d?0:a.e/a.d;a.a|=b.a;Gh(a.i,b.i);a.b.G(b.b);a.f=Zf(a.f,b.f)}function Sk(a,b){if(b==a.a)return!1;a.a=b;return!0}function Vp(a){var b;b="["+(N(a.j,N(a.i,0).a).j+"-"+N(a.j,N(a.i,a.i.b.length-1).a).j+";");b+="tl\x3d"+a.f+";";b+="nw\x3d"+a.d+";";b+="ld\x3d"+a.c+";";b=b+"]\t"+((a.a?"\u001b[0;32mCONTENT":"\u001b[0;35mboilerplate")+"\u001b[0m,");b+="\u001b[1;30m"+Pg(new rk(a.b))+"\u001b[0m";return b+="\n"+a.g} function Kk(a,b){var c,d;this.j=a;this.i=new P;O(this.i,Qf(b));c=N(this.j,b);this.b=(d=c.e,c.e=new Aj,d);this.d=c.i;this.e=c.g;this.f=c.n;this.g=c.o;this.c=0==this.d?0:this.e/this.d}m(69,1,{},Kk);_.tS=function(){return Vp(this)};_.a=!1;_.c=0;_.d=0;_.e=0;_.f=0;t(69);function Mk(a){this.a=a}m(78,1,{},Mk);t(78);function Wp(){Wp=k;Xp=new Aj;Q(Xp,"IMG")}function Yp(){Wp()}m(138,1,{},Yp);_.Bb=function(a){var b;R(Xp,a.tagName)?(b="","IMG"===a.tagName&&(b=a.src),a=new Zp(a,b)):a=null;return a};_.Cb=function(){return Xp}; var Xp;t(138);function $p(){$p=k;aq=new Aj;Q(aq,"BLOCKQUOTE");Q(aq,"IFRAME")}function bq(a){var b;if(-1==(a.className||"").indexOf("twitter-tweet"))return null;b=a.getElementsByTagName("a");if(0==b.length)return null;b=b[b.length-1];if(!lm(b.href,"twitter.com"))return null;a:{var c;c=Gg(md(b,"pathname"),"/");for(b=c.length-1;0<=b;b--)if(0<c[b].length){b=c[b];break a}b=null}return null==b?null:new cq(a,"twitter",b,null)} function dq(a){var b;if("IFRAME"!==a.tagName||a.src.length)return null;b=a.contentWindow.document;if(!b)return null;b=b.getElementsByTagName("blockquote");if(1>b.length)return null;b=z(b[0],"data-tweet-id");return b.length?new cq(a,"twitter",b,null):null}function eq(){$p()}m(139,1,{},eq);_.Bb=function(a){var b;a&&R(aq,a.tagName)?(b=null,"BLOCKQUOTE"===a.tagName?b=bq(a):"IFRAME"===a.tagName&&(b=dq(a)),b&&2<=Dk&&(U("Twitter embed extracted:"),U(" ID: "+b.b)),a=b):a=null;return a};_.Cb=function(){return aq}; var aq;t(139);function fq(){fq=k;gq=new Aj;Q(gq,"IFRAME")}function hq(a){var b,c;if(!a||!R(gq,a.tagName))return null;c=a.src;if(!lm(c,"player.vimeo.com"))return null;b=$doc.createElement("a");b.href=c;c=md(b,"pathname");b=qm(Ig(md(b,"search"),1));a:{var d;d=Gg(c,"/");for(c=d.length-1;0<=c&&"video"!==d[c];c--)if(0<d[c].length){c=d[c];break a}c=null}if(null==c)return null;2<=Dk&&(U("Vimeo embed extracted:"),U(" ID: "+c));return new cq(a,"vimeo",c,b)}function iq(){fq()}m(140,1,{},iq);_.Bb=function(a){return hq(a)}; _.Cb=function(){return gq};var gq;t(140);function jq(){jq=k;kq=new Aj;Q(kq,"IFRAME")}function lq(a){var b,c;if(!a||!R(kq,a.tagName))return null;c=a.src;if(!lm(c,"youtube.com"))return null;b=$doc.createElement("a");b.href=c;c=md(b,"pathname");b=qm(Ig(md(b,"search"),1));a:{var d;d=Gg(c,"/");for(c=d.length-1;0<=c&&"embed"!==d[c];c--)if(0<d[c].length){c=d[c];break a}c=null}if(null==c)return null;2<=Dk&&(U("YouTube embed extracted:"),U(" ID: "+c));return new cq(a,"youtube",c,b)} function mq(){jq()}m(141,1,{},mq);_.Bb=function(a){return lq(a)};_.Cb=function(){return kq};var kq;t(141);function Nk(a,b,c){if(!(1>Dk))if(b){U("\u001b[0;34m\x3c\x3c\x3c\x3c\x3c "+c+" \x3e\x3e\x3e\x3e\x3e");if(!(1>Dk)){b="";for(c=new M(a.a);c.b<c.d.J();)a=(x(c.b<c.d.J()),c.d.T(c.c=c.b++)),b+=Vp(a)+"\n";U(b)}U("\u001b[0;34m\x3c\x3c\x3c\x3c\x3c \x3e\x3e\x3e\x3e\x3e")}else U("\u001b[0;31m~~~~~ No Changes: "+c+" ~~~~~")} function Ok(){Ok=k;Pk=RegExp("(^(comments|\u00a9 reuters|please rate this|post a comment|\\d+\\s+(comments|users responded in))|what you think\\.\\.\\.|add your comment|add comment|reader views|have your say|reader comments|r\u00e4tta artikeln|^thanks for your comments - this feedback is now closed$)","i")}var Pk;function Zk(){Zk=k;$k=new nq(!1);cl=new nq(!0)} function Yk(a,b){var c,d,e,f,h;c=b.a;if(2>c.b.length)return!1;d=!1;h=(y(0,c.b.length),c.b[0]);for(f=new jh(c,1);f.b<f.d.J();)c=(x(f.b<f.d.J()),f.d.T(f.c=f.b++)),c.a&&h.a?(e=N(c.j,N(c.i,0).a).j-N(h.j,N(h.i,h.i.b.length-1).a).j-1,1>=e?(e=!0,a.a?h.f!=c.f&&(e=!1):R(c.b,"BOILERPLATE_HEADING_FUSED")&&(e=!1),R(h.b,"STRICTLY_NOT_CONTENT")!=R(c.b,"STRICTLY_NOT_CONTENT")&&(e=!1),R(h.b,"de.l3s.boilerpipe/TITLE")!=R(c.b,"de.l3s.boilerpipe/TITLE")&&(e=!1),!h.a&&R(h.b,"de.l3s.boilerpipe/LI")&&!R(c.b,"de.l3s.boilerpipe/LI")&& (e=!1),e?(Lk(h,c),ih(f),d=!0):h=c):h=c):h=c;return d}function nq(a){this.a=a}m(83,1,{},nq);_.tS=function(){return cb(oq),oq.n+": postFiltering\x3d"+this.a};_.a=!1;var cl,$k,oq=t(83);function pq(){pq=k;Rk=RegExp("[\\?\\!\\.\\-\\:]+","g")}function qq(a,b,c){var d,e;e=Gg(b,c);if(1!=e.length)for(b=0;b<e.length;b++)d=e[b],-1==d.indexOf(".com")&&(c=(S(),uk.Ab(d)),4<=c&&Q(a,d))} function rq(a,b){var c,d,e,f,h,l;l=Gg(a,b);if(1==l.length)return null;d=0;e="";for(c=0;c<l.length;c++)if(h=l[c],-1==h.indexOf(".com")&&(f=(S(),uk.Ab(h)),f>d||h.length>e.length))d=f,e=h;return 0==e.length?null:Kg(e)} function Qk(a){pq();var b;if(a)for(this.a=new Aj,a=Dh(a,0);a.b!=a.d.c;){b=(x(a.b!=a.d.c),a.c=a.b,a.b=a.b.a,++a.a,a.c.c);var c=void 0;b=Cg(b);b=Dg(b,"'");b=Kg(b).toLowerCase();0!=b.length&&Q(this.a,b)&&(c=rq(b,"[ ]*[\\|\u00bb|-][ ]*"),null!=c&&Q(this.a,c),c=rq(b,"[ ]*[\\|\u00bb|:][ ]*"),null!=c&&Q(this.a,c),c=rq(b,"[ ]*[\\|\u00bb|:\\(\\)][ ]*"),null!=c&&Q(this.a,c),c=rq(b,"[ ]*[\\|\u00bb|:\\(\\)\\-][ ]*"),null!=c&&Q(this.a,c),c=rq(b,"[ ]*[\\|\u00bb|,|:\\(\\)\\-][ ]*"),null!=c&&Q(this.a,c),c=rq(b,"[ ]*[\\|\u00bb|,|:\\(\\)\\-\u00a0][ ]*"), null!=c&&Q(this.a,c),qq(this.a,b,"[ ]+[\\|][ ]+"),qq(this.a,b,"[ ]+[\\-][ ]+"),Q(this.a,Fg(b," - [^\\-]+$")),Q(this.a,Fg(b,"^[^\\-]+ - ")))}else this.a=null}m(142,1,{},Qk);var Rk;t(142);function dl(){dl=k;el=new sq(!0)}function sq(a){this.a=a}m(85,1,{},sq);_.a=!1;var el;t(85);function tq(a,b,c){b=N(a.d,b);c=N(a.d,c);return a.c||(b.nodeType!=c.nodeType?0:1!=b.nodeType||b.nodeName===c.nodeName)?b.parentNode==c.parentNode:!1} function Wk(a,b){var c,d,e,f,h,l,p,r,A,$;a.g=b.a;if(2>a.g.b.length)return!1;d=a.g;e=$doc.documentElement;l=new P;for(f=0;f<d.b.length;++f){h=f+1==d.b.length?e:Tp((y(f+1,d.b.length),d.b[f+1]));0==f?p=e:(p=(y(f-1,d.b.length),d.b[f-1]),p=fl(N(p.j,N(p.i,p.i.b.length-1).a)));A=p;p=Tp((y(f,d.b.length),d.b[f]));for(r=p.parentNode;!r.contains(A)&&!r.contains(h);)p=r,r=r.parentNode;l.b[l.b.length]=p}a.d=l;l=G(uq,{3:1},0,a.g.b.length,7);r=p=0;d=G(uq,{3:1},0,a.g.b.length,7);f=e=0;h=!1;for(A=0;A<a.g.b.length;A++)if(!a.b&& Up(N(a.g,A),"de.l3s.boilerpipe/TITLE")||!a.a&&Up(N(a.g,A),"de.l3s.boilerpipe/HEADING"))p=r,e=f;else if(N(a.g,A).a&&!Up(N(a.g,A),"STRICTLY_NOT_CONTENT")&&!Up(N(a.g,A),"de.l3s.boilerpipe/TITLE"))for(l[r++]=A,$=e;$<f;$++)c=d[$],A-c>a.e?$==e&&++e:tq(a,A,c)&&(h=!0,Sk(N(a.g,c),!0),d[$]=d[e++]);else if(N(a.g,A).c<=a.f&&!N(a.g,A).a&&!Up(N(a.g,A),"STRICTLY_NOT_CONTENT")&&!Up(N(a.g,A),"de.l3s.boilerpipe/TITLE")){for($=p;$<r;$++)if(c=l[$],A-c>a.e)$==p&&++p;else if(tq(a,A,c)){h=!0;Sk(N(a.g,A),!0);l[$]=l[p++]; break}$==r?d[f++]=A:l[r++]=A}return h}function vq(a,b,c,d,e){this.b=a;this.a=b;this.c=c;this.f=d;this.e=e}m(144,1,{},vq);_.a=!1;_.b=!1;_.c=!1;_.e=0;_.f=0;t(144);function Vk(){var a=new wq;a.a=!0;return a}function Xk(a){return new vq(a.b,a.a,a.c,a.e,a.d)}function wq(){this.c=this.a=this.b=!1;this.d=this.e=0}m(82,1,{},wq);_.a=!1;_.b=!1;_.c=!1;_.d=0;_.e=0;t(82);function al(){al=k;bl=new xq("de.l3s.boilerpipe/TITLE")}function xq(a){this.a=a}m(84,1,{},xq);var bl;t(84); function Tk(){Tk=k;Uk=new yq(D(v(n,1),g,2,4,["STRICTLY_NOT_CONTENT"]))}function yq(a){this.a=a}m(143,1,{},yq);var Uk;t(143); function Vq(a,b){var c,d;c=Xl(b);2>Dk||(d=getComputedStyle(b,null),U((c?"KEEP ":"SKIP ")+b.tagName+": id\x3d"+b.id+", dsp\x3d"+d.display+", vis\x3d"+d.visibility+", opaq\x3d"+d.opacity));if(!c)return Q(a.d,b),!1;if(R(a.b,b.tagName))for(d=new M(a.c);d.b<d.d.J();)if(c=(x(d.b<d.d.J()),d.d.T(d.c=d.b++)),c=c.Bb(b))return d=a.a,Jk(d,d.d),O(d.b.a,c),!1;br(b.tagName)&&(c=a.a,d=new cr(b.tagName,(ll(),ml)),Jk(c,c.d),O(c.b.a,d));switch(b.tagName){case "BR":return c=a.a,c.c&&(Jk(c,c.d),++c.d,c.c=!1),c=c.g,c.j+= "\n",O(c.a,b),!1;case "TABLE":c=op(b);2>Dk||(d=B(b),U("TABLE: "+c+", id\x3d"+b.id+", class\x3d"+(b.className||"")+", parent\x3d["+d.tagName+", id\x3d"+d.id+", class\x3d"+(d.className||"")+"]"));if(c==(Y(),tp))return c=a.a,Jk(c,c.d),O(c.b.a,new dr(b)),!1;break;case "VIDEO":return c=a.a,d=new ir(b),Jk(c,c.d),O(c.b.a,d),!1;case "OPTION":case "OBJECT":case "EMBED":case "APPLET":return a.a.c=!0,!1;case "HEAD":case "STYLE":case "SCRIPT":case "LINK":case "NOSCRIPT":return!1}c=a.a;jr();var e,f,h,l;l=getComputedStyle(b, null);d=new kr;switch(l.display){case "inline":break;case "inline-block":case "inline-flex":d.a=!0;break;default:d.b=!0,d.a=!0}l=b.tagName;if("HTML"!==l&&"BODY"!==l)switch(f=z(b,"class"),e=b.classList.length,h=z(b,"id"),(lr.test(f)||lr.test(h))&&5>=e&&(e=d.d,e[e.length]="STRICTLY_NOT_CONTENT"),l){case "ASIDE":case "NAV":l=d.d;l[l.length]="STRICTLY_NOT_CONTENT";break;case "LI":l=d.d;l[l.length]="de.l3s.boilerpipe/LI";break;case "H1":l=d.d;l[l.length]="de.l3s.boilerpipe/H1";l=d.d;l[l.length]="de.l3s.boilerpipe/HEADING"; break;case "H2":l=d.d;l[l.length]="de.l3s.boilerpipe/H2";l=d.d;l[l.length]="de.l3s.boilerpipe/HEADING";break;case "H3":l=d.d;l[l.length]="de.l3s.boilerpipe/H3";l=d.d;l[l.length]="de.l3s.boilerpipe/HEADING";break;case "A":d.a=!0,b.hasAttribute("href")&&(d.c=!0)}O(c.a.a,d);d.a&&++c.f;d.c&&(l=c.g,l.e=!0,l.j+=" ");c.c|=d.b;return!0} function Fk(a){var b;this.d=new Aj;this.a=a;this.c=new P;O(this.c,new Yp);O(this.c,new eq);O(this.c,new iq);O(this.c,new mq);this.b=new Aj;for(b=new M(this.c);b.b<b.d.J();)a=(x(b.b<b.d.J()),b.d.T(b.c=b.b++)),Og(this.b,a.Cb())}m(123,1,{},Fk); _.lb=function(a){if(1==a.nodeType&&br(a.tagName)){var b=this.a;a=new cr(a.tagName,(ll(),mr));Jk(b,b.d);O(b.b.a,a)}b=this.a;a=b.a;var c;c=a.a.b.length;if(0<c)a=(Wj(c-1,a.a.b.length),N(a.a,c-1));else throw new Nh;a.a&&--b.f;if(b.c||a.b)Jk(b,b.d),++b.d;a.c&&(a=b.g,a.e=!1,a.j+=" ");Xj(b.a)}; _.mb=function(a){switch(a.nodeType){case 3:var b=this.a;b.c&&(Jk(b,b.d),++b.d,b.c=!1);var c=b.g,b=b.f,d;d=a.data;d.length&&(c.j+=d,O(c.a,a),fp(d)||(a=(S(),uk.Ab(d)),c.i+=a,c.e&&(c.g+=a),c.f=c.a.b.length-1,c.d<c.c&&(c.d=c.f),-1==c.b&&(c.b=b)));return!1;case 1:return Vq(this,a);default:return!1}};t(123);function jr(){jr=k;lr=/\bcomments?\b/}function kr(){this.d=[]}m(177,1,{},kr);_.a=!1;_.b=!1;_.c=!1;var lr;t(177);function nr(){this.a=new P}m(114,1,{},nr);t(114); function Jk(a,b){var c;c=a.g;var d=a.e;c.c==c.a.b.length?c=null:c.d<c.c?(or(c),c=null):(d=new pr(c.j,c.a,c.c,c.a.b.length,c.d,c.f,c.i,c.g,c.b,d),or(c),c=d);if(c){c.d=b;++a.e;var e,f;for(e=new M(a.a.a);e.b<e.d.J();)for(d=(x(e.b<e.d.J()),e.d.T(e.c=e.b++)),f=0;f<d.d.length;f++)Q(c.e,d.d[f]);O(a.b.a,c)}}function Ek(){this.b=new nr;this.a=new Yj;this.g=new qr;this.d=0}m(122,1,{},Ek);_.c=!1;_.d=0;_.e=0;_.f=0;t(122);m(212,1,{});_.p=!1;t(212); function cq(a,b,c,d){this.a=new P;this.b=c;O(this.a,a);this.c=b;!d&&new pj}m(55,212,{},cq);_.Db=function(a){var b;if(a)return"";a=$doc.createElement("div");b=$doc.createElement("div");b.className="embed-placeholder";b.setAttribute("data-type",this.c);b.setAttribute("data-id",this.b);a.appendChild(b);return a.innerHTML};t(55);function Zp(a,b){this.a=a;this.b=b;null==this.b&&(this.b="")}m(48,212,{48:1},Zp); _.Db=function(a){var b;if(a)return"";b=this.a.cloneNode(!1);b.src=b.src;om(b);sm(b);a=$doc.createElement("div");a.appendChild(b);return a.innerHTML};t(48);function dr(a){this.a=a}m(181,212,{},dr); _.Db=function(a){var b=this.a,c;b=(c=new P,Hk(new Ik(new tm(c)),b),c);if(0==b.b.length)a="";else{c=new Fm(b);var d=(y(0,b.b.length),b.b[0]),e;for(e=d.parentNode;e&&9!=e.nodeType;d=e,e=e.parentNode);Hk(new Ik(c),d);c=c.c;for(b=(y(0,b.b.length),b.b[0]);1==c.a.b&&c.b!=b&&3!=Ch(c.a,0).b.nodeType;)c=Ch(c.a,0);b=Km(c);if(1!=b.nodeType)a="";else{rm(b,"ID",D(v(n,1),g,2,4,["*"]));mm(b);rm(b,"COLOR",D(v(n,1),g,2,4,["FONT"]));rm(b,"BGCOLOR",D(v(n,1),g,2,4,["TABLE","TR","TD","TH"]));rm(b,"STYLE",D(v(n,1),g,2, 4,["*"]));d=b.querySelectorAll("IMG");for(c=0;c<d.length;c++)sm(d[c]);a?($doc.body.appendChild(b),a=b.innerText,$doc.body.removeChild(b)):a=b.outerHTML}}return a};t(181);function rr(){rr=k;sr=new Aj;Q(sr,"UL");Q(sr,"OL");Q(sr,"LI");Q(sr,"BLOCKQUOTE");Q(sr,"PRE")}function cr(a,b){rr();this.a=a;this.b=b}function br(a){rr();return R(sr,a)}m(49,212,{49:1},cr);_.Db=function(a){return a?"":"\x3c"+(this.b==(ll(),ml)?"":"/")+this.a+"\x3e"};var sr;t(49); function ll(){ll=k;ml=new tr("START",0);mr=new tr("END",1)}function tr(a,b){C.call(this,a,b)}m(50,8,{3:1,11:1,8:1,50:1},tr);var mr,ml,ur=u(50,function(){ll();return D(v(ur,1),ha,50,0,[ml,mr])});function gl(a){return N(a.a,a.c)}function fl(a){return N(a.a,a.f)}function pr(a,b,c,d,e,f,h,l,p,r){this.o=a;this.a=b;this.k=c;this.b=d;this.c=e;this.f=f;this.i=h;this.g=l;this.e=new Aj;this.n=p;this.j=r}m(33,212,{33:1},pr); _.Db=function(a){var b,c;if(R(this.e,"de.l3s.boilerpipe/TITLE"))return"";var d=new lh(this.a,this.k,this.b),e;if(1==d.b)b=Jm(new Hm((y(0,d.b),N(d.c,d.a))));else{c=(y(0,d.b),N(d.c,d.a));b=c.cloneNode(!1);for(d=new Gm(d);d.a;)if(Im(d,c)){if(!d.a)break;for(;;){for(e=c.nextSibling;e&&!e.contains(d.a);)e=e.nextSibling;if(e){b=Sp(b,c.parentNode);b=Qp(b,e);c=e;break}c=c.parentNode;b=Sp(b,c)}}else{for(c=c.firstChild;!c.contains(d.a);)c=c.nextSibling;b=Qp(b,c)}for(;b.parentNode;)b=b.parentNode}1!=b.nodeType&& (c=B(kh(new lh(this.a,this.k,this.b),0)).cloneNode(!1),c.appendChild(b),b=c);mm(b);rm(b,"ID",D(v(n,1),g,2,4,["*"]));rm(b,"COLOR",D(v(n,1),g,2,4,["FONT"]));rm(b,"STYLE",D(v(n,1),g,2,4,["*"]));return a?b.textContent:br(b.tagName)?b.innerHTML:b.outerHTML};_.b=0;_.c=0;_.d=0;_.f=0;_.g=0;_.i=0;_.j=0;_.k=0;_.n=0;t(33);function or(a){a.j="";a.i=0;a.g=0;a.c=a.a.b.length;a.b=-1}function qr(){this.a=new P}m(153,1,{},qr);_.b=-1;_.c=0;_.d=-1;_.e=!1;_.f=0;_.g=0;_.i=0;_.j="";t(153);function ir(a){this.a=a} m(176,212,{},ir);_.Db=function(a){var b,c,d;if(a)return"";a=$doc.createElement("div");d=this.a.cloneNode(!1);for(c=0;c<this.a.childNodes.length;c++)b=this.a.childNodes[c],1!=b.nodeType||"SOURCE"!==b.tagName&&"TRACK"!==b.tagName||(b=b.cloneNode(!1),d.appendChild(b));d.poster.length&&(d.poster=d.poster);nm(d);rm(d,"ID",D(v(n,1),g,2,4,["*"]));a.appendChild(d);return a.innerHTML};t(176);m(214,1,{});_.Fb=function(a){var b;b=0;a&&(b=this.Eb(a));2<=Dk&&U(eb(this.cZ)+": "+b+"/"+this.Gb());return Zf(b,this.Gb())}; t(214);function hl(){this.b=25;this.c=75E3;this.a=2E5}m(154,214,{},hl);_.Eb=function(a){a=((a.offsetWidth||0)|0)*((a.offsetHeight||0)|0);if(a<this.c)return 0;a=bb((a-this.c)/(this.a-this.c)*this.b);return Zf(a,this.b)};_.Gb=function(){return this.b};_.a=0;_.b=0;_.c=0;t(154);function il(){this.a=25}m(155,214,{},il); _.Eb=function(a){var b,c;b=(a.offsetHeight||0)|0;if(0>=b)return 0;c=(a.offsetWidth||0)|0;a=0;b=c/b;1.4500000476837158<b&&1.7999999523162842>b?a=1:1.2999999523162842<b&&2.200000047683716>b&&(a=0.4000000059604645);return bb(this.a*a)};_.Gb=function(){return this.a};_.a=0;t(155);function jl(a){this.b=25;this.a=a}m(156,214,{},jl); _.Eb=function(a){var b;if(!this.a)return 0;a=km(this.a).b.length-1-(km(Gk(this.a,a)).b.length-1);b=0;4>a?b=1:6>a?b=0.6000000238418579:8>a&&(b=0.20000000298023224);return bb(this.b*b)};_.Gb=function(){return this.b};_.b=0;t(156);function kl(){this.a=15}m(157,214,{},kl);_.Eb=function(a){var b;a=km(a);for(b=new M(a);b.b<b.d.J();)if(a=(x(b.b<b.d.J()),b.d.T(b.c=b.b++)),1==a.nodeType&&"FIGURE"===a.tagName)return this.a;return 0};_.Gb=function(){return this.a};_.a=0;t(157);var uq,vr;vr=Ub("I");vr.k="I"; vr.f=1;uq=vr;t(195);t(197);t(null);t(200);Ej=Wb();_=function(a){var b=this;if("$wnd"==a)return $wnd;if(""===a)return b;"$wnd."==a.substring(0,5)&&(b=$wnd,a=a.substring(5));a=a.split(".");a[0]in b||!b.execScript||b.execScript("var "+a[0]);for(var c;a.length&&(c=a.shift());)b[c]?b=b[c]:b=b[c]={};return b}("org.chromium.distiller.DomDistiller");_.apply=function(){var a;return zk((a={},a))};_.applyWithOptions=zk; function wr(a){return function(){var b;a:{var c=arguments,d;0!=vc&&(d=Date.now?Date.now():(new Date).getTime(),2E3<d-xc&&(xc=d,wc=$wnd.setTimeout(uc,10)));if(0==vc++){d=(yc(),zc);var e,f;if(d.a){f=null;do e=d.a,d.a=null,f=Bc(e,f);while(d.a);d.a=f}d=!0}else d=!1;try{b=a.apply(this,c);break a}finally{if(c=d)if(d=(yc(),zc),d.b){f=null;do e=d.b,d.b=null,f=Bc(e,f);while(d.b);d.b=f}--vc;c&&-1!=wc&&($wnd.clearTimeout(wc),wc=-1)}b=void 0}return b}} var gwtOnLoad=gwtOnLoad=function(a,b,c){function d(){for(var a=0;a<e.length;a++)e[a]()}null==oa&&(oa=[]);var e=oa;$moduleName=b;$moduleBase=c;if(a)try{wr(d)()}catch(f){a(b,f)}else wr(d)()};(function(){null==oa&&(oa=[]);for(var a=oa,b=0;b<arguments.length;b++)a.push(arguments[b])})(function(){$wnd.setTimeout(wr(Le));var a,b,c;b=$doc.compatMode;a=D(v(n,1),g,2,4,["CSS1Compat"]);for(c=0;c<a.length&&a[c]!==b;c++);});var xr=[[["locale","default"],["user.agent","safari"]]]; "object"===typeof window&&"object"===typeof window.$gwt&&(window.$gwt.permProps=xr);window.gwtOnLoad=gwtOnLoad;gwtOnLoad(undefined, "domdistiller", "", 0);})(); } window.setTimeout = function() {}; window.clearTimeout = function() {}; initialize(); // The OPTIONS placeholder will be replaced with the DomDistillerOptions at // runtime. var distiller = window.org.chromium.distiller.DomDistiller; var res = distiller.applyWithOptions(options); if (stringify_output) { return JSON.stringify(res); } return res; } catch (e) { window.console.error("Error during distillation: " + e); if (e.stack != undefined) window.console.error(e.stack); } return undefined; })(options = $$OPTIONS, stringify_output = $$STRINGIFY) /* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* Set the global 'box-sizing' state to 'border-box'. * *::after and *::before used to select pseudo-elements not selectable by *. */ *, *::after, *::before { box-sizing: border-box; } /* Remove all margins and padding from certain element and add word wrap. */ blockquote, body, caption, dd, dl, fieldset, figure, form, h1, h2, h3, h4, h5, h6, hr, legend, ol, p, pre, ul, table, td, th { margin: 0; padding: 0; word-wrap: break-word; } /* Prevent 'sub' and 'sup' affecting 'line-height'. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* Remove most spacing between table cells. */ table { border-collapse: collapse; border-spacing: 0; display: block; overflow-x: auto; } td, th { padding: 0.5rem; } /* Base typography. */ html { font-size: 14px; } body { min-height: 100vh; display: flex; flex-direction: column; line-height: 1.714; margin: 0px auto; text-rendering: optimizeLegibility; transition-property: color, background-color; transition-duration: 0.5s; transition-timing-function: ease; overflow-x: hidden; -webkit-overflow-scrolling: touch; } /* Classes for light, dark and sepia themes. * Must agree with classes returned by useTheme() in dom_distiller_viewer.js * and with CSS class constants in viewer.cc */ .light { color: #424242; background-color: #FAFAFA; } .dark { color: #E0E0E0; background-color: #212121; } .sepia { color: #000; background-color: rgb(203, 173, 141); } .light a:link, .sepia a:link { color: #55F; } .dark a:link { color: #88F; } .light a:visited, .sepia a:visited { color: #902290; } .dark a:visited { color: #D872D8; } .light code, .light pre { background-color: #EEE; border-color: #AAA; } .sepia code, .sepia pre { background-color: rgb(217, 196, 175); border-color: rgb(147, 125, 102); } .dark code, .dark pre { background-color: #333; border-color: #555; } .light tbody tr:nth-child(odd) { background-color: #EEE; } .light th, .light td { border-left: 1px solid #AAA; } .sepia tbody tr:nth-child(odd) { background-color: rgb(217, 196, 175); } .sepia th, .sepia td { border-left: 1px solid rgb(147, 125, 102); } .dark tbody tr:nth-child(odd) { background-color: #333; } .dark th, .dark td { border-left: 1px solid #555; } /* #contentWrap is added to be more specific than the color theme rules */ #contentWrap th:first-child { border-left: none; } #contentWrap td:first-child { border-left: none; } /* Font settings */ .serif { font-family: serif; } .sans-serif { font-family: 'Roboto', sans-serif; } .monospace { font-family: monospace; } /* Define vertical rhythm (baseline grid of 4px). */ blockquote, caption, code, dd, dl, fieldset, figure, form, hr, legend, ol, p, pre, q, table, td, th, ul { margin-bottom: 1.143rem; } h1, h2, h3, h4, h5, h6 { line-height: 1.417; margin: 1em 0; } /* Content. */ #loadingIndicator { width: 100%; padding-bottom: 2em; } #loadingIndicator > img, #loadingIndicator > svg { display: block; height: 2.5em; margin: auto; width: 2.5em; } /* Margins for Show Original link. */ .light #closeReaderView { border-top: 1px solid #E0E0E0; color: #4285F4; } .dark #closeReaderView { border-top: 1px solid #555; color: #3adaff; } .sepia #closeReaderView { border-top: 1px solid rgb(147, 125, 102); color: #55F; } #closeReaderView { /* TODO(mdjones): Remove the "display: none;" style when the Reader Mode bar behaves like the toolbar when scrolling. */ display: none; flex: 0 0 auto; font-family: 'Roboto', sans-serif; font-weight: 700; line-height: 14px; padding: 24px 16px; font-size: 14px; text-align: right; text-decoration: none; text-transform: uppercase; width: 100%; } @media print { #closeReaderView { display: none; } #feedbackContainer { display: none; } /* Remove backgrounds and custom colors. */ .light, .dark, .sepia { color: #000 !important; background-color: #fff !important; font-family: sans-serif !important; } /* If the transition duration is unchanged, the above color changes happen after the document is ready for print. */ body { transition-duration: unset !important; } } #content { margin: 24px 16px 24px 16px; } #mainContent { flex: 1 1 auto; margin: 0px auto; width: 100%; } @media screen { #mainContent { max-width: 35em; } } #articleHeader { margin-top: 24px; width: 100%; } #titleHolder { font-size: 1.714rem; line-height: 1.417; margin: 0 16px; } blockquote { border-left: 4px solid #888; padding-left: 1em; } cite { opacity: .8; font-style: italic; } hr { opacity: .5; border-style: solid; height: 1px 0 0 0; width: 75%; } q { opacity: .8; display:block; font-style: italic; font-weight: 600; } embed, img, object, video { max-width: 100%; } /* TODO(sunangel): make images zoomable. */ img { display: block; height: auto; margin: 0.6rem auto 0.4rem 0; } /* TODO(nyquist): set these classes directly in the dom distiller. */ embed+[class*='caption'], figcaption, img+[class*='caption'], object+[class*='caption'], video+[class*='caption'] { opacity: .8; display: table; margin-bottom: 1rem; font-size: 0.857rem; line-height: 1.667; } ol, ul { margin-left: 1.296rem; } code, pre { border: 1px solid; border-radius: 2px; } pre code { border: none; } pre { line-height: 1.642; padding: .5em; white-space: pre-wrap; } body .hidden { display: none; } /* Footer feedback form. */ #contentWrap { display: flex; flex-direction: column; flex-grow: 1; overflow: auto; position: relative; z-index: 1; } .footerFeedback { display: flex; flex-direction: column; font-size: 14px; z-index: 2; background-color: #4285F4; color: #fff; width: 100%; } .feedbackContent { font-size: 14px; font-family: sans-serif; background-color: #4285F4; clear: both; padding: 14px; } #feedbackQuestion { font-size: 1.4em; font-weight: 700; text-align: center; width: 100%; } .feedbackButtonWrap { margin-top: 14px; text-align: center; width: 100%; } .feedbackButton { -webkit-user-select: none; background-color: #FFFFFF; border-radius: 3px; color: #4285F4; display: inline-block; font-weight: 900; height: 35px; margin: 0px 4% 0px 4%; padding-top: 8px; text-align: center; text-transform: uppercase; user-select: none; width: 40%; } .clear { clear: both; } /* Feedback fade out */ .fadeOut { animation-duration: 0.5s; animation-name: fadeOutAndSwipeAnimation; } @keyframes fadeOutAndSwipeAnimation { from { margin-left: 0%; opacity: 1; } to { margin-left: -100%; opacity: 0; } } /* Iframe sizing. */ .youtubeContainer { height: 0px; /* This is the perecnt height of a standard HD video. */ padding-bottom: 56.25%; position: relative; width: 100%; } .youtubeIframe { height: 100%; left: 0px; position: absolute; top: 0px; width: 100%; } /* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* The following are iOS specific rules for rendering on WebKit instead of * Blink. */ #mainContent { -webkit-flex: 1 1 auto; } #closeReaderView { -webkit-flex: 0 0 auto; } #contentWrap { -webkit-flex-flow: column; display: -webkit-flex; } <svg version="1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 28 28"> <!-- 28= RADIUS*2 + STROKEWIDTH --> <title>Material design circular activity spinner with CSS3 animation</title> <style type="text/css"> /**************************/ /* STYLES FOR THE SPINNER */ /**************************/ /* * Constants: * RADIUS = 12.5 * STROKEWIDTH = 3 * ARCSIZE = 270 degrees (amount of circle the arc takes up) * ARCTIME = 1333ms (time it takes to expand and contract arc) * ARCSTARTROT = 216 degrees (how much the start location of the arc * should rotate each time, 216 gives us a * 5 pointed star shape (it's 360/5 * 2). * For a 7 pointed star, we might do * 360/7 * 3 = 154.286) * * SHRINK_TIME = 400ms */ .qp-circular-loader { width:28px; /* 2*RADIUS + STROKEWIDTH */ height:28px; /* 2*RADIUS + STROKEWIDTH */ } .qp-circular-loader-path { stroke-dasharray: 58.9; /* 2*RADIUS*PI * ARCSIZE/360 */ stroke-dashoffset: 58.9; /* 2*RADIUS*PI * ARCSIZE/360 */ /* hides things initially */ } /* SVG elements seem to have a different default origin */ .qp-circular-loader, .qp-circular-loader * { -webkit-transform-origin: 50% 50%; } /* Rotating the whole thing */ @-webkit-keyframes rotate { from {-webkit-transform: rotate(0deg);} to {-webkit-transform: rotate(360deg);} } .qp-circular-loader { -webkit-animation-name: rotate; -webkit-animation-duration: 1568.63ms; /* 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */ -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; } /* Filling and unfilling the arc */ @-webkit-keyframes fillunfill { from { stroke-dashoffset: 58.8 /* 2*RADIUS*PI * ARCSIZE/360 - 0.1 */ /* 0.1 a bit of a magic constant here */ } 50% { stroke-dashoffset: 0; } to { stroke-dashoffset: -58.4 /* -(2*RADIUS*PI * ARCSIZE/360 - 0.5) */ /* 0.5 a bit of a magic constant here */ } } @-webkit-keyframes rot { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(-360deg); } } @-webkit-keyframes colors { from { stroke: #4285f4; } to { stroke: #4285f4; } } .qp-circular-loader-path { -webkit-animation-name: fillunfill, rot, colors; -webkit-animation-duration: 1333ms, 5332ms, 5332ms; /* ARCTIME, 4*ARCTIME, 4*ARCTIME */ -webkit-animation-iteration-count: infinite, infinite, infinite; -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1), steps(4), linear; -webkit-animation-play-state: running, running, running; -webkit-animation-fill-mode: forwards; } </style> <!-- 3= STROKEWIDTH --> <!-- 14= RADIUS + STROKEWIDTH/2 --> <!-- 12.5= RADIUS --> <!-- 1.5= STROKEWIDTH/2 --> <!-- ARCSIZE would affect the 1.5,14 part of this... 1.5,14 is specific to 270 degress --> <g class="qp-circular-loader"> <path class="qp-circular-loader-path" fill="none" d="M 14,1.5 A 12.5,12.5 0 1 1 1.5,14" stroke-width="3" stroke-linecap="round"></path> </g> </svg> // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. (function() { var elems = document.querySelectorAll( 'meta[property="og:type"],meta[name="og:type"]'); for (var i in elems) { if (elems[i].content && elems[i].content.toUpperCase() == 'ARTICLE') { return true; } } var elems = document.querySelectorAll( '*[itemtype="http://schema.org/Article"]'); for (var i in elems) { if (elems[i].itemscope) { return true; } } return false; })() // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. (function() { function hasOGArticle() { var elems = document.head.querySelectorAll( 'meta[property="og:type"],meta[name="og:type"]'); for (var i in elems) { if (elems[i].content && elems[i].content.toUpperCase() == 'ARTICLE') { return true; } } return false; } var body = document.body; if (!body) { return false; } return JSON.stringify({ 'opengraph': hasOGArticle(), 'url': document.location.href, 'numElements': body.querySelectorAll('*').length, 'numAnchors': body.querySelectorAll('a').length, 'numForms': body.querySelectorAll('form').length, 'innerText': body.innerText, 'textContent': body.textContent, 'innerHTML': body.innerHTML, }); })() d ??E?r`M @ #@???? ?<@????? 8t@???? ?h??_???? ?.v????b?? /@?k??? ?@???? ??.?+?? `????$??!?? ??NB???? ???K??? H?????? 8p@??)? Pg??eA4?5? ?@Q??M2?? ???$??5C?? ?@??+?? ??????? H??`?2??? `???-?,} ? ??_U?:?? ??s8??'? ?@?l?? p?? u??? /@B???? ? ??CC?2z? ^@m?c? ??@h)r?? ???@??? p???][? ?? ?@???? _@?!NM??? `? ??>??(? ???3I?? ???? ?}?? ?=,?????9? ?,?0?6?:?? ?@??f? ??@?.?$?? ?@t*??? p?7d??? ?7@??? ?@?8%?; ?? ??h??? `? ????0~? ??0?? ???7`?+?? ???l???? ??????? ?B??????? ???v?$?? `Z@?R?a? h?k#?u?? |?????? ???'?!?? ?=?hH?? ?@?? S?? ?????? H????A?? ???9??? @???1?2c7?? ?????? ?@?v5?? ???#?1N?? ?@ ?$?? ??????? ?d??9?? ?;?i&??4?? ?V????? ???=??? ????1???? #@?'??? ????g?? ???i? 9??? ???D???? ???????? `? ??x]??%? 0???-??&? ?(%????B? ?B???T?? P2)???"??? ??????? ?????:?? ?@???/?? `z@?/)}?? ?@7 _?p?? p@??q??? ?@J?213? ?@B??? 0????p?E?? ?@w? ? ??2???? ????0Y??? ?@???? ?@? ??? -????(? ?@q???? ???@T??? ??MIV?T?d ?@kHUf??? |@q? W?? ??Y[??? ????;? ???? ?? @@@?F??? /@?z+pN?? ?C@???? @@@?b? ? ?E@F?G=? ??<@??qU?? ???@???? #@p?? $?? B?C4?,?? r?@"?:?? ?E@?7mr? ?>?"2z? ?@I?$??? @?ct?? ??@Q{?o?? `???G?4??? `*C??A?s?5? ????9?r?? `???U?9?? ?@?k??? ????? ??8.2??? ?;@?&?? ?@?4%??? @!??? @OC?=?? @K?t?? a?????? ?;@???3?? ?@s(??? ]@F]??? 0b@?.? @???? ???g? ? ?@j?h?? !@???? ?@?$?_?? @e?J?? ?????Q?? ??????? ?@V33r(?? ?@???? ?@hD?6?? `W@???!? ??8}?=?? @??^?? ?@e.?-?? ?@B???? hs@71F??? p??uS?';? ???+!?? 0>?@R7V8?? ??/?eA? ?U@?x?9? ?;@h?&x?? ?@?-? ? /@0x?)?? @D@\ ^??? ?@x ???? ?@???? ??S6?[?? ???:X,? @?>?8X?? `???Qv.??? ??Pa-h?? P???????? 0 ??H?~?? K???F?%X?? 06{?????? @D@???? ?U@??/n? ???eG?:o? ?@?:]?? ?@?=C? `?!???? p?8H@??Q?? 5?9@???? @K@?G?? ?@G? ?a?? @G@z?H?? 5?9@?yi.5?? @K@??j?? ?;@?)??? a?????? ??r??? ?@|1@|Rk?? P????<2??? 0 ??53dZ? `???(#??? ??NS?=w? P????.?/.?? 0 ??,jrHH?? ?????,l?? ?,X ?y? a??u?db?<!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { margin: 10px 10px 0; min-width: 47em; /* Should be larger than the evaluated height of needs-restart. */ padding-bottom: 100px; } a { color: blue; font-size: 103%; } .permalink { color: #A0A0A0; } #header { -webkit-padding-start: 55px; background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjQ4cHgiIGhlaWdodD0iNDhweCIgdmlld0JveD0iMCAwIDQ4IDQ4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIGZpbGw9IiM1YTVhNWEiPgogIDxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQsIDQpIiBkPSJNMTYsMTguNDk5NTUxNCBDMTYsMTYuMDE1MTUzIDE4LjAxNTI4NTQsMTQgMjAuNTAwNDQ2NywxNCBDMjIuOTg0NzE0NiwxNCAyNSwxNi4wMTUxNTMgMjUsMTguNDk5NTUxNCBDMjUsMjAuOTg0ODQ3IDIyLjk4NDcxNDYsMjMgMjAuNTAwNDQ2NywyMyBDMTguMDE1Mjg1NCwyMyAxNiwyMC45ODQ4NDcgMTYsMTguNDk5NTUxNCBaIE0yOC45MDY0NjM0LDE4LjAwODEwNzEgTDQwLjYxNDY5NDgsMTguMDA5MTAyNCBDNDAuNjE4NDE0MywxNC40NzM5NjM5IDM5Ljc3OTY1NDUsMTAuODkxMDUzMiAzOC4wMDE3MDY5LDcuNjEwNjk5NDIgQzM2LjIyMzc1OTMsNC4zMjkzNTA0IDMzLjczMDcyNzEsMS43NjQ1ODM1MSAzMC44NTY0NDA0LDAgTDI1LDEwLjgwOTQ0MjQgQzI3LjMzMzA5MTMsMTIuMjQ4NTc4MiAyOC45MDY0NjM0LDE0LjkyOTc4OTcgMjguOTA2NDYzNCwxOC4wMDgxMDcxIFogTTE2LDEwLjgxMDgzNTUgTDEwLjE0MDk5NzMsMCBDMy44ODU4MTQ0OSwzLjg0ODQzMDUzIDAuMzkwODcyOSwxMC44Mjk3NDQzIDAuMzg1MjkyODk4LDE4LjAwOTEwMjQgTDEyLjA5MzA2ODIsMTguMDA5MTAyNCBDMTIuMDkzMDY4MiwxNC45MzA5NTUxIDEzLjY2NjYyODksMTIuMjQ5ODkxOCAxNiwxMC44MTA4MzU1IFogTTIwLjQ3OTY2NDMsMjYuNDUzODc2MSBDMTguOTg2NTA3OSwyNi40NTM4NzYxIDE3LjU5MDk0MzUsMjYuMDM5NjY2NyAxNi4zODU2ODMzLDI1LjMyODMwNzIgTDEwLjIzOTM0NDIsMzYuMTk1OCBDMTYuMzY3MTQwOCwzOS43OTk2MjE1IDI0LjE1NTk1MTksNDAuMDY2NzU2NSAzMC43MjA5NjAzLDM2LjE5NzgwMSBMMjQuNTcyNjY5NCwyNS4zMjgzMDcyIEMyMy4zNjc0MDkyLDI2LjAzOTY2NjcgMjEuOTcxODQ0NywyNi40NTM4NzYxIDIwLjQ3OTY2NDMsMjYuNDUzODc2MSBaIj48L3BhdGg+Cjwvc3ZnPgo=) left center / 48px no-repeat; line-height: 48px; margin-bottom: 1.05em; } #title-spacer { display: table-cell; vertical-align: middle; } html[dir=rtl] #header { background-position: right center; } h1 { font-size: 156%; font-weight: bold; margin: 0; padding: 0; } .blurb-container { font-size: 120%; padding-bottom: 1.5em; } #blurb-warning { color: red; font-weight: bold; } div.content { font-size: 88%; margin: 5px auto 10px; } div.content:last-of-type { margin-bottom: 0; } .section-header { background: rgb(235, 239, 249); border-top: 1px solid rgb(181, 199, 222); font-size: 99%; padding: 2px 5px 3px; width: 100%; } .section-header > table tr td:first-child { width: 100%; } .section-header > table { width: 100%; } .section-header-title { font-weight: bold; line-height: 200%; } #experiment-reset-all { float: right; } html[dir=rtl] #experiment-reset-all { float: left; } .vbox-container { -webkit-box-orient: vertical; display: -webkit-box; } .wbox { -webkit-box-align: stretch; -webkit-box-flex: 1; display: -webkit-box; } #top { -webkit-padding-end: 5px; } /* Default and unsupported experiments display grey text on a grey background. The title, however, should remain legible. */ .experiment-unsupported > td, .experiment-default > td { background: #F0F0F0; color: #A0A0A0; } .experiment-unsupported .experiment-name, .experiment-default .experiment-name { color: #000; } .experiment { border-bottom: 1px solid #cdcdcd; } .experiment td { padding-bottom: 4px; padding-top: 5px; } /* Indent the text related to each experiment. */ .experiment-text { -webkit-padding-start: 5px; } .experiment-name { font-weight: bold; } .referenced .experiment-name { background-color: rgb(255, 255, 0); } /* Match the indentation of .experiment-text. */ .experiment-actions { -webkit-padding-start: 5px; margin-bottom: 0.2em; margin-top: 0.2em; } div.needs-restart { /* If you modify properties that change the height of this, * update body.padding-bottom. */ background: #FFF; border-top: 1px solid rgb(181, 199, 222); bottom: 0; box-shadow: 0 -2px 2px #ddd; box-sizing: border-box; left: 0; padding-bottom: 15px; padding-left: 15px; padding-right: 15px; padding-top: 15px; position: fixed; width: 100%; } .experiment-restart-button { -webkit-user-select: none; background: rgb(76, 142, 250); border: 0; border-radius: 2px; box-sizing: border-box; color: #fff; cursor: pointer; font-weight: 700; margin-top: 10px; padding: 10px 24px; text-transform: uppercase; transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1); } button { font-size: 104%; } </style> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="chrome://flags/flags.js"></script> <script src="chrome://flags/strings.js"></script> </head> <body> <div id="body-container" style="visibility:hidden"> <div id="header"> <div id="title-spacer"><h1 i18n-content="flagsLongTitle"></h1></div> </div> <div class="blurb-container"> <span id="blurb-warning" i18n-content="flagsWarningHeader">WARNING</span> <span i18n-content="flagsBlurb">WARNING TEXT</span> <span id="channel-promo-beta" i18n-content="channelPromoBeta" hidden></span> <span id="channel-promo-dev" i18n-content="channelPromoDev" hidden></span> </div> <div id="flagsTemplate"> <div id="container" class="vbox-container"> <div id="top" class="wbox"> <div class="section-header"> <table cellpadding="0" cellspacing="0"><tr valign="center"> <td> <span class="section-header-title" i18n-content="flagsTableTitle" >TITLE</span> <button id="experiment-reset-all" type="button" i18n-content="resetAllButton"></button> </td> </tr></table> </div> </div> </div> <div class="content"> <div class="experiment" jsselect="supportedFeatures" jsvalues="id:internal_name"> <table width="100%" cellpadding="2" cellspacing="0"> <!-- TODO(mkwst): This doesn't work exactly as expected for multivalue experiments. See http://crbug.com/73730 --> <tr jsvalues="class: is_default ? 'experiment-default' : 'experiment-switched'"> <td valign="top"> <div class="experiment-text"> <div> <span class="experiment-name" jscontent="name">NAME</span> <span jscontent="supported_platforms.join(', ')"></span> <div> <span jsvalues=".innerHTML:description"></span> <a class="permalink" jsvalues="href: '#' + internal_name" jscontent="'#' + internal_name"></a> </div> <div jsdisplay="choices && choices.length > 0"> <select class="experiment-select" jsvalues=".internal_name:internal_name;.disabled:!enabled"> <option jsvalues=".selected:selected" jsselect="choices" jscontent="description">NAME </option> </select> </div> </div> </div> <div class="experiment-actions"> <span> <a class="experiment-disable-link" jsvalues=".internal_name:internal_name" jsdisplay="enabled" href="#" i18n-content="disable" >DISABLE</a> <a class="experiment-enable-link" jsvalues=".internal_name:internal_name" jsdisplay="!enabled" href="#" i18n-content="enable" >ENABLE</a> </span> </div> </td> </tr> </table> </div> </div> <!-- Unsupported experiments are not shown on iOS --> <div id="container" class="vbox-container"> <div id="top" class="wbox"> <div class="section-header"> <table cellpadding="0" cellspacing="0"><tr valign="center"> <td> <span class="section-header-title" i18n-content="flagsUnsupportedTableTitle" >TITLE </span> </td> </tr></table> </div> </div> </div> <div class="content"> <div class="experiment" jsselect="unsupportedFeatures" jsvalues="id:internal_name"> <table width="100%" cellpadding="2" cellspacing="0"> <tr class="experiment-unsupported"> <td valign="top"> <div class="experiment-text"> <div> <span class="experiment-name" jscontent="name">NAME</span> <span jscontent="supported_platforms.join(', ')"></span> <div> <span jsvalues=".innerHTML:description"></span> <a class="permalink" jsvalues="href: '#' + internal_name" jscontent="'#' + internal_name"></a> </div> </div> </div> <div class="experiment-actions"> <div i18n-content="flagsNotSupported"></div> </div> </td> </tr> </table> </div> </div> <div class="needs-restart" jsdisplay="needsRestart"> <div i18n-content="flagsRestartNotice">NEEDS_RESTART</div> <button class="experiment-restart-button" type="button" i18n-content="flagsRestartButton">RESTART</button> </div> </div> </div> <script src="chrome://resources/js/i18n_template.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> </body> </html> // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * This variable structure is here to document the structure that the template * expects to correctly populate the page. */ /** * Takes the |experimentalFeaturesData| input argument which represents data * about all the current feature entries and populates the html jstemplate with * that data. It expects an object structure like the above. * @param {Object} experimentalFeaturesData Information about all experiments. * See returnFlagsExperiments() for the structure of this object. */ function renderTemplate(experimentalFeaturesData) { // This is the javascript code that processes the template: jstProcess(new JsEvalContext(experimentalFeaturesData), $('flagsTemplate')); // Add handlers to dynamically created HTML elements. var elements = document.getElementsByClassName('experiment-select'); for (var i = 0; i < elements.length; ++i) { elements[i].onchange = function() { handleSelectExperimentalFeatureChoice(this, this.selectedIndex); return false; }; } elements = document.getElementsByClassName('experiment-disable-link'); for (var i = 0; i < elements.length; ++i) { elements[i].onclick = function() { handleEnableExperimentalFeature(this, false); return false; }; } elements = document.getElementsByClassName('experiment-enable-link'); for (var i = 0; i < elements.length; ++i) { elements[i].onclick = function() { handleEnableExperimentalFeature(this, true); return false; }; } elements = document.getElementsByClassName('experiment-restart-button'); for (var i = 0; i < elements.length; ++i) { elements[i].onclick = restartBrowser; } $('experiment-reset-all').onclick = resetAllFlags; highlightReferencedFlag(); } /** * Highlight an element associated with the page's location's hash. We need to * fake fragment navigation with '.scrollIntoView()', since the fragment IDs * don't actually exist until after the template code runs; normal navigation * therefore doesn't work. */ function highlightReferencedFlag() { if (window.location.hash) { var el = document.querySelector(window.location.hash); if (el && !el.classList.contains('referenced')) { // Unhighlight whatever's highlighted. if (document.querySelector('.referenced')) document.querySelector('.referenced').classList.remove('referenced'); // Highlight the referenced element. el.classList.add('referenced'); el.scrollIntoView(); } } } /** * Asks the C++ FlagsDOMHandler to get details about the available experimental * features and return detailed data about the configuration. The * FlagsDOMHandler should reply to returnFlagsExperiments() (below). */ function requestExperimentalFeaturesData() { chrome.send('requestExperimentalFeatures'); } /** * Asks the C++ FlagsDOMHandler to restart the browser (restoring tabs). */ function restartBrowser() { chrome.send('restartBrowser'); } /** * Reset all flags to their default values and refresh the UI. */ function resetAllFlags() { // Asks the C++ FlagsDOMHandler to reset all flags to default values. chrome.send('resetAllFlags'); requestExperimentalFeaturesData(); } /** * Called by the WebUI to re-populate the page with data representing the * current state of all experimental features. * @param {Object} experimentalFeaturesData Information about all experimental * features in the following format: * { * supportedFeatures: [ * { * internal_name: 'Feature ID string', * name: 'Feature name', * description: 'Description', * // enabled and default are only set if the feature is single valued. * // enabled is true if the feature is currently enabled. * // is_default is true if the feature is in its default state. * enabled: true, * is_default: false, * // choices is only set if the entry has multiple values. * choices: [ * { * internal_name: 'Experimental feature ID string', * description: 'description', * selected: true * } * ], * supported_platforms: [ * 'Mac', * 'Linux' * ], * } * ], * unsupportedFeatures: [ * // Mirrors the format of |supportedFeatures| above. * ], * needsRestart: false, * showBetaChannelPromotion: false, * showDevChannelPromotion: false, * showOwnerWarning: false * } */ function returnExperimentalFeatures(experimentalFeaturesData) { var bodyContainer = $('body-container'); renderTemplate(experimentalFeaturesData); if (experimentalFeaturesData.showBetaChannelPromotion) $('channel-promo-beta').hidden = false; else if (experimentalFeaturesData.showDevChannelPromotion) $('channel-promo-dev').hidden = false; bodyContainer.style.visibility = 'visible'; var ownerWarningDiv = $('owner-warning'); if (ownerWarningDiv) ownerWarningDiv.hidden = !experimentalFeaturesData.showOwnerWarning; } /** * Handles a 'enable' or 'disable' button getting clicked. * @param {HTMLElement} node The node for the experiment being changed. * @param {boolean} enable Whether to enable or disable the experiment. */ function handleEnableExperimentalFeature(node, enable) { // Tell the C++ FlagsDOMHandler to enable/disable the experiment. chrome.send('enableExperimentalFeature', [String(node.internal_name), String(enable)]); requestExperimentalFeaturesData(); } /** * Invoked when the selection of a multi-value choice is changed to the * specified index. * @param {HTMLElement} node The node for the experiment being changed. * @param {number} index The index of the option that was selected. */ function handleSelectExperimentalFeatureChoice(node, index) { // Tell the C++ FlagsDOMHandler to enable the selected choice. chrome.send('enableExperimentalFeature', [String(node.internal_name) + '@' + index, 'true']); requestExperimentalFeaturesData(); } // Get data and have it displayed upon loading. document.addEventListener('DOMContentLoaded', requestExperimentalFeaturesData); // Update the highlighted flag when the hash changes. window.addEventListener('hashchange', highlightReferencedFlag); ??<!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title>GCM Internals</title> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <style>/* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ h1 { color: rgb(74, 142, 230); margin: 0; padding: 0; } td { padding: 4px; } tr:nth-child(odd) { background-color: rgb(245, 245, 200); } th { background-color: rgb(160, 160, 125); color: rgb(255, 255, 255); font-weight: bold; } .flexbar { display: flex; flex-direction: row; margin: 5px 0px; } .flexbar button { padding: 0px 4px; } #device-info tr :first-child { font-weight: bold; padding-right: 10px; text-align: end; } .log-table { padding: 4px; } </style> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/cr/ui.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="strings.js"></script> <script src="gcm_internals.js"></script> </head> <body> <h1>GCM Internals</h1> <div class="flexbar"> <button id="refresh">Refresh</button> <button id="recording">Start Recording</button> <button id="clear-logs">Clear All Logs</button> </div> <h2>Device Info</h2> <table id="device-info"> <tbody> <tr> <td> Android Id </td> <td id="android-id"> </td> </tr> <tr> <td> User Profile Service Created </td> <td id="profile-service-created"> </td> </tr> <tr> <td> GCM Enabled </td> <td id="gcm-enabled"> </td> </tr> <tr> <td> GCM Client Created </td> <td id="gcm-client-created"> </td> </tr> <tr> <td> GCM Client State </td> <td id="gcm-client-state"> </td> </tr> <tr> <td> Connection Client Created </td> <td id="connection-client-created"> </td> </tr> <tr> <td> Connection State </td> <td id="connection-state"> </td> </tr> <tr> <td> Registered App Ids </td> <td id="registered-app-ids"> </td> </tr> <tr> <td> Send Message Queue Size </td> <td id="send-queue-size"> </td> </tr> <tr> <td> Resend Message Queue Size </td> <td id="resend-queue-size"> </td> </tr> </tbody> </table> <h2>Check-in Log</h2> <table class="log-table"> <thead> <tr> <th>Time</th> <th>Event</th> <th>Details</th> </tr> </thead> <tbody id="checkin-info"> </tbody> </table> <h2>Connection Log</h2> <table class="log-table"> <thead> <tr> <th>Time</th> <th>Event</th> <th>Details</th> </tr> </thead> <tbody id="connection-info"> </tbody> </table> <h2>Registration Log</h2> <table class="log-table"> <thead> <tr> <th>Time</th> <th>App Id</th> <th>Source</th> <th>Event</th> <th>Details</th> </tr> </thead> <tbody id="registration-info"> </tbody> </table> <h2>Receive Message Log</h2> <table class="log-table"> <thead> <tr> <th>Time</th> <th>App Id</th> <th>From</th> <th>Size (bytes)</th> <th>Event</th> <th>Details</th> </tr> </thead> <tbody id="receive-info"> </tbody> </table> <h2>Send Message Log</h2> <table class="log-table"> <thead> <tr> <th>Time</th> <th>App Id</th> <th>Receiver Id</th> <th>Msg Id</th> <th>Event</th> <th>Details</th> </tr> </thead> <tbody id="send-info"> </tbody> </table> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html> /* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ h1 { color: rgb(74, 142, 230); margin: 0; padding: 0; } td { padding: 4px; } tr:nth-child(odd) { background-color: rgb(245, 245, 200); } th { background-color: rgb(160, 160, 125); color: rgb(255, 255, 255); font-weight: bold; } .flexbar { display: flex; flex-direction: row; margin: 5px 0px; } .flexbar button { padding: 0px 4px; } #device-info tr :first-child { font-weight: bold; padding-right: 10px; text-align: end; } .log-table { padding: 4px; } // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('gcmInternals', function() { 'use strict'; var isRecording = false; /** * If the info dictionary has property prop, then set the text content of * element to the value of this property. Otherwise clear the content. * @param {!Object} info A dictionary of device infos to be displayed. * @param {string} prop Name of the property. * @param {string} elementId The id of a HTML element. */ function setIfExists(info, prop, elementId) { var element = $(elementId); if (!element) return; if (info[prop] !== undefined) { element.textContent = info[prop]; } else { element.textContent = ''; } } /** * Display device informations. * @param {!Object} info A dictionary of device infos to be displayed. */ function displayDeviceInfo(info) { setIfExists(info, 'androidId', 'android-id'); setIfExists(info, 'profileServiceCreated', 'profile-service-created'); setIfExists(info, 'gcmEnabled', 'gcm-enabled'); setIfExists(info, 'gcmClientCreated', 'gcm-client-created'); setIfExists(info, 'gcmClientState', 'gcm-client-state'); setIfExists(info, 'connectionClientCreated', 'connection-client-created'); setIfExists(info, 'connectionState', 'connection-state'); setIfExists(info, 'registeredAppIds', 'registered-app-ids'); setIfExists(info, 'sendQueueSize', 'send-queue-size'); setIfExists(info, 'resendQueueSize', 'resend-queue-size'); } /** * Remove all the child nodes of the element. * @param {HTMLElement} element A HTML element. */ function removeAllChildNodes(element) { element.textContent = ''; } /** * For each item in line, add a row to the table. Each item is actually a list * of sub-items; each of which will have a corresponding cell created in that * row, and the sub-item will be displayed in the cell. * @param {HTMLElement} table A HTML tbody element. * @param {!Object} list A list of list of item. */ function addRows(table, list) { for (var i = 0; i < list.length; ++i) { var row = document.createElement('tr'); // The first element is always a timestamp. var cell = document.createElement('td'); var d = new Date(list[i][0]); cell.textContent = d; row.appendChild(cell); for (var j = 1; j < list[i].length; ++j) { var cell = document.createElement('td'); cell.textContent = list[i][j]; row.appendChild(cell); } table.appendChild(row); } } /** * Refresh all displayed information. */ function refreshAll() { chrome.send('getGcmInternalsInfo', [false]); } /** * Toggle the isRecording variable and send it to browser. */ function setRecording() { isRecording = !isRecording; chrome.send('setGcmInternalsRecording', [isRecording]); } /** * Clear all the activity logs. */ function clearLogs() { chrome.send('getGcmInternalsInfo', [true]); } function initialize() { $('recording').disabled = true; $('refresh').onclick = refreshAll; $('recording').onclick = setRecording; $('clear-logs').onclick = clearLogs; chrome.send('getGcmInternalsInfo', [false]); } /** * Refresh the log html table by clearing it first. If data is not empty, then * it will be used to populate the table. * @param {string} tableId ID of the log html table. * @param {!Object} data A list of list of data items. */ function refreshLogTable(tableId, data) { var element = $(tableId); if (!element) return; removeAllChildNodes(element); if (data !== undefined) addRows(element, data); } /** * Callback function accepting a dictionary of info items to be displayed. * @param {!Object} infos A dictionary of info items to be displayed. */ function setGcmInternalsInfo(infos) { isRecording = infos.isRecording; if (isRecording) $('recording').textContent = 'Stop Recording'; else $('recording').textContent = 'Start Recording'; $('recording').disabled = false; if (infos.deviceInfo !== undefined) { displayDeviceInfo(infos.deviceInfo); } refreshLogTable('checkin-info', infos.checkinInfo); refreshLogTable('connection-info', infos.connectionInfo); refreshLogTable('registration-info', infos.registrationInfo); refreshLogTable('receive-info', infos.receiveInfo); refreshLogTable('send-info', infos.sendInfo); } // Return an object with all of the exports. return { initialize: initialize, setGcmInternalsInfo: setGcmInternalsInfo, }; }); document.addEventListener('DOMContentLoaded', gcmInternals.initialize); ??<!doctype html> <html> <head> <meta charset="utf-8"> <script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://net-export/net_export.js"></script> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <style>/* Copyright (c) 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { font-size: 80%; } button { display: block; font-size: 110%; font-weight: bold; margin: 10px auto; min-height: 48px; width: 200px; } .radio-button-div { margin: 7px auto; } .warning { color: red; font-size: 90%; font-weight: normal; } #net-export-main { margin: 8px; } #export-view-file-path-text { white-space: pre-wrap; word-wrap: break-word; } </style> </head> <body> <h2>Network Log Export</h2> <div id="net-export-main"> <div> <button id="export-view-start-data" disabled> Start Logging to Disk <div class="warning" id="export-view-deletes-log-text" hidden> Deletes old log </div> </button> </div> <div> <button id="export-view-stop-data" disabled>Stop Logging</button> </div> <div> <button id="export-view-send-data" disabled> Email Log <div class="warning" id="export-view-private-data-text" hidden> Log contains private information </div> <div class="warning" id="export-view-send-old-log-text" hidden> Log file from previous session </div> </button> </div> <p> <b>INSTRUCTIONS</b>: Start logging, reproduce the problem, and then stop logging. Make sure to send the email before starting to log again. Otherwise, the log will be deleted. </p> <p> Logs can be loaded in <a href="chrome://net-internals" target="_blank">net-internals</a> of desktop Chrome. </p> <p> <b><span class="warning">WARNING</span></b>: Logs contain a list of sites visited from when logging started to when logging stopped. They may also contain general network configuration information, such as DNS and proxy configuration. If private information is not stripped, the logs also contain cookies and credentials. </p> <p> <b>ADVANCED</b>: <span class="warning">This section should normally be left alone.</span> <div class="radio-button-div"> <label> <input id="export-view-strip-private-data-button" type="radio" name="log-mode" value="STRIP_PRIVATE_DATA" checked disabled> Strip private information </label> </div> <div class="radio-button-div"> <label> <input id="export-view-include-private-data-button" type="radio" name="log-mode" value="NORMAL" disabled> Include cookies and credentials </label> </div> <div class="radio-button-div"> <label> <input id="export-view-log-bytes-button" type="radio" name="log-mode" value="LOG_BYTES" disabled> Include raw bytes (will include cookies and credentials) </label> </div> </p> </div> <pre id="export-view-file-path-text"></pre> </body> </html> // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Main entry point called once the page has loaded. */ function onLoad() { NetExportView.getInstance(); } document.addEventListener('DOMContentLoaded', onLoad); /** * This class handles the presentation of our profiler view. Used as a * singleton. */ var NetExportView = (function() { 'use strict'; /** * Delay in milliseconds between updates of certain browser information. */ /** @const */ var POLL_INTERVAL_MS = 5000; // -------------------------------------------------------------------------- /** * @constructor */ function NetExportView() { $('export-view-start-data').onclick = this.onStartData_.bind(this); $('export-view-stop-data').onclick = this.onStopData_.bind(this); $('export-view-send-data').onclick = this.onSendData_.bind(this); window.setInterval(function() { chrome.send('getExportNetLogInfo'); }, POLL_INTERVAL_MS); chrome.send('getExportNetLogInfo'); } cr.addSingletonGetter(NetExportView); NetExportView.prototype = { /** * Starts saving NetLog data to a file. */ onStartData_: function() { var logMode = document.querySelector('input[name="log-mode"]:checked').value; chrome.send('startNetLog', [logMode]); }, /** * Stops saving NetLog data to a file. */ onStopData_: function() { chrome.send('stopNetLog'); }, /** * Sends NetLog data via email from browser. */ onSendData_: function() { chrome.send('sendNetLog'); }, /** * Updates the UI to reflect the current state. Displays the path name of * the file where NetLog data is collected. */ onExportNetLogInfoChanged: function(exportNetLogInfo) { if (exportNetLogInfo.file) { var message = ''; if (exportNetLogInfo.state == 'LOGGING') message = 'NetLog data is collected in: '; else if (exportNetLogInfo.logType != 'NONE') message = 'NetLog data to send is in: '; $('export-view-file-path-text').textContent = message + exportNetLogInfo.file; } else { $('export-view-file-path-text').textContent = ''; } // Disable all controls. Useable controls are enabled below. var controls = document.querySelectorAll('button, input'); for (var i = 0; i < controls.length; ++i) { controls[i].disabled = true; } $('export-view-deletes-log-text').hidden = true; $('export-view-private-data-text').hidden = true; $('export-view-send-old-log-text').hidden = true; if (exportNetLogInfo.state == 'NOT_LOGGING') { // Allow making a new log. $('export-view-strip-private-data-button').disabled = false; $('export-view-include-private-data-button').disabled = false; $('export-view-log-bytes-button').disabled = false; $('export-view-start-data').disabled = false; // If there's an existing log, allow sending it. if (exportNetLogInfo.logType != 'NONE') { $('export-view-deletes-log-text').hidden = false; $('export-view-send-data').disabled = false; if (exportNetLogInfo.logType == 'UNKNOWN') { $('export-view-send-old-log-text').hidden = false; } else if (exportNetLogInfo.logType == 'NORMAL') { $('export-view-private-data-text').hidden = false; } } } else if (exportNetLogInfo.state == 'LOGGING') { // Only possible to stop logging. Radio buttons reflects current state. document.querySelector('input[name="log-mode"][value="' + exportNetLogInfo.logType + '"]').checked = true; $('export-view-stop-data').disabled = false; } else if (exportNetLogInfo.state == 'UNINITIALIZED') { $('export-view-file-path-text').textContent = 'Unable to initialize NetLog data file.'; } } }; return NetExportView; })(); <!doctype html> <head> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <style> body { margin: 0px; width: 0px; } .row { display: table-row; vertical-align: inherit; } #header, #footer { display: table; table-layout:fixed; width: inherit; } #header { vertical-align: top; } #footer { vertical-align: bottom; } .text { display: table-cell; font-size: 8px; vertical-align: inherit; white-space: nowrap; } #page_number { text-align: right; } #title { text-align: center; } #date, #url { padding-left: 0.7cm; padding-right: 0.1cm; } #title, #page_number { padding-left: 0.1cm; padding-right: 0.7cm; } #title, #url { overflow: hidden; text-overflow: ellipsis; } #title, #date { padding-bottom: 0cm; padding-top: 0.4cm; } #page_number, #url { padding-bottom: 0.4cm; padding-top: 0cm; } </style> <script> function pixels(value) { return value + 'px'; } function setup(options) { var body = document.querySelector('body'); var header = document.querySelector('#header'); var content = document.querySelector('#content'); var footer = document.querySelector('#footer'); body.style.width = pixels(options['width']); body.style.height = pixels(options['height']); header.style.height = pixels(options['topMargin']); content.style.height = pixels(options['height'] - options['topMargin'] - options['bottomMargin']); footer.style.height = pixels(options['bottomMargin']); document.querySelector('#date span').innerText = new Date(options['date']).toLocaleDateString(); document.querySelector('#title span').innerText = options['title']; document.querySelector('#url span').innerText = options['url']; document.querySelector('#page_number span').innerText = options['pageNumber']; // Reduce date and page number space to give more space to title and url. document.querySelector('#date').style.width = pixels(document.querySelector('#date span').offsetWidth); document.querySelector('#page_number').style.width = pixels(document.querySelector('#page_number span').offsetWidth); // Hide text if it doesn't fit into expected margins. if (header.offsetHeight > options['topMargin'] + 1) { header.style.display = 'none'; content.style.height = pixels(options['height'] - options['bottomMargin']); } if (footer.offsetHeight > options['bottomMargin'] + 1) { footer.style.display = 'none'; } } </script> </head> <body> <div id="header"> <div class="row"> <div id="date" class="text"><span/></div> <div id="title" class="text"><span/></div> </div> </div> <div id="content"> </div> <div id="footer"> <div class="row"> <div id="url" class="text"><span/></div> <div id="page_number" class="text"><span/></div> </div> </div> </body> </html> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Proximity Auth Debug</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="proximity_auth.css" rel="stylesheet"> <link href="chrome://resources/css/roboto.css" rel="stylesheet"> <link href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html" rel="import"> <link href="content-panel.html" rel="import"> <link href="log-panel.html" rel="import"> <script src="cryptauth_interface.js"></script> </head> <body class="layout horizontal fullbleed"> <content-panel id="content" class="flex"></content-panel> <log-panel id="logs"></log-panel> </body> </html> /* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; font-family: "Roboto", sans-serif; } #logs { width: 40%; border-left: 1px solid rgba(0,0,0,0.12); } <link href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/communication-icons.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-toolbar/paper-toolbar.html" rel="import"> <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <link href="log-buffer.html" rel="import"> <dom-module id="log-panel"> <style> :host { height: 100vh; display: flex; flex-direction: column; } paper-toolbar { background-color: #069BDE; box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); height: 48px; margin: 0; } paper-toolbar paper-icon-button { padding: 0; } #list { overflow-y: scroll; } .list-item { border-bottom: 1px solid rgba(0, 0, 0, 0.12); font-family: monospace; font-size: 12px; padding: 15px 30px; } .list-item[severity="1"] { background-color: #fffcef; color: #312200; } .list-item[severity="2"] { background-color: #fff1f1; color: #ef0000; } .item-metadata { color: #888888; font-size: 10px; } .item-log { margin: 0; overflow: hidden; } .list-item:hover .item-log { overflow: auto; text-overflow: clip; } </style> <template> <paper-toolbar class="layout horizontal end-justified center" on-click="clearLogs_"> <paper-icon-button icon="communication:clear-all"></paper-icon-button> </paper-toolbar> <log-buffer id='logBuffer' logs="{{logs}}"></log-buffer> <div id="list" class="flex"> <template is="dom-repeat" items="[[logs]]"> <div class="list-item" severity$="[[item.severity]]"> <div class="item-metadata layout horizontal"> <div>[[item.time]]</div> <div class="flex"></div> <div>[[computeFileAndLine_(item)]]</div> </div> <pre class="item-log flex">[[item.text]]</pre> </div> </template> </div> </template> <script src="log-panel.js"></script> </dom-module> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'log-panel', properties: { /** * List of displayed logs. * @type {Array<{{ * text: string, * date: string, * source: string * }}>} */ logs: Array, }, observers: [ 'logsChanged_(logs.*)', ], /** * @type {boolean} * @private */ isScrollAtBottom_: true, /** * Called after the Polymer element is initialized. */ ready: function() { this.$.list.onscroll = this.onScroll_.bind(this); this.async(this.scrollToBottom_); }, /** * Called when the list of logs change. */ logsChanged_: function() { if (this.isScrollAtBottom_) this.async(this.scrollToBottom_); }, /** * Clears the logs. * @private */ clearLogs_: function() { this.$.logBuffer.clearLogs(); }, /** * Event handler when the list is scrolled. * @private */ onScroll_: function() { var list = this.$.list; this.isScrollAtBottom_ = list.scrollTop + list.offsetHeight == list.scrollHeight; }, /** * Scrolls the logs container to the bottom. * @private */ scrollToBottom_: function() { this.$.list.scrollTop = this.$.list.scrollHeight; }, /** * @param {LogMessage} log * @return {string} The filename stripped of its preceeding path concatenated * with the line number of the log. * @private */ computeFileAndLine_: function(log) { var directories = log.file.split('/'); return directories[directories.length - 1] + ':' + log.line; }, }); <link href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html" rel="import"> <link href="chrome://resources/polymer/v1_0/neon-animation/animations/fade-in-animation.html" rel="import"> <link href="chrome://resources/polymer/v1_0/neon-animation/animations/fade-out-animation.html" rel="import"> <link href="chrome://resources/polymer/v1_0/neon-animation/neon-animatable.html" rel="import"> <link href="chrome://resources/polymer/v1_0/neon-animation/neon-animated-pages.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-material/paper-material.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-tabs/paper-tabs.html" rel="import"> <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <link href="device-list.html" rel="import"> <link href="eligible-devices.html" rel="import"> <link href="local-state.html" rel="import"> <link href="reachable-devices.html" rel="import"> <dom-module id="content-panel"> <style> :host { background-color: #ececec; display: flex; flex-direction: column; } #pages { overflow-y: auto; } paper-tabs { background-color: rgb(3, 169, 244); box-shadow: 0 3px 2px rgba(0, 0, 0, 0.2); color: white; font-size: 14px; font-weight: 500; width: 100%; } local-state, eligible-devices, reachable-devices { width: 80%; } </style> <template> <paper-tabs id="tabs" selected="{{selected_}}"> <paper-tab>LOCAL STATE</paper-tab> <paper-tab>ELIGIBLE PHONES</paper-tab> <paper-tab>REACHABLE PHONES</paper-tab> </paper-tabs> <neon-animated-pages id="pages" selected="[[selected_]]" entry-animation="fade-in-animation" exit-animation="fade-out-animation" on-selected-item-changed="onSelectedPageChanged_" class="flex"> <neon-animatable class="layout vertical center"> <local-state id="local-state" class="flex"></local-state> </neon-animatable> <neon-animatable class="layout vertical center"> <eligible-devices id="eligible-devices" class="flex"></eligible-devices> </eligible-devices> </neon-animatable> <neon-animatable class="layout vertical center"> <reachable-devices id="reachable-devices" class="flex"> </reachable-devices> </neon-animatable> </neon-animated-pages> </template> <script src="content-panel.js"></script> </dom-module> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'content-panel', properties: { /** * The index of the selected page that is currently shown. * @private */ selected_: { type: Number, value: 0, } }, /** * Called when a page transition event occurs. * @param {Event} event * @private */ onSelectedPageChanged_: function(event) { var newPage = event.detail.value instanceof Element && event.detail.value.children[0]; if (newPage && newPage.activate != null) { newPage.activate(); } } }); <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-material/paper-material.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-button/paper-button.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/notification-icons.html" rel="import"> <link href="device-list.html" rel="import"> <dom-module id="local-state"> <style> paper-material { background-color: white; } #card-row { margin-top: 22px; } #enrollment-card { margin-right: 30px; } .card-content { margin: 24px 16px 0 16px; } .card-title { font-size: 20px; } .card-subtitle { color: #767676; font-size: 14px; margin-bottom: 16px; } paper-button { margin: 8px; } .card-icon { color: green; height: 90px; margin: 16px 16px 0 0; width: 90px; } .next-sync-icon { color: black; margin-right: 4px; } .next-refresh { height: 40px; } iron-icon[error-icon] { color: orange; } </style> <template> <div id="card-row" class="layout horizontal"> <!-- CryptAuth Enrollment Info Card --> <paper-material id="enrollment-card" class="layout vertical flex"> <div class="layout horizontal"> <div class="card-content layout vertical flex"> <div class="card-title">Enrollment</div> <div class="card-subtitle"> <span>[[getLastSyncTimeString_(enrollmentState_, "Never enrolled")]]</span> </div> <div class="next-refresh layout horizontal center flex"> <iron-icon class="next-sync-icon" icon="[[getNextSyncIcon_(enrollmentState_)]]"> </iron-icon> <span>[[getNextEnrollmentString_(enrollmentState_)]]</span> </div> </div> <iron-icon class="card-icon" icon="[[getIconForSuccess_(enrollmentState_)]]" error-icon$="[[enrollmentState_.recoveringFromFailure]]"> </iron-icon> </div> <paper-button class="self-start" on-click="forceEnrollment_"> Force Enroll </paper-button> </paper-material> <!-- Device Sync Info Card --> <paper-material id="device-card" class="layout vertical flex"> <div class="layout horizontal flex"> <div class="card-content layout vertical flex"> <div class="card-title">Device Sync</div> <div class="card-subtitle"> <span>[[getLastSyncTimeString_(deviceSyncState_, "Never synced")]]</span> </div> <div class="layout horizontal center flex"> <iron-icon class="next-sync-icon" icon="[[getNextSyncIcon_(deviceSyncState_)]]"> </iron-icon> <span>[[getNextEnrollmentString_(deviceSyncState_)]]</span> </div> </div> <iron-icon class="card-icon" icon="[[getIconForSuccess_(deviceSyncState_)]]" error-icon$="[[deviceSyncState_.recoveringFromFailure]]"> </iron-icon> </div> <paper-button class="self-start" on-click="forceDeviceSync_"> Force Sync </paper-button> </paper-material> </div> <device-list label="Unlock Keys" devices="[[unlockKeys_]]"></device-list> </template> <script src="local-state.js"></script> </local-state> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'local-state', properties: { /** * The current CryptAuth enrollment status. * @type {{ * lastSuccessTime: ?number, * nextRefreshTime: ?number, * recoveringFromFailure: boolean, * operationInProgress: boolean, * }} SyncState */ enrollmentState_: { type: Object, value: { lastSuccessTime: null, nextRefreshTime: null, recoveringFromFailure: true, operationInProgress: false, }, }, /** * The current CryptAuth device sync status. * @type {SyncState} */ deviceSyncState_: { type: Object, value: { lastSuccessTime: null, nextRefreshTime: null, recoveringFromFailure: true, operationInProgress: false, }, }, /** * List of unlock keys that can unlock the local device. * @type {Array<DeviceInfo>} */ unlockKeys_: { type: Array, value: [ { publicKey: 'CAESRQogOlH8DgPMQu7eAt-b6yoTXcazG8mAl6SPC5Ds-LTULIcSIQDZ' + 'DMqsoYRO4tNMej1FBEl1sTiTiVDqrcGq-CkYCzDThw==', friendlyDeviceName: 'LGE Nexus 4', bluetoothAddress: 'C4:43:8F:12:07:07', unlockKey: true, unlockable: false, connectionStatus: 'connected', remoteState: { userPresent: true, secureScreenLock: true, trustAgent: true }, }, ], }, }, /** * Called when the page is about to be shown. */ activate: function() { LocalStateInterface = this; chrome.send('getLocalState'); }, /** * Immediately forces an enrollment attempt. */ forceEnrollment_: function() { chrome.send('forceEnrollment'); }, /** * Immediately forces an device sync attempt. */ forceDeviceSync_: function() { chrome.send('forceDeviceSync'); }, /** * Called when the enrollment state changes. * @param {SyncState} enrollmentState */ onEnrollmentStateChanged: function(enrollmentState) { this.enrollmentState_ = enrollmentState; }, /** * Called when the device sync state changes. * @param {SyncState} deviceSyncState */ onDeviceSyncStateChanged: function(deviceSyncState) { this.deviceSyncState_ = deviceSyncState; }, /** * Called when the locally stored unlock keys change. * @param {Array<DeviceInfo>} unlockKeys */ onUnlockKeysChanged: function(unlockKeys) { this.unlockKeys_ = unlockKeys; }, /** * Called for the chrome.send('getSyncStates') response. * @param {SyncState} enrollmentState * @param {SyncState} deviceSyncState * @param {Array<DeviceInfo>} unlockKeys */ onGotLocalState: function(enrollmentState, deviceSyncState, unlockKeys) { this.enrollmentState_ = enrollmentState; this.deviceSyncState_ = deviceSyncState; this.unlockKeys_ = unlockKeys; }, /** * @param {SyncState} syncState The enrollment or device sync state. * @param {string} neverSyncedString String returned if there has never been a * last successful sync. * @return {string} The formatted string of the last successful sync time. */ getLastSyncTimeString_: function(syncState, neverSyncedString) { if (syncState.lastSuccessTime == 0) return neverSyncedString; var date = new Date(syncState.lastSuccessTime); return date.toLocaleDateString() + ' ' + date.toLocaleTimeString(); }, /** * @param {SyncState} syncState The enrollment or device sync state. * @return {string} The formatted string to be displayed. */ getNextEnrollmentString_: function(syncState) { var deltaMillis = syncState.nextRefreshTime; if (deltaMillis == null) return 'unknown'; if (deltaMillis == 0) return 'sync in progress...'; var seconds = deltaMillis / 1000; if (seconds < 60) return Math.round(seconds) + ' seconds to refresh'; var minutes = seconds / 60; if (minutes < 60) return Math.round(minutes) + ' minutes to refresh'; var hours = minutes / 60; if (hours < 24) return Math.round(hours) + ' hours to refresh'; var days = hours / 24; return Math.round(days) + ' days to refresh'; }, /** * @param {SyncState} syncState The enrollment or device sync state. * @return {string} The icon to show for the current state. */ getNextSyncIcon_: function(syncState) { return syncState.operationInProgress ? 'icons:refresh' : 'icons:schedule'; }, /** * @param {SyncState} syncState The enrollment or device sync state. * @return {string} The icon id representing whether the last sync is * successful. */ getIconForSuccess_: function(syncState) { return syncState.recoveringFromFailure ? 'icons:error' : 'icons:cloud-done'; }, }); // Interface with the native WebUI component for getting the local state and // being notified when the local state changes. // The local state refers to state stored on the device rather than online in // CryptAuth. This state includes the enrollment and device sync states, as well // as the list of unlock keys. LocalStateInterface = { /** * Called when the enrollment state changes. For example, when a new * enrollment is initiated. * @type {function(SyncState)} */ onEnrollmentStateChanged: function(enrollmentState) {}, /** * Called when the device state changes. For example, when a new device sync * is initiated. * @type {function(DeviceSyncState)} */ onDeviceSyncStateChanged: function(deviceSyncState) {}, /** * Called when the locally stored unlock keys changes. * @type {function(Array<DeviceInfo>)} */ onUnlockKeysChanged: function(unlockKeys) {}, /** * Called in response to chrome.send('getLocalState') with the local state. * @type {function(SyncState, SyncState, Array<DeviceInfo>)} */ onGotLocalState: function(enrollmentState, deviceSyncState, unlockKeys) {}, }; <link href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/device-icons.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/hardware-icons.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.html" rel="import"> <link href="chrome://resources/polymer/v1_0/iron-icons/notification-icons.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-button/paper-button.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-dialog/paper-dialog.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-material/paper-material.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html" rel="import"> <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <dom-module id="device-list"> <style> .devices-label { color: rgb(153, 153, 153); font-size: 16px; margin-top: 20px; padding: 10px 22px; } paper-material { background-color: white; } .item { border-bottom: 1px solid rgba(0, 0, 0, 0.12); height: 72px; } .name { margin: 0 8px 2px 0; } .public-key { color: #767676; font-size: 13px; height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 300px; } .phone-lock { height: 16px; width: 16px; vertical-align: top; } .end-icon { margin: 0 14px; } paper-icon-button, iron-icon { opacity: 0.25; } paper-icon-button:hover, iron-icon:hover { opacity: 1; } .ineligibility-icons { margin: 0 22px; } .ineligibility-icon { color: orange; opacity: 0.5; } iron-tooltip::shadow .iron-tooltip { font-size: 14px; line-height: 18px; padding: 8px 16px; } #unlock-key-dialog { width: 500px; } #dialog-text { color: #7E7E7E; } #dialog-buttons { height: 36px; display: flex; flex-direction: row; justify-content: flex-end; margin: 8px; padding: 0px; color: #377EF3; } #dialog-spinner { width: 20px; height: 20px; padding-right: 14px; } </style> <template> <div class="devices-label">[[label]]</div> <paper-dialog id="unlock-key-dialog" no-cancel-on-outside-click="true" with-backdrop="true" no-cancel-on-esc-key="true"> <div id="dialog-text"> <span hidden$="[[deviceForDialog_.unlockKey]]"> Make <span>[[deviceForDialog_.friendlyDeviceName]]</span> an unlock key. </span> <span hidden$="[[!deviceForDialog_.unlockKey]]"> Remove <span>[[deviceForDialog_.friendlyDeviceName]]</span> as an unlock key. </span> </div> <div id="dialog-buttons"> <paper-button dialog-dismiss disabled$="[[toggleUnlockKeyInProgress_]]"> Cancel </paper-button> <paper-button id="unlock-key-button" on-click="toggleUnlockKey_" disabled$="[[toggleUnlockKeyInProgress_]]"> <span hidden$="[[deviceForDialog_.unlockKey]]"> Make Unlock Key </span> <span hidden$="[[!deviceForDialog_.unlockKey]]"> Remove Unlock Key </span> </paper-button> </div> </paper-dialog> <paper-material> <template is="dom-repeat" items="[[devices]]"> <div class="item layout horizontal center"> <paper-icon-button class="end-icon" icon="[[getIconForUnlockKey_(item)]]" on-click="showUnlockKeyDialog_"> </paper-icon-button> <div class="info"> <div class="layout horizontal center"> <span class="name">[[item.friendlyDeviceName]]</span> <core-tooltip position="top" hidden$="[[!item.remoteState]]"> <iron-icon icon="[[getIconForRemoteState_(item.remoteState)]]" class="phone-lock flex"></iron-icon> <!--TODO(tengs): Reimplement the tooltip after it is ported to Polymer 1.0--> <div hidden> <div> User Present: <span> [[getUserPresenceText_(item.remoteState.userPresent)]] </span> </div> <div> Secure Screen Lock: <span> [[getScreenLockText_(item.remoteState.secureScreenLock)]] </span> </div> <div> Trust Agent: <span> [[getTrustAgentText_(item.remoteState.trustAgent)]] </span> </div> </div> </core-tooltip> </div> <div class="public-key">[[item.publicKey]]</div> </div> <div class="flex"></div> <div class="ineligibility-icons" hidden$="[[!item.ineligibilityReasons]]"> <template is="dom-repeat" items="[[item.ineligibilityReasons]]"> <core-tooltip label="[[prettifyReason_(item)]]" position="top"> <iron-icon icon="[[getIconForIneligibilityReason_(item)]]") class="ineligibility-icon"> </iron-icon> </core-tooltip> </template> </div> <paper-icon-button class="end-icon" bluetooth-address="[[item.bluetoothAddress]]" on-click="toggleConnection_" icon="[[getIconForConnection_(item.connectionStatus)]]" hidden$="{{!item.unlockKey}}"> </paper-icon-button> </div> </template> </paper-material> </template> <script src="device-list.js"></script> </dom-module> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'device-list', properties: { /** * The label of the list to be displayed. * @type {string} */ label: { type: String, value: 'Device List', }, /** * Info of the devices contained in the list. * @type {Array<DeviceInfo>} */ devices: Array, /** * Set with the selected device when the unlock key dialog is opened. */ deviceForDialog_: { type: Object, value: null }, /** * True if currently toggling a device as an unlock key. */ toggleUnlockKeyInProgress_: { type: Boolean, value: false, }, }, /** * Shows the toggle unlock key dialog when the toggle button is pressed for an * item. * @param {Event} event */ showUnlockKeyDialog_: function(event) { this.deviceForDialog_ = event.model.item; var dialog = this.querySelector('#unlock-key-dialog'); dialog.open(); }, /** * Called when the unlock key dialog button is clicked to make the selected * device an unlock key or remove it as an unlock key. * @param {Event} event */ toggleUnlockKey_: function(event) { if (!this.deviceForDialog_) return; this.toggleUnlockKeyInProgress_ = true; CryptAuthInterface.addObserver(this); var publicKey = this.deviceForDialog_.publicKey; var makeUnlockKey = !this.deviceForDialog_.unlockKey; CryptAuthInterface.toggleUnlockKey(publicKey, makeUnlockKey); }, /** * Called when the toggling the unlock key completes, so we can close the * dialog. */ onUnlockKeyToggled: function() { this.toggleUnlockKeyInProgress_ = false; CryptAuthInterface.removeObserver(this); var dialog = this.querySelector('#unlock-key-dialog'); dialog.close(); }, /** * Handles when the toggle connection button is clicked for a list item. * @param {Event} event */ toggleConnection_: function(event) { var deviceInfo = event.model.item; chrome.send('toggleConnection', [deviceInfo.publicKey]); }, /** * @param {string} reason The device ineligibility reason. * @return {string} The prettified ineligibility reason. * @private */ prettifyReason_: function(reason) { if (reason == null || reason == '') return ''; var reasonWithSpaces = reason.replace(/([A-Z])/g, ' $1'); return reasonWithSpaces[0].toUpperCase() + reasonWithSpaces.slice(1); }, /** * @param {string} connectionStatus The Bluetooth connection status. * @return {string} The icon id to be shown for the connection state. * @private */ getIconForConnection_: function(connectionStatus) { switch (connectionStatus) { case 'connected': return 'device:bluetooth-connected'; case 'disconnected': return 'device:bluetooth'; case 'connecting': return 'device:bluetooth-searching'; default: return 'device:bluetooth-disabled'; } }, /** * @param {DeviceInfo} device * @return {string} The icon id to be shown for the unlock key state of the * device. */ getIconForUnlockKey_: function(device) { return 'hardware:phonelink' + (!device.unlockKey ? '-off' : ''); }, /** * @param {Object} remoteState The remote state of the device. * @return {string} The icon representing the state. */ getIconForRemoteState_: function(remoteState) { if (remoteState != null && remoteState.userPresent && remoteState.secureScreenLock && remoteState.trustAgent) { return 'icons:lock-open'; } else { return 'icons:lock-outline'; } }, /** * @param {string} reason The device ineligibility reason. * @return {string} The icon id to be shown for the ineligibility reason. * @private */ getIconForIneligibilityReason_: function(reason) { switch (reason) { case 'badOsVersion': return 'notification:system-update'; case 'bluetoothNotSupported': return 'device:bluetooth-disabled'; case 'deviceOffline': return 'device:signal-cellular-off'; case 'invalidCredentials': return 'notification:sync-problem'; default: return 'error'; }; }, /** * @param {number} userPresence * @return {string} */ getUserPresenceText_: function(userPresence) { var userPresenceMap = { 0: 'User Present', 1: 'User Absent', 2: 'User Presence Unknown', }; return userPresenceMap[userPresence]; }, /** * @param {number} screenLock * @return {string} */ getScreenLockText_: function(screenLock) { var screenLockMap = { 0: 'Secure Screen Lock Enabled', 1: 'Secure Screen Lock Disabled', 2: 'Secure Screen Lock State Unknown', }; return screenLockMap[screenLock]; }, /** * @param {number} trustAgent * @return {string} */ getTrustAgentText_: function(trustAgent) { var trustAgentMap = { 0: 'Trust Agent Enabled', 1: 'Trust Agent Disabled', 2: 'Trust Agent Unsupported', }; return trustAgentMap[trustAgent]; }, }); <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <dom-module id="log-buffer"> <template></template> <script src="log-buffer.js"></script> </polymer-element> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'log-buffer', properties: { /** * List of displayed logs. * @type {?Array<{{ * text: string, * time: string, * file: string, * line: number, * severity: number, * }}>} LogMessage */ logs: { type: Array, value: [], notify: true, } }, /** * Called when an instance is initialized. */ ready: function() { // We assume that only one instance of log-buffer is ever created. LogBufferInterface = this; chrome.send('getLogMessages'); }, // Clears the native LogBuffer. clearLogs: function() { chrome.send('clearLogBuffer'); }, // Handles when a new log message is added. onLogMessageAdded: function(log) { this.push('logs', log); }, // Handles when the logs are cleared. onLogBufferCleared: function() { this.logs = []; }, // Handles when the logs are returned in response to the 'getLogMessages' // request. onGotLogMessages: function(logs) { this.logs = logs; } }); // Interface with the native WebUI component for LogBuffer events. The functions // contained in this object will be invoked by the browser for each operation // performed on the native LogBuffer. LogBufferInterface = { /** * Called when a new log message is added. * @type {function(LogMessage)} */ onLogMessageAdded: function(log) {}, /** * Called when the log buffer is cleared. * @type {function()} */ onLogBufferCleared: function() {}, /** * Called in response to chrome.send('getLogMessages') with the log messages * currently in the buffer. * @type {function(Array<LogMessage>)} */ onGotLogMessages: function(messages) {}, }; <link href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html" rel="import"> <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <link href="device-list.html" rel="import"> <dom-module id="eligible-devices"> <style> paper-spinner { margin-top: 40px; } </style> <template> <div class="layout vertical"> <paper-spinner hidden$="[[!requestInProgress_]]" class="self-center" active> </paper-spinner> <device-list label="Eligible Phones" devices="[[eligibleDevices_]]" hidden$="[[!eligibleDevices_.length]]"> </device-list> <device-list label="Ineligible Phones" devices="[[ineligibleDevices_]]" hidden$="[[!ineligibleDevices_.length]]"> </device-list> </div> </template> <script src="eligible-devices.js"></script> </dom-module> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'eligible-devices', properties: { /** * List of devices that are eligible to be used as an unlock key. * @type {Array<DeviceInfo>} * @private */ eligibleDevices_: { type: Array, value: null, }, /** * List of devices that are ineligible to be used as an unlock key. * @type {Array<DeviceInfo>} * @private */ ineligibleDevices_: { type: Array, value: null, }, /** * Whether the findEligibleUnlockDevices request is in progress. * @type {boolean} * @private */ requestInProgress_: Boolean, }, /** * Called when this element is added to the DOM. */ attached: function() { CryptAuthInterface.addObserver(this); }, /** * Called when this element is removed from the DOM. */ detatched: function() { CryptAuthInterface.removeObserver(this); }, /** * Called when the page is about to be shown. */ activate: function() { this.requestInProgress_ = true; this.eligibleDevices_ = null; this.ineligibleDevices_ = null; CryptAuthInterface.findEligibleUnlockDevices(); }, /** * Called when eligible devices are found. * @param {Array<EligibleDevice>} eligibleDevices * @param {Array<IneligibleDevice>} ineligibleDevices_ */ onGotEligibleDevices: function(eligibleDevices, ineligibleDevices) { this.requestInProgress_ = false; this.eligibleDevices_ = eligibleDevices; this.ineligibleDevices_ = ineligibleDevices; }, /** * Called when the CryptAuth request fails. * @param {string} errorMessage */ onCryptAuthError: function(errorMessage) { console.error('CryptAuth request failed: ' + errorMessage); this.requestInProgress_ = false; this.eligibleDevices_ = null; this.ineligibleDevices_ = null; }, }); <link href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html" rel="import"> <link href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html" rel="import"> <link href="chrome://resources/polymer/v1_0/polymer/polymer.html" rel="import"> <link href="device-list.html" rel="import"> <dom-module id="reachable-devices"> <style> paper-spinner { margin-top: 40px; } </style> <template> <div class="layout vertical"> <paper-spinner hidden$="[[!requestInProgress_]]" class="self-center" active> </paper-spinner> <device-list label="Reachable Phones" devices="[[reachableDevices_]]" hidden$="[[!reachableDevices_.length]]"> </device-list> </div> </template> <script src="reachable-devices.js"></script> </dom-module> // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Polymer({ is: 'reachable-devices', properties: { /** * List of devices that recently responded to a CryptAuth ping. * @type {Array<DeviceInfo>} * @private */ reachableDevices_: { type: Array, value: null, }, /** * Whether the findEligibleUnlockDevices request is in progress. * @type {boolean} * @private */ requestInProgress_: Boolean, }, /** * Called when this element is added to the DOM. */ attached: function() { CryptAuthInterface.addObserver(this); }, /** * Called when this element is removed from the DOM. */ detatched: function() { CryptAuthInterface.removeObserver(this); }, /** * Called when the page is about to be shown. */ activate: function() { this.requestInProgress_ = true; this.reachableDevices_ = null; CryptAuthInterface.findReachableDevices(); }, /** * Called when reachable devices are found. * @param {Array<EligibleDevice>} reachableDevices */ onGotReachableDevices: function(reachableDevices) { this.requestInProgress_ = false; this.reachableDevices_ = reachableDevices; }, /** * Called when the CryptAuth request fails. * @param {string} errorMessage */ onCryptAuthError: function(errorMessage) { console.error('CryptAuth request failed: ' + errorMessage); this.requestInProgress_ = false; this.reachableDevices_ = null; }, }); // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Responsible for interfacing with the native component of the WebUI to make * CryptAuth API requests and handling the responses. */ CryptAuthInterface = { /** * A list of observers of CryptAuth events. */ observers_: [], /** * Adds an observer. */ addObserver: function(observer) { CryptAuthInterface.observers_.push(observer); }, /** * Removes an observer. */ removeObserver: function(observer) { var index = CryptAuthInterface.observers_.indexOf(observer); if (observer) CryptAuthInterface.observers_.splice(index, 1); }, /** * Starts the findEligibleUnlockDevices API call. * The onGotEligibleDevices() function will be called upon success. */ findEligibleUnlockDevices: function() { chrome.send('findEligibleUnlockDevices'); }, /** * Starts the flow to find reachable devices. Reachable devices are those that * respond to a CryptAuth ping. * The onGotReachableDevices() function will be called upon success. */ findReachableDevices: function() { chrome.send('findReachableDevices'); }, /** * Makes the device with |publicKey| an unlock key if |makeUnlockKey| is true. * Otherwise, the device will be removed as an unlock key. */ toggleUnlockKey: function(publicKey, makeUnlockKey) { chrome.send('toggleUnlockKey', [publicKey, makeUnlockKey]); }, /** * Called by the browser when the API request fails. */ onError: function(errorMessage) { CryptAuthInterface.observers_.forEach(function(observer) { if (observer.onCryptAuthError != null) observer.onCryptAuthError(errorMessage); }); }, /** * Called by the browser when a findEligibleUnlockDevices completes * successfully. * @param {Array<DeviceInfo>} eligibleDevices * @param {Array<DeviceInfo>} ineligibleDevices */ onGotEligibleDevices: function(eligibleDevices, ineligibleDevices) { CryptAuthInterface.observers_.forEach(function(observer) { if (observer.onGotEligibleDevices != null) observer.onGotEligibleDevices(eligibleDevices, ineligibleDevices); }); }, /* * Called by the browser when the reachable devices flow completes * successfully. * @param {Array<DeviceInfo>} reachableDevices */ onGotReachableDevices: function(reachableDevices) { CryptAuthInterface.observers_.forEach(function(observer) { if (observer.onGotReachableDevices != null) observer.onGotReachableDevices(reachableDevices); }); }, /** * Called by the browser when an unlock key is toggled. */ onUnlockKeyToggled: function() { CryptAuthInterface.observers_.forEach(function(observer) { if (observer.onUnlockKeyToggled != null) observer.onUnlockKeyToggled(); }); }, }; // This message tells the native WebUI handler that the WebContents backing the // WebUI has been iniitalized. This signal allows the native handler to execute // JavaScript inside the page. chrome.send('onWebContentsInitialized'); <html> <head> <title>Interstitials</title> </head> <body> <h2>Choose an interstitial</h2> <h3>SSL</h3> <div> <a href="ssl?overridable=1&strict_enforcement=0">example.com (generic, overridable)</a> </div> <div> <a href="ssl?overridable=0&strict_enforcement=0"> example.com (generic, non-overridable) </a> </div> <div> <a href="ssl?overridable=0&strict_enforcement=1"> example.com (HSTS, non-overridable) </a> </div> <div> <a href="clock?clock_manipulation=2">Clock is ahead</a> </div> <div> <a href="clock?clock_manipulation=-2">Clock is behind</a> </div> <h3>SafeBrowsing</h3> <div> <a href="safebrowsing?type=malware">Malware</a> </div> <div> <a href="safebrowsing?type=phishing">Phishing</a> </div> <div> <a href="safebrowsing?type=clientside_malware">Client Side Malware</a> </div> <div> <a href="safebrowsing?type=clientside_phishing">Client Side Phishing</a> </div> <h3>Captive Portal</h3> <div> <a href="captiveportal">Captive Portal, Non-WiFi</a> </div> <div> <a href="captiveportal?is_wifi=1"> Captive Portal, WiFi </a> </div> <div> <a href="captiveportal?is_wifi=1&wifi_name=CoffeeShopWiFi"> Captive Portal, WiFi with network name "CoffeeShopWiFi" </a> </div> </body> </html> <!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width"> <title i18n-content="tabTitle"></title> <style>/* Copyright 2014 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ a { color: #585858; } .bad-clock .icon { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAFo0lEQVR4Xu3cS1OTVxwG8Ha6dsZNt/0S7ozX+wUSGKN7ycIvkJ2OiNcdbvwMfABXLS1VvLXFSMWUgFAh1oJICCEGq8UFp8+fPu87J4S3vrmcvIfOceaZMKOSnN/8z/+c95Yv3B8XFxcXFxcXFzNRZ89+rZLJJNKLDCAZdfp0Hini5zWJ/Izk5e+QAf7bpPzf/yvKLkD0I1lArCOqwazL70D65Xdub5RUagcA0kDJCYCJ8Hen5b22D8y5czvVmTN9gCkRwHzwXvKe8t72wij1JWB6AFMIBDAPVZDPIJ/Fth7zDWAeESD64LPIZ7ICBwAxZBFRlmURiUWLk0ymuCwrG8NtQyqKKfUVYG4RwP7gs8pnbhsOAO4gapvlTluQzFaO+Uoy3nNMAayurlalcOqUKaSUudUKTa9dQN/t3m0EiWOItX6fw6W8nUCDyFJHh5ktAMbUuh0yN4HtBPpWgGIxNYQUTSBhTC3ZccvW3QNoawUR6Afk7p49ZpAwtuYPPHlsFUkFEehHAA0jy61GwthkjM1UTx8BIq2gIeDcQ+7v3atKnZ2trqK+xs/n8JRFVBUEJL+CBGgYQD/t369WWomEMTZ0PgkAaQ8g6ik2RJyH+/apxwD6BSm3tpLS9QPxTGDUFTQkTZrT6wGApIJGkKcHD6p38XjLzkzWfw6ZADb0oHvAEaBHAPpZKohAv7YSCWOup3r6CRBpBX3v9R+pHuSxAB04oDKI4EjGDh1qDRLGXA9Q1iagYQFigxagJwR6BpwxptIsEsYc+roVANajBhpkcxag+3qDBs5TRMd5jowfPtws0rqMPUz1JAkQbQ8i0F1vBWP/GQHOqEwvgWGywPmNWW0GCWMPA9RrA9Cg339YPQR6AhwBGtuEM47kjhxRE0jDSBh7GKABC4CqGzSBZHplNCDA6PGBXhw9qt4nEo0ADYQBytgCJLvnB97yLs2ZQM+Q59WV4+NM8nWqESSMPcwOOm8BEA8v2KC5QcxIgxYgTq0sgSY8HFaP4Ewjvx87Vi9SPgxQ0QYgHqD6q9cIK2jU7z2sHIY4NUAzyF/hkYphptiaDUBjFy6oYa//aLtnArHn1FaOjvMSkdfZsEgY+7YBqpTLKnvxonrI/jPiTS/ijBPHAxKYFxrONDLD5I8f33j9AKQQQHZOsaVr1wSlBmkcSN7hxagGlPtM5Xg4swR6xXwGqWhnk2aWr1/fEmni0iUfiNPLX84nQ+L8wbw+ceK/kPKGlnnzSFNA8nbPOQBNalOKOEw1DiMwfuaQj11dDS7z3ChGmVIA0nRvr8oCaKPvbMJ5ycxqOLObKudP4syfPCmpRcLYDRxqmMlKANLM5cvSf/zqmUI4rQik9ZwAnDnkDbKA/K0jYeyhD1ZtRnoFJKxSWuVwWjHEERjiyCsrR8N5iyu3i4iPhLEbON1hNuUApNdXrgAooHJqgHQchDiSApE+dXXxdIeBE2am8+7GjS2R5oBU1ZCDp5WfBR2HweVtueaWNXDKNXqkeSARRlutiMP404pZJJCHU0RwKanf8El786kEIL0BEisnsOfoOJICIzjLSLmjY5fFl33CZ/XmzSCkwMqZD5hWgkOgnIELh/Yhvb16Vc0RqXa1Ympx1EoikTZw6TnavA9AWujpERgdh0B+5bAp+72npBKJHQZuXrAPqXD7dlDlEIdVw+BGCKmePgO3v9iHBJzaymF0nCUNB9f3C6q7e6eBG6jsyofz57V9DrOpIRc0GMkKUuns7DFwC56dwYGnvpTX9hzGwynF47wFz8BNnLYGx1ScUn64WlXjlOPxxY8Yk6HbgO1H0nsOo+OsVRKJmNEbyW3PGpAAhGg9hwFOyj2KQCR/WjG4TeaWe5hlE5LAlBG8bvUwi3sc6lN390blGMBxD9S5RzINxD3U6x4Ld18s4L6awt64LzdxX4/zDxj9/IEueAvhAAAAAElFTkSuQmCC) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMAAADQmBKKAAACvlBMVEUAAAD/gID/gID/VVX/VVX/Tk7/YmL/YGD/VVXzUVH/XV32UlL/W1v2T0//WFj3UlL/UlL3UFD/WFjwTk7/U1P/U1PxTU3/V1fyT0//VFTzTk7/UlLwTU3/VVX0UFD/VFT/VFT1Tk7/VVX/VFT/U1PyT0//VFT/U1PxTEz/UlLuS0v/U1P/UlL/VFT0T0//U1P0Tk7/VFT/U1PuTU3/UlLzTU3/U1P/U1PwTEz/UlL/U1PvTU3/U1P/U1PxTU3/U1PzTk70Tk7/U1PyTk7/U1PzTk7/U1P/U1P6UFD/UlLzTk7/U1P/U1PyTk7/U1PtTEz/UlLyTU3/U1P/UlL/UlLxTk7/UlLvTEz/U1PvTU3/U1P/U1P/UlLxTEzxTU3zTU3/UlK7Ozu8Ozu8PDy9PDy+PDy+PT2/PDy/PT3APDzAPT3BPT3BPj7CPT3CPj7DPT3DPj7EPj7EPz/FPj7FPz/GPj7GPz/HPz/HQEDIPz/IQEDJPz/JQEDKQEDKQUHLQEDLQUHMQEDMQUHNQUHNQkLOQUHOQkLOZWXPQUHPQkLPZWXQQkLRQkLRQ0PSQkLSQ0PSZmbTQ0PTZmbUQ0PURETVQ0PVRETVaGjWRETWRUXXRETXRUXXaGjYRUXZRUXZaGjaRUXaRkbaaWnbRUXbRkbbaWncRkbdRkbdaWneRkbeR0ffRkbfR0ffa2vgR0fga2vhR0fhSEjha2viR0fiSEjia2vjSEjjbGzkSEjkSUnkbGzlSEjlSUnlbGzmSUnmbGznSUnnSkroSkrobW3pSkrqSkrqS0vqi4vrS0vriYnri4vsS0vsiYntS0vtTEzuTEzvTEzwTEzwTU3w6OjxTU3x6OjyTU3y6Ojy6eny8vLz8/P0Tk71Tk72Tk72cnL3T0/3cnL4T0/4cnL5T0/5c3P6T0/7UFD8UFD9UFD/UlJJWZWgAAAAYXRSTlMAAgQGDA0NEBUWFhwcHR0fHyAgNDQ3ODg9PT4+QkJDQ0lLS15fdHR1fHyEhIWGiIiJiYuVlaioqaurrK+vuLm5u7u7wsLExMXGxszM0tTU2dna2t/p7Ozt7fPz+fv+/v7+jD+tjQAACYhJREFUeAHs1cFqwjAcx/G1FR0iIqKIFFEUHKJQKlIRFKGUilSKVCmiHrKpCDuPHcbA99xtjA1+b7HLjmMkaeIu+TzBl18C/xtFURRFURSFQ6bc6g0ns8Uq3u3i1WI2GfZa5cz/tKQafW+NX629fiN11Rij1p3v8af9vFszrpRTGWxAZTOoyK8pdpZgsOwUpeaUxgSMyLgkLac6BZdpVUpO3QM3ry48JzdCIqOc0By9vUVC27YurscMIUBoiprHIhCCWEJGyvsQxhfwk5oxBIqbCXM0m0AoYmuJrqgD4RyDvyftQgI3zduTDSBFcMvXU4ggSVTg2ieCNFGW4/8EkChg/keGC6lcg61Hc8Dg7cc76DkaU5ANnqAnliKb6V4QrqB7liLCcEXyMfiCHp4/QC3O0/boPniDDi8MRb5OGWSBN+hwOL4yFFl0PSYB/0LH0+UTtIhJ9WAhEgSdTufLF2iFNI92ByRa6PzIUPTNih21uFG1cQC/Kewn6GWh0BdeSu1NKRRKS2+EUuiF2CKl7UWR3WabNHFmk84k2WSTndmsGyfZMc42ziYmJhozbo0hxSVsMYRYFhEEFWt7Uau1V3q+hf+Ts2ZXMsmMnHk+wY//ec55zjn/d/Heuc4DmqUg/4pr0XXnO+1Zwp2QP5B1LTrr+D4lHKC3aQ8BFHxn3bXI6U37OuFPKBAUI4U/3b6yHf4TCIqrh3w+vwCQVHQrmv4TcYFwJ3THHxIkSYqZLkUXpv7/EC4QTmrf3J1QSAwDtFh2KZr2f3SOGzQXCNwNCbIkx5LpqjvRuSn/dbcIbw/5fYGQIN6T5EQ6rX7qSnRr8q/fcYLi2vaz876AIIr34olESlEzzb+Iizo+EfQmJwie+WAQLXQvGk+mlEwma7kRvTHxv5dwJ3R7PiAIoixHk8mUmnErmvR7fJoXNHsbp3RQkMLRaHw5BY6maV+4EJ2e8PK5xg2apaCIiJZOJJfVbDarZXNtZ9E1+zfREcINoi0UXJBjMbpiq/BouZzWcRYdsQWd4AfNYY4tLOAQiidVdVWjnpyuf+UoOmELusQP8gfQ0wuynEBCqwDldHh0w1F0yc5z6CY3aM6POSZIsryYSCtoIayXXsgbht51EN08ZAM6SrhBPl9IFDDpFxfT6QxaGvkUUEbR6DuIjtqATvGD/L67oihF5MTSUlrNaDoKHN0oFs2vydQ6ZXs141+yu4IQFumeX1LX1vKaRj2GUQSo9M1/vqZd9SAhP0BhKYEOUjJrWr6gF3Tq2TBNs/SYTKmr454Zwg+ax6AXo/F4Mqkqa3l4DJYPOGalskum1MwY6LAHIAQkShIGq6KghfI6Wy8EVCqVKpXyt2RyHR4D/c8DUCAgRiJR3Dxw9UBLG6yfTXjMUqVarX1HJtaxMdBJD0BBQYhEpEQqqWBs5KjI+CeeKkDTRCfHQGc8ANGAZDmeSuGYph7WP0UmqtUatcb3ZEKd4X9v2CUUBAhjQ1lZwdgoIB54hhzkU6k1GvXmD67fHpc8AAnhSCQmJxQElF1f3yiAM/SUwUFA9Uaz2fzR7TS77AVIACiWximEMVYoDNeL5VODh3KshmUvujwGuuIBKBSOyAAp6iruHRs4DunuMoftzECWtbVl/URs6soY6C0PQO+KmPRoIUx6BASQud8/aCDLagLUav1s9wM6BrrhAejJe1EJPa2q2bymb2zQfEbx1Fk+8LTaNqIbXoJePt8XxZMJVVWyGKvY88P1QjtXWf8AZG21HrTbrV+cQTxL9ur5vuj9ZAoLltHzBlasshcQPA14miyfdrvTeeawZJxN/fuTA6LllJrVADKKFRQ81RryoR29hQKo1elsbz9zbOrLxCPRB+oqNplxv1iulPfyoZrhBoMG+WwD1P3VadtfJF6JPqRzo3Afoio7EJt1ixaLp418HnZR/xZdHAOdJ96JNGx6c7NC46Ee1Kh/OggI+XS3d3ZekAN13nm4cog+Wsce29xkGx7FNrw1BIHzcHunu7PTe/Ri6nA9SbwTPf14vWCW2X5nG77J8kE/dxAPDajX6/V/I6N6bQx0jHgp+sQslsusf5qsfSiIctoUNOT0+oN90THuK6yD6DNcERusfxoW2+5DD2sfgPr9/mDw+OXkK+wM8Vb0eam6Ny8sxnkAUBugIQee3mAw6I9EM/bPIG7R0wOien00MFp0YAw5XfRzr9vrPRr0wdnd3X016RmEh6IH9ccB0ZeUM1qvv7s539YmgiCMx5S+KP4RFUREBKFaFSqiSLWCVVSwBdEKIr5QP6IgtYrYiNe7unpudleWpHlrxdRv4cwOmyYVmSudg6XzCX7MPnN5sjsz+P0BoCXIz+DAsizPikB0T+avNEP0mvwP8dD3Bw5smWgQBzJUFCFHV5jLBiGiN+R/IPD3Ar/PpGcssCz7nCNPodQGXTYw1zEiRG/j95n0PBB00DPyKOAp9QZdx/A2XyBH5H9IPwCEcg4FFs9LlWtaqwfMlZ4g0TvSc8BBQbeiniE/GeSnhNDmotylJ09E+UEBYX0BzUfAQQGhfABIK21OyV0L80QfyP+8h1hGnhbVF+AUOfJobZ6NSV6c80Tkf0jP+H2m+qIEKeAxVyWeFpj4uUXUXQk/YLG+SM5ZEWhK5DHHG/+Jx4JEv4ZytEL+B3FIPwWEWqPzMuaR8PMUT9T9tBR/UGO5F0E+CnisPS/zgMcTdbeIVsn/oH5Az3mQDyWobV8cEX/i5InWV1sD/WR4XsRjMEE3+UfgWojI/2SxvEJ9tYHHHZN7JueJ1iNQ7yv5n3BeOeGUxgLPrRoaCXii3rfof0J+FMonCNq4E7KtFjwR8Qz5nyhnAzTO3ZVvRuGJel9G/A8dmGnjgbnTDSZuyBNhfkb8T6mNBhxnnb8u39DEE33/x/9oAwFE/vn+Bhvn/kjH73y7/9EWcaz3Z+tpiuOiX2zzP8biiXn/sCnfNliRaMT/AJBzwPPypHxjZVUiNex/qL6cvyTfelqdqBzyP6Sfzv1mXc25lYj0wP+0rYPwTw/W1r5cjchE/wM8oOhXZ+pr8K5OpCk9cF7+co0t8JWJgn5MILq2L4EhgT7yBBx/eyyJMYq+Czw/OgvjiQya9G3Iz+JEMqM4/Y71ncXDCQ0rbXb8wkRS41ybd8bTH3hLfyQw/aHJusZKDyU/eLsHRpMpSVO7H96easqOt8/ujmf2wF5fAJDgioQEl0jQmo0deYAnF46mv4gk/VUtKS2zkV/3Mzk9Mzcf1/3Mz81MTwqt+/kLc5W5R5JoGz0AAAAASUVORK5CYII=) 2x); } body { background-color: #f7f7f7; color: #646464; } body.safe-browsing { background-color: rgb(206, 52, 38); color: white; } button { -webkit-user-select: none; background: rgb(66, 133, 244); border: 0; border-radius: 2px; box-sizing: border-box; color: #fff; cursor: pointer; float: right; font-size: .875em; margin: 0; padding: 10px 24px; transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1); } [dir='rtl'] button { float: left; } button:active { background: rgb(50, 102, 213); outline: 0; } button:hover { box-shadow: 0 1px 3px rgba(0, 0, 0, .50); } #debugging { display: inline; overflow: auto; } .debugging-content { line-height: 1em; margin-bottom: 0; margin-top: 1em; } .debugging-title { font-weight: bold; } #details { color: #696969; margin: 45px 0 50px; } #details p:not(:first-of-type) { margin-top: 20px; } #details-button { background: inherit; border: 0; float: none; margin: 0; padding: 10px 0; text-decoration: underline; } #details-button:hover { box-shadow: inherit; } .error-code { color: #696969; display: inline; font-size: .86667em; margin-top: 15px; opacity: .5; text-transform: uppercase; } #error-debugging-info { font-size: 0.8em; } h1 { color: #333; font-size: 1.6em; font-weight: normal; line-height: 1.25em; margin-bottom: 16px; } h2 { font-size: 1.2em; font-weight: normal; } .hidden { display: none; } html { -webkit-text-size-adjust: 100%; font-size: 125%; } .icon { background-repeat: no-repeat; background-size: 100%; height: 72px; margin: 0 0 40px; width: 72px; } input[type=checkbox] { opacity: 0; } input[type=checkbox]:focus ~ .checkbox { outline: -webkit-focus-ring-color auto 5px; } .interstitial-wrapper { box-sizing: border-box; font-size: 1em; line-height: 1.6em; margin: 100px auto 0; max-width: 600px; width: 100%; } #main-message > p { display: inline; } #extended-reporting-opt-in { font-size: .875em; margin-top: 39px; } #extended-reporting-opt-in label { position: relative; } .nav-wrapper { margin-top: 51px; } .nav-wrapper::after { clear: both; content: ''; display: table; width: 100%; } .safe-browsing :-webkit-any( a, #details, #details-button, h1, h2, p, .small-link) { color: white; } .safe-browsing button { background-color: rgba(255, 255, 255, .15); } .safe-browsing button:active { background-color: rgba(255, 255, 255, .25); } .safe-browsing button:hover { box-shadow: 0 2px 3px rgba(0, 0, 0, .5); } .safe-browsing .error-code { display: none; } .safe-browsing .icon { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAACFlBMVEX////19fX////////39/f39/f29vb09PQAAAD8/Pz29vbu7u7t7e3bRDfv7+/r6+vcRTjq6ur09PTy8vL86efp6en8/Pzz8/Pw8PDqUEPj4+Ps7OzdRjnfRzrx8fHdRTjl5eXf39/aQzb7+/ve3t7mTUDSPTDpT0L19fX////gSDvZVEneRjnkSz76+vrm5ubVPzLZQjXTPjHKNirNOCzn1dPrUEPoTkHbVkvOOi3jSj3QOy7RPC/o6Ojd3d3cRDfeRzni4uL39/fqUEL29vb5+fntZlrZxsTPOi3RT0TXVEjcV0zWQDPlYFTWU0f86ejYQjX96ejoYVb14uH96ujhSTzUPjHUUUb14uDq19bk5OTlTD/n5+fMOCva2trm1NLp1tXey8riSTziSj3wfHLZ2dnYxcPrZFnQTkLTUEXnTUDaVUrXQTTKNyruZ1rNOSzQOy/hzsznTkHROy/hSTvYQTThSDvsZlnWUkfeRzrqY1jgzczcRTfnYVXlX1PZVUrdWEzlYFPLNyvfSDrfzMvXU0fkX1LYVEnc3NzkX1Ph4eHNTEHPOy7pdm3oT0Hbycfj0M/POi7YQTXgW0/PTUHVUUbZQzbuZlrodmzl0tDOOS3lTD7LNyrmYVXSY1n76OfeWU3l09HaaV/tZlnsZVnm09HqYlfNS0HcysjUPzLOTEHKNinST0XbaV/o1dTTY1ng4ODrUUPxo4TUAAAAC3RSTlMAABDKAMoAAAAAyh18qQ0AAAPjSURBVHhe7dbjmiRZEAbgHq2SKNuutm3bY9vm2rZt6w43IjE13VFTfXpyf05cwPtExIn8qqoe+5/qIbSmHkJbt2XvW9u2VjEXOvYl6lDJjkMl+w5Kdhwq2XdQsuNQyb6Dkh2HSvYdlOw6VKKOfQkd+xJ12CXq2JHsOyhVdhaPLFLA8aajolTOOdc8TCTHU7n3F8pId6EyzrB3wAvSeicYfKaMVIKo0+yFWis5XgWnEJ5Y3QR0ZMALHf0L0lrnZiEgy98NsUK4IWDQ+mHurvNsMBjoDfcIrccSQ4wQSh97sdJvHZ+x+oGxAnfkntMjR/dFqxkhlL73Ng+kW1qStxyW0xuWBTl/7Oi+7m5fNSuE+06n06dOJXfPO4z9FMKyHGtFJ5GIRqoZIZSut1xKJj8vFr90QD+9gUBYEF4eQScafc23J84MZeeOJ5O7i8X2Q1P6fmRBOG30A06kRoozQ9mZn8A5vLSUez4YCPT0xCynry9S0+X0x5mhrGO+vf3wFf0MoZ88zPUKzNXnQ8cpgcQGofTkoWumg3OhA3P59nQ5FUlRuDgjhNJULof7kc250NmFjqJIkp9zMUP4XnjOsVh+BO4ngXNFsB8nODwvutggdPT7EWJ1s+NvQz+4Zyc42I/EcZzHxbbsl9ABBpz3zkwfLM2lSH4/z3G8iBKFaI4VcD/CR3V1ZyZra2/c1t8LFJzLz3Gi6PGEXASic4EThvvJPz17FaDl+g8vwlxO3A/2Y0Kai0DEgfcK4/2MjE+iU586+aOxH4XndQYdt9v1uFkUsvIHvgv93X+Zrv11OZW63PnHfpBgLr0fkEKhkNutPmoWgUr5A3eI99x98MX6VKrzwujoWJMxFy+KHPTj0dyVISt/BCN/otEXVlKdHW+0tTWeaNLnQgb6cUNpFSArf0rfqe+dlY6Od8+fb3zugwMcj2MBpGkIZTJbzKLQJyR/dtV8erLts8a9XzQ0fGXtR9MhtRL09Tckf5zOb8egn7NnX99pzRUy+skMPmIWhbILEyR/FGn/ib0NDT8f4ETe4xFD+PDYjzrYv90s+MmmUivJH0Vq+u137EcUrT2rbuinf4cFlf0TsfonyR9J+uvvnfohitiOBhAOtmODvyNDCZI/+Jka/Vhrzqj96Gwg/UPyR78fEecyoUHTqSxV+0j+gAOllfaDDoMUIflj3qHmVrGfDDpMUhfJH9HcD0BGP2xSXCL5g5DRj/5ezJKf5A+URhwWieQPPBdxWCSO5I9K7odRWpc/5J5ZJRe3Ln9U8l6skmdN/tD9sEuhUv6Qe96kdG/+PEEddol8Xw8skfx5YEldlz+0/gOZkEIssMdljwAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMAAADQmBKKAAAB/lBMVEUAAAD////////4+Pj09PTz8/P19fX39/f29vb39/f19fXhSTzgSDvfRzrjl5HwpJ7gSDreRzrkmJHrUUPeRjneRzndRjndRTjjmJHcRTjkmJLcRDffSDrbRDfbQzbaQzbYjIbs7OzpUEL0p6HY2NjZ2dnpT0LoTkHgRzrXjIbu7u7oT0H0p6DhSTvcRTfZjYfX19fa2trv7+/pT0HnTkHnTUDzpqDb29ve3t7mTUDw8PDnTkDmTT/lTD/ypp/c3Nzf39/aRDfg4ODx8fHkSz7ypZ/Zjofi4uLy8vLjSz7xpZ7d3d3h4eHj4+Pz8/PmTD/lTD7jSz3jSj3iSTzk5OTl5eXm5ub09PTiSj3n5+fiSjzp6enZQzbr6+vzpp/kTD7q6ur19fXo6Oj29vbxpJ7t7e3ZQjXYQTXYQjXXQTTajojXQDTaj4jYQTTXQDPWQDPVPzLZjoj39/fUPjHaj4nTPjH4+PjXjIXYjYfUPzLSPTDbkIrUPjLTPTDSPDDckYvRPC/////WPzPQOy71qKHVPzPTPTHPOi3ckozwpJ3YjYbPOy7POi7dk4zqUELSPC/ROy/OOS3NOSzQOy/OOi3OOSzNOCzMOCvLNyvbkYrKNirLNyrbkYvKNinJNinKNyrbkovqUEPNOCvhSDvdRjjjl5DckovJNSnlmZLrUEOrszXuAAAAC3RSTlMAgAAAAAAAAACAgKEmtJUAAAnFSURBVHgB7M6xDYBADMBAw+ZINGzNCG+lcJWb4FhrrbXWWmfXM3HdE9xng898hPqEI8ynHCE+6QjxSUeITzpCfNIR4pOOEJ90hPikI8QnHSE+6QjxSUeITzoi+ugR1ceOyD5yRPdxI8KPGlF+zIj0I0akHzEi/YgR6UeMSD9iRPoRI9KPGJF+xIj0I0akHzEi/YgR6UeMEJ90hP+87yN933yE//y00j0OwjAMBeDu2P2BkBCgt/XSJXd46kJviZ2dYkVK5Jcx+vTiAnF69v3TLBrcngPwibYLEY+tosHrAYqOQzQR0czL1fduK0hwAyx/RRsRM4e7ijqCRCnl8HSk/8UmiiE9+oEEdoqjo4mqJ4QYY372AolaDsBSlCSnHhUtygkpv/LYBySKMElVGUvOPPyuoJzzuq5jJxBKNdnUS3555rrQIaWYvrSWUVKbUBiFF8CDZZoJk0nxigaoYppqRYOGalOsVUENiElM06LWhbABN+FTd9nz/97gGH29d1jAN+ec/3Ca5qIplixFlrEwFCF8QFpeeZPnkQQCT61uNBpNEzwt21ITalKGUR4Iy1l2V97g0T6yPhCo3iS/zNWWbdtrqs6ej55lenA8z1l/xdPGfX3Q9Trp84mAOp/Bs7GxqQBIavSeM+R8cRxvy9+e78N38Kum03kZ8EuIJeKxd3a6mwqAQCRDBH1cx93a8oPt+fxwQdcNg+9LdFqkD3i63V0VQKTRPxKIeFx/rxeEX1/2Mx7FxyC7hNlptciv/X0AHeyqAJJ1Db8c1/eDoNdjIrk3uKB1qmc8U3x7yo/9xNPtf1cBRESg8aAPXhiGUXRY7R95X/LcxY+WzA+/g4OjnyqA4Nqy53h7/l7QCxno+KTyC4/6EEDi2a/TU8Lp9+MkOVMBVK640Mf1A/88vIiiQZRmIFrgOtSr/JiC/NqAPuwXgOI4uczPVACV6x5wgvD8PAJPmqZZtlDtH9yXvHfoA79m+en3E/DkV0MFQCCCX2EAv46jdDDKNO2R9k+N9k+jTvJIv6Q+ZNhRkuTguRoPVQCV28zDAl1fZ22az5xn7p8m+8X52WEayHMEvy6vwDOeDBUAgaiH/KTIzyjLIA/XM88x7J9F8xf5hbfPcSaihHjyMXgm06EKoPL3xR/oM0pHmsY8FGjE+UU/S7uQZ8oP6zMuiun0RgVQeRil6SAlfar90zDk/nmRnyrP5FdRTKYgUgAEogH51daon3XZh7P9U/0vCIfik5NftxMYRs+6UQFUnmQjra3R/qkRT8Og/SPEKvMgP6ev81M88UytOxVA5d9rTWtzfHhv8P4Rcv9U/RPHuczP5JZxCsuy7u/vVABh/jzvn+bc/pnpE1+SYZwfwJA+DLR2pwSI86PT/mmQXwDqyP1T9WE+65//rJhNbxpXFIZTtU3aLrKoHBzLspB3FZuqs5ztSC6bskVRXInxCMLU5sMQYoMNRh3V4JSo9QQHzEccVf34mz3vmZub8U24uiEc+Qc8es97mccH74t5fs4TTwpEKwSS/sN9ps/pFvensFvYubWv+O+PKDTi2U6BaNVAnA/2lUhssv8kd5OFwpPvpf/Q7/Pb9/UoF+tPKp/CWN5qgeA/eF3Sf2gKxaLv/yL958efRH/2cjQcDxaW4slbtrcyIOk/a/Afeu+bRLNboHyK/v7+gfQfxkF/ZEDA4YVZlmVb3sqAhP+syf4goEKh5Ptlv1I9lP4DoL3He7nHoj7bUaFpaTYB2XZtVUAx/8HvM+MQT6nkVyqVavVQfi9oXXs5TocXJvtjpWyMU1sN0AX7zwP4z/qmiGe3WCzu+5Uy8VTrT6X/PJLfCy401kVMSAc8jlVbBRDuPzQJ+M8WFxoPnvrsAwdAjafSfxAQBnVmnKg+Nv85TvrZpwNdfEdAVB/2ny34z9Fx4UmpVPZ97KvZbDQarRP5+xPblxjsC+MQTzrzzAzIoM9x/9lBf8pUoNPTap142p0z6T/888x1FjzIBjgAymSI6JOALth/xL/vW/CfI/jPMaWDfOrNervRarW63RPpP7I/2BgWJvoDHAdEn6tjDAQe9p8EPXhqD/oT+cYPh+XKr8SDfNod4ukGZ7LP8n3lo/pgsK404dBkv1DHFAg88B/MxjrjUD7Cfw6qv53WT5vt81aXeYJeX/oP0tmO9iXrbFN/Ip7Ml+rc+bj3RfXhfPBBff7Ofw6rzWr9vN1udTrE8/ugN3jx9vtFI3BQaNlnTDqbde+qYwQk7z/ggR5uIp+4/+zU6+3z89YfnT+7QS8Y9C7DvvSfWwVyRD5AytIstzLwKP6D9xX3n4N61J+XQTAIhpeXYdiX/oNhGsvm5xXREE9m6YQuaF3ocwLfL+Akn+N9xf3npAWe4CWtqzcMr8JXozMlHoxjYV+i0FnXXRKI+8w6Bv8BzzH355b/EBEF1KMGDUOa0Wjcx/tS+pN23vXHXQ4IPFF90Gehq+r9B/5zTQENgt6QeC7D0Xg8mfal/8iFoT5p7IsWtiwQ74uAIv/B5/RYuf8I/zkLqNC9q/Dq1WhEQNPJ5Fr6T5SPTTwiIBeTXRII+4r6s7nw/oPv+6w3GCIg2td0Op1PXs+k/zBQGv0R9QHRsiu7L8/zwFl0/4H/9KnPVGfmuZnP38T9x2EepAOgiMer3VPHqNTfPlhbl/6z8P4D/3lB7+uvcIwCvZ7PbvsPATlIJ8oHf57rfaWO2bN/+Df8B6O7/8B/+uGIEppOpvP5TPUf3hYjRThZr7ZcQthaAvuC/+juPzS5/mhM9bm5QX9U/1H35X1oZZ+ZEf2zsZFM6u4/0n/+naLQ/715338w/PMc8dDUvn4f6J4h0cMt4jnS3H+k/8xuJujzB/wHI/vjuTXBowCZEt2X/qO7/9Dk+9SfRf7DPKgz4UgeBciY6Mjk/gP/uZ4t8h8RkLIvBciYaNvo/qP3Hx7alod8FgCZE+WN7j9a/3FFPi7xaIBMiVJG9x+N/8TflwbInMgyuv9o/Afvq8bvSw9kTmRy/9H4D3hkfzRA5kS2wf1H4z+a/ihA5kT6+4/ef8CDfAyAzIkc/f1H7z+eiz4bAZkTZfT3H53/oD/f3NXNnf+LsWMUhmEgCqK5peqQG6jI+Q3qDIt5MIXdhTSPr2bY2y8V0f1n7J+zDy/EG63x/iP9czwOctFw/6H+Oe/lT+avtqb7j/ePL+Qbwf0H+gdALIL7D/QPgFg03H+8fxzkom/vHwS5qPePgVT06/2DIBbl/lEQi2r/MIhFsX8cxCLvHwV1EfVPB7GI+we+z+O/KNrWP30h3mhj/3QQi7x//Mnaq3n/+EJpo7/3j4OiyPvHQVHk/eOgIvL+cdDr3wXi3sf0ME5PmgAAAABJRU5ErkJggg==) 2x); } .small-link { color: #696969; font-size: .875em; } .ssl .icon { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAACClBMVEUAAADbRTfrTjvcRjraQjbcRDjbRDjbRTfaRDXZQDPZQTTbQzfaRDbcRDfbQzbVKyvZQzXaQzbaRDbIPjLaRDbYQzfXQTfaQzbZQzbbRDi/QADbRDfbQDfbJCTcRTjbQzbIPjPbQzfbQzfbRTfTQyzcRzvbQzbaRDbaQjfbQzbaQzbaQzbaRDfYQTTaRDfbQzfaRDbaQzbbQjbbQjbZQjTZQzbaQzbYQTTVQTXbRDbPQDDbQzbIPzPbQzfbRDfbNzfZRDaAAADVOSvYQDbbRDa/QCDZRDbqVUDaQTPbRDfGPDLbQjXHPjTVQEDJPTLGPTHKPTPYTjvGPDHbRDe+Oi+6OS64OC7LPzLHPTL7+/urNSv5+fm/OjD4+PjEPDHFPDG5OC67OS/DOzG8OS+9Oi/COzDrn5nAOzDtoZvBOzD9/f36+vq3OC62Ny339/fIPjLsoJr+/v6xNizx8fHFPDCnMymjMii1NyyfMSfz8/PUlI+uNivLlI+oMynDPDDUlY+zNyylMiipNCrOlI/JPjLHPTHKPjKhMijPlI+3OC2+Oy/FPTH29vaqNSq5OS319fW8Oi7AOy/BOy+sNSv////VlZD8/PzQlZDKlI+iMijCPDDYmJO0NyykMiiwNiy2OC27OS69Oi6gMSfYl5K4OC3MPzPempXBPDDqnpjy8vL09PTHPjLRlZDbmZMWYj36AAAAUnRSTlMAgQ1CaODzz4soSuj4/tkGV9303/FBM9ic8gTpHAffhc+MKtAXQbDHdMaudtc7rX7q+n93Nl/VJyu4EK9B9vwOXgISNOIIgAw32vJNgAz+84ENOFEUuAAAA25JREFUeAHsz0lPwmAQxvEWSxdaWiAIyAIBkQXc9yXuezw+3/+7mAkc1MxrZho9kPR3fZL/ZKxM5n80a05jXA+jKKyPG06tmTIT+C180/IDS689AmPU1nacKlhVR9fpwain6RxiabtfGgw7neGg5J9iaU/eKWDhYsf64m2GhYK0k7yDXJ/8HD72QeJEGJqAHDCHz0OQiTAUgxxx0+MNTbGsE4A8PbNjH+RMFJqDvPDjZUTjXBS6Alk3rLs0zkShKcitYb2jcSoKlUESw3pMY1kUqoDcG9YHGiuiEEB+n1cvlLM9FyLupp0zd7a6UMivGTtFqBQNpdculPL8dzbUbDbkQc1jQy7UNtgQUshCfxb67Lw+ltMGoygALzLJLiuvsvNMXsNPkElJZAkQIIxASHRsesEUXOy49zi99+Qdc84vBXuBPJLYefPNOfdezfzOZq//ZZpBoezZ2TXJjMW+BYPgrKxkrxwtpn0OCEHKL0/zxDTtUg9WDU6ekpOnfNlu7gQbNiEVklkQzqfmeNUKtP7lfP5CLZjsRWdr3JhEvweAIF2oaqHA8WjCiUZ71d1AB2mqKuIAwnyYp/duVNoIAEESeei8bUz2T6utUiu0EQgSecp95Inu96qjN8ViKFTxDzlOeW8N8zlFLzqh5G+/kL0vOHuH2+g1KpXAPE8mlXV/kLhDrd+Hc/jrBfO8Zx5F0dObfiC7V7+9tUaoM3R6JQ/0dNoIe4ece26/HDe24XQ6QzAMpOvpI1kOe4XoMI/Y1x84P2tdzEeBYxiyHI+HPUI/WAx5muIOh3Bq5+ilHKAXnTgyeav2l72YJ8o7PK/ZgfS0YRzRsazMV4/Dfs3vHffM76JV7HbFeJgHgWQrl8mkvK5fYR7hFHE+nDPzyHae40zKM7S4szqZfhf2/XBflJgnkfD+iViYD/Pwp+B+PiDPR+ahM/ABLb6iU0Sv6d5lOLlj5vGRCL9d556/sJdg0CuXSmUSiSXJBwRJnHPSmU+c+8phznCW6jOhe25ShY7TC9LUkaQHPl9sFfZSeIcsBoe9BpJUn/f7hqwozh1azHPi5JEiD2e/1m+7S+tw/g8I++J8IvXI3KPZ7+Nbd92lTYOMfYepAR0p8nhhtgPphkxhQNN9JaS6FJlbuOl/kft3XCVxzydg4EhP5p8+c0H+Affig2wpFL3DAAAAAElFTkSuQmCC) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMAAADQmBKKAAACx1BMVEUAAADcRDfbSDjbRTfbRDfhSzwAAADbRDjbRzjbRTjbQzbaRDfaRDbcRDfTQyzXQzbZQDPbRDfcRDfbRTm/QCDaQzfbQzbaQzbMMzPbQzfbQzXaQzfeRjrbQjbVOSvbRDfaQzbaQzfFPDLZQjfZQzbVQCvZQzXaQjXaRDbXQTfbQzfaQTPZQTa/QADaQzbcRDjZQjXaQzfbRDTaQzbaQzbbQzfbQzfaRDfbQzbHQDTMMzPbNzfaQjfbQzbaQzfbRDbWQDTZQzfaQDXEPTHXQTbGPTHbRDbYQTTVRDPaQzbaRDXaQTXZQzXbRDfXQDDXRDTaRDbbQzbGPDLHPTPZQjTbRDfPQDDbRDbYQjbbRDbaQjbZQjbaQzfaQzfaQzXaQzbbJCTDPTDFPTTFPDLaQzbbRDbbPTHLPDXbQzbbQzfbRDfgSTnSPC3EPTHbRTfbQzbbRDfbQzbaRDfEPTHFPDLaQzbGPTLaQzatNiuiMiioNCntoZuuNivsoJrLlJCxNiy3OC2vNizz8/O3OC7Ok47+/v7x8fHWQTXMk4+9Oi739/f19fXw8PD29vb09PSlMymfMSfZQjW1Ny2zNyy7OS6nNCn4+Pjy8vKvNiu4OC2/Oy/WQjXYQjXMlI+sNSvVQTWpNCqjMimdMCfAOy/v7++4OC6+Oi/Rl5K1OC3////8/PzFPDHNk477+/u6OS7XQjX6+vq0Nyy5OC67OS+5OS29Oi/Qko3BOy+8OS/DPDCkMinSl5LPk47Rk46wNiy8Oi6/OjDAOzCeMCe2OC3CPDDCOzDDPDG5OS6sNCrEPTGyNizEPDGgMSfBOzD9/f3Qk46tNSvnnZezNizDOzHonpi0Ny2uNSvOlI+1Nyz5+fm7Oi7NlJDNlI/TmJOjMiioNCqqNCq4OS3Oko3MlZDVQTSrNCqmMynPko2sNSrQlpGhMijFPTHbRDeKorW+AAAAeHRSTlMA2UCB7CIB8zLIt8j4vhcTFPzYVQjk/qQF95TJVFUS+p37vl16DDVh6jOoNy8Eir9luzHC4+gqte9ACg6DhZmpLJUw80eB0yce3XxSV+kgQFrF+jI2zBC4QvBZUZ/ffcEH2VTHq/0VIpu2sTER2cewYmOe7Nj67Nj6WWwvAAAICklEQVR4AezV105bQRDG8TEuxj4uOMEdgxG9QOggOgjRC0j0fgGIFKVEQn7p7yFyOcc4gR1r9+Rmf/f/0Vh7vEuWIsuyLMuyrNm+joXFpTOnMpnPT1acs6XFhY6+Wfo/mkqF9Qz+IrNeKDWRx5Ijoym8ITU6kiTvLJdjeFesvEzemJqGoukpMq+10A5l7YVWMuwgDZH0AZkUmn+E0ON8iIzJZVGHbI4MaY6iLtFmQ+f1gFqx4krP2sBG4v4+sTGw1rNSjKHWg5lTG8ZrW9tjNceRG9vewmvDZMAOquWz5//44aHzbB7Vdgw8XXuoEt2nN+xHUWVP/+PWD7feQ3rHYS/c+kmzbrgdKbycySO4dZNeUbg4cyrJXBEun0mrY7icnKpFpydwOSadnsHS35Qf4jTYs9Y7+gLsUr27BLvQeV/vgo1LwnGwXdLnmsemBiXhYIrLa9Lnhsf+kJVfuLwhbTbBfsrSX2CbpEuJh2YSsjSR4bZEunTyUEfaOtx2ki6/eeittL3ltky63PHQK2l7xe0d6VLhoavSdpXbCukywUOfpO0TtxOkywwP7ZK2XdzOkC4vPHRI2g5x+0K6gHkb24XsQnYhu9BXf9wXhj5hX9zfSHVr+QATfC1Ul+B3mBIJklxDAOYEGuT7tMGkNulGwQDMCghPLQLTIrL/F8z7SAI+mOcT7NMILwhuSD+84CdlcXjhk/lPyNhHFIYXwqQM3rAL2YXsQmbZhexCf3q3n622qigM4Dpz3jfoCzh27OoL2CeoHThypMsFIX9aUrgthJQ0BCjYhoJEmpZrLhgIkYYkGBtJAmrqfzSpSFTsQ7i/szm5d2VxbMm695wpk9/69j4n3+AyNKT+WyCgHzT08KFSFEinA5pB8ECk8OynV5/pBcGjEgX20+n0KkT6QPCoRAHBWc1knukDwaMQ8bxY9K1OkEKEecFDnMzP/8xrAqlFcn9Ik8kEF9vzekBqUddDomC5XK7OawCpRdKDgOCZrNeRkQaQQmR7MsIzWT85QUZ6QL0ieLDQmVMPnZOTwcH89aQukFM0MsSeVYDgWSyX6/U6efJ5f1IXyBaNjIwMBdI4pOl6KB8CdXyFpCaQFAG0v+/cn0XsM4F+z98mkC+U1ASCiPMhDvaHH6AgxVMmTh6HPAstiPSAIBoBKN3NBx4xL4Budzq+Vrt9HE/qAUEEDgJy3nfynDzA/nQ6LXiqVSupCwSR4ODI95BAD0Q+mFf7mEADd5K6QPz8pDke+v3i9xCeTiLRagnPwIB/9ntDG6i7PgiI94fmhfVJ0Lza1eOq3+8vhJ4bOkDwOH7ApqePsD/YZ/Lw/lA+A7OFQmjvqaED5Og/8EyPHYEj8vH5yAMQOKE9y0JGXoPgsQdGnrGJe3maVz6RSCy0jtvH9ykemldhby9uWabhNUh6MC86Y0L0K97njtjnKgZWgIcCsnZ3c4a3IPZIDmmIMzE+fhPjWuB50ToTiDgr1k/h5WWIvAPBIy98MMiesYnxieihzyfvO+WDcSGf5fA1iDwD4QFy9rEgPBQQnehj4pDnb8oHnj3i0Fmms5Y1vALJB7Hbf47IA1B0PDr8mPfHPytAyAccgO5C5AVI9h/h4d/Te8QhTzQ6PDx8A+uMgEJOz7W1NdNMGV6AZD4Aif6D9/BQzAuemZltgHC/LHjChEE+AEHkOggeZ/+Z5P5zk+Jhz+jMNsYFj9hnaOjcNdfpQOQqiH8vIOrtP4fkAWiUzsHpvFZoXoiH81k313O54p+ugpDPGf0HvxedH8ERnkjkgO8X3h+5PxRQbj2XzRYNl0FIR/afOjyirqL/3EA+M6MROk9O3x/sz9qyGBgmls1ld7Ilw9WR/ebYH84HHp/oP9sIiECfbCAf3h+YOB8zl6OAsqnUnOEmaP5Tul6rmNcZ/ecPcOCJxy08h7u8PyZA4EwRh07DcBEEkb0/gz39ZztCoif8/IQ5Hbk/HM8tgIoN90AQfQEPArL7T0v2n4NIZAOeld0w4pEcBDRFHmiKxVLJTRBEwfIkcWif0X983H9EPfQXNv7CvOzfC6zz5xQQcRh0q1hMuQnC+ey+fH/QfxLd/uN39B+eFx1xvRzzQkDugiD6hvLh/RHj6u0/2B8ZD2kEiOOBx20Qzsc/yH22+w88iIf7T3eBcMGyuamUOEUCzZUa7i41i2aFB/NS9h/7fmGf5UITp7HkNgiikLhgzv2R/Scs+88a1tnEuOS8UqXSXKNRqbgPgojfZ3Hd/aL/fBfv6T9yn4WG8ynB03QfBFGcfr9kPmf2n3WT89lJ4UDE+Wx6kRBEd+DB/ZL9Z6W3/2CfRUB4f0pYoAoC8iQhiHaRD9+vEO9zuLf/ZKcc8QC01Gx6BILoOTyzBFL2Hzrd/WmQh06zUvPsY5TY06rwhM7sP5jXjhwYFrrSaGzSwGpve/e5TmzKX7hO+cRV/QcYkQ/2uYF8KKD3Xx305otziyge2X94f8ze/lMECJwl4jRrtdpFLz/5iv0SUvYfpOPYHxwBuuTpR3Gx7Mv7T4oCWoIGnNqjy95+NhhLWRZx4LH7Dzh2/ymBw6CtWu3Ka+c4F170ISp1+495dv/hdd5EPhTQu55/ehr78iX9ByCMawueq55/nAuRov/QmROFo4lxifPBezo+X4599b/9h/MR83rnLR0feEOk7j/2Om89+ujcHkytrz36Wtl/wKlwPlcxrz7Ohdf7ESn7jxzYh7hffZ43zv9vFLF/Vf0Hv6dXLl66fH7Gf0i3E4sWdg3XAAAAAElFTkSuQmCC) 2x); } .captive-portal .icon { background-image: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAQAAAD/5HvMAAAEyElEQVR4Xu3afWhVZRwH8LvdmjVSjKyQbKazia1k1sL6YzXoZdy28/J8f5XRC7hwEVk0hZQCXY2SipCgYgappXMQ5Ya9ELZqoEM3VHqxBkapm21jOBWmbLfudk+0Peeu2+mc3zk9514WbN9/zz18ds75Pc/vPM+JTP9NZzrT+b9Fn2nGxHrainb8ggEaRgLn0IOjaMFroloU/Ssg1yxBLZpxBD00QufpODrRiFX6IiUKXY8XcRAJsryC3nRL7EpsQJ/r0V3iSS0/MKU4D6uoQwLY/P1q4i0aYX9xVqyPRH1jbr8UtfSbE8CDqIK60wBjOEb7aDf24CBO/gN12LjJF4dM+dPAoNgMdNkUxLENQltAFViJdbTWfFTcaRbiMXyCpE1CM4vR5uAzdwB/hcxCDI5jXqGFeAadNJoGH0ErVhg3YPs46Ad9JldNS3GCAbDPkFGG/eJGWktn3PA4IUB3oxPzGY4AXSBLCSTLgfZxx2MLV1Q5tFHeWxWQDNalHulWeo4q9GW4VVShng5J0KgZ8+bkYpcEqIJk6H2y0CiW4H58gGMYQhyn8DlqUUltZIk1XF01kKUW5yhm3gVB3Q76MDaRyXBQR1aIIJnyi6jNZUgs8uTQfUiGDJIxZ9OPfxEwhAO0F70To5NR5skxrsUgWaGDZLQCHBHVxnKxWjwuivRS7McK7na1kpUZkEwUzXbFiZfZcVk8pE6xZ3u34AV5TFJUsV2ObBHU0+Q5wu0eJ21krw+eD4lzBvOYf7wLeyI5DEfLx2l1DPqoSXK8SItis/gm41mlago/9P2UApklZE0pkHhdAv6YIiB8NwEQL9HvUwCkzZHz15g5Gw8jmR0QtsizvOoACUjAIdlOZQUkHpCgDqd1gwRslhX3djZAmDsBwpATJPtDUZPqGFuyUWU453IWu7fFHZOvhjiQ+aqiDheQ/bJjXpf2oP+caRA+cgPJpkxckeZfiIHMgmirC8gee4rz0qF6KV3IJEi86R8kg0oazQ6Iv2Uyoiajt4x/qJ1BfcCe6JQZC/BQ82XvDLYHJPUEK3tmYHTmlotpbzCSwsDomDpc+mD6VgHETB3M5Or2c5xUBvGTq7P98DjBEjqrBOLbD2eDZj7o+aJdhnhooJxUbd/r1cJ+yl1mJMMBGWUSP6zlezT5SIirGNKacEB4bwKEXcxrEN7gThUGSCtILaZXMC+KiGN+5kHYITndkSj7Ko3GTIPMEvtJFKt9LDYgiZtVQTLnqUPUOJcV8KWE95df4m85ps0+CQ/ig68xN72lscF4yveCFTa5g9AXnDR5lczC1Jr+4UhuCsAv6YlH3EDURFbgPCG3Y2altmPG9FIJ8LnoOYLbXNDzgi+Myvkqii9sIuocAHZZuN9tAKi6hnaiBwka9f942y2rzFcut4tZOO+3r5J6xcVmYEeKc9xlPuC3FhDHynBA6LQ5GGA2ftnNl82RqDrIDgb1ZU4AnxzUTc7raDeWhwPCUW0BA/C7gYeP9cWqILSUX8YAgmxxIoF3tYL/DkK9Y/znwm8CI4lvRLV+dVAQThOpOPht8p+ogZ4W9/jijFFD5eXhWPgPCXjMh/pSVYD6pxaywPGOKOIBWfkYhXYKozgvy5/rYBva8avzcx19sSrgT2jJnjJMVMiUAAAAAElFTkSuQmCC) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAQAAABNTyozAAAKSUlEQVR4Xu2de2wUxx3Hfxhj5dkSIgOhpICDWilH1AjTGEwdnaCNdbi+2/n+EGlKAvSBopRIKa+KSC5tCU+ZoKaKQ9WSNihqgsXDqRMkHBRBDDi04Q9kGQFG4JAEqF1TIkwSP+BcjBXK7zC3551Ze3zdz/7NnffD3uz8HjND/hAQEBAQEBAQEBAQEBAQEBAQEOAMjeWpOVjF5djFB7gWDWjmNm5DMxq4lg9gF5djlZoTy3OGkmceuzNWoBaiDDu5Dmf4M26/en2GM1yHnShTC2MFj91JNhG+y4lwKVejkTtTv9DI1VzqRMJ3UaoMxlS1Bof5iuunX8FhtQZTaTD1J6EsNU2tRA06uNP7hQ7UkCuxB3kDN/X605t4Q+xB6g8wGWV8njvNXJQUnoH9Op+O/TyD+g5nLEpwXAjwURCK+JCR7ziEIvKf6CRUIC4E+CiIc7DT5LdgJ+eQf8QKuEoI8FdQBi/jL41/05e8jDLIPM50rhYCfBaE+/Cei4DL+Ce2ogy/4We4i2fwG5RhK3/Il5NLwnu4j0yC0dgqBfgvKKmeI/wSopGv0S34/tcRxR/4SDJFZIpwplrCLdzZ54LG9DinalG/Lx5H1+AQP4dNqOSDfIovXb1O8UFUYhM/x6GvRjB+iS/1NP/CGDIDHuU6DQFaY5CaglZxW2d5WdE9RMV3qDn8Op9LKvwcv67mTLmdqOgePI+zQk+rmmLo2eG1Ou8r/beY8+R1AW14PpRFFMlWv0NzqtLxb/w2kk0UysLz3PaVIOdJMkHsfo2pmbHXPFZ1z2A4RPTDb/BG/qLX6r/AK9FRRBzqnk1hFZkAReL/qd8E0SC8iZJwJhGewgXP+v/T9dSEM1GCN2kQaZOBdTo/LfOhhhqOCt3Pxw413FD4iS1CgAWCsNvEN2A36RO9W/wxlggq/uYt0yjH+DW1Ri1Us69eC9Ua/JWPCS1mX+1quAgLrRFEFMvnNnG7cbyDeRh9i2ntPLyTMEi0YSrpgjGo5057BEkw74ab/Ut3hieSjZn8MvbyEW7idm7iI9jLL2NmJPta9ujV/0lVPzHw9Ag9VgiScGl3Zsd5gCh3iPMEasRTIp+vGvWjcKbzAPZ16cF6A2OP+HFZKYgyeLtaQhmUwc/ypylI/5SfDWdiMW+nDO03lxiaLRMk4RA+SF07PuAQaZMhXuyWC8KOXqrfTrpgHXfaLUgWfHo1GBzSLv+gCHHbBUlmjMRHqenBRzNGaoekIuayWJAsAN0Ql7VjL1bgaWcWnsYLeJ/br+u5oF3uCWeKiN1qQRIn3DXHQTN+XXQPCQqH8fJrxag2J0y68FohwHJBEjUblWo4USwfr+Aot3ALjqKsOxUWHcFvq9kGsoWIWyPoEnmgS0SiaFRGR5jKF9bZ8/zwKfIA3u9JNvaSCXipRXo6sYM8oCb0kJK/pCYYKeRwiw1idINJPH6T6sfJBNhmkx6cLb6DPKJeFKJfNFUl7bTpUj8l7wzmPdcF7THUDcTVNunBJtIiko1PuvTgk0i2oRYEm/Twn3KHkCbOI2hFq/MImYGrbJGDj/EUGUHNV/ON9fdYoKYF9diCH4dvI/tAhQWhg704YxEPBCUBJckFBILqA0FJwOTkAgJBZYGgpMUdPh8ISoKallxAIGilbM7HvkCQADVCwKLCYXwsEHTDgiW5Isd5+Nq08V/pJ8h5WK4kSnGxlRMR/6y5u1fPyeVL6SaIBslanxOhVOBSIWjbDQuNOqwWpJ8vLfWQJFML6Dr4eboJUguEoGpKBdnlJzP/WGFaDy70q6AJsjsxpaW2cuBKzOLxa4YFvU/9SO4QOWyksHw4licE1ffwke8aFNSG79oUlMfyyA01V9zA2z02AB82Iucc/s4h6mdkSVrNITewWjxB66kHoqPwcboEElgv7ne1u9FyYXT+Lfv/LqSHIDVf3EF5bysZhcn6btJBEBcKQVW9jMOSLShznkA8DZ6gKWJIqXE3WitG9YcoCfjVwBcUe0jcQS25gQYRnYzVzTzaX70RT1ADuSHDN3Wva0/7WwNbkLo3ITR3Qw69oSxyYcrtfHAgCwplyYmrIUGyZ4JPpJkg/Z+YJDqem9LvJ6Y/SMsI7os0G6T1X/MSFeMr/xeveT4gBOVTyuAXPheIzmEr5xgXlC8EHSA3sEuGGpb147eob/kZamCXTrDqziB+w29FqPQ3WNVNd7i/NPf4rKjJ13THKnejc1wSZq4pW78XLvibMPOQcvWwsuyMrYLcU64aSfvUUd/BxYEhKHcIX5ZJey9lHw+oH3C7HYL0yz7uhUNPqLlWCNIvHLqXnm1rA/Wz9KzRvOAF/NkCQfrNC+7tLxpLgXdaIEi3/cW9gYo8IBb3WyqIF8mEvdcWvH2kQXQEGmwVJFsL1UrvTZw5Woq+zedtFMQ5Urya5r0NeDlpob7HX1ooaLkQdD6U5b2R/ARpgpl8xTZBMpOOMq2lCLF80gS/tEtQLF9qx2TqHXIfcWwmbewShM1Cz3HNeTA6iselk6DicXKuhxL9BXUb00kQ/ij0xJ2x2ksy0RodlS6CoqPQKgRVmFnUuyFdBPEGqTw6yciycHyOMekgCGMSipxV5jYWeIs08G3h+HF+w5mV+jQvsR8lVmBwawoU2SNIXjjJTCmAogTB1WY3NznlfYm//6sYsd5tJ83wbXxKCnKmkx6Jx0BgBXkE//BbkHsdDy9IPdhqfIMldHg4KUCkcn2+OFnDJjrk+IXRpI9aIq3z6cJh5AEnty8E4aQoVMltAU9LmWqJ0U3e9OvjeLcvFDmzqEdQmSCzLpxJAoPbBGKxtyoUWv0XhL9RD2Cx1IM4HiWB2Y0m272N/mp2Hwg63uPbOLGQuZYExrcqxUVMJA/gZ9zudw8RJYCJiaVw7Hf9eelvdovG6HiP+4J86K+ixBZTNEo9aI7dT+7ob5eMkx43GR7kRPhVHMVFvsKX/RU0Y2Ti1BBxl3jA6IbbtUKRJSGI0FObqA/ryAWjW7bjZHS8rYKi43HyJj1bXMIR85v+oxETbRSEiWi8Sc9ut6jfl2MjcNGZbpsgZ3oPTVyHoneTBjoHj7TzIpsE8aKbJxOo1zr1Sf/oGlQWDrND0PWgQujRyIcaO/zotJqiIcjP65DG02Py+Cx0YEX4NtsEYbfO2GP+ALZTKLJJELbov7nMH+H3FsbYIAhxrNOY9/h5CCQ+5w3RUf0rCM26QYXPx4iilTcWj+svQdhvIiT1/SBadGBzLL+vBSHOa00mNPw/yvgEL+ecPhNUJ7OF9jxHS5MfMYF9vMh5mAb5KqiFl4YzyVYwGttSGDq3qQVqQu4Q84KwDaPJDvQP5EcH6vltrDemp1qEzHYTK+jjAwOqYgU00IhOQoX/274jjgrR3zPgdsYvQb1vcupR4oylgQ8mo8xwb8d5lGEypROhLDVNrUSN3nan6ECNWqmmhbIoXQnf5US4lKvR2CsxjVzNpU5ELFhKd5yhsTw1F6u5nKtQw7VoQDO3cRua0cC1qOEqLsdqNTeW5wwla/gvpXzJeo7GTncAAAAASUVORK5CYII=) 2x); } .checkbox { background: transparent; border: 1px solid white; border-radius: 2px; display: block; height: 14px; left: 0; position: absolute; right: 0; top: -1px; width: 14px; } .checkbox::before { background: transparent; border: 2px solid white; border-right-width: 0; border-top-width: 0; content: ''; height: 4px; left: 2px; opacity: 0; position: absolute; top: 3px; transform: rotate(-45deg); width: 9px; } .ssl-opt-in .checkbox { border-color: #696969; } .ssl-opt-in .checkbox::before { border-color: #696969; } input[type=checkbox]:checked ~ .checkbox::before { opacity: 1; } @media (max-width: 700px) { .interstitial-wrapper { padding: 0 10%; } #error-debugging-info { overflow: auto; } } @media (max-height: 600px) { .error-code { margin-top: 10px; } } @media (max-width: 420px) { button, [dir='rtl'] button, .small-link { float: none; font-size: .825em; font-weight: 400; margin: 0; text-transform: uppercase; width: 100%; } #details { margin: 20px 0 20px 0; } #details p:not(:first-of-type) { margin-top: 10px; } #details-button { display: block; margin-top: 20px; text-align: center; width: 100%; } .interstitial-wrapper { padding: 0 5%; } #extended-reporting-opt-in { margin-top: 24px; } .nav-wrapper { margin-top: 30px; } } /** * Mobile specific styling. * Navigation buttons are anchored to the bottom of the screen. * Details message replaces the top content in its own scrollable area. */ @media (max-width: 420px) and (max-height: 736px) and (orientation: portrait) { #details-button { border: 0; margin: 8px 0 0; } .secondary-button { -webkit-margin-end: 0; margin-top: 16px; } } /* Fixed nav. */ @media (min-width: 240px) and (max-width: 420px) and (min-height: 401px) and (max-height: 736px) and (orientation:portrait), (min-width: 421px) and (max-width: 736px) and (min-height: 240px) and (max-height: 420px) and (orientation:landscape) { body .nav-wrapper { background: #f7f7f7; bottom: 0; box-shadow: 0 -22px 40px rgb(247, 247, 247); left: 0; margin: 0; max-width: 736px; padding-left: 24px; padding-right: 24px; position: fixed; z-index: 1; } body.safe-browsing .nav-wrapper { background: rgb(206, 52, 38); box-shadow: 0 -22px 40px rgb(206, 52, 38); } .interstitial-wrapper { max-width: 736px; } #details, #main-content { padding-bottom: 40px; } } @media (max-width: 420px) and (max-height: 736px) and (orientation: portrait), (max-width: 736px) and (max-height: 420px) and (orientation: landscape) { body { margin: 0 auto; } button, [dir='rtl'] button, button.small-link { font-family: Roboto-Regular,Helvetica; font-size: .933em; font-weight: 600; margin: 6px 0; text-transform: uppercase; } .nav-wrapper { box-sizing: border-box; padding-bottom: 8px; width: 100%; } .error-code { margin-top: 0; } #details { box-sizing: border-box; height: auto; margin: 0; opacity: 1; transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1); } #details.hidden, #main-content.hidden { display: block; height: 0; opacity: 0; overflow: hidden; transition: none; } #details-button { padding-bottom: 16px; padding-top: 16px; } h1 { font-size: 1.5em; margin-bottom: 8px; } .icon { margin-bottom: 12px; } .interstitial-wrapper { box-sizing: border-box; margin: 24px auto 12px; padding: 0 24px; position: relative; } .interstitial-wrapper p { font-size: .95em; line-height: 1.61em; margin-top: 8px; } #main-content { margin: 0; transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1); } .small-link { border: 0; } .suggested-left > #control-buttons, .suggested-right > #control-buttons { float: none; margin: 0; } } @media (min-height: 400px) and (orientation:portrait) { .interstitial-wrapper { margin-bottom: 145px; } } @media (min-height: 299px) and (orientation:portrait) { .nav-wrapper { padding-bottom: 16px; } } @media (min-height: 405px) and (max-height: 736px) and (max-width: 420px) and (orientation:portrait) { .icon { margin-bottom: 24px; } .interstitial-wrapper { margin-top: 64px; } } @media (min-height: 480px) and (max-width: 420px) and (max-height: 736px) and (orientation: portrait), (min-height: 338px) and (max-height: 420px) and (max-width: 736px) and (orientation: landscape) { .icon { margin-bottom: 24px; } .nav-wrapper { padding-bottom: 24px; } } @media (min-height: 500px) and (max-width: 414px) and (orientation: portrait) { .interstitial-wrapper { margin-top: 96px; } } /* Phablet sizing */ @media (min-width: 375px) and (min-height: 641px) and (max-height: 736px) and (max-width: 414px) and (orientation: portrait) { button, [dir='rtl'] button, .small-link { font-size: 1em; padding-bottom: 12px; padding-top: 12px; } body:not(.offline) .icon { height: 80px; width: 80px; } #details-button { margin-top: 28px; } h1 { font-size: 1.7em; } .icon { margin-bottom: 28px; } .interstitial-wrapper { padding: 28px; } .interstitial-wrapper p { font-size: 1.05em; } .nav-wrapper { padding: 28px; } } @media (min-width: 420px) and (max-width: 736px) and (min-height: 240px) and (max-height: 298px) and (orientation:landscape) { body:not(.offline) .icon { height: 50px; width: 50px; } .icon { padding-top: 0; } .interstitial-wrapper { margin-top: 16px; } .nav-wrapper { padding: 0 24px 8px; } } @media (min-width: 420px) and (max-width: 736px) and (min-height: 240px) and (max-height: 420px) and (orientation:landscape) { #details-button { margin: 0; } .interstitial-wrapper { margin-bottom: 70px; } .nav-wrapper { margin-top: 0; } #extended-reporting-opt-in { margin-top: 0; } } /* Phablet landscape */ @media (min-width: 680px) and (max-height: 414px) { .interstitial-wrapper { margin: 24px auto; } .nav-wrapper { margin: 16px auto 0; } } @media (max-height: 240px) and (orientation: landscape), (max-height: 480px) and (orientation: portrait), (max-width: 419px) and (max-height: 323px) { body:not(.offline) .icon { height: 56px; width: 56px; } .icon { margin-bottom: 16px; } } /* Small mobile screens. No fixed nav. */ @media (max-height: 400px) and (orientation: portrait), (max-height: 239px) and (orientation: landscape), (max-width: 419px) and (max-height: 399px) { .interstitial-wrapper { display: flex; flex-direction: column; margin-bottom: 0; } #details { flex: 1 1 auto; order: 0; } #main-content { flex: 1 1 auto; order: 0; } .nav-wrapper { flex: 0 1 auto; margin-top: 8px; order: 1; padding-left: 0; padding-right: 0; position: relative; width: 100%; } } @media (max-width: 239px) and (orientation: portrait) { .nav-wrapper { padding-left: 0; padding-right: 0; } } </style> <script>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Assertion support. */ /** * Verify |condition| is truthy and return |condition| if so. * @template T * @param {T} condition A condition to check for truthiness. Note that this * may be used to test whether a value is defined or not, and we don't want * to force a cast to Boolean. * @param {string=} opt_message A message to show on failure. * @return {T} A non-null |condition|. */ function assert(condition, opt_message) { if (!condition) { var message = 'Assertion failed'; if (opt_message) message = message + ': ' + opt_message; var error = new Error(message); var global = function() { return this; }(); if (global.traceAssertionsForTesting) console.warn(error.stack); throw error; } return condition; } /** * Call this from places in the code that should never be reached. * * For example, handling all the values of enum with a switch() like this: * * function getValueFromEnum(enum) { * switch (enum) { * case ENUM_FIRST_OF_TWO: * return first * case ENUM_LAST_OF_TWO: * return last; * } * assertNotReached(); * return document; * } * * This code should only be hit in the case of serious programmer error or * unexpected input. * * @param {string=} opt_message A message to show when this is hit. */ function assertNotReached(opt_message) { assert(false, opt_message || 'Unreachable code hit'); } /** * @param {*} value The value to check. * @param {function(new: T, ...)} type A user-defined constructor. * @param {string=} opt_message A message to show when this is hit. * @return {T} * @template T */ function assertInstanceof(value, type, opt_message) { assert(value instanceof type, opt_message || value + ' is not a[n] ' + (type.name || typeof type)); return value; } /** * Alias for document.getElementById. * @param {string} id The ID of the element to find. * @return {HTMLElement} The found element or null if not found. */ function $(id) { return document.getElementById(id); } /** * Add an accessible message to the page that will be announced to * users who have spoken feedback on, but will be invisible to all * other users. It's removed right away so it doesn't clutter the DOM. * @param {string} msg The text to be pronounced. */ function announceAccessibleMessage(msg) { var element = document.createElement('div'); element.setAttribute('aria-live', 'polite'); element.style.position = 'relative'; element.style.left = '-9999px'; element.style.height = '0px'; element.innerText = msg; document.body.appendChild(element); window.setTimeout(function() { document.body.removeChild(element); }, 0); } /** * Calls chrome.send with a callback and restores the original afterwards. * @param {string} name The name of the message to send. * @param {!Array} params The parameters to send. * @param {string} callbackName The name of the function that the backend calls. * @param {!Function} callback The function to call. */ function chromeSend(name, params, callbackName, callback) { var old = global[callbackName]; global[callbackName] = function() { // restore global[callbackName] = old; var args = Array.prototype.slice.call(arguments); return callback.apply(global, args); }; chrome.send(name, params); } /** * Returns the scale factors supported by this platform for webui * resources. * @return {Array} The supported scale factors. */ function getSupportedScaleFactors() { var supportedScaleFactors = []; if (cr.isMac || cr.isChromeOS || cr.isWindows || cr.isLinux) { // All desktop platforms support zooming which also updates the // renderer's device scale factors (a.k.a devicePixelRatio), and // these platforms has high DPI assets for 2.0x. Use 1x and 2x in // image-set on these platforms so that the renderer can pick the // closest image for the current device scale factor. supportedScaleFactors.push(1); supportedScaleFactors.push(2); } else { // For other platforms that use fixed device scale factor, use // the window's device pixel ratio. // TODO(oshima): Investigate if Android/iOS need to use image-set. supportedScaleFactors.push(window.devicePixelRatio); } return supportedScaleFactors; } /** * Generates a CSS url string. * @param {string} s The URL to generate the CSS url for. * @return {string} The CSS url string. */ function url(s) { // http://www.w3.org/TR/css3-values/#uris // Parentheses, commas, whitespace characters, single quotes (') and double // quotes (") appearing in a URI must be escaped with a backslash var s2 = s.replace(/(\(|\)|\,|\s|\'|\"|\\)/g, '\\$1'); // WebKit has a bug when it comes to URLs that end with \ // https://bugs.webkit.org/show_bug.cgi?id=28885 if (/\\\\$/.test(s2)) { // Add a space to work around the WebKit bug. s2 += ' '; } return 'url("' + s2 + '")'; } /** * Returns the URL of the image, or an image set of URLs for the profile avatar. * Default avatars have resources available for multiple scalefactors, whereas * the GAIA profile image only comes in one size. * * @param {string} path The path of the image. * @return {string} The url, or an image set of URLs of the avatar image. */ function getProfileAvatarIcon(path) { var chromeThemePath = 'chrome://theme'; var isDefaultAvatar = (path.slice(0, chromeThemePath.length) == chromeThemePath); return isDefaultAvatar ? imageset(path + '@scalefactorx'): url(path); } /** * Generates a CSS -webkit-image-set for a chrome:// url. * An entry in the image set is added for each of getSupportedScaleFactors(). * The scale-factor-specific url is generated by replacing the first instance of * 'scalefactor' in |path| with the numeric scale factor. * @param {string} path The URL to generate an image set for. * 'scalefactor' should be a substring of |path|. * @return {string} The CSS -webkit-image-set. */ function imageset(path) { var supportedScaleFactors = getSupportedScaleFactors(); var replaceStartIndex = path.indexOf('scalefactor'); if (replaceStartIndex < 0) return url(path); var s = ''; for (var i = 0; i < supportedScaleFactors.length; ++i) { var scaleFactor = supportedScaleFactors[i]; var pathWithScaleFactor = path.substr(0, replaceStartIndex) + scaleFactor + path.substr(replaceStartIndex + 'scalefactor'.length); s += url(pathWithScaleFactor) + ' ' + scaleFactor + 'x'; if (i != supportedScaleFactors.length - 1) s += ', '; } return '-webkit-image-set(' + s + ')'; } /** * Parses query parameters from Location. * @param {Location} location The URL to generate the CSS url for. * @return {Object} Dictionary containing name value pairs for URL */ function parseQueryParams(location) { var params = {}; var query = unescape(location.search.substring(1)); var vars = query.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); params[pair[0]] = pair[1]; } return params; } /** * Creates a new URL by appending or replacing the given query key and value. * Not supporting URL with username and password. * @param {Location} location The original URL. * @param {string} key The query parameter name. * @param {string} value The query parameter value. * @return {string} The constructed new URL. */ function setQueryParam(location, key, value) { var query = parseQueryParams(location); query[encodeURIComponent(key)] = encodeURIComponent(value); var newQuery = ''; for (var q in query) { newQuery += (newQuery ? '&' : '?') + q + '=' + query[q]; } return location.origin + location.pathname + newQuery + location.hash; } /** * @param {Node} el A node to search for ancestors with |className|. * @param {string} className A class to search for. * @return {Element} A node with class of |className| or null if none is found. */ function findAncestorByClass(el, className) { return /** @type {Element} */(findAncestor(el, function(el) { return el.classList && el.classList.contains(className); })); } /** * Return the first ancestor for which the {@code predicate} returns true. * @param {Node} node The node to check. * @param {function(Node):boolean} predicate The function that tests the * nodes. * @return {Node} The found ancestor or null if not found. */ function findAncestor(node, predicate) { var last = false; while (node != null && !(last = predicate(node))) { node = node.parentNode; } return last ? node : null; } function swapDomNodes(a, b) { var afterA = a.nextSibling; if (afterA == b) { swapDomNodes(b, a); return; } var aParent = a.parentNode; b.parentNode.replaceChild(a, b); aParent.insertBefore(b, afterA); } /** * Disables text selection and dragging, with optional whitelist callbacks. * @param {function(Event):boolean=} opt_allowSelectStart Unless this function * is defined and returns true, the onselectionstart event will be * surpressed. * @param {function(Event):boolean=} opt_allowDragStart Unless this function * is defined and returns true, the ondragstart event will be surpressed. */ function disableTextSelectAndDrag(opt_allowSelectStart, opt_allowDragStart) { // Disable text selection. document.onselectstart = function(e) { if (!(opt_allowSelectStart && opt_allowSelectStart.call(this, e))) e.preventDefault(); }; // Disable dragging. document.ondragstart = function(e) { if (!(opt_allowDragStart && opt_allowDragStart.call(this, e))) e.preventDefault(); }; } /** * TODO(dbeam): DO NOT USE. THIS IS DEPRECATED. Use an action-link instead. * Call this to stop clicks on <a href="#"> links from scrolling to the top of * the page (and possibly showing a # in the link). */ function preventDefaultOnPoundLinkClicks() { document.addEventListener('click', function(e) { var anchor = findAncestor(/** @type {Node} */(e.target), function(el) { return el.tagName == 'A'; }); // Use getAttribute() to prevent URL normalization. if (anchor && anchor.getAttribute('href') == '#') e.preventDefault(); }); } /** * Check the directionality of the page. * @return {boolean} True if Chrome is running an RTL UI. */ function isRTL() { return document.documentElement.dir == 'rtl'; } /** * Get an element that's known to exist by its ID. We use this instead of just * calling getElementById and not checking the result because this lets us * satisfy the JSCompiler type system. * @param {string} id The identifier name. * @return {!HTMLElement} the Element. */ function getRequiredElement(id) { return assertInstanceof($(id), HTMLElement, 'Missing required element: ' + id); } /** * Query an element that's known to exist by a selector. We use this instead of * just calling querySelector and not checking the result because this lets us * satisfy the JSCompiler type system. * @param {string} selectors CSS selectors to query the element. * @param {(!Document|!DocumentFragment|!Element)=} opt_context An optional * context object for querySelector. * @return {!HTMLElement} the Element. */ function queryRequiredElement(selectors, opt_context) { var element = (opt_context || document).querySelector(selectors); return assertInstanceof(element, HTMLElement, 'Missing required element: ' + selectors); } // Handle click on a link. If the link points to a chrome: or file: url, then // call into the browser to do the navigation. document.addEventListener('click', function(e) { if (e.defaultPrevented) return; var el = e.target; if (el.nodeType == Node.ELEMENT_NODE && el.webkitMatchesSelector('A, A *')) { while (el.tagName != 'A') { el = el.parentElement; } if ((el.protocol == 'file:' || el.protocol == 'about:') && (e.button == 0 || e.button == 1)) { chrome.send('navigateToUrl', [ el.href, el.target, e.button, e.altKey, e.ctrlKey, e.metaKey, e.shiftKey ]); e.preventDefault(); } } }); /** * Creates a new URL which is the old URL with a GET param of key=value. * @param {string} url The base URL. There is not sanity checking on the URL so * it must be passed in a proper format. * @param {string} key The key of the param. * @param {string} value The value of the param. * @return {string} The new URL. */ function appendParam(url, key, value) { var param = encodeURIComponent(key) + '=' + encodeURIComponent(value); if (url.indexOf('?') == -1) return url + '?' + param; return url + '&' + param; } /** * Creates a CSS -webkit-image-set for a favicon request. * @param {string} url The url for the favicon. * @param {number=} opt_size Optional preferred size of the favicon. * @param {string=} opt_type Optional type of favicon to request. Valid values * are 'favicon' and 'touch-icon'. Default is 'favicon'. * @return {string} -webkit-image-set for the favicon. */ function getFaviconImageSet(url, opt_size, opt_type) { var size = opt_size || 16; var type = opt_type || 'favicon'; return imageset( 'chrome://' + type + '/size/' + size + '@scalefactorx/' + url); } /** * Creates a new URL for a favicon request for the current device pixel ratio. * The URL must be updated when the user moves the browser to a screen with a * different device pixel ratio. Use getFaviconImageSet() for the updating to * occur automatically. * @param {string} url The url for the favicon. * @param {number=} opt_size Optional preferred size of the favicon. * @param {string=} opt_type Optional type of favicon to request. Valid values * are 'favicon' and 'touch-icon'. Default is 'favicon'. * @return {string} Updated URL for the favicon. */ function getFaviconUrlForCurrentDevicePixelRatio(url, opt_size, opt_type) { var size = opt_size || 16; var type = opt_type || 'favicon'; return 'chrome://' + type + '/size/' + size + '@' + window.devicePixelRatio + 'x/' + url; } /** * Creates an element of a specified type with a specified class name. * @param {string} type The node type. * @param {string} className The class name to use. * @return {Element} The created element. */ function createElementWithClassName(type, className) { var elm = document.createElement(type); elm.className = className; return elm; } /** * webkitTransitionEnd does not always fire (e.g. when animation is aborted * or when no paint happens during the animation). This function sets up * a timer and emulate the event if it is not fired when the timer expires. * @param {!HTMLElement} el The element to watch for webkitTransitionEnd. * @param {number} timeOut The maximum wait time in milliseconds for the * webkitTransitionEnd to happen. */ function ensureTransitionEndEvent(el, timeOut) { var fired = false; el.addEventListener('webkitTransitionEnd', function f(e) { el.removeEventListener('webkitTransitionEnd', f); fired = true; }); window.setTimeout(function() { if (!fired) cr.dispatchSimpleEvent(el, 'webkitTransitionEnd', true); }, timeOut); } /** * Alias for document.scrollTop getter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @return {number} The Y document scroll offset. */ function scrollTopForDocument(doc) { return doc.documentElement.scrollTop || doc.body.scrollTop; } /** * Alias for document.scrollTop setter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @param {number} value The target Y scroll offset. */ function setScrollTopForDocument(doc, value) { doc.documentElement.scrollTop = doc.body.scrollTop = value; } /** * Alias for document.scrollLeft getter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @return {number} The X document scroll offset. */ function scrollLeftForDocument(doc) { return doc.documentElement.scrollLeft || doc.body.scrollLeft; } /** * Alias for document.scrollLeft setter. * @param {!HTMLDocument} doc The document node where information will be * queried from. * @param {number} value The target X scroll offset. */ function setScrollLeftForDocument(doc, value) { doc.documentElement.scrollLeft = doc.body.scrollLeft = value; } /** * Replaces '&', '<', '>', '"', and ''' characters with their HTML encoding. * @param {string} original The original string. * @return {string} The string with all the characters mentioned above replaced. */ function HTMLEscape(original) { return original.replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } /** * Shortens the provided string (if necessary) to a string of length at most * |maxLength|. * @param {string} original The original string. * @param {number} maxLength The maximum length allowed for the string. * @return {string} The original string if its length does not exceed * |maxLength|. Otherwise the first |maxLength| - 1 characters with '...' * appended. */ function elide(original, maxLength) { if (original.length <= maxLength) return original; return original.substring(0, maxLength - 1) + '\u2026'; } </script> <script>// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var CAPTIVEPORTAL_CMD_OPEN_LOGIN_PAGE = 'openLoginPage'; </script> <script>// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. function setupSSLDebuggingInfo() { if (loadTimeData.getString('type') != 'SSL') return; // The titles are not internationalized because this is debugging information // for bug reports, help center posts, etc. appendDebuggingField('Subject', loadTimeData.getString('subject')); appendDebuggingField('Issuer', loadTimeData.getString('issuer')); appendDebuggingField('Expires on', loadTimeData.getString('expirationDate')); appendDebuggingField('Current date', loadTimeData.getString('currentDate')); appendDebuggingField('PEM encoded chain', loadTimeData.getString('pem')); $('error-code').addEventListener('click', toggleDebuggingInfo); } </script> <script>// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; // Other constants defined in security_interstitial_page.h. var SB_BOX_CHECKED = 'boxchecked'; var SB_DISPLAY_CHECK_BOX = 'displaycheckbox'; // This sets up the Extended Safe Browsing Reporting opt-in, either for // reporting malware or invalid certificate chains. Does nothing if the // interstitial type is not SAFEBROWSING or SSL or CAPTIVE_PORTAL. function setupExtendedReportingCheckbox() { var interstitialType = loadTimeData.getString('type'); if (interstitialType != 'SAFEBROWSING' && interstitialType != 'SSL' && interstitialType != 'CAPTIVE_PORTAL') { return; } if (!loadTimeData.getBoolean(SB_DISPLAY_CHECK_BOX)) { return; } $('opt-in-label').innerHTML = loadTimeData.getString('optInLink'); $('opt-in-checkbox').checked = loadTimeData.getBoolean(SB_BOX_CHECKED); $('extended-reporting-opt-in').classList.remove('hidden'); var className = interstitialType == 'SAFEBROWSING' ? 'safe-browsing-opt-in' : 'ssl-opt-in'; $('extended-reporting-opt-in').classList.add(className); $('body').classList.add('extended-reporting-has-checkbox'); $('opt-in-checkbox').addEventListener('click', function() { sendCommand($('opt-in-checkbox').checked ? CMD_DO_REPORT : CMD_DONT_REPORT); }); } </script> <script>// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var mobileNav = false; /** * For small screen mobile the navigation buttons are moved * below the advanced text. */ function onResize() { var helpOuterBox = document.querySelector('#details'); var mainContent = document.querySelector('#main-content'); var mediaQuery = '(min-width: 240px) and (max-width: 420px) and ' + '(max-height: 736px) and (min-height: 401px) and ' + '(orientation: portrait), (max-width: 736px) and ' + '(max-height: 420px) and (min-height: 240px) and ' + '(min-width: 421px) and (orientation: landscape)'; var detailsHidden = helpOuterBox.classList.contains('hidden'); var runnerContainer = document.querySelector('.runner-container'); // Check for change in nav status. if (mobileNav != window.matchMedia(mediaQuery).matches) { mobileNav = !mobileNav; // Handle showing the top content / details sections according to state. if (mobileNav) { mainContent.classList.toggle('hidden', !detailsHidden); helpOuterBox.classList.toggle('hidden', detailsHidden); if (runnerContainer) { runnerContainer.classList.toggle('hidden', !detailsHidden); } } else if (!detailsHidden) { // Non mobile nav with visible details. mainContent.classList.remove('hidden'); helpOuterBox.classList.remove('hidden'); if (runnerContainer) { runnerContainer.classList.remove('hidden'); } } } } function setupMobileNav() { window.addEventListener('resize', onResize); onResize(); } document.addEventListener('DOMContentLoaded', setupMobileNav); </script> <script>// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This is the shared code for the new (Chrome 37) security interstitials. It is // used for both SSL interstitials and Safe Browsing interstitials. var expandedDetails = false; var keyPressState = 0; // Should match SecurityInterstitialCommands in security_interstitial_page.h var CMD_DONT_PROCEED = 0; var CMD_PROCEED = 1; // Ways for user to get more information var CMD_SHOW_MORE_SECTION = 2; var CMD_OPEN_HELP_CENTER = 3; var CMD_OPEN_DIAGNOSTIC = 4; // Primary button actions var CMD_RELOAD = 5; var CMD_OPEN_DATE_SETTINGS = 6; var CMD_OPEN_LOGIN = 7; // Safe Browsing Extended Reporting var CMD_DO_REPORT = 8; var CMD_DONT_REPORT = 9; var CMD_OPEN_REPORTING_PRIVACY = 10; // Report a phishing error. var CMD_REPORT_PHISHING_ERROR = 11; /** * A convenience method for sending commands to the parent page. * @param {string} cmd The command to send. */ function sendCommand(cmd) { window.domAutomationController.setAutomationId(1); window.domAutomationController.send(cmd); } /** * This allows errors to be skippped by typing a secret phrase into the page. * @param {string} e The key that was just pressed. */ function handleKeypress(e) { var BYPASS_SEQUENCE = 'badidea'; if (BYPASS_SEQUENCE.charCodeAt(keyPressState) == e.keyCode) { keyPressState++; if (keyPressState == BYPASS_SEQUENCE.length) { sendCommand(CMD_PROCEED); keyPressState = 0; } } else { keyPressState = 0; } } /** * This appends a piece of debugging information to the end of the warning. * When complete, the caller must also make the debugging div * (error-debugging-info) visible. * @param {string} title The name of this debugging field. * @param {string} value The value of the debugging field. */ function appendDebuggingField(title, value) { // The values input here are not trusted. Never use innerHTML on these // values! var spanTitle = document.createElement('span'); spanTitle.classList.add('debugging-title'); spanTitle.innerText = title + ': '; var spanValue = document.createElement('span'); spanValue.classList.add('debugging-value'); spanValue.innerText = value; var pElem = document.createElement('p'); pElem.classList.add('debugging-content'); pElem.appendChild(spanTitle); pElem.appendChild(spanValue); $('error-debugging-info').appendChild(pElem); } function toggleDebuggingInfo() { $('error-debugging-info').classList.toggle('hidden'); } function setupEvents() { var overridable = loadTimeData.getBoolean('overridable'); var interstitialType = loadTimeData.getString('type'); var ssl = interstitialType == 'SSL'; var captivePortal = interstitialType == 'CAPTIVE_PORTAL'; var badClock = ssl && loadTimeData.getBoolean('bad_clock'); var hidePrimaryButton = badClock && loadTimeData.getBoolean( 'hide_primary_button'); if (ssl) { $('body').classList.add(badClock ? 'bad-clock' : 'ssl'); $('error-code').textContent = loadTimeData.getString('errorCode'); $('error-code').classList.remove('hidden'); } else if (captivePortal) { $('body').classList.add('captive-portal'); } else { $('body').classList.add('safe-browsing'); } if (hidePrimaryButton) { $('primary-button').classList.add('hidden'); } else { $('primary-button').addEventListener('click', function() { switch (interstitialType) { case 'CAPTIVE_PORTAL': sendCommand(CMD_OPEN_LOGIN); break; case 'SSL': if (badClock) sendCommand(CMD_OPEN_DATE_SETTINGS); else if (overridable) sendCommand(CMD_DONT_PROCEED); else sendCommand(CMD_RELOAD); break; case 'SAFEBROWSING': sendCommand(CMD_DONT_PROCEED); break; default: throw 'Invalid interstitial type'; } }); } if (overridable) { // Captive portal page isn't overridable. $('proceed-link').addEventListener('click', function(event) { sendCommand(CMD_PROCEED); }); } else if (!ssl) { $('final-paragraph').classList.add('hidden'); } if (ssl && overridable) { $('proceed-link').classList.add('small-link'); } else if ($('help-link')) { // Overridable SSL page doesn't have this link. $('help-link').addEventListener('click', function(event) { if (ssl || loadTimeData.getBoolean('phishing')) sendCommand(CMD_OPEN_HELP_CENTER); else sendCommand(CMD_OPEN_DIAGNOSTIC); }); } if (captivePortal) { // Captive portal page doesn't have details button. $('details-button').classList.add('hidden'); } else { $('details-button').addEventListener('click', function(event) { var hiddenDetails = $('details').classList.toggle('hidden'); if (mobileNav) { // Details appear over the main content on small screens. $('main-content').classList.toggle('hidden', !hiddenDetails); } else { $('main-content').classList.remove('hidden'); } $('details-button').innerText = hiddenDetails ? loadTimeData.getString('openDetails') : loadTimeData.getString('closeDetails'); if (!expandedDetails) { // Record a histogram entry only the first time that details is opened. sendCommand(CMD_SHOW_MORE_SECTION); expandedDetails = true; } }); } // TODO(felt): This should be simplified once the Finch trial is no longer // needed. if (interstitialType == 'SAFEBROWSING' && loadTimeData.getBoolean('phishing') && $('report-error-link')) { $('report-error-link').addEventListener('click', function(event) { sendCommand(CMD_REPORT_PHISHING_ERROR); }); } preventDefaultOnPoundLinkClicks(); setupExtendedReportingCheckbox(); setupSSLDebuggingInfo(); document.addEventListener('keypress', handleKeypress); } document.addEventListener('DOMContentLoaded', setupEvents); </script> </head> <body id="body"> <div class="interstitial-wrapper"> <div id="main-content"> <div class="icon" id="icon"></div> <div id="main-message"> <h1 i18n-content="heading"></h1> <p i18n-values=".innerHTML:primaryParagraph"></p> <div id="debugging"> <div id="error-code" class="error-code"></div> <div id="error-debugging-info" class="hidden"></div> </div> </div> <div id="extended-reporting-opt-in" class="hidden"> <label> <input type="checkbox" id="opt-in-checkbox"> <span class="checkbox"></span> <span id="opt-in-label"></span> </label> </div> </div> <div class="nav-wrapper"> <button i18n-content="primaryButtonText" id="primary-button"></button> <button id="details-button" class="small-link" i18n-content="openDetails"></button> </div> <div id="details" class="hidden"> <p i18n-values=".innerHTML:explanationParagraph"></p> <p i18n-values=".innerHTML:finalParagraph" id="final-paragraph"></p> </div> </div> </body> </html> <!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> <!-- If you change the title, make sure you also update chrome/test/functional/special_tabs.py. --> <meta charset="utf-8"> <title>Sync Internals</title> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <link rel="stylesheet" href="chrome://resources/css/list.css"> <link rel="stylesheet" href="chrome://resources/css/tabs.css"> <link rel="stylesheet" href="chrome://resources/css/tree.css"> <style>/* Copyright 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #about-info { -webkit-column-width: 350px; } #about-info > div { -webkit-column-break-inside: avoid; width: 350px; } #about-info h2 { color: rgb(74, 142, 230); font-size: 100%; margin-bottom: 0; } #about-info .err { color: red; } #about-info .section { display: inline-block; margin-left: auto; margin-right: auto; } .about-details { width: 100%; } .about-details tr:nth-child(odd) { background: rgb(239, 243, 255); } #typeInfo .error { background: rgb(255, 204, 204); } #typeInfo .warning { background: rgb(255, 255, 204); } #typeInfo .disabled { background: rgb(224, 224, 224); } #typeInfo .ok { background: rgb(204, 255, 204); } @-webkit-keyframes highlight1 { 0% { background: rgb(255, 255, 0); } 100% { background: #fff; } } @-webkit-keyframes highlight2 { 0% { background: rgb(155, 158, 166); } 100% { background: rgb(239, 243, 255); } } .about-details [highlighted] { -webkit-animation-duration: 3s; -webkit-animation-name: highlight1; -webkit-animation-timing-function: linear; } .about-details [highlighted]:nth-child(odd) { -webkit-animation-duration: 3s; -webkit-animation-name: highlight2; -webkit-animation-timing-function: linear; } .about-details .uninitialized { color: #7f7f7f; } #status { margin-left: auto; margin-right: auto; text-align: center; width: 300px; } #dump-status { margin: 2px; } #import-status { margin: 2px; } #traffic-event-container { border: 1px solid; height: 500px; max-width: 500px; overflow-y: auto; } .traffic-event-entry { border: 2px outset; padding: 0.5em; } .traffic-event-entry:hover { background-color: #eee; } .traffic-event-entry .time { color: #222; } .traffic-event-entry .type { font-weight: bold; margin: 0.5em; white-space: nowrap; } .traffic-event-entry .details { margin: 0.5em; overflow-x: auto; } .traffic-event-entry .proto { display: none; } .traffic-event-entry-expanded .proto { background-color: #fff; border: 1px solid #222; display: block; max-height: 300px; overflow-x: auto; overflow-y: auto; } </style> <style>/* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #sync-events-table, #sync-events-table th, #sync-events-table td { border: 1px black solid; } #sync-events-table { table-layout: fixed; width: 100%; } #sync-events > tr { vertical-align: top; } .expanded .attrib-column { display: none; } </style> <style>/* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #type-counters-table { table-layout: fixed; } #type-counters-table th { max-width: 80px; width: 80px; } #type-counters-table th.type { max-width: 200px; width: 200px; } #type-counters-table tr:nth-child(odd) { background: rgb(239, 243, 255); } </style> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #sync-search-query { width: 16em; } #sync-search-query[error] { background-color: rgb(255,170,170); } .sync-search-quicklink { background-color: rgb(239,243,255); padding-left: 10px; padding-right: 10px; } #sync-search-status { color: rgb(51,51,51); font-style: italic; } #sync-results-container { display: -webkit-box; /* Should be > #sync-page's min-height. */ /* TODO(akalin): Find a less hacky way to do this. */ height: 750px; } #sync-results-list { -webkit-padding-start: 10px; box-sizing: border-box; height: 100%; /* min-width and max-width are used by the split pane. */ max-width: 50%; min-width: 50px; overflow: auto; padding: 5px; width: 275px; } #sync-results-splitter { background-color: rgb(235, 239, 249); cursor: col-resize; /* TODO(akalin): Make the BMM also use this style. */ cursor: e-resize; width: 5px; } #sync-result-details-container { -webkit-box-flex: 1; height: 100%; overflow: auto; /* TODO(akalin): Figure out why this is needed, even with box-flex: 1. */ width: 100%; } </style> <style>/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #sync-node-browser-refresher { border-bottom: 1px rgb(160,160,160) solid; } #sync-node-browser-refresher > * { display: inline-block; } #sync-node-browser-container { display: -webkit-box; height: 750px; } #sync-node-tree-container { -webkit-padding-start: 10px; box-sizing: border-box; height: 100%; /* min-width and max-width are used by the split pane. */ max-width: 50%; min-width: 50px; overflow: auto; width: 200px; } #sync-node-tree { display: inline-block; min-width: 100%; overflow: visible; /* let the container do the scrolling */ } /* TODO(akalin): Find a better icon to use for leaf nodes. */ #sync-node-tree .leaf .tree-label { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAABr0lEQVQY02NgQAOFJU96jI1PfA0Kud/DgA8sWfFWMzn16sVZU7P/+/ntu9jW+VoTQ9GcBa9FJ0x9JVrb9C6jvGzr//evZP/nZnX/T818lzFhymvReYveiIIVBgbfri6reva/qOTxf1//5//nzKj5//8/6//+9tD/tvb3/hcUP/6fk//kv6/f7WoGVbVj//u6qv8fOBDxf8/2tP9vXpj9//eT8/+bp3L/d26N+L9/f9j/4tyg/zIyu/4z5BY8ehTg1/Z/5yZFoIlM////5P7/9ws/kOb6/+8b4/8t67j+e3vk/E9Ju/yIYfP2d0rV9a9mSklufb17i8X//3+4/v//DlLM/n/2FOX/4mKTX2fnv5y5Yu1bJbgnvX1vn1q1LBzoBKb/754w/v/7len/3Glq/zW1zp5CCY2d+z7XxSec/f34psr/eVOl/wf4xPyfN032/9VTLP/d3ab/njLjfR1ccVrGi97QkOb/tWWq/83MFvw3NH641s529f/EWIP/ft6x/909H/bCFc+a+7rF2nrbVw+vw1+B4drh63+TaeHSzx3unqe/qmts/lpZ+6QFpA4AtfnoAC8Qt2wAAAAASUVORK5CYII=); } #sync-node-splitter { background-color: rgb(235, 239, 249); cursor: col-resize; width: 5px; /* TODO(akalin): Make the BMM also use this style. */ cursor: e-resize; } #sync-node-details-container { -webkit-box-flex: 1; height: 100%; overflow: auto; visibility: hidden; /* Element is invisible until first refresh. */ } #node-details { width: 100%; } #node-details td { vertical-align: top; white-space: nowrap; } #node-details tr:nth-child(odd) { background: rgb(239, 243, 255); } </style> <script src="chrome://resources/js/event_tracker.js"></script> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/cr/event_target.js"></script> <script src="chrome://resources/js/cr/ui/touch_handler.js"></script> <script src="chrome://resources/js/cr/ui.js"></script> <script src="chrome://resources/js/cr/ui/focus_outline_manager.js"></script> <script src="chrome://resources/js/cr/ui/splitter.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <!-- List stuff. --> <script src="chrome://resources/js/cr/ui/array_data_model.js"></script> <script src="chrome://resources/js/cr/ui/list_item.js"></script> <script src="chrome://resources/js/cr/ui/list_selection_controller.js"></script> <script src="chrome://resources/js/cr/ui/list_selection_model.js"></script> <script src="chrome://resources/js/cr/ui/list.js"></script> <script src="chrome://resources/js/cr/ui/tabs.js"></script> <script src="chrome://resources/js/cr/ui/tree.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="chrome://sync-internals/chrome_sync.js"></script> <script src="chrome://sync-internals/about.js"></script> <script src="chrome://sync-internals/events.js"></script> <script src="chrome://sync-internals/types.js"></script> <script src="chrome://sync-internals/sync_log.js"></script> <script src="chrome://sync-internals/sync_node_browser.js"></script> <script src="chrome://sync-internals/sync_search.js"></script> <script src="chrome://sync-internals/strings.js"></script> </head> <body> <style> #sync-page { /* TODO(akalin): Figure out a better way to make the tab box the same height no matter which tab is selected. */ min-height: 650px; } </style> <tabbox id="sync-page"> <tabs> <tab id="sync-about-tab">About</tab> <tab id="sync-types-tab">Types</tab> <tab id="sync-data-tab">Data</tab> <tab id="sync-events-tab">Events</tab> <tab id="sync-browser-tab">Sync Node Browser</tab> <tab id="sync-search-tab">Search</tab> </tabs> <tabpanels> <tabpanel> <div id="status"> <div id="dump"> <button id="dump-status">Dump status</button> <input type="checkbox" id="include-ids"> Include Identifiers </input> </div> <div id="import"> <button id="import-status">Import status</button> </div> <div id="status-data"> <textarea rows="10" cols="30" id="status-text"></textarea> </div> </div> <div id='about-info'> <div class="section" jsselect="details"> <h2 jscontent="title"></h2> <table class="about-details"> <tr jsselect="data" jsvalues="class:$this.is_valid ? '' : 'uninitialized'" jseval='chrome.sync.about_tab.highlightIfChanged(this, this.children[1].innerText, stat_value)'> <td class="detail" jscontent="stat_name" width=50%></td> <td class="value" jscontent="stat_value" width=50%></td> </tr> </table> </div> <div id="traffic-event-container-wrapper" jsskip="true"> <h2>Sync Protocol Log</h2> <div id="traffic-event-container"> <div class="traffic-event-entry" jsselect="events" jseval="chrome.sync.about_tab.addExpandListener(this)"> <span class="time" jscontent="(new Date(time)).toLocaleString()"></span> <span class="type" jscontent="type"></span> <pre class="details" jscontent="details"></pre> <pre class="proto" jscontent="JSON.stringify(proto, null, 2)"></pre> </div> </div> </div> <div class="section" style="overflow-x: auto"> <h2>Type Info</h2> <table id="typeInfo"> <tr jsselect="type_status" jsvalues="class:$this.status"> <td jscontent="name" width=50%></td> <td jscontent="value" width=30%></td> <td jscontent="num_entries" width=10%></td> <td jscontent="num_live" width=10%></td> </tr> </table> </div> <div class="section" jsdisplay="unrecoverable_error_detected"> <p> <span class="err" jscontent="unrecoverable_error_message"></span> </p> </div> <div class="section" jsdisplay="actionable_error_detected"> <p> <h2>Actionable Error</h2> <table id="actionableError"> <tr jsselect="actionable_error"> <td jscontent="stat_name"></td> <td jscontent="stat_value"></td> </tr> </table> </p> </div> </div> </tabpanel> <tabpanel> <div id="type-counters-container-wrapper" jsskip="true"> <div class="section"> <h2>Type Counters</h2> <table id="type-counters-table"> <thead> <tr> <th class='type'>Type</th> <th>Total Entries</th> <th>Updates Received</th> <th>Reflected Updates Received</th> <th>Tombstone Updates Received</th> <th>Updates Applied</th> <th>Hierarchy Conflict Application Failures</th> <th>Encryption Conflict Application Failures</th> <th>Server Overwrite Conflicts</th> <th>Local Overwrite Conflicts</th> <th>Commit Attempts</th> <th>Commit Successes</th> <th>Commit Conflicts</th> <th>Commit Errors</th> </tr> </thead> <tbody> <tr jsselect="rows"> <td jscontent="type"></td> <td jscontent="counters.numEntries || 0">0</td> <td jscontent="counters.numUpdatesReceived || 0">0</td> <td jscontent="counters.numReflectedUpdatesReceived || 0">0</td> <td jscontent="counters.numTombstoneUpdatesReceived || 0">0</td> <td jscontent="counters.numUpdatesApplied || 0">0</td> <td jscontent="counters.numHierarchyConflictApplicationFailures || 0">0</td> <td jscontent="counters.numEncryptionConflictApplicationFailures || 0">0</td> <td jscontent="counters.numServerOverwrites || 0">0</td> <td jscontent="counters.numLocalOverwrites || 0">0</td> <td jscontent="counters.numCommitsAttempted || 0">0</td> <td jscontent="counters.numCommitsSuccess || 0">0</td> <td jscontent="counters.numCommitsConflict || 0">0</td> <td jscontent="counters.numCommitsError || 0">0</td> </tr> </tbody> </table> </div> </div> </tabpanel> <tabpanel> <p><strong>Some personal info may be in the events dump. Be careful about posting data dumps on bug reports.</strong></p> <button id="dump-to-text">Dump sync events to text</button> <pre id="data-dump"></pre> <hr> <div id="node-type-checkboxes"> </div> <button id="dump-to-file">Dump sync nodes to file</button> <input type="checkbox" id="include-specifics">include node content <font color="red">WARNING: This is likely to include personal information.</font><br> <a style="display: none" id="dump-to-file-anchor"></a> <script src="chrome://sync-internals/data.js"></script> </tabpanel> <tabpanel> <table id="sync-events-table"> <thead> <th>Details</th> <th>Submodule</th> <th>Event</th> <th>Time</th> </thead> <tbody id="sync-events"> <tr jsselect="eventList"> <td> <button class="toggle-button">Toggle Display</button> <pre jscontent="textDetails" class="details" hidden></pre> </td> <td jscontent="submodule" class="attrib-column"></td> <td jscontent="event" class="attrib-column"></td> <td jscontent="date" class="attrib-column"></td> </tr> </tbody> </table> </tabpanel> <tabpanel> <!-- TODO(akalin): Move to a three-pane view; node tree on the left (minus leaf nodes), tree contents list on the upper right, selected item detail on the lower right. --> <div id="sync-node-main"> <!-- TODO(akalin): Figure out how to get this element to be as tall as its container (style.height=100% doesn't work). Also fix behavior when tree is too tall (currently it makes you scroll the entire page). --> <div id="sync-node-browser-refresher"> <button id="node-browser-refresh-button">Refresh</button> <div id="node-refresh-status"> Last refresh time: <span id="node-browser-refresh-time">Never</span> </div> </div> <div id="sync-node-browser-container"> <div id="sync-node-tree-container"> </div> <div id="sync-node-splitter"></div> <div id="node-details"> <table> <tr> <td>Title</td> <td jscontent="NON_UNIQUE_NAME"></td> </tr> <tr> <td>ID</td> <td jscontent="ID"></td> </tr> <tr> <td>Modification Time</td> <td jscontent="MTIME"></td> </tr> <tr> <td>Parent</td> <td jscontent="PARENT_ID"></td> </tr> <tr> <td>Is Folder</td> <td jscontent="IS_DIR"></td> </tr> <tr> <td>Type</td> <td jscontent="modelType"></td> </tr> <tr> <td>External ID</td> <td jscontent="LOCAL_EXTERNAL_ID"></td> </tr> <tr jsdisplay="$this.hasOwnProperty('positionIndex')"> <td>Position Index</td> <td jscontent="positionIndex"></td> </tr> </table> <pre jscontent="JSON.stringify($this, null, 2)"></pre></td> </div> </div> </div> </tabpanel> <tabpanel> <p> <input id="sync-search-query" type="search" placeholder="Search Sync Data"> <button id="sync-search-submit">Search</button> <span id="sync-search-quicklink-container">Quick Search: <a class='sync-search-quicklink' data-query=""IS_UNAPPLIED_UPDATE": true" href="#">Unapplied Updates</a> <a class='sync-search-quicklink' data-query=""IS_UNSYNCED": true" href="#">Unsynced</a> <a class='sync-search-quicklink' data-query="(("IS_UNAPPLIED_UPDATE": true)[\s\S]*("IS_UNSYNCED": true))|(("IS_UNSYNCED": true)[\s\S]*("IS_UNAPPLIED_UPDATE": true))" href="#">Conflicted</a> <a class='sync-search-quicklink' data-query=""IS_DEL": true" href="#">Deleted</a> </span> </p> <p> <span id="sync-search-status"></span> </p> <div id="sync-results-container"> <list id="sync-results-list"></list> <div id="sync-results-splitter"></div> <div id="sync-result-details-container"> <pre id="sync-result-details"></pre> </div> </div> <script src="chrome://sync-internals/search.js"></script> </tabpanel> </tabpanels> </tabbox> <script src="chrome://resources/js/i18n_template.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script> <script src="chrome://sync-internals/sync_index.js"></script> </body> </html> // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Allow platform specific CSS rules. // // TODO(akalin): BMM and options page does something similar, too. // Move this to util.js. if (cr.isWindows) document.documentElement.setAttribute('os', 'win'); cr.ui.decorate('tabbox', cr.ui.TabBox); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // require cr.js // require cr/event_target.js // require cr/util.js cr.define('chrome.sync', function() { 'use strict'; /** * A simple timer to measure elapsed time. * @constructor */ function Timer() { /** * The time that this Timer was created. * @type {number} * @private * @const */ this.start_ = Date.now(); } /** * @return {number} The elapsed seconds since this Timer was created. */ Timer.prototype.getElapsedSeconds = function() { return (Date.now() - this.start_) / 1000; }; /** @return {!Timer} An object which measures elapsed time. */ var makeTimer = function() { return new Timer; }; /** * @param {string} name The name of the event type. * @param {!Object} details A collection of event-specific details. */ var dispatchEvent = function(name, details) { var e = new Event(name); e.details = details; chrome.sync.events.dispatchEvent(e); }; /** * Registers to receive a stream of events through * chrome.sync.dispatchEvent(). */ var registerForEvents = function() { chrome.send('registerForEvents'); }; /** * Registers to receive a stream of status counter update events * chrome.sync.dispatchEvent(). */ var registerForPerTypeCounters = function() { chrome.send('registerForPerTypeCounters'); } /** * Asks the browser to refresh our snapshot of sync state. Should result * in an onAboutInfoUpdated event being emitted. */ var requestUpdatedAboutInfo = function() { chrome.send('requestUpdatedAboutInfo'); }; /** * Asks the browser to send us the list of registered types. Should result * in an onReceivedListOfTypes event being emitted. */ var requestListOfTypes = function() { chrome.send('requestListOfTypes'); }; /** * Counter to uniquely identify requests while they're in progress. * Used in the implementation of GetAllNodes. */ var requestId = 0; /** * A map from counter values to asynchronous request callbacks. * Used in the implementation of GetAllNodes. * @type {{number: !Function}} */ var requestCallbacks = {}; /** * Asks the browser to send us a copy of all existing sync nodes. * Will eventually invoke the given callback with the results. * * @param {function(!Object)} callback The function to call with the response. */ var getAllNodes = function(callback) { requestId++; requestCallbacks[requestId] = callback; chrome.send('getAllNodes', [requestId]); }; /** * Called from C++ with the response to a getAllNodes request. * @param {number} id The requestId passed in with the request. * @param {Object} response The response to the request. */ var getAllNodesCallback = function(id, response) { requestCallbacks[id](response); requestCallbacks[id] = undefined; }; return { makeTimer: makeTimer, dispatchEvent: dispatchEvent, events: new cr.EventTarget(), getAllNodes: getAllNodes, getAllNodesCallback: getAllNodesCallback, registerForEvents: registerForEvents, registerForPerTypeCounters: registerForPerTypeCounters, requestUpdatedAboutInfo: requestUpdatedAboutInfo, requestListOfTypes: requestListOfTypes, }; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('chrome.sync.types', function() { var typeCountersMap = {}; /** * Redraws the counters table taking advantage of the most recent * available information. * * Makes use of typeCountersMap, which is defined in the containing scope. */ var refreshTypeCountersDisplay = function() { var typeCountersArray = []; // Transform our map into an array to make jstemplate happy. Object.keys(typeCountersMap).sort().forEach(function(t) { typeCountersArray.push({ type: t, counters: typeCountersMap[t], }); }); jstProcess( new JsEvalContext({ rows: typeCountersArray }), $('type-counters-table')); }; /** * Helps to initialize the table by picking up where initTypeCounters() left * off. That function registers this listener and requests that this event * be emitted. * * @param {!Object} e An event containing the list of known sync types. */ var onReceivedListOfTypes = function(e) { var types = e.details.types; types.map(function(type) { if (!typeCountersMap.hasOwnProperty(type)) { typeCountersMap[type] = {}; } }); chrome.sync.events.removeEventListener( 'onReceivedListOfTypes', onReceivedListOfTypes); refreshTypeCountersDisplay(); }; /** * Callback for receipt of updated per-type counters. * * @param {!Object} e An event containing an updated counter. */ var onCountersUpdated = function(e) { var details = e.details; var modelType = details.modelType; var counters = details.counters; if (typeCountersMap.hasOwnProperty(modelType)) for (k in counters) { typeCountersMap[modelType][k] = counters[k]; } refreshTypeCountersDisplay(); }; /** * Initializes state and callbacks for the per-type counters and status UI. */ var initTypeCounters = function() { chrome.sync.events.addEventListener( 'onCountersUpdated', onCountersUpdated); chrome.sync.events.addEventListener( 'onReceivedListOfTypes', onReceivedListOfTypes); chrome.sync.requestListOfTypes(); chrome.sync.registerForPerTypeCounters(); }; var onLoad = function() { initTypeCounters(); }; return { onLoad: onLoad }; }); document.addEventListener('DOMContentLoaded', chrome.sync.types.onLoad, false); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // require: cr.js // require: cr/event_target.js /** * @fileoverview This creates a log object which listens to and * records all sync events. */ cr.define('chrome.sync', function() { 'use strict'; var eventsByCategory = { notifier: [ 'onIncomingNotification', 'onNotificationStateChange', ], manager: [ 'onActionableError', 'onChangesApplied', 'onChangesComplete', 'onClearServerDataFailed', 'onClearServerDataSucceeded', 'onConnectionStatusChange', 'onEncryptedTypesChanged', 'onEncryptionComplete', 'onInitializationComplete', 'onPassphraseAccepted', 'onPassphraseRequired', 'onStopSyncingPermanently', 'onSyncCycleCompleted', ], transaction: [ 'onTransactionWrite', ], protocol: [ 'onProtocolEvent', ] }; /** * Creates a new log object which then immediately starts recording * sync events. Recorded entries are available in the 'entries' * property and there is an 'append' event which can be listened to. * @constructor * @extends {cr.EventTarget} */ var Log = function() { var self = this; /** * Creates a callback function to be invoked when an event arrives. */ var makeCallback = function(categoryName, eventName) { return function(e) { self.log_(categoryName, eventName, e.details); }; }; for (var categoryName in eventsByCategory) { for (var i = 0; i < eventsByCategory[categoryName].length; ++i) { var eventName = eventsByCategory[categoryName][i]; chrome.sync.events.addEventListener( eventName, makeCallback(categoryName, eventName)); } } } Log.prototype = { __proto__: cr.EventTarget.prototype, /** * The recorded log entries. * @type {array} */ entries: [], /** * Records a single event with the given parameters and fires the * 'append' event with the newly-created event as the 'detail' * field of a custom event. * @param {string} submodule The sync submodule for the event. * @param {string} event The name of the event. * @param {dictionary} details A dictionary of event-specific details. */ log_: function(submodule, event, details) { var entry = { submodule: submodule, event: event, date: new Date(), details: details, textDetails: '' }; entry.textDetails = JSON.stringify(entry.details, null, 2); this.entries.push(entry); // Fire append event. var e = cr.doc.createEvent('CustomEvent'); e.initCustomEvent('append', false, false, entry); this.dispatchEvent(e); } }; return { log: new Log() }; }); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // require: cr.js // require: cr/ui.js // require: cr/ui/tree.js (function() { /** * A helper function to determine if a node is the root of its type. * * @param {!Object} node The node to check. */ var isTypeRootNode = function(node) { return node.PARENT_ID == 'r' && node.UNIQUE_SERVER_TAG != ''; }; /** * A helper function to determine if a node is a child of the given parent. * * @param {!Object} parent node. * @param {!Object} node The node to check. */ var isChildOf = function(parentNode, node) { if (node.PARENT_ID != '') { return node.PARENT_ID == parentNode.ID; } else { return node.modelType == parentNode.modelType; } }; /** * A helper function to sort sync nodes. * * Sorts by position index if possible, falls back to sorting by name, and * finally sorting by METAHANDLE. * * If this proves to be slow and expensive, we should experiment with moving * this functionality to C++ instead. */ var nodeComparator = function(nodeA, nodeB) { if (nodeA.hasOwnProperty('positionIndex') && nodeB.hasOwnProperty('positionIndex')) { return nodeA.positionIndex - nodeB.positionIndex; } else if (nodeA.NON_UNIQUE_NAME != nodeB.NON_UNIQUE_NAME) { return nodeA.NON_UNIQUE_NAME.localeCompare(nodeB.NON_UNIQUE_NAME); } else { return nodeA.METAHANDLE - nodeB.METAHANDLE; } }; /** * Updates the node detail view with the details for the given node. * @param {!Object} node The struct representing the node we want to display. */ function updateNodeDetailView(node) { var nodeDetailsView = $('node-details'); nodeDetailsView.hidden = false; jstProcess(new JsEvalContext(node.entry_), nodeDetailsView); } /** * Updates the 'Last refresh time' display. * @param {string} The text to display. */ function setLastRefreshTime(str) { $('node-browser-refresh-time').textContent = str; } /** * Creates a new sync node tree item. * * @constructor * @param {!Object} node The nodeDetails object for the node as returned by * chrome.sync.getAllNodes(). * @extends {cr.ui.TreeItem} */ var SyncNodeTreeItem = function(node) { var treeItem = new cr.ui.TreeItem(); treeItem.__proto__ = SyncNodeTreeItem.prototype; treeItem.entry_ = node; treeItem.label = node.NON_UNIQUE_NAME; if (node.IS_DIR) { treeItem.mayHaveChildren_ = true; // Load children on expand. treeItem.expanded_ = false; treeItem.addEventListener('expand', treeItem.handleExpand_.bind(treeItem)); } else { treeItem.classList.add('leaf'); } return treeItem; }; SyncNodeTreeItem.prototype = { __proto__: cr.ui.TreeItem.prototype, /** * Finds the children of this node and appends them to the tree. */ handleExpand_: function(event) { var treeItem = this; if (treeItem.expanded_) { return; } treeItem.expanded_ = true; var children = treeItem.tree.allNodes.filter( isChildOf.bind(undefined, treeItem.entry_)); children.sort(nodeComparator); children.forEach(function(node) { treeItem.add(new SyncNodeTreeItem(node)); }); }, }; /** * Creates a new sync node tree. Technically, it's a forest since it each * type has its own root node for its own tree, but it still looks and acts * mostly like a tree. * * @param {Object=} opt_propertyBag Optional properties. * @constructor * @extends {cr.ui.Tree} */ var SyncNodeTree = cr.ui.define('tree'); SyncNodeTree.prototype = { __proto__: cr.ui.Tree.prototype, decorate: function() { cr.ui.Tree.prototype.decorate.call(this); this.addEventListener('change', this.handleChange_.bind(this)); this.allNodes = []; }, populate: function(nodes) { var tree = this; // We store the full set of nodes in the SyncNodeTree object. tree.allNodes = nodes; var roots = tree.allNodes.filter(isTypeRootNode); roots.sort(nodeComparator); roots.forEach(function(typeRoot) { tree.add(new SyncNodeTreeItem(typeRoot)); }); }, handleChange_: function(event) { if (this.selectedItem) { updateNodeDetailView(this.selectedItem); } } }; /** * Clears any existing UI state. Useful prior to a refresh. */ function clear() { var treeContainer = $('sync-node-tree-container'); while (treeContainer.firstChild) { treeContainer.removeChild(treeContainer.firstChild); } var nodeDetailsView = $('node-details'); nodeDetailsView.hidden = true; } /** * Fetch the latest set of nodes and refresh the UI. */ function refresh() { $('node-browser-refresh-button').disabled = true; clear(); setLastRefreshTime('In progress since ' + (new Date()).toLocaleString()); chrome.sync.getAllNodes(function(nodeMap) { // Put all nodes into one big list that ignores the type. var nodes = nodeMap. map(function(x) { return x.nodes; }). reduce(function(a, b) { return a.concat(b); }); var treeContainer = $('sync-node-tree-container'); var tree = document.createElement('tree'); tree.setAttribute('id', 'sync-node-tree'); tree.setAttribute('icon-visibility', 'parent'); treeContainer.appendChild(tree); cr.ui.decorate(tree, SyncNodeTree); tree.populate(nodes); setLastRefreshTime((new Date()).toLocaleString()); $('node-browser-refresh-button').disabled = false; }); } document.addEventListener('DOMContentLoaded', function(e) { $('node-browser-refresh-button').addEventListener('click', refresh); cr.ui.decorate('#sync-node-splitter', cr.ui.Splitter); // Automatically trigger a refresh the first time this tab is selected. $('sync-browser-tab').addEventListener('selectedChange', function f(e) { if (this.selected) { $('sync-browser-tab').removeEventListener('selectedChange', f); refresh(); } }); }); })(); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // require: cr.js cr.define('chrome.sync', function() { var currSearchId = 0; var setQueryString = function(queryControl, query) { queryControl.value = query; }; var createDoQueryFunction = function(queryControl, submitControl, query) { return function() { setQueryString(queryControl, query); submitControl.click(); }; }; /** * Decorates the quick search controls * * @param {Array of DOM elements} quickLinkArray The <a> object which * will be given a link to a quick filter option. * @param {!HTMLInputElement} queryControl The <input> object of * type=search where user's query is typed. */ var decorateQuickQueryControls = function(quickLinkArray, submitControl, queryControl) { for (var index = 0; index < allLinks.length; ++index) { var quickQuery = allLinks[index].getAttribute('data-query'); var quickQueryFunction = createDoQueryFunction(queryControl, submitControl, quickQuery); allLinks[index].addEventListener('click', quickQueryFunction); } }; /** * Runs a search with the given query. * * @param {string} query The regex to do the search with. * @param {function} callback The callback called with the search results; * not called if doSearch() is called again while the search is running. */ var doSearch = function(query, callback) { var searchId = ++currSearchId; try { var regex = new RegExp(query); chrome.sync.getAllNodes(function(node_map) { // Put all nodes into one big list that ignores the type. var nodes = node_map. map(function(x) { return x.nodes; }). reduce(function(a, b) { return a.concat(b); }); if (currSearchId != searchId) { return; } callback(nodes.filter(function(elem) { return regex.test(JSON.stringify(elem, null, 2)); }), null); }); } catch (err) { // Sometimes the provided regex is invalid. This and other errors will // be caught and handled here. callback([], err); } }; /** * Decorates the various search controls. * * @param {!HTMLInputElement} queryControl The <input> object of * type=search where the user's query is typed. * @param {!HTMLButtonElement} submitControl The <button> object * where the user can click to submit the query. * @param {!HTMLElement} statusControl The <span> object display the * search status. * @param {!HTMLElement} listControl The <list> object which holds * the list of returned results. * @param {!HTMLPreElement} detailsControl The <pre> object which * holds the details of the selected result. */ function decorateSearchControls(queryControl, submitControl, statusControl, resultsControl, detailsControl) { var resultsDataModel = new cr.ui.ArrayDataModel([]); var searchFunction = function() { var query = queryControl.value; statusControl.textContent = ''; resultsDataModel.splice(0, resultsDataModel.length); if (!query) { return; } statusControl.textContent = 'Searching for ' + query + '...'; queryControl.removeAttribute('error'); var timer = chrome.sync.makeTimer(); doSearch(query, function(nodes, error) { if (error) { statusControl.textContent = 'Error: ' + error; queryControl.setAttribute('error', ''); } else { statusControl.textContent = 'Found ' + nodes.length + ' nodes in ' + timer.getElapsedSeconds() + 's'; queryControl.removeAttribute('error'); // TODO(akalin): Write a nicer list display. for (var i = 0; i < nodes.length; ++i) { nodes[i].toString = function() { return this.NON_UNIQUE_NAME; }; } resultsDataModel.push.apply(resultsDataModel, nodes); // Workaround for http://crbug.com/83452 . resultsControl.redraw(); } }); }; submitControl.addEventListener('click', searchFunction); // Decorate search box. queryControl.onsearch = searchFunction; queryControl.value = ''; // Decorate results list. cr.ui.List.decorate(resultsControl); resultsControl.dataModel = resultsDataModel; resultsControl.selectionModel.addEventListener('change', function(event) { detailsControl.textContent = ''; var selected = resultsControl.selectedItem; if (selected) { detailsControl.textContent = JSON.stringify(selected, null, 2); } }); } return { decorateSearchControls: decorateSearchControls, decorateQuickQueryControls: decorateQuickQueryControls }; }); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('chrome.sync.about_tab', function() { // Contains the latest snapshot of sync about info. chrome.sync.aboutInfo = {}; function highlightIfChanged(node, oldVal, newVal) { function clearHighlight() { this.removeAttribute('highlighted'); } var oldStr = oldVal.toString(); var newStr = newVal.toString(); if (oldStr != '' && oldStr != newStr) { // Note the addListener function does not end up creating duplicate // listeners. There can be only one listener per event at a time. // Reference: https://developer.mozilla.org/en/DOM/element.addEventListener node.addEventListener('webkitAnimationEnd', clearHighlight, false); node.setAttribute('highlighted', ''); } } function refreshAboutInfo(aboutInfo) { chrome.sync.aboutInfo = aboutInfo; var aboutInfoDiv = $('about-info'); jstProcess(new JsEvalContext(aboutInfo), aboutInfoDiv); } function onAboutInfoUpdatedEvent(e) { refreshAboutInfo(e.details); } /** * Helper to determine if an element is scrolled to its bottom limit. * @param {Element} elem element to check * @return {boolean} true if the element is scrolled to the bottom */ function isScrolledToBottom(elem) { return elem.scrollHeight - elem.scrollTop == elem.clientHeight; } /** * Helper to scroll an element to its bottom limit. * @param {Element} elem element to be scrolled */ function scrollToBottom(elem) { elem.scrollTop = elem.scrollHeight - elem.clientHeight; } /** Container for accumulated sync protocol events. */ var protocolEvents = []; /** We may receive re-delivered events. Keep a record of ones we've seen. */ var knownEventTimestamps = {}; /** * Callback for incoming protocol events. * @param {Event} e The protocol event. */ function onReceivedProtocolEvent(e) { var details = e.details; // Return early if we've seen this event before. Assumes that timestamps // are sufficiently high resolution to uniquely identify an event. if (knownEventTimestamps.hasOwnProperty(details.time)) { return; } knownEventTimestamps[details.time] = true; protocolEvents.push(details); var trafficContainer = $('traffic-event-container'); // Scroll to the bottom if we were already at the bottom. Otherwise, leave // the scrollbar alone. var shouldScrollDown = isScrolledToBottom(trafficContainer); var context = new JsEvalContext({ events: protocolEvents }); jstProcess(context, trafficContainer); if (shouldScrollDown) scrollToBottom(trafficContainer); } /** * Initializes state and callbacks for the protocol event log UI. */ function initProtocolEventLog() { chrome.sync.events.addEventListener( 'onProtocolEvent', onReceivedProtocolEvent); // Make the prototype jscontent element disappear. jstProcess({}, $('traffic-event-container')); } /** * Initializes listeners for status dump and import UI. */ function initStatusDumpButton() { $('status-data').hidden = true; var dumpStatusButton = $('dump-status'); dumpStatusButton.addEventListener('click', function(event) { var aboutInfo = chrome.sync.aboutInfo; if (!$('include-ids').checked) { aboutInfo.details = chrome.sync.aboutInfo.details.filter(function(el) { return !el.is_sensitive; }); } var data = ''; data += new Date().toString() + '\n'; data += '======\n'; data += 'Status\n'; data += '======\n'; data += JSON.stringify(aboutInfo, null, 2) + '\n'; $('status-text').value = data; $('status-data').hidden = false; }); var importStatusButton = $('import-status'); importStatusButton.addEventListener('click', function(event) { $('status-data').hidden = false; if ($('status-text').value.length == 0) { $('status-text').value = 'Paste sync status dump here then click import.'; return; } // First remove any characters before the '{'. var data = $('status-text').value; var firstBrace = data.indexOf('{'); if (firstBrace < 0) { $('status-text').value = 'Invalid sync status dump.'; return; } data = data.substr(firstBrace); // Remove listeners to prevent sync events from overwriting imported data. chrome.sync.events.removeEventListener( 'onAboutInfoUpdated', onAboutInfoUpdatedEvent); var aboutInfo = JSON.parse(data); refreshAboutInfo(aboutInfo); }); } /** * Toggles the given traffic event entry div's "expanded" state. * @param {MouseEvent} e the click event that triggered the toggle. */ function expandListener(e) { e.target.classList.toggle('traffic-event-entry-expanded'); } /** * Attaches a listener to the given traffic event entry div. * @param {HTMLElement} element the element to attach the listener to. */ function addExpandListener(element) { element.addEventListener('click', expandListener, false); } function onLoad() { initStatusDumpButton(); initProtocolEventLog(); chrome.sync.events.addEventListener( 'onAboutInfoUpdated', onAboutInfoUpdatedEvent); // Register to receive a stream of event notifications. chrome.sync.registerForEvents(); // Request an about info update event to initialize the page. chrome.sync.requestUpdatedAboutInfo(); } return { onLoad: onLoad, addExpandListener: addExpandListener, highlightIfChanged: highlightIfChanged }; }); document.addEventListener( 'DOMContentLoaded', chrome.sync.about_tab.onLoad, false); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. (function() { var dumpToTextButton = $('dump-to-text'); var dataDump = $('data-dump'); dumpToTextButton.addEventListener('click', function(event) { // TODO(akalin): Add info like Chrome version, OS, date dumped, etc. var data = ''; data += '======\n'; data += 'Status\n'; data += '======\n'; data += JSON.stringify(chrome.sync.aboutInfo, null, 2); data += '\n'; data += '\n'; data += '=============\n'; data += 'Notifications\n'; data += '=============\n'; data += JSON.stringify(chrome.sync.notifications, null, 2); data += '\n'; data += '\n'; data += '===\n'; data += 'Log\n'; data += '===\n'; data += JSON.stringify(chrome.sync.log.entries, null, 2); data += '\n'; dataDump.textContent = data; }); var allFields = [ 'ID', 'IS_UNSYNCED', 'IS_UNAPPLIED_UPDATE', 'BASE_VERSION', 'BASE_VERSION_TIME', 'SERVER_VERSION', 'SERVER_VERSION_TIME', 'PARENT_ID', 'SERVER_PARENT_ID', 'IS_DEL', 'SERVER_IS_DEL', 'modelType', 'SERVER_SPECIFICS', 'SPECIFICS', ]; function versionToDateString(version) { // TODO(mmontgomery): ugly? Hacky? Is there a better way? var epochLength = Date.now().toString().length; var epochTime = parseInt(version.slice(0, epochLength)); var date = new Date(epochTime); return date.toString(); } /** * @param {!Object} node A JavaScript represenation of a sync entity. * @return {string} A string representation of the sync entity. */ function serializeNode(node) { return allFields.map(function(field) { var fieldVal; if (field == 'SERVER_VERSION_TIME') { var version = node['SERVER_VERSION']; fieldVal = versionToDateString(version); } if (field == 'BASE_VERSION_TIME') { var version = node['BASE_VERSION']; fieldVal = versionToDateString(version); } else if ((field == 'SERVER_SPECIFICS' || field == 'SPECIFICS') && (!$('include-specifics').checked)) { fieldVal = 'REDACTED'; } else if ((field == 'SERVER_SPECIFICS' || field == 'SPECIFICS') && $('include-specifics').checked) { fieldVal = JSON.stringify(node[field]); } else { fieldVal = node[field]; } return fieldVal; }); } /** * @param {string} type The name of a sync model type. * @return {boolean} True if the type's checkbox is selected. */ function isSelectedDatatype(type) { var typeCheckbox = $(type); // Some types, such as 'Top level folder', appear in the list of nodes // but not in the list of selectable items. if (typeCheckbox == null) { return false; } return typeCheckbox.checked; } function makeBlobUrl(data) { var textBlob = new Blob([data], {type: 'octet/stream'}); var blobUrl = window.URL.createObjectURL(textBlob); return blobUrl; } function makeDownloadName() { // Format is sync-data-dump-$epoch-$year-$month-$day-$OS.csv. var now = new Date(); var friendlyDate = [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('-'); var name = ['sync-data-dump', friendlyDate, Date.now(), navigator.platform].join('-'); return [name, 'csv'].join('.'); } function makeDateUserAgentHeader() { var now = new Date(); var userAgent = window.navigator.userAgent; var dateUaHeader = [now.toISOString(), userAgent].join(','); return dateUaHeader; } /** * Builds a summary of current state and exports it as a downloaded file. * * @param {!Array<{type: string, nodes: !Array<!Object>}>} nodesMap * Summary of local state by model type. */ function triggerDataDownload(nodesMap) { // Prepend a header with ISO date and useragent. var output = [makeDateUserAgentHeader()]; output.push('====='); var aboutInfo = JSON.stringify(chrome.sync.aboutInfo, null, 2); output.push(aboutInfo); // Filter out non-selected types. var selectedTypesNodes = nodesMap.filter(function(x) { return isSelectedDatatype(x.type); }); // Serialize the remaining nodes and add them to the output. selectedTypesNodes.forEach(function(typeNodes) { output.push('====='); output.push(typeNodes.nodes.map(serializeNode).join('\n')); }); output = output.join('\n'); var anchor = $('dump-to-file-anchor'); anchor.href = makeBlobUrl(output); anchor.download = makeDownloadName(); anchor.click(); } function createTypesCheckboxes(types) { var containerElt = $('node-type-checkboxes'); types.map(function(type) { var div = document.createElement('div'); var checkbox = document.createElement('input'); checkbox.id = type; checkbox.type = 'checkbox'; checkbox.checked = 'yes'; div.appendChild(checkbox); var label = document.createElement('label'); // Assigning to label.for doesn't work. label.setAttribute('for', type); label.innerText = type; div.appendChild(label); containerElt.appendChild(div); }); } function onReceivedListOfTypes(e) { var types = e.details.types; types.sort(); createTypesCheckboxes(types); chrome.sync.events.removeEventListener( 'onReceivedListOfTypes', onReceivedListOfTypes); } document.addEventListener('DOMContentLoaded', function() { chrome.sync.events.addEventListener( 'onReceivedListOfTypes', onReceivedListOfTypes); chrome.sync.requestListOfTypes(); }); var dumpToFileLink = $('dump-to-file'); dumpToFileLink.addEventListener('click', function(event) { chrome.sync.getAllNodes(triggerDataDownload); }); })(); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. cr.define('chrome.sync.events_tab', function() { 'use strict'; function toggleDisplay(event) { var originatingButton = event.target; if (originatingButton.className != 'toggle-button') { return; } var detailsNode = originatingButton.parentNode.getElementsByClassName( 'details')[0]; var detailsColumn = detailsNode.parentNode; var detailsRow = detailsColumn.parentNode; if (!detailsRow.classList.contains('expanded')) { detailsRow.classList.toggle('expanded'); detailsColumn.setAttribute('colspan', 4); detailsNode.removeAttribute('hidden'); } else { detailsNode.setAttribute('hidden', ''); detailsColumn.removeAttribute('colspan'); detailsRow.classList.toggle('expanded'); } }; function displaySyncEvents() { var entries = chrome.sync.log.entries; var eventTemplateContext = { eventList: entries, }; var context = new JsEvalContext(eventTemplateContext); jstProcess(context, $('sync-events')); }; function onLoad() { $('sync-events').addEventListener('click', toggleDisplay); chrome.sync.log.addEventListener('append', function(event) { displaySyncEvents(); }); } return { onLoad: onLoad }; }); document.addEventListener( 'DOMContentLoaded', chrome.sync.events_tab.onLoad, false); // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // require: cr/ui.js // require: util.js cr.ui.decorate('#sync-results-splitter', cr.ui.Splitter); var allLinks = document.getElementsByClassName('sync-search-quicklink'); chrome.sync.decorateQuickQueryControls( allLinks, $('sync-search-submit'), $('sync-search-query')); chrome.sync.decorateSearchControls( $('sync-search-query'), $('sync-search-submit'), $('sync-search-status'), $('sync-results-list'), $('sync-result-details')); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This code is used in conjunction with the Google Translate Element script. // It is executed in an isolated world of a page to translate it from one // language to another. // It should be included in the page before the Translate Element script. var cr = cr || {}; /** * An object to provide functions to interact with the Translate library. * @type {object} */ cr.googleTranslate = (function() { /** * The Translate Element library's instance. * @type {object} */ var lib; /** * A flag representing if the Translate Element library is initialized. * @type {boolean} */ var libReady = false; /** * Error definitions for |errorCode|. See chrome/common/translate_errors.h * to modify the definition. * @const */ var ERROR = { 'NONE': 0, 'INITIALIZATION_ERROR': 2, 'UNSUPPORTED_LANGUAGE': 4, 'TRANSLATION_ERROR': 6, 'TRANSLATION_TIMEOUT': 7, 'UNEXPECTED_SCRIPT_ERROR': 8, 'BAD_ORIGIN': 9, 'SCRIPT_LOAD_ERROR': 10 }; /** * Error code map from te.dom.DomTranslator.Error to |errorCode|. * See also go/dom_translator.js in google3. * @const */ var TRANSLATE_ERROR_TO_ERROR_CODE_MAP = { 0: ERROR['NONE'], 1: ERROR['TRANSLATION_ERROR'], 2: ERROR['UNSUPPORTED_LANGUAGE'] }; /** * An error code happened in translate.js and the Translate Element library. */ var errorCode = ERROR['NONE']; /** * A flag representing if the Translate Element has finished a translation. * @type {boolean} */ var finished = false; /** * Counts how many times the checkLibReady function is called. The function * is called in every 100 msec and counted up to 6. * @type {number} */ var checkReadyCount = 0; /** * Time in msec when this script is injected. * @type {number} */ var injectedTime = performance.now(); /** * Time in msec when the Translate Element library is loaded completely. * @type {number} */ var loadedTime = 0.0; /** * Time in msec when the Translate Element library is initialized and ready * for performing translation. * @type {number} */ var readyTime = 0.0; /** * Time in msec when the Translate Element library starts a translation. * @type {number} */ var startTime = 0.0; /** * Time in msec when the Translate Element library ends a translation. * @type {number} */ var endTime = 0.0; function checkLibReady() { if (lib.isAvailable()) { readyTime = performance.now(); libReady = true; return; } if (checkReadyCount++ > 5) { errorCode = ERROR['TRANSLATION_TIMEOUT']; return; } setTimeout(checkLibReady, 100); } function onTranslateProgress(progress, opt_finished, opt_error) { finished = opt_finished; // opt_error can be 'undefined'. if (typeof opt_error == 'boolean' && opt_error) { // TODO(toyoshim): Remove boolean case once a server is updated. errorCode = ERROR['TRANSLATION_ERROR']; // We failed to translate, restore so the page is in a consistent state. lib.restore(); } else if (typeof opt_error == 'number' && opt_error != 0) { errorCode = TRANSLATE_ERROR_TO_ERROR_CODE_MAP[opt_error]; lib.restore(); } if (finished) endTime = performance.now(); } // Public API. return { /** * Whether the library is ready. * The translate function should only be called when |libReady| is true. * @type {boolean} */ get libReady() { return libReady; }, /** * Whether the current translate has finished successfully. * @type {boolean} */ get finished() { return finished; }, /** * Whether an error occured initializing the library of translating the * page. * @type {boolean} */ get error() { return errorCode != ERROR['NONE']; }, /** * Returns a number to represent error type. * @type {number} */ get errorCode() { return errorCode; }, /** * The language the page translated was in. Is valid only after the page * has been successfully translated and the original language specified to * the translate function was 'auto'. Is empty otherwise. * Some versions of Element library don't provide |getDetectedLanguage| * function. In that case, this function returns 'und'. * @type {boolean} */ get sourceLang() { if (!libReady || !finished || errorCode != ERROR['NONE']) return ''; if (!lib.getDetectedLanguage) return 'und'; // Defined as translate::kUnknownLanguageCode in C++. return lib.getDetectedLanguage(); }, /** * Time in msec from this script being injected to all server side scripts * being loaded. * @type {number} */ get loadTime() { if (loadedTime == 0) return 0; return loadedTime - injectedTime; }, /** * Time in msec from this script being injected to the Translate Element * library being ready. * @type {number} */ get readyTime() { if (!libReady) return 0; return readyTime - injectedTime; }, /** * Time in msec to perform translation. * @type {number} */ get translationTime() { if (!finished) return 0; return endTime - startTime; }, /** * Translate the page contents. Note that the translation is asynchronous. * You need to regularly check the state of |finished| and |errorCode| to * know if the translation finished or if there was an error. * @param {string} originalLang The language the page is in. * @param {string} targetLang The language the page should be translated to. * @return {boolean} False if the translate library was not ready, in which * case the translation is not started. True otherwise. */ translate: function(originalLang, targetLang) { finished = false; errorCode = ERROR['NONE']; if (!libReady) return false; startTime = performance.now(); try { lib.translatePage(originalLang, targetLang, onTranslateProgress); } catch (err) { console.error('Translate: ' + err); errorCode = ERROR['UNEXPECTED_SCRIPT_ERROR']; return false; } return true; }, /** * Reverts the page contents to its original value, effectively reverting * any performed translation. Does nothing if the page was not translated. */ revert: function() { lib.restore(); }, /** * Entry point called by the Translate Element once it has been injected in * the page. */ onTranslateElementLoad: function() { loadedTime = performance.now(); try { lib = google.translate.TranslateService({ // translateApiKey is predefined by translate_script.cc. 'key': translateApiKey, 'useSecureConnection': true }); translateApiKey = undefined; } catch (err) { errorCode = ERROR['INITIALIZATION_ERROR']; translateApiKey = undefined; return; } // The TranslateService is not available immediately as it needs to start // Flash. Let's wait until it is ready. checkLibReady(); }, /** * Entry point called by the Translate Element when it want to load an * external CSS resource into the page. * @param {string} url URL of an external CSS resource to load. */ onLoadCSS: function(url) { var element = document.createElement('link'); element.type = 'text/css'; element.rel = 'stylesheet'; element.charset = 'UTF-8'; element.href = url; document.head.appendChild(element); }, /** * Entry point called by the Translate Element when it want to load and run * an external JavaScript on the page. * @param {string} url URL of an external JavaScript to load. */ onLoadJavascript: function(url) { // securityOrigin is predefined by translate_script.cc. if (url.indexOf(securityOrigin) != 0) { console.error('Translate: ' + url + ' is not allowed to load.'); errorCode = ERROR['BAD_ORIGIN']; return; } var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function() { if (this.readyState != this.DONE) return; if (this.status != 200) { errorCode = ERROR['SCRIPT_LOAD_ERROR']; return; } eval(this.responseText); } xhr.send(); } }; })(); /* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ body { background-color: white; color: black; font-size: 100%; margin: 0; } #outer { margin-left: auto; margin-right: auto; margin-top: 10px; width: 800px; } #inner { padding-top: 10px; word-break: break-word; } .label { -webkit-padding-end: 5px; font-size: 0.9em; font-weight: bold; text-align: end; vertical-align: top; white-space: nowrap; } .label::after { content: ':'; } #logo { float: right; margin-left: 40px; text-align: right; width: 180px; } #company { font-size: 0.7em; text-align: right; } #copyright { font-size: 0.7em; text-align: right; } #useragent { font-family: monospace; } .version { font-family: monospace; max-width: 430px; padding-left: 5px; vertical-align: bottom; } <!doctype html> <!-- about:version template page --> <html id="t" i18n-values="dir:textdirection;lang:language"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <link rel="stylesheet" href="chrome://version/about_version.css"> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/parse_html_subset.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="chrome://version/version.js"></script> <script src="chrome://version/strings.js"></script> </head> <body> <div id="outer"> <div id="logo"> <img src="chrome://theme/IDR_PRODUCT_LOGO"> <div id="company" i18n-content="company"></div> <div id="copyright" i18n-content="copyright"></div> </div> <table id="inner" cellpadding="0" cellspacing="0" border="0"> <tr><td class="label" i18n-content="application_label"></td> <td class="version" id="version"> <span i18n-content="version"></span> (<span i18n-content="official"></span>) <span i18n-content="version_modifier"></span> <span i18n-content="version_bitsize"></span> </td> </tr> <tr> <td class="label" i18n-content="revision"></td> <td class="version"> <span i18n-content="cl"></span> </td> </tr> <tr><td class="label" i18n-content="os_name"></td> <td class="version" id="os_type"> <span i18n-content="os_type"></span> <span id="os_version" i18n-content="os_version"></span> </td> </tr> <tr><td class="label">Blink</td> <td class="version" id="blink_version" i18n-content="blink_version"></td> </tr> <tr><td class="label">JavaScript</td> <td class="version" id="js_engine"> <span i18n-content="js_engine"></span> <span i18n-content="js_version"></span> </td> </tr> <tr><td class="label" i18n-content="flash_plugin"></td> <td class="version" id="flash_version" i18n-content="flash_version"></td> </tr> <tr><td class="label" i18n-content="user_agent_name"></td> <td class="version" id="useragent" i18n-content="useragent"></td> </tr> <tr><td class="label" i18n-content="command_line_name"></td> <td class="version" id="command_line" i18n-content="command_line"></td> </tr> <tr><td class="label" i18n-content="executable_path_name"></td> <td class="version" id="executable_path" i18n-content="executable_path"></td> </tr> <tr><td class="label" i18n-content="profile_path_name"></td> <td class="version" id="profile_path" i18n-content="profile_path"></td> </tr> <tr id="variations-section"> <td class="label" i18n-content="variations_name"></td> <td class="version" id="variations-list"></td> </tr> <tr id="compiler-section"> <td class="label">Compiler</td> <td class="version" id="compiler" i18n-content="compiler"></td> </tr> </table> </div> <script src="chrome://resources/js/i18n_template.js"></script> </body> </html> // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Callback from the backend with the list of variations to display. * This call will build the variations section of the version page, or hide that * section if there are none to display. * @param {!Array<string>} variationsList The list of variations. */ function returnVariationInfo(variationsList) { $('variations-section').hidden = !variationsList.length; $('variations-list').appendChild( parseHtmlSubset(variationsList.join('<br>'), ['BR'])); } /** * Callback from the backend with the executable and profile paths to display. * @param {string} execPath The executable path to display. * @param {string} profilePath The profile path to display. */ function returnFilePaths(execPath, profilePath) { $('executable_path').textContent = execPath; $('profile_path').textContent = profilePath; } /** * Callback from the backend with the Flash version to display. * @param {string} flashVersion The Flash version to display. */ function returnFlashVersion(flashVersion) { $('flash_version').textContent = flashVersion; } /** * Callback from the backend with the OS version to display. * @param {string} osVersion The OS version to display. */ function returnOsVersion(osVersion) { $('os_version').textContent = osVersion; } /* All the work we do onload. */ function onLoadWork() { chrome.send('requestVersionInfo'); } document.addEventListener('DOMContentLoaded', onLoadWork); /* * The default style sheet used to render HTML. * * Copyright (C) 2000 Lars Knoll (knoll@kde.org) * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ @namespace "http://www.w3.org/1999/xhtml"; html { display: block } /* children of the <head> element all have display:none */ head { display: none } meta { display: none } title { display: none } link { display: none } style { display: none } script { display: none } /* generic block-level elements */ body { display: block; margin: 8px } body:-webkit-full-page-media { background-color: rgb(0, 0, 0) } p { display: block; -webkit-margin-before: 1__qem; -webkit-margin-after: 1__qem; -webkit-margin-start: 0; -webkit-margin-end: 0; } div { display: block } layer { display: block } article, aside, footer, header, hgroup, main, nav, section { display: block } marquee { display: inline-block; } address { display: block } blockquote { display: block; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 40px; -webkit-margin-end: 40px; } figcaption { display: block } figure { display: block; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 40px; -webkit-margin-end: 40px; } q { display: inline } q:before { content: open-quote; } q:after { content: close-quote; } center { display: block; /* special centering to be able to emulate the html4/netscape behaviour */ text-align: -webkit-center } hr { display: block; -webkit-margin-before: 0.5em; -webkit-margin-after: 0.5em; -webkit-margin-start: auto; -webkit-margin-end: auto; border-style: inset; border-width: 1px } map { display: inline } video { object-fit: contain; } /* heading elements */ h1 { display: block; font-size: 2em; -webkit-margin-before: 0.67__qem; -webkit-margin-after: 0.67em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } :-webkit-any(article,aside,nav,section) h1 { font-size: 1.5em; -webkit-margin-before: 0.83__qem; -webkit-margin-after: 0.83em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: 1.17em; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: 1.00em; -webkit-margin-before: 1.33__qem; -webkit-margin-after: 1.33em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: .83em; -webkit-margin-before: 1.67__qem; -webkit-margin-after: 1.67em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: .67em; -webkit-margin-before: 2.33__qem; -webkit-margin-after: 2.33em; } h2 { display: block; font-size: 1.5em; -webkit-margin-before: 0.83__qem; -webkit-margin-after: 0.83em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h3 { display: block; font-size: 1.17em; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h4 { display: block; -webkit-margin-before: 1.33__qem; -webkit-margin-after: 1.33em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h5 { display: block; font-size: .83em; -webkit-margin-before: 1.67__qem; -webkit-margin-after: 1.67em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h6 { display: block; font-size: .67em; -webkit-margin-before: 2.33__qem; -webkit-margin-after: 2.33em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } /* tables */ table { display: table; border-collapse: separate; border-spacing: 2px; border-color: gray } thead { display: table-header-group; vertical-align: middle; border-color: inherit } tbody { display: table-row-group; vertical-align: middle; border-color: inherit } tfoot { display: table-footer-group; vertical-align: middle; border-color: inherit } /* for tables without table section elements (can happen with XHTML or dynamically created tables) */ table > tr { vertical-align: middle; } col { display: table-column } colgroup { display: table-column-group } tr { display: table-row; vertical-align: inherit; border-color: inherit } td, th { display: table-cell; vertical-align: inherit } th { font-weight: bold } caption { display: table-caption; text-align: -webkit-center } /* lists */ ul, menu, dir { display: block; list-style-type: disc; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; -webkit-padding-start: 40px } ol { display: block; list-style-type: decimal; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; -webkit-padding-start: 40px } li { display: list-item; text-align: -webkit-match-parent; } ul ul, ol ul { list-style-type: circle } ol ol ul, ol ul ul, ul ol ul, ul ul ul { list-style-type: square } dd { display: block; -webkit-margin-start: 40px } dl { display: block; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; } dt { display: block } ol ul, ul ol, ul ul, ol ol { -webkit-margin-before: 0; -webkit-margin-after: 0 } /* form elements */ form { display: block; margin-top: 0__qem; } label { cursor: default; } legend { display: block; -webkit-padding-start: 2px; -webkit-padding-end: 2px; border: none } fieldset { display: block; -webkit-margin-start: 2px; -webkit-margin-end: 2px; -webkit-padding-before: 0.35em; -webkit-padding-start: 0.75em; -webkit-padding-end: 0.75em; -webkit-padding-after: 0.625em; border: 2px groove ThreeDFace; min-width: -webkit-min-content; } button { -webkit-appearance: button; } /* Form controls don't go vertical. */ input, textarea, keygen, select, button, meter, progress { -webkit-writing-mode: horizontal-tb !important; } input, textarea, keygen, select, button { margin: 0__qem; font: -webkit-small-control; text-rendering: auto; /* FIXME: Remove when tabs work with optimizeLegibility. */ color: initial; letter-spacing: normal; word-spacing: normal; line-height: normal; text-transform: none; text-indent: 0; text-shadow: none; display: inline-block; text-align: start; } input[type="hidden" i] { display: none } input { -webkit-appearance: textfield; padding: 1px; background-color: white; border: 2px inset; -webkit-rtl-ordering: logical; -webkit-user-select: text; cursor: auto; } input[type="search" i] { -webkit-appearance: searchfield; box-sizing: border-box; } input::-webkit-textfield-decoration-container { display: flex; align-items: center; -webkit-user-modify: read-only !important; content: none !important; } input[type="search" i]::-webkit-textfield-decoration-container { direction: ltr; } input::-webkit-clear-button { -webkit-appearance: searchfield-cancel-button; display: inline-block; flex: none; -webkit-user-modify: read-only !important; -webkit-margin-start: 2px; opacity: 0; pointer-events: none; } input:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-clear-button { opacity: 1; pointer-events: auto; } input[type="search" i]::-webkit-search-cancel-button { -webkit-appearance: searchfield-cancel-button; display: block; flex: none; -webkit-user-modify: read-only !important; -webkit-margin-start: 1px; opacity: 0; pointer-events: none; } input[type="search" i]:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-search-cancel-button { opacity: 1; pointer-events: auto; } input[type="search" i]::-webkit-search-decoration { -webkit-appearance: searchfield-decoration; display: block; flex: none; -webkit-user-modify: read-only !important; -webkit-align-self: flex-start; margin: auto 0; } input[type="search" i]::-webkit-search-results-decoration { -webkit-appearance: searchfield-results-decoration; display: block; flex: none; -webkit-user-modify: read-only !important; -webkit-align-self: flex-start; margin: auto 0; } input::-webkit-inner-spin-button { -webkit-appearance: inner-spin-button; display: inline-block; cursor: default; flex: none; align-self: stretch; -webkit-user-select: none; -webkit-user-modify: read-only !important; opacity: 0; pointer-events: none; } input:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-inner-spin-button { opacity: 1; pointer-events: auto; } keygen, select { border-radius: 5px; } keygen::-webkit-keygen-select { margin: 0px; } textarea { -webkit-appearance: textarea; background-color: white; border: 1px solid; -webkit-rtl-ordering: logical; -webkit-user-select: text; flex-direction: column; resize: auto; cursor: auto; padding: 2px; white-space: pre-wrap; word-wrap: break-word; } ::-webkit-input-placeholder { -webkit-text-security: none; color: darkGray; pointer-events: none !important; } input::-webkit-input-placeholder { white-space: pre; word-wrap: normal; overflow: hidden; -webkit-user-modify: read-only !important; } input[type="password" i] { -webkit-text-security: disc !important; } input[type="hidden" i], input[type="image" i], input[type="file" i] { -webkit-appearance: initial; padding: initial; background-color: initial; border: initial; } input[type="file" i] { align-items: baseline; color: inherit; text-align: start !important; } input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { background-color: #FAFFBD !important; background-image:none !important; color: #000000 !important; } input[type="radio" i], input[type="checkbox" i] { margin: 3px 0.5ex; padding: initial; background-color: initial; border: initial; } input[type="button" i], input[type="submit" i], input[type="reset" i] { -webkit-appearance: push-button; -webkit-user-select: none; white-space: pre } input[type="file" i]::-webkit-file-upload-button { -webkit-appearance: push-button; -webkit-user-modify: read-only !important; white-space: nowrap; margin: 0; font-size: inherit; } input[type="button" i], input[type="submit" i], input[type="reset" i], input[type="file" i]::-webkit-file-upload-button, button { align-items: flex-start; text-align: center; cursor: default; color: ButtonText; padding: 2px 6px 3px 6px; border: 2px outset ButtonFace; background-color: ButtonFace; box-sizing: border-box } input[type="range" i] { -webkit-appearance: slider-horizontal; padding: initial; border: initial; margin: 2px; color: #909090; } input[type="range" i]::-webkit-slider-container, input[type="range" i]::-webkit-media-slider-container { flex: 1; min-width: 0; box-sizing: border-box; -webkit-user-modify: read-only !important; display: flex; } input[type="range" i]::-webkit-slider-runnable-track { flex: 1; min-width: 0; -webkit-align-self: center; box-sizing: border-box; -webkit-user-modify: read-only !important; display: block; } input[type="range" i]::-webkit-slider-thumb, input[type="range" i]::-webkit-media-slider-thumb { -webkit-appearance: sliderthumb-horizontal; box-sizing: border-box; -webkit-user-modify: read-only !important; display: block; } input[type="button" i]:disabled, input[type="submit" i]:disabled, input[type="reset" i]:disabled, input[type="file" i]:disabled::-webkit-file-upload-button, button:disabled, select:disabled, keygen:disabled, optgroup:disabled, option:disabled, select[disabled]>option { color: GrayText } input[type="button" i]:active, input[type="submit" i]:active, input[type="reset" i]:active, input[type="file" i]:active::-webkit-file-upload-button, button:active { border-style: inset } input[type="button" i]:active:disabled, input[type="submit" i]:active:disabled, input[type="reset" i]:active:disabled, input[type="file" i]:active:disabled::-webkit-file-upload-button, button:active:disabled { border-style: outset } input:disabled, textarea:disabled { color: #545454; } option:-internal-spatial-navigation-focus { outline: black dashed 1px; outline-offset: -1px; } datalist { display: none } area { display: inline; cursor: pointer; } param { display: none } input[type="checkbox" i] { -webkit-appearance: checkbox; box-sizing: border-box; } input[type="radio" i] { -webkit-appearance: radio; box-sizing: border-box; } input[type="color" i] { -webkit-appearance: square-button; width: 44px; height: 23px; background-color: ButtonFace; /* Same as native_theme_base. */ border: 1px #a9a9a9 solid; padding: 1px 2px; } input[type="color" i]::-webkit-color-swatch-wrapper { display:flex; padding: 4px 2px; box-sizing: border-box; -webkit-user-modify: read-only !important; width: 100%; height: 100% } input[type="color" i]::-webkit-color-swatch { background-color: #000000; border: 1px solid #777777; flex: 1; min-width: 0; -webkit-user-modify: read-only !important; } input[type="color" i][list] { -webkit-appearance: menulist; width: 88px; height: 23px } input[type="color" i][list]::-webkit-color-swatch-wrapper { padding-left: 8px; padding-right: 24px; } input[type="color" i][list]::-webkit-color-swatch { border-color: #000000; } input::-webkit-calendar-picker-indicator { display: inline-block; width: 0.66em; height: 0.66em; padding: 0.17em 0.34em; -webkit-user-modify: read-only !important; opacity: 0; pointer-events: none; } input::-webkit-calendar-picker-indicator:hover { background-color: #eee; } input:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-calendar-picker-indicator, input::-webkit-calendar-picker-indicator:focus { opacity: 1; pointer-events: auto; } input[type="date" i]:disabled::-webkit-clear-button, input[type="date" i]:disabled::-webkit-inner-spin-button, input[type="datetime-local" i]:disabled::-webkit-clear-button, input[type="datetime-local" i]:disabled::-webkit-inner-spin-button, input[type="month" i]:disabled::-webkit-clear-button, input[type="month" i]:disabled::-webkit-inner-spin-button, input[type="week" i]:disabled::-webkit-clear-button, input[type="week" i]:disabled::-webkit-inner-spin-button, input:disabled::-webkit-calendar-picker-indicator, input[type="date" i][readonly]::-webkit-clear-button, input[type="date" i][readonly]::-webkit-inner-spin-button, input[type="datetime-local" i][readonly]::-webkit-clear-button, input[type="datetime-local" i][readonly]::-webkit-inner-spin-button, input[type="month" i][readonly]::-webkit-clear-button, input[type="month" i][readonly]::-webkit-inner-spin-button, input[type="week" i][readonly]::-webkit-clear-button, input[type="week" i][readonly]::-webkit-inner-spin-button, input[readonly]::-webkit-calendar-picker-indicator { visibility: hidden; } select { -webkit-appearance: menulist; box-sizing: border-box; align-items: center; border: 1px solid; white-space: pre; -webkit-rtl-ordering: logical; color: black; background-color: white; cursor: default; } select:not(:-internal-list-box) { overflow: visible !important; } select:-internal-list-box { -webkit-appearance: listbox; align-items: flex-start; border: 1px inset gray; border-radius: initial; overflow-x: hidden; overflow-y: scroll; vertical-align: text-bottom; -webkit-user-select: none; white-space: nowrap; } optgroup { font-weight: bolder; display: block; } option { font-weight: normal; display: block; padding: 0 2px 1px 2px; white-space: pre; min-height: 1.2em; } select:-internal-list-box optgroup option:before { content: "\00a0\00a0\00a0\00a0";; } select:-internal-list-box option, select:-internal-list-box optgroup { line-height: initial !important; } select:-internal-list-box:focus option:checked { background-color: -internal-active-list-box-selection !important; color: -internal-active-list-box-selection-text !important; } select:-internal-list-box:focus option:checked:disabled { background-color: -internal-inactive-list-box-selection !important; } select:-internal-list-box option:checked { background-color: -internal-inactive-list-box-selection !important; color: -internal-inactive-list-box-selection-text !important; } select:-internal-list-box:disabled option:checked, select:-internal-list-box option:checked:disabled { color: gray !important; } select:-internal-list-box hr { border-style: none; } output { display: inline; } /* meter */ meter { -webkit-appearance: meter; box-sizing: border-box; display: inline-block; height: 1em; width: 5em; vertical-align: -0.2em; } meter::-webkit-meter-inner-element { -webkit-appearance: inherit; box-sizing: inherit; -webkit-user-modify: read-only !important; height: 100%; width: 100%; } meter::-webkit-meter-bar { background: linear-gradient(to bottom, #ddd, #eee 20%, #ccc 45%, #ccc 55%, #ddd); height: 100%; width: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; } meter::-webkit-meter-optimum-value { background: linear-gradient(to bottom, #ad7, #cea 20%, #7a3 45%, #7a3 55%, #ad7); height: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; } meter::-webkit-meter-suboptimum-value { background: linear-gradient(to bottom, #fe7, #ffc 20%, #db3 45%, #db3 55%, #fe7); height: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; } meter::-webkit-meter-even-less-good-value { background: linear-gradient(to bottom, #f77, #fcc 20%, #d44 45%, #d44 55%, #f77); height: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; } /* progress */ progress { -webkit-appearance: progress-bar; box-sizing: border-box; display: inline-block; height: 1em; width: 10em; vertical-align: -0.2em; } progress::-webkit-progress-inner-element { -webkit-appearance: inherit; box-sizing: inherit; -webkit-user-modify: read-only; height: 100%; width: 100%; } progress::-webkit-progress-bar { background-color: gray; height: 100%; width: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; } progress::-webkit-progress-value { background-color: green; height: 100%; width: 50%; /* should be removed later */ -webkit-user-modify: read-only !important; box-sizing: border-box; } /* inline elements */ u, ins { text-decoration: underline } strong, b { font-weight: bold } i, cite, em, var, address, dfn { font-style: italic } tt, code, kbd, samp { font-family: monospace } pre, xmp, plaintext, listing { display: block; font-family: monospace; white-space: pre; margin: 1__qem 0 } mark { background-color: yellow; color: black } big { font-size: larger } small { font-size: smaller } s, strike, del { text-decoration: line-through } sub { vertical-align: sub; font-size: smaller } sup { vertical-align: super; font-size: smaller } nobr { white-space: nowrap } /* states */ :focus { outline: auto 5px -webkit-focus-ring-color } /* Read-only text fields do not show a focus ring but do still receive focus */ html:focus, body:focus, input[readonly]:focus { outline: none } embed:focus, iframe:focus, object:focus { outline: none } input:focus, textarea:focus, keygen:focus, select:focus { outline-offset: -2px } input[type="button" i]:focus, input[type="checkbox" i]:focus, input[type="file" i]:focus, input[type="hidden" i]:focus, input[type="image" i]:focus, input[type="radio" i]:focus, input[type="reset" i]:focus, input[type="submit" i]:focus, input[type="file" i]:focus::-webkit-file-upload-button { outline-offset: 0 } a:-webkit-any-link { color: -webkit-link; text-decoration: underline; cursor: auto; } a:-webkit-any-link:active { color: -webkit-activelink } /* HTML5 ruby elements */ ruby, rt { text-indent: 0; /* blocks used for ruby rendering should not trigger this */ } rt { line-height: normal; -webkit-text-emphasis: none; } ruby > rt { display: block; font-size: 50%; text-align: start; } ruby > rp { display: none; } /* other elements */ noframes { display: none } frameset, frame { display: block } frameset { border-color: inherit } iframe { border: 2px inset } details { display: block } summary { display: block } summary::-webkit-details-marker { display: inline-block; width: 0.66em; height: 0.66em; -webkit-margin-end: 0.4em; } template { display: none } bdi, output { unicode-bidi: -webkit-isolate; } bdo { unicode-bidi: bidi-override; } textarea[dir=auto i] { unicode-bidi: -webkit-plaintext; } dialog:not([open]) { display: none } dialog { position: absolute; left: 0; right: 0; width: -webkit-fit-content; height: -webkit-fit-content; margin: auto; border: solid; padding: 1em; background: white; color: black } dialog::backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.1) } /* page */ @page { /* FIXME: Define the right default values for page properties. */ size: auto; margin: auto; padding: 0px; border-width: 0px; } /* noscript is handled internally, as it depends on settings. */ /* * Additonal style sheet used to render HTML pages in quirks mode. * * Copyright (C) 2000-2003 Lars Knoll (knoll@kde.org) * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ /* Give floated images margins of 3px */ img[align="left" i] { margin-right: 3px; } img[align="right" i] { margin-left: 3px; } /* Tables reset both line-height and white-space in quirks mode. */ /* Compatible with WinIE. Note that font-family is *not* reset. */ table { white-space: normal; line-height: normal; font-weight: normal; font-size: medium; font-variant: normal; font-style: normal; color: -webkit-text; text-align: start; } /* This will apply only to text fields, since all other inputs already use border box sizing */ input:not([type=image i]), textarea { box-sizing: border-box; } /* Set margin-bottom for form element in quirks mode. */ /* Compatible with Gecko. (Doing this only for quirks mode is a fix for bug 17696.) */ form { margin-bottom: 1em } /* * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ body { margin: 0 } table { width: 100%; border-spacing: 0; white-space: pre-wrap !important; margin: 0; word-break: break-word; font-size: initial; font-family: monospace; } td { padding: 0 !important; vertical-align: baseline } .line-gutter-backdrop, .line-number { /* Keep this in sync with inspector.css (.webkit-line-gutter-backdrop) */ box-sizing: border-box; padding: 0 4px !important; width: 31px; background-color: rgb(240, 240, 240); border-right: 1px solid rgb(187, 187, 187) !important; -webkit-user-select: none; } .line-gutter-backdrop { /* Keep this in sync with inspector.css (.webkit-line-gutter-backdrop) */ position: absolute; z-index: -1; left: 0; top: 0; height: 100% } .line-number { text-align: right; color: rgb(128, 128, 128); word-break: normal; white-space: nowrap; font-size: 9px; font-family: Helvetica; -webkit-user-select: none; } .line-number::before { content: attr(value); } tbody:last-child .line-content:empty:before { content: " "; } .line-content { padding: 0 5px !important; } .highlight { background-color: rgb(100%, 42%, 42%); border: 2px solid rgb(100%, 31%, 31%); } .html-tag { /* Keep this in sync with inspector.css (.webkit-html-tag) */ color: rgb(136, 18, 128); } .html-attribute-name { /* Keep this in sync with inspector.css (.webkit-html-attribute-name) */ color: rgb(153, 69, 0); } .html-attribute-value { /* Keep this in sync with inspector.css (.webkit-html-attribute-value) */ color: rgb(26, 26, 166); } .html-external-link, .html-resource-link { /* Keep this in sync with inspectorSyntaxHighlight.css (.webkit-html-external-link, .webkit-html-resource-link) */ color: #00e; } .html-external-link { /* Keep this in sync with inspectorSyntaxHighlight.css (.webkit-html-external-link) */ text-decoration: none; } .html-external-link:hover { /* Keep this in sync with inspectorSyntaxHighlight.css (.webkit-html-external-link:hover) */ text-decoration: underline; } .html-comment { /* Keep this in sync with inspectorSyntaxHighlight.css (.webkit-html-comment) */ color: rgb(35, 110, 37); } .html-doctype { /* Keep this in sync with inspectorSyntaxHighlight.css (.webkit-html-doctype) */ color: rgb(192, 192, 192); } .html-end-of-file { /* Keep this in sync with inspectorSyntaxHighlight.css (.webkit-html-end-of-file) */ color: rgb(255, 0, 0); font-weight: bold; } /* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ input[type="date" i], input[type="datetime-local" i], input[type="month" i], input[type="time" i], input[type="week" i] { align-items: center; display: -webkit-inline-flex; font-family: monospace; overflow: hidden; padding: 0; -webkit-padding-start: 1px; } input::-webkit-datetime-edit { flex: 1; min-width: 0; -webkit-user-modify: read-only !important; display: inline-block; overflow: hidden; } input::-webkit-datetime-edit-fields-wrapper { -webkit-user-modify: read-only !important; display: inline-block; padding: 1px 0; white-space: pre; } /* If you update padding, border, or margin in the following ruleset, update DateTimeFieldElement::maximumWidth too. */ input::-webkit-datetime-edit-ampm-field, input::-webkit-datetime-edit-day-field, input::-webkit-datetime-edit-hour-field, input::-webkit-datetime-edit-millisecond-field, input::-webkit-datetime-edit-minute-field, input::-webkit-datetime-edit-month-field, input::-webkit-datetime-edit-second-field, input::-webkit-datetime-edit-week-field, input::-webkit-datetime-edit-year-field { -webkit-user-modify: read-only !important; border: none; display: inline; font: inherit !important; padding: 1px; } /* Remove focus ring from fields and use highlight color */ input::-webkit-datetime-edit-ampm-field:focus, input::-webkit-datetime-edit-day-field:focus, input::-webkit-datetime-edit-hour-field:focus, input::-webkit-datetime-edit-millisecond-field:focus, input::-webkit-datetime-edit-minute-field:focus, input::-webkit-datetime-edit-month-field:focus, input::-webkit-datetime-edit-second-field:focus, input::-webkit-datetime-edit-week-field:focus, input::-webkit-datetime-edit-year-field:focus { background-color: highlight; color: highlighttext; outline: none; } input::-webkit-datetime-edit-year-field[disabled], input::-webkit-datetime-edit-month-field[disabled], input::-webkit-datetime-edit-week-field[disabled], input::-webkit-datetime-edit-day-field[disabled], input::-webkit-datetime-edit-ampm-field[disabled], input::-webkit-datetime-edit-hour-field[disabled], input::-webkit-datetime-edit-millisecond-field[disabled], input::-webkit-datetime-edit-minute-field[disabled], input::-webkit-datetime-edit-second-field[disabled] { color: GrayText; } /* If you update padding, border, or margin in the following ruleset, update DateTimeEditElement::customStyelForRenderer too. */ input::-webkit-datetime-edit-text { -webkit-user-modify: read-only !important; display: inline; font: inherit !important; } input[type="date" i]::-webkit-inner-spin-button, input[type="datetime" i]::-webkit-inner-spin-button, input[type="datetime-local" i]::-webkit-inner-spin-button, input[type="month" i]::-webkit-inner-spin-button, input[type="time" i]::-webkit-inner-spin-button, input[type="week" i]::-webkit-inner-spin-button { /* FIXME: Remove height. */ height: 1.5em; -webkit-margin-start: 2px; } /* * Copyright (C) 2008 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* These styles override the default styling for HTML elements as defined in WebCore/css/html.css. So far we have used this file exclusively for making our form elements match Firefox's. */ input:not([type]), input[type="email" i], input[type="number" i], input[type="password" i], input[type="tel" i], input[type="url" i], input[type="text" i] { padding:1px 0; } input[type="search" i] { padding:1px; } input[type="checkbox" i] { margin:3px 3px 3px 4px; } input[type="radio" i] { margin:3px 3px 0 5px; } input[type="range" i] { color: #c4c4c4; } /* Not sure this is the right color. #EBEBE4 is what Firefox uses. FIXME: Figure out how to support legacy input rendering. FIXME: Add input[type="file" i] once we figure out our file inputs. FIXME: Add input[type="image" i] once we figure out our image inputs. FIXME: We probably do the wrong thing if you put an invalid input type. do we care? */ textarea:disabled, input:not([type]):disabled, input[type="color" i]:disabled, input[type="date" i]:disabled, input[type="datetime" i]:disabled, input[type="datetime-local" i]:disabled, input[type="email" i]:disabled, input[type="month" i]:disabled, input[type="password" i]:disabled, input[type="number" i]:disabled, input[type="search" i]:disabled, input[type="tel" i]:disabled, input[type="text" i]:disabled, input[type="time" i]:disabled, input[type="url" i]:disabled, input[type="week" i]:disabled { background-color: #EBEBE4; } input[type="search" i]::-webkit-search-cancel-button { margin-right: 3px; } input[type="search" i]::-webkit-search-results-decoration { margin: auto 3px auto 2px; } input[type="button" i], input[type="submit" i], input[type="reset" i], input[type="file" i]::-webkit-file-upload-button, button { padding: 1px 6px; } /* Windows selects are not rounded. Custom borders for them shouldn't be either. */ keygen, select, select[size="0"], select[size="1"] { border-radius: 0; /* Same as native_theme_base. */ border-color: #a9a9a9; } select[size], select[multiple], select[size][multiple] { /* Same as native_theme_base. */ border: 1px solid #a9a9a9; } textarea { font-family: monospace; /* Same as native_theme_base. */ border-color: #a9a9a9; } /* * Copyright (C) 2008 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* These styles override the default styling for HTML elements in quirks-mode as defined in WebCore/css/quirks.css. So far we have used this file exclusively for making our form elements match Firefox's. */ textarea { /* Matches IE's text offsets in quirksmode (causes text to wrap the same as IE). */ padding: 2px 0 0 2px; } /* * The default style sheet used to render SVG. * * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @namespace "http://www.w3.org/2000/svg"; @namespace html "http://www.w3.org/1999/xhtml"; /* When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to the bounds of the initial viewport. When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will establish an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set according to the clipping rules as defined in [CSS2-overflow]. Opera/Firefox & WebKit agreed on NOT setting "overflow: hidden" for the outermost svg element - SVG 1.1 Errata contains these changes as well as all future SVG specifications: see http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html */ svg:not(:root), symbol, image, marker, pattern, foreignObject { overflow: hidden } svg:root { width: 100%; height: 100%; } text, foreignObject { display: block } text { white-space: nowrap } tspan, textPath { white-space: inherit } /* states */ :focus { outline: auto 5px -webkit-focus-ring-color } /* CSS transform specification: "transform-origin 0 0 for SVG elements without associated CSS layout box, 50% 50% for all other elements". */ * { -webkit-transform-origin: 0 0; } html|* > svg { -webkit-transform-origin: 50% 50%; } /* * The default style sheet used to render MathML. * * Copyright (C) 2014 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @namespace "http://www.w3.org/1998/Math/MathML"; /* By default, we only display the MathML formulas without any formatting other than the one specified by the display attribute. */ math { display: inline; } math[display="block"] { display: block; text-align: center; } /* We hide the PresentationExpression constructions that are children of a <semantics> element. http://www.w3.org/TR/MathML/appendixa.html#parsing_PresentationExpression */ semantics > mi, semantics > mn, semantics > mo, semantics > mtext, semantics > mspace, semantics > ms, semantics > maligngroup, semantics > malignmark, semantics > mrow, semantics > mfrac, semantics > msqrt, semantics > mroot, semantics > mstyle, semantics > merror, semantics > mpadded, semantics > mphantom, semantics > mfenced, semantics > menclose, semantics > msub, semantics > msup, semantics > msubsup, semantics > munder, semantics > mover, semantics > munderover, semantics > mmultiscripts, semantics > mtable, semantics > mstack, semantics > mlongdiv, semantics > maction { display: none; } /* However, we display all the annotations. */ annotation, annotation-xml { display: inline-block; } /* * Copyright (C) 2009 Apple Inc. All rights reserved. * Copyright (C) 2009 Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Chromium default media controls */ /* WARNING: This css file can only style <audio> and <video> elements */ audio:not([controls]) { display: none !important; } audio { width: 300px; height: 30px; } audio::-webkit-media-controls, video::-webkit-media-controls { width: inherit; height: inherit; position: relative; direction: ltr; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; } audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure { width: 100%; max-width: 800px; height: 30px; flex-shrink: 0; bottom: 0; text-indent: 0; padding: 0; box-sizing: border-box; } video::-webkit-media-controls-enclosure { padding: 0px 5px 5px 5px; height: 35px; flex-shrink: 0; } audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel { display: flex; flex-direction: row; align-items: center; /* We use flex-start here to ensure that the play button is visible even * if we are too small to show all controls. */ justify-content: flex-start; -webkit-user-select: none; position: relative; width: 100%; z-index: 0; overflow: hidden; text-align: right; bottom: auto; height: 30px; background-color: rgba(20, 20, 20, 0.8); border-radius: 5px; /* The duration is also specified in MediaControlElements.cpp and LayoutTests/media/media-controls.js */ transition: opacity 0.3s; } video:-webkit-full-page-media { margin: auto; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } audio:-webkit-full-page-media, video:-webkit-full-page-media { max-height: 100%; max-width: 100%; } audio:-webkit-full-page-media::-webkit-media-controls-panel, video:-webkit-full-page-media::-webkit-media-controls-panel { bottom: 0px; } audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button { -webkit-appearance: media-mute-button; display: flex; flex: none; border: none; box-sizing: border-box; width: 35px; height: 30px; line-height: 30px; margin: 0 6px 0 0; padding: 0; background-color: initial; color: inherit; } audio::-webkit-media-controls-overlay-enclosure { display: none; } video::-webkit-media-controls-overlay-enclosure { display: flex; position: relative; flex-direction: column; justify-content: flex-end; align-items: center; flex: 1 1; min-height: 0; width: 100%; text-indent: 0; box-sizing: border-box; overflow: hidden; } video::-webkit-media-controls-overlay-play-button { -webkit-appearance: media-overlay-play-button; display: flex; position: absolute; top: 50%; left: 50%; margin-left: -40px; margin-top: -40px; border: none; box-sizing: border-box; background-color: transparent; width: 80px; height: 80px; padding: 0; } video::-internal-media-controls-overlay-cast-button { -webkit-appearance: -internal-media-overlay-cast-off-button; display: flex; position: absolute; top: 5%; left: 5%; margin-left: 0px; margin-top: 0px; border: none; box-sizing: border-box; background-color: transparent; width: 30px; height: 30px; padding: 0; } audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button { -webkit-appearance: media-play-button; display: flex; flex: none; border: none; box-sizing: border-box; width: 30px; height: 30px; line-height: 30px; margin-left: 9px; margin-right: 9px; padding: 0; background-color: initial; color: inherit; } audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container { -webkit-appearance: media-controls-background; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; flex: 1 1; -webkit-user-select: none; height: 16px; min-width: 0; } audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display, audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display { -webkit-appearance: media-current-time-display; -webkit-user-select: none; flex: none; display: flex; border: none; cursor: default; height: 30px; margin: 0 9px 0 0; padding: 0; line-height: 30px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; font-style: normal; color: white; letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0; text-shadow: none; text-decoration: none; } audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { -webkit-appearance: media-slider; display: flex; flex: 1 1 auto; height: 8px; margin: 0 15px 0 0; padding: 0; background-color: transparent; min-width: 25px; border: initial; color: inherit; } audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider { -webkit-appearance: media-volume-slider; display: flex; /* The 1.9 value was empirically chosen to match old-flexbox behaviour * and be aesthetically pleasing. */ flex: 1 1.9 auto; height: 8px; max-width: 70px; margin: 0 15px 0 0; padding: 0; background-color: transparent; min-width: 15px; border: initial; color: inherit; } /* FIXME these shouldn't use special pseudoShadowIds, but nicer rules. https://code.google.com/p/chromium/issues/detail?id=112508 https://bugs.webkit.org/show_bug.cgi?id=62218 */ input[type="range" i]::-webkit-media-slider-container { display: flex; align-items: center; flex-direction: row; /* This property is updated by C++ code. */ box-sizing: border-box; height: 100%; width: 100%; border: 1px solid rgba(230, 230, 230, 0.35); border-radius: 4px; background-color: transparent; /* Background drawing is managed by C++ code to draw ranges. */ } /* The negative right margin causes the track to overflow its container. */ input[type="range" i]::-webkit-media-slider-container > div { margin-right: -14px; } input[type="range" i]::-webkit-media-slider-thumb { margin-left: -7px; margin-right: -7px; } audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button { -webkit-appearance: media-enter-fullscreen-button; display: flex; flex: none; border: none; box-sizing: border-box; width: 30px; height: 30px; line-height: 30px; margin-left: -5px; margin-right: 9px; padding: 0; background-color: initial; color: inherit; } audio::-internal-media-controls-cast-button, video::-internal-media-controls-cast-button { -webkit-appearance: -internal-media-cast-off-button; display: flex; flex: none; border: none; box-sizing: border-box; width: 30px; height: 30px; line-height: 30px; margin-left: -5px; margin-right: 9px; padding: 0; background-color: initial; color: inherit; } audio::-webkit-media-controls-toggle-closed-captions-button { display: none; } video::-webkit-media-controls-toggle-closed-captions-button { -webkit-appearance: media-toggle-closed-captions-button; display: flex; flex: none; border: none; box-sizing: border-box; width: 30px; height: 30px; line-height: 30px; margin-left: -5px; margin-right: 9px; padding: 0; background-color: initial; color: inherit; } audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-controls-fullscreen-volume-slider { display: none; } audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media-controls-fullscreen-volume-min-button { display: none; } audio::-webkit-media-controls-fullscreen-volume-max-button, video::-webkit-media-controls-fullscreen-volume-max-button { display: none; } video::-webkit-media-text-track-container { position: relative; width: inherit; height: inherit; overflow: hidden; font: 22px sans-serif; text-align: center; color: rgba(255, 255, 255, 1); letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0; text-decoration: none; pointer-events: none; -webkit-user-select: none; word-break: break-word; } video::cue { display: inline; background-color: rgba(0, 0, 0, 0.8); padding: 2px 2px; } video::-webkit-media-text-track-region { position: absolute; line-height: 5.33vh; writing-mode: horizontal-tb; background: rgba(0, 0, 0, 0.8); color: rgba(255, 255, 255, 1); word-wrap: break-word; overflow-wrap: break-word; overflow: hidden; } video::-webkit-media-text-track-region-container { position: relative; display: flex; flex-flow: column; flex-direction: column; } video::-webkit-media-text-track-region-container.scrolling { transition: top 433ms linear; } video::-webkit-media-text-track-display { position: absolute; overflow: hidden; white-space: pre-wrap; -webkit-box-sizing: border-box; flex: 0 0 auto; } video::cue(:future) { color: gray; } video::cue(b) { font-weight: bold; } video::cue(u) { text-decoration: underline; } video::cue(i) { font-style: italic; } /* * Copyright (C) 2009 Apple Inc. All rights reserved. * Copyright (C) 2015 Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Chromium default media controls */ /* WARNING: This css file can only style <audio> and <video> elements */ audio:not([controls]) { display: none !important; } audio { width: 300px; height: 48px; } audio::-webkit-media-controls, video::-webkit-media-controls { width: inherit; height: inherit; position: relative; direction: ltr; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; } audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure { width: 100%; height: 48px; flex-shrink: 0; bottom: 0; text-indent: 0; padding: 0; margin: 0; box-sizing: border-box; } audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel { display: flex; flex-direction: row; align-items: center; /* We use flex-start here to ensure that the play button is visible even * if we are too small to show all controls. */ justify-content: flex-start; -webkit-user-select: none; position: relative; width: 100%; z-index: 0; overflow: hidden; text-align: right; bottom: auto; height: 48px; min-width: 48px; background-color: #fafafa; /* The duration is also specified in MediaControlElements.cpp and LayoutTests/media/media-controls.js */ transition: opacity 0.3s; font-family: Segoe, "Helvetica Neue", Roboto, Arial, Helvetica, sans-serif ; font-size: 14px; font-weight: normal; /* Make sure that we don't inherit non-defaults. */ font-style: normal; } video:-webkit-full-page-media { margin: auto; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } audio:-webkit-full-page-media, video:-webkit-full-page-media { max-height: 100%; max-width: 100%; } audio:-webkit-full-page-media::-webkit-media-controls-panel, video:-webkit-full-page-media::-webkit-media-controls-panel { bottom: 0px; } audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button { -webkit-appearance: media-mute-button; display: flex; flex: none; border: none; width: 48px; height: 48px; line-height: 48px; padding: 12px; background-color: initial; color: inherit; } audio::-webkit-media-controls-overlay-enclosure { display: none; } video::-webkit-media-controls-overlay-enclosure { display: flex; position: relative; flex-direction: column; justify-content: flex-end; align-items: center; flex: 1 1; min-height: 0; width: 100%; /* prevent disambiguation zooms with the panel */ margin-bottom: 10px; text-indent: 0; box-sizing: border-box; overflow: hidden; } video::-webkit-media-controls-overlay-play-button { -webkit-appearance: media-overlay-play-button; display: flex; position: absolute; top: 0; left: 0; margin: 0; border: none; background-color: transparent; width: 100%; height: 100%; padding: 0; } video::-internal-media-controls-overlay-cast-button { -webkit-appearance: -internal-media-overlay-cast-off-button; display: flex; position: absolute; top: 8px; left: 8px; margin-left: 0px; margin-top: 0px; border: none; background-color: transparent; width: 48px; height: 48px; padding: 0; transition: opacity 0.3s; } audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button { -webkit-appearance: media-play-button; display: flex; flex: none; border-sizing: border-box; width: 48px; height: 48px; line-height: 48px; padding: 12px; background-color: initial; color: inherit; } audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container { -webkit-appearance: media-controls-background; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; flex: 1 1; -webkit-user-select: none; height: 48px; padding: 0; min-width: 0; } audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display { -webkit-appearance: media-current-time-display; -webkit-user-select: none; flex: none; display: flex; border: none; cursor: default; height: 48px; /* text runs right to the edge of the container */ padding: 0; line-height: 48px; color: #5a5a5a; letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0; text-shadow: none; text-decoration: none; } audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display { -webkit-appearance: media-current-time-display; -webkit-user-select: none; flex: none; display: flex; border: none; cursor: default; height: 48px; /* text runs right to the edge of the container, plus a little on * the left to pad the leading "/" */ padding: 0 0 0 4px; line-height: 48px; color: #5a5a5a; letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0; text-shadow: none; text-decoration: none; } audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { -webkit-appearance: media-slider; display: flex; flex: 1 1 auto; height: 2px; /* Leave 6px on either side for the thumb. Use margin so that * the slider doesn't extend into it. We also add 12px border. */ padding: 0; margin: 0 18px 0 18px; background-color: transparent; min-width: 25px; border: initial; color: inherit; } audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider { -webkit-appearance: media-volume-slider; display: flex; /* The 1.9 value was empirically chosen to match old-flexbox behaviour * and be aesthetically pleasing. */ flex: 1 1.9 auto; height: 2px; max-width: 70px; /* Leave room for the thumb, which has 6px radius. Use margin rather * than padding so that the slider doesn't extend into it. We also * leave an addition 12px margin. */ padding: 0; margin: 0 18px 0 18px; background-color: transparent; min-width: 25px; border: initial; color: inherit; } /* FIXME these shouldn't use special pseudoShadowIds, but nicer rules. https://code.google.com/p/chromium/issues/detail?id=112508 https://bugs.webkit.org/show_bug.cgi?id=62218 */ input[type="range" i]::-webkit-media-slider-container { display: flex; align-items: center; flex-direction: row; /* This property is updated by C++ code. */ box-sizing: border-box; /** this positions the slider thumb for both time and volume. */ height: 2px; width: 100%; background-color: transparent; /* Background drawing is managed by C++ code to draw ranges. */ } /* The negative right margin causes the track to overflow its container. */ input[type="range" i]::-webkit-media-slider-container > div { margin-right: -18px; /* box is 36px wide, get to the middle */ margin-left: -18px; } input[type="range" i]::-webkit-media-slider-thumb { box-sizing: border-box; width: 48px; height: 48px; padding: 0px; } audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button { -webkit-appearance: media-enter-fullscreen-button; display: flex; flex: none; overflow: hidden; border: none; width: 48px; height: 48px; line-height: 48px; background-color: initial; color: inherit; } audio::-internal-media-controls-cast-button, video::-internal-media-controls-cast-button { -webkit-appearance: -internal-media-cast-off-button; display: flex; flex: none; border: none; width: 48px; height: 48px; line-height: 48px; margin-left: 0px; margin-right: 0px; padding: 12px; background-color: initial; color: inherit; } audio::-webkit-media-controls-toggle-closed-captions-button { display: none; } video::-webkit-media-controls-toggle-closed-captions-button { -webkit-appearance: media-toggle-closed-captions-button; display: flex; flex: none; border: none; width: 48px; height: 48px; line-height: 48px; margin-left: 0px; margin-right: 0px; padding: 12px; background-color: initial; color: inherit; } audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-controls-fullscreen-volume-slider { display: none; } audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media-controls-fullscreen-volume-min-button { display: none; } audio::-webkit-media-controls-fullscreen-volume-max-button, video::-webkit-media-controls-fullscreen-volume-max-button { display: none; } video::-webkit-media-text-track-container { position: relative; width: inherit; height: inherit; overflow: hidden; font: 22px sans-serif; text-align: center; color: rgba(255, 255, 255, 1); letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0; text-decoration: none; pointer-events: none; -webkit-user-select: none; word-break: break-word; } video::cue { display: inline; background-color: rgba(0, 0, 0, 0.8); padding: 2px 2px; } video::-webkit-media-text-track-region { position: absolute; line-height: 5.33vh; writing-mode: horizontal-tb; background: rgba(0, 0, 0, 0.8); color: rgba(255, 255, 255, 1); word-wrap: break-word; overflow-wrap: break-word; overflow: hidden; } video::-webkit-media-text-track-region-container { position: relative; display: flex; flex-flow: column; flex-direction: column; } video::-webkit-media-text-track-region-container.scrolling { transition: top 433ms linear; } video::-webkit-media-text-track-display { position: absolute; overflow: hidden; white-space: pre-wrap; -webkit-box-sizing: border-box; flex: 0 0 auto; } video::cue(:future) { color: gray; } video::cue(b) { font-weight: bold; } video::cue(u) { text-decoration: underline; } video::cue(i) { font-style: italic; } :-webkit-full-screen { background-color: white; z-index: 2147483647 !important; } :root:-webkit-full-screen-ancestor { overflow: hidden !important; } :-webkit-full-screen-ancestor:not(iframe) { z-index: auto !important; position: static !important; opacity: 1 !important; transform: none !important; -webkit-mask: none !important; clip: none !important; -webkit-filter: none !important; transition: none !important; -webkit-box-reflect: none !important; -webkit-perspective: none !important; -webkit-transform-style: flat !important; } video:-webkit-full-screen, audio:-webkit-full-screen { background-color: transparent !important; position: relative !important; left: 0 !important; top: 0 ! important; margin: 0 !important; min-width: 0 !important; max-width: none !important; min-height: 0 !important; max-height: none !important; width: 100% !important; height: 100% !important; flex: 1 !important; display: block !important; transform: none !important; } img:-webkit-full-screen { width: auto; height: 100%; max-width: 100%; } iframe:-webkit-full-screen { margin: 0 !important; padding: 0 !important; border: 0 !important; position: fixed !important; min-width: 0 !important; max-width: none !important; min-height: 0 !important; max-height: none !important; width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; } /* * Copyright (c) 2013, Opera Software ASA. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Opera Software ASA nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Default styles for XHTML Mobile Profile documents where they differ from html.css */ @viewport { width: auto; /* Ideally these should be removed. Currently here to avoid test result regressions. */ min-zoom: 0.25; max-zoom: 5; } /* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* These styles override other user-agent styles for Chromium on Android. */ @viewport { min-width: 980px; } <!-- Copyright (C) 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <!DOCTYPE html> <html> <head> <style> body { margin: 0; padding: 0; } body.platform-mac { font-size: 11px; font-family: Menlo, Monaco; } body.platform-windows { font-size: 12px; font-family: Consolas, Lucida Console; } body.platform-linux { font-size: 11px; font-family: dejavu sans mono; } .fill { position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .dimmed { background-color: rgba(0, 0, 0, 0.31); } #canvas, #layout-editor-matched-nodes-canvas { pointer-events: none; } .controls-line { display: flex; justify-content: center; margin: 10px 0; } .message-box { padding: 2px 4px; display: flex; align-items: center; cursor: default; } .controls-line > * { background-color: rgb(255, 255, 194); border: 1px solid rgb(202, 202, 202); height: 22px; box-sizing: border-box; } .controls-line .button { width: 26px; margin-left: -1px; margin-right: 0; padding: 0; } .controls-line .button:hover { cursor: pointer; } .controls-line .button .glyph { width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.75); opacity: 0.8; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; position: relative; } .controls-line .button:active .glyph { top: 1px; left: 1px; } #resume-button .glyph { -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAKCAYAAABv7tTEAAAAAXNSR0IArs4c6QAAAFJJREFUKM+10bEJgGAMBeEPbR3BLRzEVdzEVRzELRzBVohVwEJ+iODBlQfhBeJhsmHU4C0KnFjQV6J0x1SNAhdWDJUoPTB3PvLLeaUhypM3n3sD/qc7lDrdpIEAAAAASUVORK5CYII=); -webkit-mask-size: 13px 10px; background-color: rgb(66, 129, 235); } #step-over-button .glyph { -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAKCAYAAAC5Sw6hAAAAAXNSR0IArs4c6QAAAOFJREFUKM+N0j8rhXEUB/DPcxW35CqhvIBrtqibkklhV8qkTHe4ZbdblcXgPVhuMdqUTUl5A2KRRCF5LGc4PT1P7qnfcr5/zu/8KdTHLFaxjHnc4RZXKI0QYxjgLQTVd42l/0wmg5iFX3iq5H6w22RS4DyRH7CB8cAXcBTGJT6xUmd0mEwuMdFQcA3fwXvGTAan8BrgPabTL9fRRyfx91PRMwyjGwcJ2EyCfsrfpPw2Pipz24NT/MZciiQYVshzOKnZ5Hturxt3k2MnCpS4SPkeHpPR8Sh3tYgttBoW9II2/AHiaEqvD2Fc0wAAAABJRU5ErkJggg==); -webkit-mask-size: 18px 10px; } .px { color: rgb(128, 128, 128); } #element-title { position: absolute; z-index: 10; } #tag-name { /* Keep this in sync with view-source.css (.html-tag) */ color: rgb(136, 18, 128); } #node-id { /* Keep this in sync with view-source.css (.html-attribute-value) */ color: rgb(26, 26, 166); } #class-name { /* Keep this in sync with view-source.css (.html-attribute-name) */ color: rgb(153, 69, 0); } .wall { position: absolute; z-index: -2; opacity: 0.2; pointer-events: none; } .wall.horizontal { width: 8px; height: 16px; } .wall.vertical { height: 8px; width: 16px; } .wall.padding { background: repeating-linear-gradient(45deg, #FFFFFF 2px, #FFFFFF 4px, rgba(147, 196, 125, 1) 2px, rgba(147, 196, 125, 1) 10px) } .wall.margin { background: repeating-linear-gradient(45deg, #FFFFFF 2px, #FFFFFF 4px, rgba(246, 178, 107, 1) 4px, rgba(246, 178, 107, 1) 10px) } .wall.highlighted { z-index: 1; opacity: 1; } .blur-rect { position: absolute; background-color: rgba(0, 0, 0, 0.1); } .control-lane { position: absolute; } .control-lane.padding { background-color: rgba(147, 196, 125, 0.1); } .control-lane.margin { background-color: rgba(246, 178, 107, 0.1); } .editor-anchor { position: absolute; -webkit-filter: drop-shadow(0px 1px 1px rgba(0, 0, 0, 0.34)); } .editor-anchor.vertical { height: 6px; width: 16px; } .editor-anchor.horizontal { width: 6px; height: 16px; } .editor-anchor.horizontal::before { content: ""; position: absolute; height: 8px; border-right: 2px dotted rgba(255, 255, 255, 0.4); top: 4px; left: 2px; } .editor-anchor.vertical::before { content: ""; position: absolute; width: 8px; border-bottom: 2px dotted rgba(255, 255, 255, 0.4); top: 2px; left: 4px; } .editor-anchor.vertical:hover { cursor: ns-resize; } .editor-anchor.horizontal:hover { cursor: ew-resize; } .editor-anchor.padding { background-color: rgb(107, 213, 0); } .editor-anchor.margin { background-color: rgb(246, 167, 35); } .editor-anchor:hover { z-index: 3; } .editor-anchor.padding.highlighted { background-color: rgba(147, 196, 125, 1); } .editor-anchor.margin.highlighted { background-color: rgba(246, 178, 107, 1); } .guide-line.horizontal { border-top: dashed 1px; } .guide-line.vertical { border-left: dashed 1px; } .guide-line.padding { border-color: rgba(147, 196, 125, 0.56); } .guide-line.margin { border-color: rgba(246, 178, 107, 0.56); } .guide-line.content { border-color: rgba(147, 147, 147, 0.56) } .guide-line { position: absolute; pointer-events: none; } .label { position: absolute; font-size: 10px; font-family: Arial, Roboto; color: white; line-height: 1em; padding: 2px 5px; -webkit-filter: drop-shadow(0px 1px 1px rgba(0, 0, 0, 0.34)); border-radius: 2px; min-width: 30px; z-index: 5; } .label.padding { background-color: rgb(91, 181, 0); } .label.margin { background-color: rgb(246, 167, 35); } .label.disabled { background-color: rgb(159, 188, 191); } .label .dimension { color: rgba(255, 255, 255, 0.7); } .label .name { color: rgba(255, 255, 255, 0.7); display: none; border-radius: 4px; } .label.full .name { display: inline; z-index: 5; } .label::before { content: ''; display: block; position: absolute; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; top: 1px; } .label.right-arrow::before { border-left-width: 6px; border-left-style: solid; border-right: none; left: auto; right: -6px; } .label.left-arrow::before { border-left: none; border-right-width: 6px; border-right-style: solid; left: -6px; right: auto; } .label.padding::before { border-left-color: rgb(91, 181, 0); border-right-color: rgb(91, 181, 0); } .label.margin::before { border-left-color: rgb(246, 167, 35); border-right-color: rgb(246, 167, 35); } /* Material */ .hidden { display: none !important; } .tooltip-content, .material-tooltip-arrow { position: absolute; z-index: 10; -webkit-user-select: none; } .tooltip-content { background-color: #333740; font-size: 11px; line-height: 14px; padding: 5px 8px; border-radius: 3px; color: white; box-sizing: border-box; max-width: calc(100% - 4px); border: 1px solid hsla(0, 0%, 100%, 0.3); z-index: 1; background-clip: padding-box; will-change: transform; text-rendering: optimizeLegibility; pointer-events: none; } .element-info { display: flex; align-content: stretch; } .material-tooltip-arrow { border: solid; border-color: #333740 transparent; border-width: 0 8px 8px 8px; z-index: 2; margin-top: 1px; } .material-tooltip-arrow.tooltip-arrow-top { border-width: 8px 8px 0 8px; margin-top: -1px; } .element-description { flex: 1 1; word-wrap: break-word; } .dimensions { border-left: 1px solid hsl(0, 0%, 50%); padding-left: 7px; margin-left: 7px; float: right; flex: 0 0 auto; white-space: nowrap; display: flex; align-items: center; color: hsl(0, 0%, 85%); } .material-node-width { margin-right: 2px; } .material-node-height { margin-left: 2px; } .material-tag-name { color: hsl(304, 77%, 70%); } .material-node-id { color: hsl(27, 100%, 70%); } .material-class-name { color: hsl(202,92%,77%); } .layout-editor-media-tooltip { color: hsl(0, 0%, 85%); } .layout-editor-selector-tooltip { color: hsl(202,92%,77%); } </style> <script> const lightGridColor = "rgba(0,0,0,0.2)"; const darkGridColor = "rgba(0,0,0,0.7)"; const transparentColor = "rgba(0, 0, 0, 0)"; const gridBackgroundColor = "rgba(255, 255, 255, 0.8)"; function drawPausedInDebuggerMessage(message) { window._controlsVisible = true; document.querySelector(".controls-line").style.visibility = "visible"; document.getElementById("paused-in-debugger").textContent = message; document.body.classList.add("dimmed"); } function _drawGrid(context, rulerAtRight, rulerAtBottom) { if (window._gridPainted) return; window._gridPainted = true; context.save(); var pageFactor = pageZoomFactor * pageScaleFactor; var scrollX = window.scrollX * pageScaleFactor; var scrollY = window.scrollY * pageScaleFactor; function zoom(x) { return Math.round(x * pageFactor); } function unzoom(x) { return Math.round(x / pageFactor); } var width = canvasWidth / pageFactor; var height = canvasHeight / pageFactor; const gridSubStep = 5; const gridStep = 50; { // Draw X grid background context.save(); context.fillStyle = gridBackgroundColor; if (rulerAtBottom) context.fillRect(0, zoom(height) - 15, zoom(width), zoom(height)); else context.fillRect(0, 0, zoom(width), 15); // Clip out backgrounds intersection context.globalCompositeOperation = "destination-out"; context.fillStyle = "red"; if (rulerAtRight) context.fillRect(zoom(width) - 15, 0, zoom(width), zoom(height)); else context.fillRect(0, 0, 15, zoom(height)); context.restore(); // Draw Y grid background context.fillStyle = gridBackgroundColor; if (rulerAtRight) context.fillRect(zoom(width) - 15, 0, zoom(width), zoom(height)); else context.fillRect(0, 0, 15, zoom(height)); } context.lineWidth = 1; context.strokeStyle = darkGridColor; context.fillStyle = darkGridColor; { // Draw labels. context.save(); context.translate(-scrollX, 0.5 - scrollY); var maxY = height + unzoom(scrollY); for (var y = 2 * gridStep; y < maxY; y += 2 * gridStep) { context.save(); context.translate(scrollX, zoom(y)); context.rotate(-Math.PI / 2); context.fillText(y, 2, rulerAtRight ? zoom(width) - 7 : 13); context.restore(); } context.translate(0.5, -0.5); var maxX = width + unzoom(scrollX); for (var x = 2 * gridStep; x < maxX; x += 2 * gridStep) { context.save(); context.fillText(x, zoom(x) + 2, rulerAtBottom ? scrollY + zoom(height) - 7 : scrollY + 13); context.restore(); } context.restore(); } { // Draw vertical grid context.save(); if (rulerAtRight) { context.translate(zoom(width), 0); context.scale(-1, 1); } context.translate(-scrollX, 0.5 - scrollY); var maxY = height + unzoom(scrollY); for (var y = gridStep; y < maxY; y += gridStep) { context.beginPath(); context.moveTo(scrollX, zoom(y)); var markLength = (y % (gridStep * 2)) ? 5 : 8; context.lineTo(scrollX + markLength, zoom(y)); context.stroke(); } context.strokeStyle = lightGridColor; for (var y = gridSubStep; y < maxY; y += gridSubStep) { if (!(y % gridStep)) continue; context.beginPath(); context.moveTo(scrollX, zoom(y)); context.lineTo(scrollX + gridSubStep, zoom(y)); context.stroke(); } context.restore(); } { // Draw horizontal grid context.save(); if (rulerAtBottom) { context.translate(0, zoom(height)); context.scale(1, -1); } context.translate(0.5 - scrollX, -scrollY); var maxX = width + unzoom(scrollX); for (var x = gridStep; x < maxX; x += gridStep) { context.beginPath(); context.moveTo(zoom(x), scrollY); var markLength = (x % (gridStep * 2)) ? 5 : 8; context.lineTo(zoom(x), scrollY + markLength); context.stroke(); } context.strokeStyle = lightGridColor; for (var x = gridSubStep; x < maxX; x += gridSubStep) { if (!(x % gridStep)) continue; context.beginPath(); context.moveTo(zoom(x), scrollY); context.lineTo(zoom(x), scrollY + gridSubStep); context.stroke(); } context.restore(); } context.restore(); } function resetCanvas(canvasElement) { canvasElement.width = deviceScaleFactor * viewportSize.width; canvasElement.height = deviceScaleFactor * viewportSize.height; canvasElement.style.width = viewportSize.width + "px"; canvasElement.style.height = viewportSize.height + "px"; var context = canvasElement.getContext("2d"); context.scale(deviceScaleFactor, deviceScaleFactor); } function reset(resetData) { window.viewportSize = resetData.viewportSize; window.deviceScaleFactor = resetData.deviceScaleFactor; window.pageScaleFactor = resetData.pageScaleFactor; window.pageZoomFactor = resetData.pageZoomFactor; window.scrollX = Math.round(resetData.scrollX); window.scrollY = Math.round(resetData.scrollY); window.canvas = document.getElementById("canvas"); window.context = canvas.getContext("2d"); resetCanvas(canvas); window.canvasWidth = viewportSize.width; window.canvasHeight = viewportSize.height; window._controlsVisible = false; document.querySelector(".controls-line").style.visibility = "hidden"; document.getElementById("element-title").style.visibility = "hidden"; document.getElementById("tooltip-container").removeChildren(); document.body.classList.remove("dimmed"); window._gridPainted = false; if (window.layoutEditor) window.layoutEditor.reset(); } function _drawElementTitle(context, elementInfo, bounds) { document.getElementById("tag-name").textContent = elementInfo.tagName; document.getElementById("node-id").textContent = elementInfo.idValue ? "#" + elementInfo.idValue : ""; document.getElementById("class-name").textContent = (elementInfo.className || "").trimEnd(50); document.getElementById("node-width").textContent = elementInfo.nodeWidth; document.getElementById("node-height").textContent = elementInfo.nodeHeight; var elementTitle = document.getElementById("element-title"); var titleWidth = elementTitle.offsetWidth + 6; var titleHeight = elementTitle.offsetHeight + 4; var anchorTop = bounds.minY; var anchorBottom = bounds.maxY; var anchorLeft = bounds.minX; const arrowHeight = 7; var renderArrowUp = false; var renderArrowDown = false; var boxX = Math.max(2, anchorLeft); if (boxX + titleWidth > canvasWidth) boxX = canvasWidth - titleWidth - 2; var boxY; if (anchorTop > canvasHeight) { boxY = canvasHeight - titleHeight - arrowHeight; renderArrowDown = true; } else if (anchorBottom < 0) { boxY = arrowHeight; renderArrowUp = true; } else if (anchorBottom + titleHeight + arrowHeight < canvasHeight) { boxY = anchorBottom + arrowHeight - 4; renderArrowUp = true; } else if (anchorTop - titleHeight - arrowHeight > 0) { boxY = anchorTop - titleHeight - arrowHeight + 3; renderArrowDown = true; } else boxY = arrowHeight; context.save(); context.translate(0.5, 0.5); context.beginPath(); context.moveTo(boxX, boxY); if (renderArrowUp) { context.lineTo(boxX + 2 * arrowHeight, boxY); context.lineTo(boxX + 3 * arrowHeight, boxY - arrowHeight); context.lineTo(boxX + 4 * arrowHeight, boxY); } context.lineTo(boxX + titleWidth, boxY); context.lineTo(boxX + titleWidth, boxY + titleHeight); if (renderArrowDown) { context.lineTo(boxX + 4 * arrowHeight, boxY + titleHeight); context.lineTo(boxX + 3 * arrowHeight, boxY + titleHeight + arrowHeight); context.lineTo(boxX + 2 * arrowHeight, boxY + titleHeight); } context.lineTo(boxX, boxY + titleHeight); context.closePath(); context.fillStyle = "rgb(255, 255, 194)"; context.fill(); context.strokeStyle = "rgb(128, 128, 128)"; context.stroke(); context.restore(); elementTitle.style.visibility = "visible"; elementTitle.style.top = (boxY + 3) + "px"; elementTitle.style.left = (boxX + 3) + "px"; } function _createElementDescription(elementInfo) { var elementInfoElement = createElement("div", "element-info"); var descriptionElement = elementInfoElement.createChild("div", "element-description monospace"); var tagNameElement = descriptionElement.createChild("b").createChild("span", "material-tag-name"); tagNameElement.textContent = elementInfo.tagName; var nodeIdElement = descriptionElement.createChild("span", "material-node-id"); nodeIdElement.textContent = elementInfo.idValue ? "#" + elementInfo.idValue : ""; nodeIdElement.classList.toggle("hidden", !elementInfo.idValue); var classNameElement = descriptionElement.createChild("span", "material-class-name"); classNameElement.textContent = (elementInfo.className || "").trim(50); classNameElement.classList.toggle("hidden", !elementInfo.className); var dimensionsElement = elementInfoElement.createChild("div", "dimensions"); dimensionsElement.createChild("span", "material-node-width").textContent = Math.round(elementInfo.nodeWidth * 100) / 100; dimensionsElement.createTextChild("\u00d7"); dimensionsElement.createChild("span", "material-node-height").textContent = Math.round(elementInfo.nodeHeight * 100) / 100; return elementInfoElement; } function _drawMaterialElementTitle(elementInfo, bounds) { var tooltipContainer = document.getElementById("tooltip-container"); tooltipContainer.removeChildren(); _createMaterialTooltip(tooltipContainer, bounds, _createElementDescription(elementInfo), true); } function _createMaterialTooltip(parentElement, bounds, contentElement, withArrow) { var tooltipContainer = parentElement.createChild("div"); var tooltipContent = tooltipContainer.createChild("div", "tooltip-content"); tooltipContent.appendChild(contentElement); var titleWidth = tooltipContent.offsetWidth; var titleHeight = tooltipContent.offsetHeight; var arrowRadius = 8; var pageMargin = 2; var boxX = Math.max(pageMargin, bounds.minX + (bounds.maxX - bounds.minX) / 2 - titleWidth / 2); boxX = Math.min(boxX, canvasWidth - titleWidth - pageMargin); var boxY = bounds.minY - arrowRadius - titleHeight; var onTop = true; if (boxY < 0) { boxY = bounds.maxY + arrowRadius; onTop = false; } else if (bounds.minY > canvasHeight) { boxY = canvasHeight - arrowRadius - titleHeight; } tooltipContent.style.top = boxY + "px"; tooltipContent.style.left = boxX + "px"; if (!withArrow) return; var tooltipArrow = tooltipContainer.createChild("div", "material-tooltip-arrow"); // Center arrow if possible. Otherwise, try the bounds of the element. var arrowX = bounds.minX + (bounds.maxX - bounds.minX) / 2 - arrowRadius; var tooltipBorderRadius = 2; if (arrowX < pageMargin + tooltipBorderRadius) arrowX = bounds.maxX - arrowRadius * 2; else if (arrowX + arrowRadius * 2 > canvasWidth - pageMargin - tooltipBorderRadius) arrowX = bounds.minX; // Hide arrow if element is completely off the sides of the page. var arrowHidden = arrowX < pageMargin + tooltipBorderRadius || arrowX + arrowRadius * 2 > canvasWidth - pageMargin - tooltipBorderRadius; tooltipArrow.classList.toggle("hidden", arrowHidden); if (!arrowHidden) { tooltipArrow.classList.toggle("tooltip-arrow-top", onTop); tooltipArrow.style.top = (onTop ? boxY + titleHeight : boxY - arrowRadius) + "px"; tooltipArrow.style.left = arrowX + "px"; } } function _drawRulers(context, bounds, rulerAtRight, rulerAtBottom) { context.save(); var width = canvasWidth; var height = canvasHeight; context.strokeStyle = "rgba(128, 128, 128, 0.3)"; context.lineWidth = 1; context.translate(0.5, 0.5); if (rulerAtRight) { for (var y in bounds.rightmostXForY) { context.beginPath(); context.moveTo(width, y); context.lineTo(bounds.rightmostXForY[y], y); context.stroke(); } } else { for (var y in bounds.leftmostXForY) { context.beginPath(); context.moveTo(0, y); context.lineTo(bounds.leftmostXForY[y], y); context.stroke(); } } if (rulerAtBottom) { for (var x in bounds.bottommostYForX) { context.beginPath(); context.moveTo(x, height); context.lineTo(x, bounds.topmostYForX[x]); context.stroke(); } } else { for (var x in bounds.topmostYForX) { context.beginPath(); context.moveTo(x, 0); context.lineTo(x, bounds.topmostYForX[x]); context.stroke(); } } context.restore(); } function drawPath(context, commands, fillColor, outlineColor, bounds) { var commandsIndex = 0; function extractPoints(count) { var points = []; for (var i = 0; i < count; ++i) { var x = Math.round(commands[commandsIndex++]); bounds.maxX = Math.max(bounds.maxX, x); bounds.minX = Math.min(bounds.minX, x); var y = Math.round(commands[commandsIndex++]); bounds.maxY = Math.max(bounds.maxY, y); bounds.minY = Math.min(bounds.minY, y); bounds.leftmostXForY[y] = Math.min(bounds.leftmostXForY[y] || Number.MAX_VALUE, x); bounds.rightmostXForY[y] = Math.max(bounds.rightmostXForY[y] || Number.MIN_VALUE, x); bounds.topmostYForX[x] = Math.min(bounds.topmostYForX[x] || Number.MAX_VALUE, y); bounds.bottommostYForX[x] = Math.max(bounds.bottommostYForX[x] || Number.MIN_VALUE, y); points.push(x, y); } return points; } context.save(); var commandsLength = commands.length; var path = new Path2D(); while (commandsIndex < commandsLength) { switch (commands[commandsIndex++]) { case "M": path.moveTo.apply(path, extractPoints(1)); break; case "L": path.lineTo.apply(path, extractPoints(1)); break; case "C": path.bezierCurveTo.apply(path, extractPoints(3)); break; case "Q": path.quadraticCurveTo.apply(path, extractPoints(2)); break; case "Z": path.closePath(); break; } } path.closePath(); context.lineWidth = 0; context.fillStyle = fillColor; context.fill(path); if (outlineColor) { context.lineWidth = 2; context.strokeStyle = outlineColor; context.stroke(path); } context.restore(); return path; } function emptyBounds() { var bounds = { minX: Number.MAX_VALUE, minY: Number.MAX_VALUE, maxX: Number.MIN_VALUE, maxY: Number.MIN_VALUE, leftmostXForY: {}, rightmostXForY: {}, topmostYForX: {}, bottommostYForX: {} }; return bounds; } function drawHighlight(highlight, context) { context = context || window.context; context.save(); var bounds = emptyBounds(); for (var paths = highlight.paths.slice(); paths.length;) { var path = paths.pop(); drawPath(context, path.path, path.fillColor, path.outlineColor, bounds); if (paths.length) { context.save(); context.globalCompositeOperation = "destination-out"; drawPath(context, paths[paths.length - 1].path, "red", null, bounds); context.restore(); } } var rulerAtRight = highlight.paths.length && highlight.showRulers && bounds.minX < 20 && bounds.maxX + 20 < canvasWidth; var rulerAtBottom = highlight.paths.length && highlight.showRulers && bounds.minY < 20 && bounds.maxY + 20 < canvasHeight; if (highlight.showRulers) _drawGrid(context, rulerAtRight, rulerAtBottom); if (highlight.paths.length) { if (highlight.showExtensionLines) _drawRulers(context, bounds, rulerAtRight, rulerAtBottom); if (highlight.elementInfo && highlight.displayAsMaterial) _drawMaterialElementTitle(highlight.elementInfo, bounds); else if (highlight.elementInfo) _drawElementTitle(context, highlight.elementInfo, bounds); } context.restore(); return { bounds: bounds }; } function setPlatform(platform) { window.platform = platform; document.body.classList.add("platform-" + platform); } function dispatch(message) { var functionName = message.shift(); window[functionName].apply(null, message); } function log(text) { document.getElementById("log").createChild("div").textContent = text; } function onResumeClick() { InspectorOverlayHost.resume(); } function onStepOverClick() { InspectorOverlayHost.stepOver(); } function onLoaded() { document.getElementById("resume-button").addEventListener("click", onResumeClick); document.getElementById("step-over-button").addEventListener("click", onStepOverClick); } function eventHasCtrlOrMeta(event) { return window.platform == "mac" ? (event.metaKey && !event.ctrlKey) : (event.ctrlKey && !event.metaKey); } function onDocumentKeyDown(event) { if (!window._controlsVisible) return; if (event.keyIdentifier == "F8" || eventHasCtrlOrMeta(event) && event.keyCode == 220 /* backslash */) InspectorOverlayHost.resume(); else if (event.keyIdentifier == "F10" || eventHasCtrlOrMeta(event) && event.keyCode == 222 /* single quote */) InspectorOverlayHost.stepOver(); } function showLayoutEditor(info) { if (!window.layoutEditor) window.layoutEditor = new LayoutEditor(); window.layoutEditor.setState(info); } function setSelectorInLayoutEditor(selectorInfo) { if (!window.layoutEditor) return; window.layoutEditor.setSelector(selectorInfo); } /** * @constructor */ function LayoutEditor() { this._boundConsumeEvent = this._consumeEvent.bind(this); this._boundStrayClick = this._onStrayClick.bind(this); this._boundKeyDown = this._onKeyDown.bind(this); this._boundMouseWheel = this._onMouseWheel.bind(this); this._paddingBounds = this._defaultBounds(); this._contentBounds = this._defaultBounds(); this._marginBounds = this._defaultBounds(); this._element = document.getElementById("editor"); this._editorElement = this._element.createChild("div"); this._selectorTooltipElement = this._element.createChild("div", "selector-tooltip-element"); this._matchedNodesCanvas = createCanvas("layout-editor-matched-nodes-canvas"); this._editorElement.parentElement.insertBefore(this._matchedNodesCanvas, this._editorElement); this._wallsElements = new Map(); this._labelsElements = new Map(); this._anchorsElements = new Map(); this._anchorsInfo = new Map(); } /** * @typedef {{ * type: string, * propertyName: number, * propertyValue: {value: number, unit: string, growInside: boolean, mutable: boolean} * }} */ LayoutEditor.AnchorInfo; /** * @typedef {{ * left: number, * top: number, * right: number, * bottom: number * }} */ LayoutEditor.Bounds; /** * @typedef {{ * orientation: string, * border1: string, * border2: string, * dimension1: string, * dimension2: string * }} */ LayoutEditor.Bounds; /** * @typedef {{ * p1: !Point, * p2: !Point, * p3: !Point, * p4: !Point * }} */ LayoutEditor.Quad; /** * @typedef {{ * contentQuad: !LayoutEditor.Quad, * marginQuad: !LayoutEditor.Quad, * paddingQuad: !LayoutEditor.Quad, * anchors: !Array.<!LayoutEditor.AnchorInfo> * }} */ LayoutEditor.Info; LayoutEditor._controlLaneWidth = 16; LayoutEditor._wallWidth = 8; LayoutEditor._handleWidth = 8; LayoutEditor._labelOffset = 12; LayoutEditor.prototype = { /** * @return {!LayoutEditor.Bounds} */ _defaultBounds: function () { var bounds = { left: Number.MAX_VALUE, top: Number.MAX_VALUE, right: Number.MIN_VALUE, bottom: Number.MIN_VALUE, }; return bounds; }, reset: function() { this._anchorsInfo.clear(); this._anchorsElements.clear(); this._wallsElements.clear(); this._labelsElements.clear(); this._paddingBounds = this._defaultBounds(); this._contentBounds = this._defaultBounds(); this._marginBounds = this._defaultBounds(); resetCanvas(this._matchedNodesCanvas); document.body.style.cursor = ""; this._editorElement.removeChildren(); this._selectorTooltipElement.removeChildren(); document.removeEventListener("mousedown", this._boundConsumeEvent); document.removeEventListener("mouseup", this._boundConsumeEvent); document.removeEventListener("click", this._boundStrayClick); document.removeEventListener("keydown", this._boundKeyDown); document.removeEventListener("mousewheel", this._boundMouseWheel); document.removeEventListener("mousemove", this._boundConsumeEvent); }, /** * @param {!LayoutEditor.Info} info */ setState: function(info) { this._editorElement.style.visibility = "visible"; function buildBounds(quad) { var bounds = this._defaultBounds(); for (var i = 1; i <= 4; ++i) { var point = quad["p" + i]; bounds.left = Math.min(bounds.left, point.x); bounds.right = Math.max(bounds.right, point.x); bounds.top = Math.min(bounds.top, point.y); bounds.bottom = Math.max(bounds.bottom, point.y); } return bounds; } this._contentBounds = buildBounds.call(this, info.contentQuad); this._paddingBounds = buildBounds.call(this, info.paddingQuad); this._marginBounds = buildBounds.call(this, info.marginQuad); this._anchorsInfo = new Map(); for (var i = 0; i < info.anchors.length; ++i) this._anchorsInfo.set(info.anchors[i].propertyName, info.anchors[i]) document.addEventListener("mousedown", this._boundConsumeEvent); document.addEventListener("mouseup", this._boundConsumeEvent); document.addEventListener("click", this._boundStrayClick); document.addEventListener("keydown", this._boundKeyDown); document.addEventListener("mousewheel", this._boundMouseWheel); this._createBlurWindow(); this._createGuideLines(); this._createControlLanes(info.anchors); document.addEventListener("mousemove", this._boundConsumeEvent); if (this._draggedPropertyName) { document.body.style.cursor = (this._draggedPropertyName.endsWith("left") || this._draggedPropertyName.endsWith("right")) ? "ew-resize" : "ns-resize"; this._toggleHighlightedState(this._draggedPropertyName, true); } }, _createBlurWindow: function() { var left = this._editorElement.createChild("div", "blur-rect"); left.style.height = canvasHeight + "px"; left.style.width = this._marginBounds.left + "px"; var top = this._editorElement.createChild("div", "blur-rect"); top.style.left = this._marginBounds.left + "px"; top.style.width = canvasWidth - this._marginBounds.left + "px"; top.style.height = this._marginBounds.top + "px"; var right = this._editorElement.createChild("div", "blur-rect"); right.style.left = this._marginBounds.right + "px"; right.style.top = this._marginBounds.top + "px"; right.style.width = (canvasWidth - this._marginBounds.right) + "px"; right.style.height = (canvasHeight - this._marginBounds.top) + "px"; var bottom = this._editorElement.createChild("div", "blur-rect"); bottom.style.left = this._marginBounds.left + "px"; bottom.style.top = this._marginBounds.bottom + "px"; bottom.style.width = this._marginBounds.right - this._marginBounds.left + "px"; bottom.style.height = canvasHeight - this._marginBounds.bottom + "px"; top.addEventListener("click", this._boundStrayClick); bottom.addEventListener("click", this._boundStrayClick); left.addEventListener("click", this._boundStrayClick); right.addEventListener("click", this._boundStrayClick); }, _createGuideLines: function() { /** * @param {number} x * @param {string} type * @this {LayoutEditor} */ function verticalLine(x, type) { var verticalElement = this._editorElement.createChild("div", "guide-line vertical"); verticalElement.classList.add(type); verticalElement.style.height = canvasHeight + "px"; verticalElement.style.top = "0px"; verticalElement.style.left = x + "px"; } /** * @param {number} y * @param {string} type * @this {LayoutEditor} */ function horizontalLine(y, type) { var horizontalElement = this._editorElement.createChild("div", "guide-line horizontal"); horizontalElement.classList.add(type); horizontalElement.style.width = canvasWidth + "px"; horizontalElement.style.left = "0px"; horizontalElement.style.top = y + "px"; } /** * @param {!LayoutEditor.Bounds} bounds * @param {string} type * @this {LayoutEditor} */ function guideLines(bounds, type) { verticalLine.call(this, bounds.left, type); verticalLine.call(this, bounds.right, type); horizontalLine.call(this, bounds.top, type); horizontalLine.call(this, bounds.bottom, type); } guideLines.call(this, this._contentBounds, "content"); guideLines.call(this, this._paddingBounds, "padding"); guideLines.call(this, this._marginBounds, "margin"); }, /** * @param {!Element} parent * @param {!Element} anchorElement * @param {!LayoutEditor.AnchorInfo} anchorInfo */ _createLabel: function(parent, anchorElement, anchorInfo) { var label = parent.createChild("div", "label " + anchorInfo.type); var nameElement = label.createChild("span", "name"); var anchorName = anchorInfo.propertyName; nameElement.textContent = anchorName + ": "; var valueElement = label.createChild("span", "value"); valueElement.textContent = String(parseFloat(anchorInfo.propertyValue.value.toFixed(2))); var dimensionElement = label.createChild("span", "dimension"); dimensionElement.textContent = "\u2009" + anchorInfo.propertyValue.unit; var leftX = anchorElement.offsetLeft - LayoutEditor._labelOffset - label.offsetWidth; var fitLeft = leftX > 0; var rightX = anchorElement.offsetLeft + anchorElement.offsetWidth + LayoutEditor._labelOffset; var fitRight = rightX + label.offsetWidth < canvasWidth; var growsInside = anchorInfo.propertyValue.growInside; var toLeft = anchorName.endsWith("right") && growsInside || anchorName.endsWith("left") && !growsInside; var startPosition; if (!fitLeft || (!toLeft && fitRight)) { startPosition = rightX; label.classList.add("left-arrow"); } else { startPosition = leftX; label.classList.add("right-arrow"); } var y = anchorElement.offsetTop + anchorElement.offsetHeight / 2; label.style.left = (startPosition | 0) + "px"; label.style.top = ((y - label.offsetHeight / 2) | 0) + "px"; label.classList.add("hidden"); return label; }, /** * @param {string} anchorName * @param {boolean} highlighted */ _toggleHighlightedState: function(anchorName, highlighted) { this._anchorsElements.get(anchorName).classList.toggle("highlighted", highlighted); this._wallsElements.get(anchorName).classList.toggle("highlighted", highlighted); this._labelsElements.get(anchorName).classList.toggle("hidden", !highlighted); }, _createControlLanes: function() { var descriptionH = {orientation: "horizontal", border1: "left", border2: "top", dimension1: "width", dimension2: "height"}; var descriptionV = {orientation: "vertical", border1: "top", border2: "left", dimension1: "height", dimension2: "width"}; var sidesByOrientation = {horizontal : ["left", "right"], vertical : ["top", "bottom"]}; /** * @param {!Element} parent * @param {!LayoutEditor.Bounds} innerBox * @param {!LayoutEditor.Bounds} outerBox * @param {string} type * @param {string} side * @param {!LayoutEditor.Description} description * @param {number} border2Position * @this {LayoutEditor} */ function createAnchorWithWall(parent, innerBox, outerBox, type, side, description, border2Position) { var anchorName = type + "-" + side; var anchorInfo = this._anchorsInfo.get(anchorName); var growsInside = anchorInfo.propertyValue.growInside; var anchorPosition = (growsInside ? innerBox[side] : outerBox[side]); var anchorElement = parent.createChild("div", "editor-anchor " + description.orientation + " " + type); var handleHalf = LayoutEditor._handleWidth / 2; anchorElement.style[description.border1] = (anchorPosition - handleHalf) + "px"; anchorElement.style[description.border2] = border2Position + "px"; this._anchorsElements.set(anchorName, anchorElement); if (anchorInfo.propertyValue.mutable) anchorElement.addEventListener("mousedown", this._onAnchorMouseDown.bind(this, anchorName)); anchorElement.addEventListener("mouseenter", this._toggleHighlightedState.bind(this, anchorName, true)); anchorElement.addEventListener("mouseleave", this._toggleHighlightedState.bind(this, anchorName, false)); var wallElement = parent.createChild("div", "wall " + description.orientation + " " + type); var wallPosition = (growsInside ? outerBox[side] : innerBox[side]); var minSide = (side === "left" || side === "top"); wallPosition += (minSide === growsInside) ? - handleHalf - LayoutEditor._wallWidth : handleHalf; wallElement.style[description.border1] = wallPosition + "px"; wallElement.style[description.border2] = border2Position + "px"; this._wallsElements.set(anchorName, wallElement); var labelElement = this._createLabel(parent, anchorElement, anchorInfo); this._labelsElements.set(anchorName, labelElement); } /** * @param {!Element} parent * @param {!LayoutEditor.Bounds} innerBox * @param {!LayoutEditor.Bounds} outerBox * @param {string} type * @param {!LayoutEditor.Description} description * @param {number} border2Position * @this {LayoutEditor} */ function createLane(parent, innerBox, outerBox, type, description, border2Position) { var verticalElement = parent.createChild("div", "control-lane " + type); var sides = sidesByOrientation[description.orientation]; verticalElement.style[description.border1] = outerBox[sides[0]] + "px"; verticalElement.style[description.border2] = border2Position + "px"; verticalElement.style[description.dimension1] = (outerBox[sides[1]] - outerBox[sides[0]]) + "px"; verticalElement.style[description.dimension2] = LayoutEditor._controlLaneWidth + "px"; createAnchorWithWall.call(this, parent, innerBox, outerBox, type, sides[0], description, border2Position); createAnchorWithWall.call(this, parent, innerBox, outerBox, type, sides[1], description, border2Position); } var yPosition = 0; var xPosition = 0; if (this._marginBounds.bottom + 2 * LayoutEditor._controlLaneWidth <= canvasHeight) yPosition = this._marginBounds.bottom; else if (this._marginBounds.top - 2 * LayoutEditor._controlLaneWidth >= 0) yPosition = this._marginBounds.top - 2 * LayoutEditor._controlLaneWidth; else yPosition = (this._contentBounds.top + this._contentBounds.bottom) / 2; if (this._marginBounds.left - 2 * LayoutEditor._controlLaneWidth >= 0) xPosition = this._marginBounds.left - 2 * LayoutEditor._controlLaneWidth; else if (this._marginBounds.right + 2 * LayoutEditor._controlLaneWidth <= canvasWidth) xPosition = this._marginBounds.right; else xPosition = (this._contentBounds.right + this._contentBounds.left) / 2; createLane.call(this, this._editorElement, this._contentBounds, this._paddingBounds, "padding", descriptionH, yPosition); createLane.call(this, this._editorElement, this._paddingBounds, this._marginBounds, "margin", descriptionH, yPosition + LayoutEditor._controlLaneWidth); createLane.call(this, this._editorElement, this._contentBounds, this._paddingBounds, "padding", descriptionV, xPosition); createLane.call(this, this._editorElement, this._paddingBounds, this._marginBounds, "margin", descriptionV, xPosition + LayoutEditor._controlLaneWidth); }, setSelector: function(selectorInfo) { this._selectorTooltipElement.removeChildren(); var containerElement = createElement("div"); for (var i = (selectorInfo.medias || []).length - 1; i >= 0; --i) containerElement.createChild("div", "layout-editor-media-tooltip").textContent = ("@media " + selectorInfo.medias[i]).trim(50); var selectorElement = containerElement.createChild("div", "layout-editor-selector-tooltip"); selectorElement.textContent = selectorInfo.selector.trimEnd(50); var margin = 40; var bounds = {minX: this._marginBounds.left, maxX: this._marginBounds.right, minY: this._marginBounds.top - margin, maxY: this._marginBounds.bottom + margin}; _createMaterialTooltip(this._selectorTooltipElement, bounds, containerElement); resetCanvas(this._matchedNodesCanvas); if (!selectorInfo.nodes) return; for (var nodeHighlight of selectorInfo.nodes) drawHighlight(nodeHighlight, this._matchedNodesCanvas.getContext("2d")); }, _calculateDelta: function(deltaVector, moveDelta) { return scalarProduct(deltaVector, moveDelta) / Math.sqrt(scalarProduct(deltaVector, deltaVector)); }, /** * @param {string} anchorName * @return {!Point} */ _defaultDeltaVector: function(anchorName) { if (anchorName.endsWith("right")) return new Point(1, 0); if (anchorName.endsWith("left")) return new Point(-1, 0); if (anchorName.endsWith("top")) return new Point(0, -1); if (anchorName.endsWith("bottom")) return new Point(0, 1); }, /** * @param {string} anchorName * @param {!Event} event */ _onAnchorMouseDown: function(anchorName, event) { // Only drag upon left button. Right will likely cause a context menu. So will ctrl-click on mac. if (event.button || (window.platform == "mac" && event.ctrlKey)) return; event.preventDefault(); var deltaVector = this._defaultDeltaVector(anchorName); var anchorInfo = this._anchorsInfo.get(anchorName); if (anchorInfo.propertyValue.growInside) deltaVector = new Point(-deltaVector.x, -deltaVector.y); this._boundDragMove = this._onDragMove.bind(this, new Point(event.screenX, event.screenY), deltaVector); this._boundDragEnd = this._onDragEnd.bind(this); document.addEventListener("mousemove", this._boundDragMove); document.addEventListener("mouseup", this._boundDragEnd); InspectorOverlayHost.startPropertyChange(anchorName); this._preciseDrag = !!event.shiftKey; this._draggedPropertyName = anchorName; this._toggleHighlightedState(anchorName, true); }, /** * @param {!Point} mouseDownPoint * @param {!Point} deltaVector * @param {!Event} event */ _onDragMove: function(mouseDownPoint, deltaVector, event) { if (event.buttons !== 1) { this._onDragEnd(event); return; } event.preventDefault(); if (this._preciseDrag !== event.shiftKey) { InspectorOverlayHost.endPropertyChange(); document.removeEventListener("mousemove", this._boundDragMove); mouseDownPoint = new Point(event.screenX, event.screenY); this._boundDragMove = this._onDragMove.bind(this, mouseDownPoint, deltaVector); document.addEventListener("mousemove", this._boundDragMove); this._preciseDrag = event.shiftKey; InspectorOverlayHost.startPropertyChange(this._draggedPropertyName); } var preciseFactor = this._preciseDrag ? 5 : 1; InspectorOverlayHost.changeProperty(this._calculateDelta(deltaVector, new Point(event.screenX - mouseDownPoint.x, event.screenY - mouseDownPoint.y)) / preciseFactor); }, /** * @param {!Event} event */ _onDragEnd: function(event) { document.removeEventListener("mousemove", this._boundDragMove); document.removeEventListener("mouseup", this._boundDragEnd); delete this._boundDragMove; delete this._boundDragEnd; this._toggleHighlightedState(this._draggedPropertyName, false); document.body.style.cursor = ""; delete this._draggedPropertyName; delete this._preciseDrag; event.preventDefault(); InspectorOverlayHost.endPropertyChange(); }, /** * @param {!Event} event */ _onStrayClick: function(event) { event.preventDefault(); InspectorOverlayHost.clearSelection(true); }, /** * @param {!Event} event */ _onKeyDown: function(event) { if (this._draggedPropertyName) return; // Clear selection on Esc. if (event.keyIdentifier === "U+001B") { event.preventDefault(); InspectorOverlayHost.clearSelection(false); } }, /** * @param {!Event} event */ _onMouseWheel: function(event) { event.preventDefault(); this._mouseWheelDelta = (this._mouseWheelDelta || 0) + event.wheelDelta; if (this._mouseWheelDelta >= 120) { InspectorOverlayHost.nextSelector(); this._mouseWheelDelta = 0; } else if (this._mouseWheelDelta <= -120) { InspectorOverlayHost.previousSelector(); this._mouseWheelDelta = 0; } }, /** * @param {!Event} event */ _consumeEvent: function(event) { event.preventDefault(); } } /** * @constructor * @param {number} x * @param {number} y */ function Point(x, y) { this.x = x; this.y = y; } function createCanvas(id) { var canvas = createElement("canvas", "fill"); canvas.id = id; resetCanvas(canvas); return canvas; } function scalarProduct(v1, v2) { return v1.x * v2.x + v1.y * v2.y; } Element.prototype.createChild = function(tagName, className) { var element = createElement(tagName, className); element.addEventListener("click", function(e) { e.stopPropagation(); }, false); this.appendChild(element); return element; } Element.prototype.createTextChild = function(text) { var element = document.createTextNode(text); this.appendChild(element); return element; } Element.prototype.removeChildren = function() { if (this.firstChild) this.textContent = ""; } function createElement(tagName, className) { var element = document.createElement(tagName); if (className) element.className = className; return element; } String.prototype.trimEnd = function(maxLength) { if (this.length <= maxLength) return String(this); return this.substr(0, maxLength - 1) + "\u2026"; } window.addEventListener("DOMContentLoaded", onLoaded); document.addEventListener("keydown", onDocumentKeyDown); </script> </head> <body class="fill"> </body> <canvas id="canvas" class="fill"></canvas> <div id="element-title"> <span id="tag-name"></span><span id="node-id"></span><span id="class-name"></span> <span id="node-width"></span><span class="px">px</span><span class="px"> × </span><span id="node-height"></span><span class="px">px</span> </div> <div id="tooltip-container"></div> <div id="editor" class="fill"></div> <div class="controls-line"> <div class="message-box"><div id="paused-in-debugger"></div></div> <div class="button" id="resume-button" title="Resume script execution (F8)."><div class="glyph"></div></div> <div class="button" id="step-over-button" title="Step over next function call (F10)."><div class="glyph"></div></div> </div> <div id="log"></div> </html> /* * Copyright (C) 2007 Apple Inc. All rights reserved. * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ "use strict"; /** * @param {!InjectedScriptHostClass} InjectedScriptHost * @param {!Window|!WorkerGlobalScope} inspectedGlobalObject * @param {number} injectedScriptId */ (function (InjectedScriptHost, inspectedGlobalObject, injectedScriptId) { /** * Protect against Object overwritten by the user code. * @suppress {duplicate} */ var Object = /** @type {function(new:Object, *=)} */ ({}.constructor); /** * @param {!Array.<T>} array * @param {...} var_args * @template T */ function push(array, var_args) { for (var i = 1; i < arguments.length; ++i) array[array.length] = arguments[i]; } /** * @param {(!Arguments.<T>|!NodeList)} array * @param {number=} index * @return {!Array.<T>} * @template T */ function slice(array, index) { var result = []; for (var i = index || 0, j = 0; i < array.length; ++i, ++j) result[j] = array[i]; return result; } /** * @param {!Array.<T>} array1 * @param {!Array.<T>} array2 * @return {!Array.<T>} * @template T */ function concat(array1, array2) { var result = []; for (var i = 0; i < array1.length; ++i) push(result, array1[i]); for (var i = 0; i < array2.length; ++i) push(result, array2[i]); return result; } /** * @param {*} obj * @return {string} * @suppress {uselessCode} */ function toString(obj) { // We don't use String(obj) because String could be overridden. // Also the ("" + obj) expression may throw. try { return "" + obj; } catch (e) { var name = InjectedScriptHost.internalConstructorName(obj) || InjectedScriptHost.subtype(obj) || (typeof obj); return "#<" + name + ">"; } } /** * @param {*} obj * @return {string} */ function toStringDescription(obj) { if (typeof obj === "number" && obj === 0 && 1 / obj < 0) return "-0"; // Negative zero. return toString(obj); } /** * Please use this bind, not the one from Function.prototype * @param {function(...)} func * @param {?Object} thisObject * @param {...} var_args * @return {function(...)} */ function bind(func, thisObject, var_args) { var args = slice(arguments, 2); /** * @param {...} var_args */ function bound(var_args) { return InjectedScriptHost.callFunction(func, thisObject, concat(args, slice(arguments))); } bound.toString = function() { return "bound: " + toString(func); }; return bound; } /** * @param {T} obj * @return {T} * @template T */ function nullifyObjectProto(obj) { if (obj && typeof obj === "object") obj.__proto__ = null; return obj; } /** * @param {number|string} obj * @return {boolean} */ function isUInt32(obj) { if (typeof obj === "number") return obj >>> 0 === obj && (obj > 0 || 1 / obj > 0); return "" + (obj >>> 0) === obj; } /** * FireBug's array detection. * @param {*} obj * @return {boolean} */ function isArrayLike(obj) { if (typeof obj !== "object") return false; try { if (typeof obj.splice === "function") { if (!InjectedScriptHost.suppressWarningsAndCallFunction(Object.prototype.hasOwnProperty, obj, ["length"])) return false; var len = obj.length; return typeof len === "number" && isUInt32(len); } } catch (e) { } return false; } /** * @param {number} a * @param {number} b * @return {number} */ function max(a, b) { return a > b ? a : b; } /** * FIXME: Remove once ES6 is supported natively by JS compiler. * @param {*} obj * @return {boolean} */ function isSymbol(obj) { var type = typeof obj; return (type === "symbol"); } /** * @param {string} str * @param {string} searchElement * @param {number=} fromIndex * @return {number} */ function indexOf(str, searchElement, fromIndex) { var len = str.length; var n = fromIndex || 0; var k = max(n >= 0 ? n : len + n, 0); while (k < len) { if (str[k] === searchElement) return k; ++k; } return -1; } /** * DOM Attributes which have observable side effect on getter, in the form of * {interfaceName1: {attributeName1: true, * attributeName2: true, * ...}, * interfaceName2: {...}, * ...} * @type {!Object<string, !Object<string, boolean>>} * @const */ var domAttributesWithObservableSideEffectOnGet = nullifyObjectProto({}); domAttributesWithObservableSideEffectOnGet["Request"] = nullifyObjectProto({}); domAttributesWithObservableSideEffectOnGet["Request"]["body"] = true; domAttributesWithObservableSideEffectOnGet["Response"] = nullifyObjectProto({}); domAttributesWithObservableSideEffectOnGet["Response"]["body"] = true; /** * @param {!Object} object * @param {string} attribute * @return {boolean} */ function doesAttributeHaveObservableSideEffectOnGet(object, attribute) { for (var interfaceName in domAttributesWithObservableSideEffectOnGet) { var isInstance = InjectedScriptHost.suppressWarningsAndCallFunction(function(object, interfaceName) { return /* suppressBlacklist */ typeof inspectedGlobalObject[interfaceName] === "function" && object instanceof inspectedGlobalObject[interfaceName]; }, null, [object, interfaceName]); if (isInstance) { return attribute in domAttributesWithObservableSideEffectOnGet[interfaceName]; } } return false; } /** * @constructor */ var InjectedScript = function() { } /** * @type {!Object.<string, boolean>} * @const */ InjectedScript.primitiveTypes = { "undefined": true, "boolean": true, "number": true, "string": true, __proto__: null } InjectedScript.prototype = { /** * @param {*} object * @return {boolean} */ isPrimitiveValue: function(object) { // FIXME(33716): typeof document.all is always 'undefined'. return InjectedScript.primitiveTypes[typeof object] && !this._isHTMLAllCollection(object); }, /** * @param {*} object * @param {string} groupName * @param {boolean} canAccessInspectedGlobalObject * @param {boolean} generatePreview * @return {!RuntimeAgent.RemoteObject} */ wrapObject: function(object, groupName, canAccessInspectedGlobalObject, generatePreview) { if (canAccessInspectedGlobalObject) return this._wrapObject(object, groupName, false, generatePreview); return this._fallbackWrapper(object); }, /** * @param {*} object * @return {!RuntimeAgent.RemoteObject} */ _fallbackWrapper: function(object) { var result = { __proto__: null }; result.type = typeof object; if (this.isPrimitiveValue(object)) result.value = object; else result.description = toString(object); return /** @type {!RuntimeAgent.RemoteObject} */ (result); }, /** * @param {boolean} canAccessInspectedGlobalObject * @param {!Object} table * @param {!Array.<string>|string|boolean} columns * @return {!RuntimeAgent.RemoteObject} */ wrapTable: function(canAccessInspectedGlobalObject, table, columns) { if (!canAccessInspectedGlobalObject) return this._fallbackWrapper(table); var columnNames = null; if (typeof columns === "string") columns = [columns]; if (InjectedScriptHost.subtype(columns) === "array") { columnNames = []; for (var i = 0; i < columns.length; ++i) columnNames[i] = toString(columns[i]); } return this._wrapObject(table, "console", false, true, columnNames, true); }, /** * @param {*} object * @return {*} */ _inspect: function(object) { if (arguments.length === 0) return; var objectId = this._wrapObject(object, ""); var hints = { __proto__: null }; InjectedScriptHost.inspect(objectId, hints); return object; }, /** * This method cannot throw. * @param {*} object * @param {string=} objectGroupName * @param {boolean=} forceValueType * @param {boolean=} generatePreview * @param {?Array.<string>=} columnNames * @param {boolean=} isTable * @param {boolean=} doNotBind * @param {*=} customObjectConfig * @return {!RuntimeAgent.RemoteObject} * @suppress {checkTypes} */ _wrapObject: function(object, objectGroupName, forceValueType, generatePreview, columnNames, isTable, doNotBind, customObjectConfig) { try { return new InjectedScript.RemoteObject(object, objectGroupName, doNotBind, forceValueType, generatePreview, columnNames, isTable, undefined, customObjectConfig); } catch (e) { try { var description = injectedScript._describe(e); } catch (ex) { var description = "<failed to convert exception to string>"; } return new InjectedScript.RemoteObject(description); } }, /** * @param {!Object|symbol} object * @param {string=} objectGroupName * @return {string} */ _bind: function(object, objectGroupName) { var id = InjectedScriptHost.bind(object, objectGroupName || ""); return "{\"injectedScriptId\":" + injectedScriptId + ",\"id\":" + id + "}"; }, /** * @param {string} objectId * @return {!Object} */ _parseObjectId: function(objectId) { return nullifyObjectProto(/** @type {!Object} */ (InjectedScriptHost.eval("(" + objectId + ")"))); }, clearLastEvaluationResult: function() { delete this._lastResult; }, /** * @param {string} objectId * @param {boolean} ownProperties * @param {boolean} accessorPropertiesOnly * @param {boolean} generatePreview * @return {!Array.<!RuntimeAgent.PropertyDescriptor>|boolean} */ getProperties: function(objectId, ownProperties, accessorPropertiesOnly, generatePreview) { var parsedObjectId = this._parseObjectId(objectId); var object = this._objectForId(parsedObjectId); var objectGroupName = InjectedScriptHost.idToObjectGroupName(parsedObjectId.id); if (!this._isDefined(object) || isSymbol(object)) return false; object = /** @type {!Object} */ (object); var descriptors = []; var iter = this._propertyDescriptors(object, ownProperties, accessorPropertiesOnly, undefined); // Go over properties, wrap object values. for (var descriptor of iter) { if ("get" in descriptor) descriptor.get = this._wrapObject(descriptor.get, objectGroupName); if ("set" in descriptor) descriptor.set = this._wrapObject(descriptor.set, objectGroupName); if ("value" in descriptor) descriptor.value = this._wrapObject(descriptor.value, objectGroupName, false, generatePreview); if (!("configurable" in descriptor)) descriptor.configurable = false; if (!("enumerable" in descriptor)) descriptor.enumerable = false; if ("symbol" in descriptor) descriptor.symbol = this._wrapObject(descriptor.symbol, objectGroupName); push(descriptors, descriptor); } return descriptors; }, /** * @param {string} objectId * @return {!Array.<!Object>|boolean} */ getInternalProperties: function(objectId) { var parsedObjectId = this._parseObjectId(objectId); var object = this._objectForId(parsedObjectId); var objectGroupName = InjectedScriptHost.idToObjectGroupName(parsedObjectId.id); if (!this._isDefined(object) || isSymbol(object)) return false; object = /** @type {!Object} */ (object); var descriptors = []; var internalProperties = InjectedScriptHost.getInternalProperties(object); if (internalProperties) { for (var i = 0; i < internalProperties.length; i += 2) { var descriptor = { name: internalProperties[i], value: this._wrapObject(internalProperties[i + 1], objectGroupName), __proto__: null }; push(descriptors, descriptor); } } return descriptors; }, /** * @param {string} functionId * @return {!DebuggerAgent.FunctionDetails|string} */ getFunctionDetails: function(functionId) { var parsedFunctionId = this._parseObjectId(functionId); var func = this._objectForId(parsedFunctionId); if (typeof func !== "function") return "Cannot resolve function by id."; var details = nullifyObjectProto(/** @type {!DebuggerAgent.FunctionDetails} */ (InjectedScriptHost.functionDetails(func))); if ("rawScopes" in details) { var objectGroupName = InjectedScriptHost.idToObjectGroupName(parsedFunctionId.id); var rawScopes = details["rawScopes"]; delete details["rawScopes"]; var scopes = []; for (var i = 0; i < rawScopes.length; ++i) scopes[i] = InjectedScript.CallFrameProxy._createScopeJson(rawScopes[i].type, rawScopes[i].name, rawScopes[i].object, objectGroupName); details.scopeChain = scopes; } return details; }, /** * @param {string} objectId * @return {!DebuggerAgent.GeneratorObjectDetails|string} */ getGeneratorObjectDetails: function(objectId) { var parsedObjectId = this._parseObjectId(objectId); var object = this._objectForId(parsedObjectId); if (!object || typeof object !== "object") return "Could not find object with given id"; var details = nullifyObjectProto(/** @type {?DebuggerAgent.GeneratorObjectDetails} */ (InjectedScriptHost.generatorObjectDetails(object))); if (!details) return "Object is not a generator"; var objectGroupName = InjectedScriptHost.idToObjectGroupName(parsedObjectId.id); details["function"] = this._wrapObject(details["function"], objectGroupName); return details; }, /** * @param {string} objectId * @return {!Array.<!Object>|string} */ getCollectionEntries: function(objectId) { var parsedObjectId = this._parseObjectId(objectId); var object = this._objectForId(parsedObjectId); if (!object || typeof object !== "object") return "Could not find object with given id"; var entries = InjectedScriptHost.collectionEntries(object); if (!entries) return "Object with given id is not a collection"; var objectGroupName = InjectedScriptHost.idToObjectGroupName(parsedObjectId.id); for (var i = 0; i < entries.length; ++i) { var entry = nullifyObjectProto(entries[i]); if ("key" in entry) entry.key = this._wrapObject(entry.key, objectGroupName); entry.value = this._wrapObject(entry.value, objectGroupName); entries[i] = entry; } return entries; }, /** * @param {!Object} object * @param {boolean=} ownProperties * @param {boolean=} accessorPropertiesOnly * @param {?Array.<string>=} propertyNamesOnly */ _propertyDescriptors: function*(object, ownProperties, accessorPropertiesOnly, propertyNamesOnly) { var propertyProcessed = { __proto__: null }; /** * @param {?Object} o * @param {!Iterable.<string|symbol>|!Array.<string|symbol>} properties */ function* process(o, properties) { for (var property of properties) { if (propertyProcessed[property]) continue; var name = property; if (isSymbol(property)) name = /** @type {string} */ (injectedScript._describe(property)); try { propertyProcessed[property] = true; var descriptor = nullifyObjectProto(InjectedScriptHost.suppressWarningsAndCallFunction(Object.getOwnPropertyDescriptor, Object, [o, property])); if (descriptor) { if (accessorPropertiesOnly && !("get" in descriptor || "set" in descriptor)) continue; if ("get" in descriptor && "set" in descriptor && name != "__proto__" && InjectedScriptHost.isDOMWrapper(object) && !doesAttributeHaveObservableSideEffectOnGet(object, name)) { descriptor.value = InjectedScriptHost.suppressWarningsAndCallFunction(function(attribute) { return this[attribute]; }, object, [name]); descriptor.isOwn = true; delete descriptor.get; delete descriptor.set; } } else { // Not all bindings provide proper descriptors. Fall back to the writable, configurable property. if (accessorPropertiesOnly) continue; try { descriptor = { name: name, value: o[property], writable: false, configurable: false, enumerable: false, __proto__: null }; if (o === object) descriptor.isOwn = true; yield descriptor; } catch (e) { // Silent catch. } continue; } } catch (e) { if (accessorPropertiesOnly) continue; var descriptor = { __proto__: null }; descriptor.value = e; descriptor.wasThrown = true; } descriptor.name = name; if (o === object) descriptor.isOwn = true; if (isSymbol(property)) descriptor.symbol = property; yield descriptor; } } /** * @param {number} length */ function* arrayIndexNames(length) { for (var i = 0; i < length; ++i) yield "" + i; } if (propertyNamesOnly) { for (var i = 0; i < propertyNamesOnly.length; ++i) { var name = propertyNamesOnly[i]; for (var o = object; this._isDefined(o); o = o.__proto__) { if (InjectedScriptHost.suppressWarningsAndCallFunction(Object.prototype.hasOwnProperty, o, [name])) { for (var descriptor of process(o, [name])) yield descriptor; break; } if (ownProperties) break; } } return; } var skipGetOwnPropertyNames; try { skipGetOwnPropertyNames = InjectedScriptHost.isTypedArray(object) && object.length > 500000; } catch (e) { } for (var o = object; this._isDefined(o); o = o.__proto__) { if (skipGetOwnPropertyNames && o === object) { // Avoid OOM crashes from getting all own property names of a large TypedArray. for (var descriptor of process(o, arrayIndexNames(o.length))) yield descriptor; } else { // First call Object.keys() to enforce ordering of the property descriptors. for (var descriptor of process(o, Object.keys(/** @type {!Object} */ (o)))) yield descriptor; for (var descriptor of process(o, Object.getOwnPropertyNames(/** @type {!Object} */ (o)))) yield descriptor; } if (Object.getOwnPropertySymbols) { for (var descriptor of process(o, Object.getOwnPropertySymbols(/** @type {!Object} */ (o)))) yield descriptor; } if (ownProperties) { if (object.__proto__ && !accessorPropertiesOnly) yield { name: "__proto__", value: object.__proto__, writable: true, configurable: true, enumerable: false, isOwn: true, __proto__: null }; break; } } }, /** * @param {string} expression * @param {string} objectGroup * @param {boolean} injectCommandLineAPI * @param {boolean} returnByValue * @param {boolean} generatePreview * @return {*} */ evaluate: function(expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview) { return this._evaluateAndWrap(null, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview); }, /** * @param {string} objectId * @param {string} expression * @param {string} args * @param {boolean} returnByValue * @return {!Object|string} */ callFunctionOn: function(objectId, expression, args, returnByValue) { var parsedObjectId = this._parseObjectId(objectId); var object = this._objectForId(parsedObjectId); if (!this._isDefined(object)) return "Could not find object with given id"; if (args) { var resolvedArgs = []; var callArgs = /** @type {!Array.<!RuntimeAgent.CallArgument>} */ (InjectedScriptHost.eval(args)); for (var i = 0; i < callArgs.length; ++i) { try { resolvedArgs[i] = this._resolveCallArgument(callArgs[i]); } catch (e) { return toString(e); } } } var objectGroup = InjectedScriptHost.idToObjectGroupName(parsedObjectId.id); /** * @suppressReceiverCheck * @param {*} object * @param {boolean=} forceValueType * @param {boolean=} generatePreview * @param {?Array.<string>=} columnNames * @param {boolean=} isTable * @param {*=} customObjectConfig * @return {!RuntimeAgent.RemoteObject} * @this {InjectedScript} */ function wrap(object, forceValueType, generatePreview, columnNames, isTable, customObjectConfig) { return this._wrapObject(object, objectGroup, forceValueType, generatePreview, columnNames, isTable, false, customObjectConfig); } try { var remoteObjectAPI = { bindRemoteObject: bind(wrap, this), __proto__: null}; InjectedScriptHost.setNonEnumProperty(inspectedGlobalObject, "__remoteObjectAPI", remoteObjectAPI); var func = InjectedScriptHost.eval("with (typeof __remoteObjectAPI !== 'undefined' ? __remoteObjectAPI : { __proto__: null }) {(" + expression + ")}"); if (typeof func !== "function") return "Given expression does not evaluate to a function"; return { wasThrown: false, result: this._wrapObject(InjectedScriptHost.callFunction(func, object, resolvedArgs), objectGroup, returnByValue), __proto__: null }; } catch (e) { return this._createThrownValue(e, objectGroup, false); } finally { try { delete inspectedGlobalObject["__remoteObjectAPI"]; } catch(e) { } } }, /** * @param {string|undefined} objectGroupName * @param {*} jsonMLObject * @throws {string} error message */ _substituteObjectTagsInCustomPreview: function(objectGroupName, jsonMLObject) { var maxCustomPreviewRecursionDepth = 20; this._customPreviewRecursionDepth = (this._customPreviewRecursionDepth || 0) + 1 try { if (this._customPreviewRecursionDepth >= maxCustomPreviewRecursionDepth) throw new Error("Too deep hierarchy of inlined custom previews"); if (!isArrayLike(jsonMLObject)) return; if (jsonMLObject[0] === "object") { var attributes = jsonMLObject[1]; var originObject = attributes["object"]; var config = attributes["config"]; if (typeof originObject === "undefined") throw new Error("Illegal format: obligatory attribute \"object\" isn't specified"); jsonMLObject[1] = this._wrapObject(originObject, objectGroupName, false, false, null, false, false, config); return; } for (var i = 0; i < jsonMLObject.length; ++i) this._substituteObjectTagsInCustomPreview(objectGroupName, jsonMLObject[i]); } finally { this._customPreviewRecursionDepth--; } }, /** * Resolves a value from CallArgument description. * @param {!RuntimeAgent.CallArgument} callArgumentJson * @return {*} resolved value * @throws {string} error message */ _resolveCallArgument: function(callArgumentJson) { callArgumentJson = nullifyObjectProto(callArgumentJson); var objectId = callArgumentJson.objectId; if (objectId) { var parsedArgId = this._parseObjectId(objectId); if (!parsedArgId || parsedArgId["injectedScriptId"] !== injectedScriptId) throw "Arguments should belong to the same JavaScript world as the target object."; var resolvedArg = this._objectForId(parsedArgId); if (!this._isDefined(resolvedArg)) throw "Could not find object with given id"; return resolvedArg; } else if ("value" in callArgumentJson) { var value = callArgumentJson.value; if (callArgumentJson.type === "number" && typeof value !== "number") value = Number(value); return value; } return undefined; }, /** * @param {?JavaScriptCallFrame} callFrame * @param {string} expression * @param {string} objectGroup * @param {boolean} injectCommandLineAPI * @param {boolean} returnByValue * @param {boolean} generatePreview * @param {!Array.<!Object>=} scopeChain * @return {!Object} */ _evaluateAndWrap: function(callFrame, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview, scopeChain) { var wrappedResult = this._evaluateOn(callFrame, objectGroup, expression, injectCommandLineAPI, scopeChain); if (!wrappedResult.exceptionDetails) { return { wasThrown: false, result: this._wrapObject(wrappedResult.result, objectGroup, returnByValue, generatePreview), __proto__: null }; } return this._createThrownValue(wrappedResult.result, objectGroup, generatePreview, wrappedResult.exceptionDetails); }, /** * @param {*} value * @param {string|undefined} objectGroup * @param {boolean} generatePreview * @param {!DebuggerAgent.ExceptionDetails=} exceptionDetails * @return {!Object} */ _createThrownValue: function(value, objectGroup, generatePreview, exceptionDetails) { var remoteObject = this._wrapObject(value, objectGroup, false, generatePreview && InjectedScriptHost.subtype(value) !== "error"); if (!remoteObject.description){ try { remoteObject.description = toStringDescription(value); } catch (e) {} } return { wasThrown: true, result: remoteObject, exceptionDetails: exceptionDetails, __proto__: null }; }, /** * @param {?JavaScriptCallFrame} callFrame * @param {string} objectGroup * @param {string} expression * @param {boolean} injectCommandLineAPI * @param {!Array.<!Object>=} scopeChain * @return {*} */ _evaluateOn: function(callFrame, objectGroup, expression, injectCommandLineAPI, scopeChain) { // Only install command line api object for the time of evaluation. // Surround the expression in with statements to inject our command line API so that // the window object properties still take more precedent than our API functions. var scopeExtensionForEval = (callFrame && injectCommandLineAPI) ? new CommandLineAPI(this._commandLineAPIImpl, callFrame) : undefined; injectCommandLineAPI = !scopeExtensionForEval && !callFrame && injectCommandLineAPI && !("__commandLineAPI" in inspectedGlobalObject); var injectScopeChain = scopeChain && scopeChain.length && !("__scopeChainForEval" in inspectedGlobalObject); try { var prefix = ""; var suffix = ""; if (injectCommandLineAPI) { InjectedScriptHost.setNonEnumProperty(inspectedGlobalObject, "__commandLineAPI", new CommandLineAPI(this._commandLineAPIImpl, callFrame)); prefix = "with (typeof __commandLineAPI !== 'undefined' ? __commandLineAPI : { __proto__: null }) {"; suffix = "}"; } if (injectScopeChain) { InjectedScriptHost.setNonEnumProperty(inspectedGlobalObject, "__scopeChainForEval", scopeChain); for (var i = 0; i < scopeChain.length; ++i) { prefix = "with (typeof __scopeChainForEval !== 'undefined' ? __scopeChainForEval[" + i + "] : { __proto__: null }) {" + (suffix ? " " : "") + prefix; if (suffix) suffix += " }"; else suffix = "}"; } } if (prefix) expression = prefix + "\n" + expression + "\n" + suffix; var wrappedResult = callFrame ? callFrame.evaluateWithExceptionDetails(expression, scopeExtensionForEval) : InjectedScriptHost.evaluateWithExceptionDetails(expression); if (objectGroup === "console" && !wrappedResult.exceptionDetails) this._lastResult = wrappedResult.result; return wrappedResult; } finally { if (injectCommandLineAPI) { try { delete inspectedGlobalObject["__commandLineAPI"]; } catch(e) { } } if (injectScopeChain) { try { delete inspectedGlobalObject["__scopeChainForEval"]; } catch(e) { } } } }, /** * @param {?Object} callFrame * @param {number} asyncOrdinal * @return {!Array.<!InjectedScript.CallFrameProxy>|boolean} */ wrapCallFrames: function(callFrame, asyncOrdinal) { if (!callFrame) return false; var result = []; var depth = 0; do { result[depth] = new InjectedScript.CallFrameProxy(depth, callFrame, asyncOrdinal); callFrame = callFrame.caller; ++depth; } while (callFrame); return result; }, /** * @param {!JavaScriptCallFrame} topCallFrame * @param {boolean} isAsyncStack * @param {string} callFrameId * @param {string} expression * @param {string} objectGroup * @param {boolean} injectCommandLineAPI * @param {boolean} returnByValue * @param {boolean} generatePreview * @return {*} */ evaluateOnCallFrame: function(topCallFrame, isAsyncStack, callFrameId, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview) { var callFrame = this._callFrameForId(topCallFrame, callFrameId); if (!callFrame) return "Could not find call frame with given id"; if (isAsyncStack) return this._evaluateAndWrap(null, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview, callFrame.scopeChain); return this._evaluateAndWrap(callFrame, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview); }, /** * @param {!JavaScriptCallFrame} topCallFrame * @param {string} callFrameId * @return {*} */ restartFrame: function(topCallFrame, callFrameId) { var callFrame = this._callFrameForId(topCallFrame, callFrameId); if (!callFrame) return "Could not find call frame with given id"; return callFrame.restart(); }, /** * @param {!JavaScriptCallFrame} topCallFrame * @param {string} callFrameId * @return {*} a stepIn position array ready for protocol JSON or a string error */ getStepInPositions: function(topCallFrame, callFrameId) { var callFrame = this._callFrameForId(topCallFrame, callFrameId); if (!callFrame) return "Could not find call frame with given id"; var stepInPositionsUnpacked = JSON.parse(callFrame.stepInPositions); if (typeof stepInPositionsUnpacked !== "object") return "Step in positions not available"; return stepInPositionsUnpacked; }, /** * Either callFrameId or functionObjectId must be specified. * @param {!JavaScriptCallFrame} topCallFrame * @param {string|boolean} callFrameId or false * @param {string|boolean} functionObjectId or false * @param {number} scopeNumber * @param {string} variableName * @param {string} newValueJsonString RuntimeAgent.CallArgument structure serialized as string * @return {string|undefined} undefined if success or an error message */ setVariableValue: function(topCallFrame, callFrameId, functionObjectId, scopeNumber, variableName, newValueJsonString) { try { var newValueJson = /** @type {!RuntimeAgent.CallArgument} */ (InjectedScriptHost.eval("(" + newValueJsonString + ")")); var resolvedValue = this._resolveCallArgument(newValueJson); if (typeof callFrameId === "string") { var callFrame = this._callFrameForId(topCallFrame, callFrameId); if (!callFrame) return "Could not find call frame with given id"; callFrame.setVariableValue(scopeNumber, variableName, resolvedValue) } else { var parsedFunctionId = this._parseObjectId(/** @type {string} */ (functionObjectId)); var func = this._objectForId(parsedFunctionId); if (typeof func !== "function") return "Could not resolve function by id"; InjectedScriptHost.setFunctionVariableValue(func, scopeNumber, variableName, resolvedValue); } } catch (e) { return toString(e); } return undefined; }, /** * @param {!JavaScriptCallFrame} topCallFrame * @param {string} callFrameId * @return {?JavaScriptCallFrame} */ _callFrameForId: function(topCallFrame, callFrameId) { var parsedCallFrameId = nullifyObjectProto(/** @type {!Object} */ (InjectedScriptHost.eval("(" + callFrameId + ")"))); var ordinal = parsedCallFrameId["ordinal"]; var callFrame = topCallFrame; while (--ordinal >= 0 && callFrame) callFrame = callFrame.caller; return callFrame; }, /** * @param {!Object} objectId * @return {!Object|symbol|undefined} */ _objectForId: function(objectId) { return objectId.injectedScriptId === injectedScriptId ? /** @type{!Object|symbol|undefined} */ (InjectedScriptHost.objectForId(objectId.id)) : void 0; }, /** * @param {*} object * @return {boolean} */ _isDefined: function(object) { return !!object || this._isHTMLAllCollection(object); }, /** * @param {*} object * @return {boolean} */ _isHTMLAllCollection: function(object) { // document.all is reported as undefined, but we still want to process it. return (typeof object === "undefined") && InjectedScriptHost.isHTMLAllCollection(object); }, /** * @param {*} obj * @return {?string} */ _subtype: function(obj) { if (obj === null) return "null"; if (this.isPrimitiveValue(obj)) return null; var subtype = InjectedScriptHost.subtype(obj); if (subtype) return subtype; if (isArrayLike(obj)) return "array"; // If owning frame has navigated to somewhere else window properties will be undefined. return null; }, /** * @param {*} obj * @return {?string} */ _describe: function(obj) { if (this.isPrimitiveValue(obj)) return null; var subtype = this._subtype(obj); if (subtype === "regexp") return toString(obj); if (subtype === "date") return toString(obj); if (subtype === "node") { var description = obj.nodeName.toLowerCase(); switch (obj.nodeType) { case 1 /* Node.ELEMENT_NODE */: description += obj.id ? "#" + obj.id : ""; var className = obj.className; description += (className && typeof className === "string") ? "." + className.trim().replace(/\s+/g, ".") : ""; break; case 10 /*Node.DOCUMENT_TYPE_NODE */: description = "<!DOCTYPE " + description + ">"; break; } return description; } var className = InjectedScriptHost.internalConstructorName(obj); if (subtype === "array") { if (typeof obj.length === "number") className += "[" + obj.length + "]"; return className; } // NodeList in JSC is a function, check for array prior to this. if (typeof obj === "function") return toString(obj); if (isSymbol(obj)) { try { return /** @type {string} */ (InjectedScriptHost.callFunction(Symbol.prototype.toString, obj)) || "Symbol"; } catch (e) { return "Symbol"; } } if (InjectedScriptHost.subtype(obj) === "error") { try { var stack = obj.stack; var message = obj.message && obj.message.length ? ": " + obj.message : ""; var firstCallFrame = /^\s+at\s/m.exec(stack); var stackMessageEnd = firstCallFrame ? firstCallFrame.index : -1; if (stackMessageEnd !== -1) { var stackTrace = stack.substr(stackMessageEnd); return className + message + "\n" + stackTrace; } return className + message; } catch(e) { } } return className; }, /** * @param {boolean} enabled */ setCustomObjectFormatterEnabled: function(enabled) { this._customObjectFormatterEnabled = enabled; } } /** * @type {!InjectedScript} * @const */ var injectedScript = new InjectedScript(); /** * @constructor * @param {*} object * @param {string=} objectGroupName * @param {boolean=} doNotBind * @param {boolean=} forceValueType * @param {boolean=} generatePreview * @param {?Array.<string>=} columnNames * @param {boolean=} isTable * @param {boolean=} skipEntriesPreview * @param {*=} customObjectConfig */ InjectedScript.RemoteObject = function(object, objectGroupName, doNotBind, forceValueType, generatePreview, columnNames, isTable, skipEntriesPreview, customObjectConfig) { this.type = typeof object; if (this.type === "undefined" && injectedScript._isHTMLAllCollection(object)) this.type = "object"; if (injectedScript.isPrimitiveValue(object) || object === null || forceValueType) { // We don't send undefined values over JSON. if (this.type !== "undefined") this.value = object; // Null object is object with 'null' subtype. if (object === null) this.subtype = "null"; // Provide user-friendly number values. if (this.type === "number") { this.description = toStringDescription(object); // Override "value" property for values that can not be JSON-stringified. switch (this.description) { case "NaN": case "Infinity": case "-Infinity": case "-0": this.value = this.description; break; } } return; } object = /** @type {!Object} */ (object); if (!doNotBind) this.objectId = injectedScript._bind(object, objectGroupName); var subtype = injectedScript._subtype(object); if (subtype) this.subtype = subtype; var className = InjectedScriptHost.internalConstructorName(object); if (className) this.className = className; this.description = injectedScript._describe(object); if (generatePreview && this.type === "object" && this.subtype !== "node") this.preview = this._generatePreview(object, undefined, columnNames, isTable, skipEntriesPreview); if (injectedScript._customObjectFormatterEnabled) { var customPreview = this._customPreview(object, objectGroupName, customObjectConfig); if (customPreview) this.customPreview = customPreview; } } InjectedScript.RemoteObject.prototype = { /** * @param {*} object * @param {string=} objectGroupName * @param {*=} customObjectConfig * @return {?RuntimeAgent.CustomPreview} */ _customPreview: function(object, objectGroupName, customObjectConfig) { /** * @param {!Error} error */ function logError(error) { Promise.resolve().then(inspectedGlobalObject.console.error.bind(inspectedGlobalObject.console, "Custom Formatter Failed: " + error.message)); } try { var formatters = inspectedGlobalObject["devtoolsFormatters"]; if (!formatters || !isArrayLike(formatters)) return null; for (var i = 0; i < formatters.length; ++i) { try { var formatted = formatters[i].header(object, customObjectConfig); if (!formatted) continue; var hasBody = formatters[i].hasBody(object, customObjectConfig); injectedScript._substituteObjectTagsInCustomPreview(objectGroupName, formatted); var formatterObjectId = injectedScript._bind(formatters[i], objectGroupName); var result = {header: JSON.stringify(formatted), hasBody: !!hasBody, formatterObjectId: formatterObjectId}; if (customObjectConfig) result["configObjectId"] = injectedScript._bind(customObjectConfig, objectGroupName); return result; } catch (e) { logError(e); } } } catch (e) { logError(e); } return null; }, /** * @return {!RuntimeAgent.ObjectPreview} preview */ _createEmptyPreview: function() { var preview = { type: /** @type {!RuntimeAgent.ObjectPreviewType.<string>} */ (this.type), description: this.description || toStringDescription(this.value), lossless: true, overflow: false, properties: [], __proto__: null }; if (this.subtype) preview.subtype = /** @type {!RuntimeAgent.ObjectPreviewSubtype.<string>} */ (this.subtype); return preview; }, /** * @param {!Object} object * @param {?Array.<string>=} firstLevelKeys * @param {?Array.<string>=} secondLevelKeys * @param {boolean=} isTable * @param {boolean=} skipEntriesPreview * @return {!RuntimeAgent.ObjectPreview} preview */ _generatePreview: function(object, firstLevelKeys, secondLevelKeys, isTable, skipEntriesPreview) { var preview = this._createEmptyPreview(); var firstLevelKeysCount = firstLevelKeys ? firstLevelKeys.length : 0; var propertiesThreshold = { properties: isTable ? 1000 : max(5, firstLevelKeysCount), indexes: isTable ? 1000 : max(100, firstLevelKeysCount), __proto__: null }; try { var descriptors = injectedScript._propertyDescriptors(object, undefined, undefined, firstLevelKeys); this._appendPropertyDescriptors(preview, descriptors, propertiesThreshold, secondLevelKeys, isTable); if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0) return preview; // Add internal properties to preview. var rawInternalProperties = InjectedScriptHost.getInternalProperties(object) || []; var internalProperties = []; for (var i = 0; i < rawInternalProperties.length; i += 2) { push(internalProperties, { name: rawInternalProperties[i], value: rawInternalProperties[i + 1], isOwn: true, enumerable: true, __proto__: null }); } this._appendPropertyDescriptors(preview, internalProperties, propertiesThreshold, secondLevelKeys, isTable); if (this.subtype === "map" || this.subtype === "set" || this.subtype === "iterator") this._appendEntriesPreview(object, preview, skipEntriesPreview); } catch (e) { preview.lossless = false; } return preview; }, /** * @param {!RuntimeAgent.ObjectPreview} preview * @param {!Array.<*>|!Iterable.<*>} descriptors * @param {!Object} propertiesThreshold * @param {?Array.<string>=} secondLevelKeys * @param {boolean=} isTable */ _appendPropertyDescriptors: function(preview, descriptors, propertiesThreshold, secondLevelKeys, isTable) { for (var descriptor of descriptors) { if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0) break; if (!descriptor) continue; if (descriptor.wasThrown) { preview.lossless = false; continue; } var name = descriptor.name; // Ignore __proto__ property, stay lossless. if (name === "__proto__") continue; // Ignore non-enumerable members on prototype, stay lossless. if (!descriptor.isOwn && !descriptor.enumerable) continue; // Ignore length property of array, stay lossless. if (this.subtype === "array" && name === "length") continue; // Ignore size property of map, set, stay lossless. if ((this.subtype === "map" || this.subtype === "set") && name === "size") continue; // Never preview prototype properties, turn lossy. if (!descriptor.isOwn) { preview.lossless = false; continue; } // Ignore computed properties, turn lossy. if (!("value" in descriptor)) { preview.lossless = false; continue; } var value = descriptor.value; var type = typeof value; // Never render functions in object preview, turn lossy if (type === "function" && (this.subtype !== "array" || !isUInt32(name))) { preview.lossless = false; continue; } // Special-case HTMLAll. if (type === "undefined" && injectedScript._isHTMLAllCollection(value)) type = "object"; // Render own properties. if (value === null) { this._appendPropertyPreview(preview, { name: name, type: "object", subtype: "null", value: "null", __proto__: null }, propertiesThreshold); continue; } var maxLength = 100; if (InjectedScript.primitiveTypes[type]) { if (type === "string" && value.length > maxLength) { value = this._abbreviateString(value, maxLength, true); preview.lossless = false; } this._appendPropertyPreview(preview, { name: name, type: type, value: toStringDescription(value), __proto__: null }, propertiesThreshold); continue; } var property = { name: name, type: type, __proto__: null }; var subtype = injectedScript._subtype(value); if (subtype) property.subtype = subtype; if (secondLevelKeys === null || secondLevelKeys) { var subPreview = this._generatePreview(value, secondLevelKeys || undefined, undefined, isTable); property.valuePreview = subPreview; if (!subPreview.lossless) preview.lossless = false; if (subPreview.overflow) preview.overflow = true; } else { var description = ""; if (type !== "function") description = this._abbreviateString(/** @type {string} */ (injectedScript._describe(value)), maxLength, subtype === "regexp"); property.value = description; preview.lossless = false; } this._appendPropertyPreview(preview, property, propertiesThreshold); } }, /** * @param {!RuntimeAgent.ObjectPreview} preview * @param {!Object} property * @param {!Object} propertiesThreshold */ _appendPropertyPreview: function(preview, property, propertiesThreshold) { if (toString(property.name >>> 0) === property.name) propertiesThreshold.indexes--; else propertiesThreshold.properties--; if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0) { preview.overflow = true; preview.lossless = false; } else { push(preview.properties, property); } }, /** * @param {!Object} object * @param {!RuntimeAgent.ObjectPreview} preview * @param {boolean=} skipEntriesPreview */ _appendEntriesPreview: function(object, preview, skipEntriesPreview) { var entries = InjectedScriptHost.collectionEntries(object); if (!entries) return; if (skipEntriesPreview) { if (entries.length) { preview.overflow = true; preview.lossless = false; } return; } preview.entries = []; var entriesThreshold = 5; for (var i = 0; i < entries.length; ++i) { if (preview.entries.length >= entriesThreshold) { preview.overflow = true; preview.lossless = false; break; } var entry = nullifyObjectProto(entries[i]); var previewEntry = { value: generateValuePreview(entry.value), __proto__: null }; if ("key" in entry) previewEntry.key = generateValuePreview(entry.key); push(preview.entries, previewEntry); } /** * @param {*} value * @return {!RuntimeAgent.ObjectPreview} */ function generateValuePreview(value) { var remoteObject = new InjectedScript.RemoteObject(value, undefined, true, undefined, true, undefined, undefined, true); var valuePreview = remoteObject.preview || remoteObject._createEmptyPreview(); if (!valuePreview.lossless) preview.lossless = false; return valuePreview; } }, /** * @param {string} string * @param {number} maxLength * @param {boolean=} middle * @return {string} */ _abbreviateString: function(string, maxLength, middle) { if (string.length <= maxLength) return string; if (middle) { var leftHalf = maxLength >> 1; var rightHalf = maxLength - leftHalf - 1; return string.substr(0, leftHalf) + "\u2026" + string.substr(string.length - rightHalf, rightHalf); } return string.substr(0, maxLength) + "\u2026"; }, __proto__: null } /** * @constructor * @param {number} ordinal * @param {!JavaScriptCallFrame} callFrame * @param {number} asyncOrdinal */ InjectedScript.CallFrameProxy = function(ordinal, callFrame, asyncOrdinal) { this.callFrameId = "{\"ordinal\":" + ordinal + ",\"injectedScriptId\":" + injectedScriptId + (asyncOrdinal ? ",\"asyncOrdinal\":" + asyncOrdinal : "") + "}"; this.functionName = callFrame.functionName; this.functionLocation = { scriptId: toString(callFrame.sourceID), lineNumber: callFrame.functionLine, columnNumber: callFrame.functionColumn, __proto__: null }; this.location = { scriptId: toString(callFrame.sourceID), lineNumber: callFrame.line, columnNumber: callFrame.column, __proto__: null }; this.scopeChain = this._wrapScopeChain(callFrame); this.this = injectedScript._wrapObject(callFrame.thisObject, "backtrace"); if (callFrame.isAtReturn) this.returnValue = injectedScript._wrapObject(callFrame.returnValue, "backtrace"); } InjectedScript.CallFrameProxy.prototype = { /** * @param {!JavaScriptCallFrame} callFrame * @return {!Array.<!DebuggerAgent.Scope>} */ _wrapScopeChain: function(callFrame) { var scopeChain = callFrame.scopeChain; var scopeChainProxy = []; for (var i = 0; i < scopeChain.length; ++i) scopeChainProxy[i] = InjectedScript.CallFrameProxy._createScopeJson(callFrame.scopeType(i), callFrame.scopeName(i), scopeChain[i], "backtrace"); return scopeChainProxy; }, __proto__: null } /** * @const * @type {!Object.<number, !DebuggerAgent.ScopeType>} */ InjectedScript.CallFrameProxy._scopeTypeNames = { 0: "global", 1: "local", 2: "with", 3: "closure", 4: "catch", 5: "block", 6: "script", __proto__: null }; /** * @param {number} scopeTypeCode * @param {string} scopeName * @param {*} scopeObject * @param {string} groupId * @return {!DebuggerAgent.Scope} */ InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeName, scopeObject, groupId) { var scope = { object: injectedScript._wrapObject(scopeObject, groupId), type: InjectedScript.CallFrameProxy._scopeTypeNames[scopeTypeCode], __proto__: null }; if (scopeName) scope.name = scopeName; return scope; } /** * @constructor * @param {!CommandLineAPIImpl} commandLineAPIImpl * @param {?JavaScriptCallFrame} callFrame */ function CommandLineAPI(commandLineAPIImpl, callFrame) { /** * @param {string} member * @return {boolean} */ function inScopeVariables(member) { if (!callFrame) return (member in inspectedGlobalObject); var scopeChain = callFrame.scopeChain; for (var i = 0; i < scopeChain.length; ++i) { if (member in scopeChain[i]) return true; } return false; } /** * @param {string} name The name of the method for which a toString method should be generated. * @return {function():string} */ function customToStringMethod(name) { return function() { var funcArgsSyntax = ""; try { var funcSyntax = "" + commandLineAPIImpl[name]; funcSyntax = funcSyntax.replace(/\n/g, " "); funcSyntax = funcSyntax.replace(/^function[^\(]*\(([^\)]*)\).*$/, "$1"); funcSyntax = funcSyntax.replace(/\s*,\s*/g, ", "); funcSyntax = funcSyntax.replace(/\bopt_(\w+)\b/g, "[$1]"); funcArgsSyntax = funcSyntax.trim(); } catch (e) { } return "function " + name + "(" + funcArgsSyntax + ") { [Command Line API] }"; }; } for (var i = 0; i < CommandLineAPI.members_.length; ++i) { var member = CommandLineAPI.members_[i]; if (inScopeVariables(member)) continue; this[member] = bind(commandLineAPIImpl[member], commandLineAPIImpl); this[member].toString = customToStringMethod(member); } for (var i = 0; i < 5; ++i) { var member = "$" + i; if (inScopeVariables(member)) continue; this.__defineGetter__("$" + i, bind(commandLineAPIImpl._inspectedObject, commandLineAPIImpl, i)); } this.$_ = injectedScript._lastResult; this.__proto__ = null; } // NOTE: Please keep the list of API methods below snchronized to that in WebInspector.RuntimeModel! // NOTE: Argument names of these methods will be printed in the console, so use pretty names! /** * @type {!Array.<string>} * @const */ CommandLineAPI.members_ = [ "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd", "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventListeners", "debug", "undebug", "monitor", "unmonitor", "table" ]; /** * @constructor */ function CommandLineAPIImpl() { } CommandLineAPIImpl.prototype = { /** * @param {string} selector * @param {!Node=} opt_startNode * @return {*} */ $: function (selector, opt_startNode) { if (this._canQuerySelectorOnNode(opt_startNode)) return opt_startNode.querySelector(selector); return inspectedGlobalObject.document.querySelector(selector); }, /** * @param {string} selector * @param {!Node=} opt_startNode * @return {*} */ $$: function (selector, opt_startNode) { if (this._canQuerySelectorOnNode(opt_startNode)) return slice(opt_startNode.querySelectorAll(selector)); return slice(inspectedGlobalObject.document.querySelectorAll(selector)); }, /** * @param {!Node=} node * @return {boolean} */ _canQuerySelectorOnNode: function(node) { return !!node && InjectedScriptHost.subtype(node) === "node" && (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE); }, /** * @param {string} xpath * @param {!Node=} opt_startNode * @return {*} */ $x: function(xpath, opt_startNode) { var doc = (opt_startNode && opt_startNode.ownerDocument) || inspectedGlobalObject.document; var result = doc.evaluate(xpath, opt_startNode || doc, null, XPathResult.ANY_TYPE, null); switch (result.resultType) { case XPathResult.NUMBER_TYPE: return result.numberValue; case XPathResult.STRING_TYPE: return result.stringValue; case XPathResult.BOOLEAN_TYPE: return result.booleanValue; default: var nodes = []; var node; while (node = result.iterateNext()) push(nodes, node); return nodes; } }, /** * @return {*} */ dir: function(var_args) { return InjectedScriptHost.callFunction(inspectedGlobalObject.console.dir, inspectedGlobalObject.console, slice(arguments)); }, /** * @return {*} */ dirxml: function(var_args) { return InjectedScriptHost.callFunction(inspectedGlobalObject.console.dirxml, inspectedGlobalObject.console, slice(arguments)); }, /** * @return {!Array.<string>} */ keys: function(object) { return Object.keys(object); }, /** * @return {!Array.<*>} */ values: function(object) { var result = []; for (var key in object) push(result, object[key]); return result; }, /** * @return {*} */ profile: function(opt_title) { return InjectedScriptHost.callFunction(inspectedGlobalObject.console.profile, inspectedGlobalObject.console, slice(arguments)); }, /** * @return {*} */ profileEnd: function(opt_title) { return InjectedScriptHost.callFunction(inspectedGlobalObject.console.profileEnd, inspectedGlobalObject.console, slice(arguments)); }, /** * @param {!Object} object * @param {!Array.<string>|string=} opt_types */ monitorEvents: function(object, opt_types) { if (!object || !object.addEventListener || !object.removeEventListener) return; var types = this._normalizeEventTypes(opt_types); for (var i = 0; i < types.length; ++i) { object.removeEventListener(types[i], this._logEvent, false); object.addEventListener(types[i], this._logEvent, false); } }, /** * @param {!Object} object * @param {!Array.<string>|string=} opt_types */ unmonitorEvents: function(object, opt_types) { if (!object || !object.addEventListener || !object.removeEventListener) return; var types = this._normalizeEventTypes(opt_types); for (var i = 0; i < types.length; ++i) object.removeEventListener(types[i], this._logEvent, false); }, /** * @param {*} object * @return {*} */ inspect: function(object) { return injectedScript._inspect(object); }, copy: function(object) { var string; if (injectedScript._subtype(object) === "node") { string = object.outerHTML; } else if (injectedScript.isPrimitiveValue(object)) { string = toString(object); } else { try { string = JSON.stringify(object, null, " "); } catch (e) { string = toString(object); } } var hints = { copyToClipboard: true, __proto__: null }; var remoteObject = injectedScript._wrapObject(string, "") InjectedScriptHost.inspect(remoteObject, hints); }, clear: function() { InjectedScriptHost.clearConsoleMessages(); }, /** * @param {!Node} node * @return {!Array.<!{type: string, listener: function(), useCapture: boolean, remove: function()}>|undefined} */ getEventListeners: function(node) { var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node)); if (!result) return result; /** @this {{type: string, listener: function(), useCapture: boolean}} */ var removeFunc = function() { node.removeEventListener(this.type, this.listener, this.useCapture); } for (var type in result) { var listeners = result[type]; for (var i = 0, listener; listener = listeners[i]; ++i) { listener["type"] = type; listener["remove"] = removeFunc; } } return result; }, debug: function(fn) { InjectedScriptHost.debugFunction(fn); }, undebug: function(fn) { InjectedScriptHost.undebugFunction(fn); }, monitor: function(fn) { InjectedScriptHost.monitorFunction(fn); }, unmonitor: function(fn) { InjectedScriptHost.unmonitorFunction(fn); }, table: function(data, opt_columns) { InjectedScriptHost.callFunction(inspectedGlobalObject.console.table, inspectedGlobalObject.console, slice(arguments)); }, /** * @param {number} num */ _inspectedObject: function(num) { return InjectedScriptHost.inspectedObject(num); }, /** * @param {!Array.<string>|string=} types * @return {!Array.<string>} */ _normalizeEventTypes: function(types) { if (typeof types === "undefined") types = ["mouse", "key", "touch", "pointer", "control", "load", "unload", "abort", "error", "select", "input", "change", "submit", "reset", "focus", "blur", "resize", "scroll", "search", "devicemotion", "deviceorientation"]; else if (typeof types === "string") types = [types]; var result = []; for (var i = 0; i < types.length; ++i) { if (types[i] === "mouse") push(result, "click", "dblclick", "mousedown", "mouseeenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "mouseleave", "mousewheel"); else if (types[i] === "key") push(result, "keydown", "keyup", "keypress", "textInput"); else if (types[i] === "touch") push(result, "touchstart", "touchmove", "touchend", "touchcancel"); else if (types[i] === "pointer") push(result, "pointerover", "pointerout", "pointerenter", "pointerleave", "pointerdown", "pointerup", "pointermove", "pointercancel", "gotpointercapture", "lostpointercapture"); else if (types[i] === "control") push(result, "resize", "scroll", "zoom", "focus", "blur", "select", "input", "change", "submit", "reset"); else push(result, types[i]); } return result; }, /** * @param {!Event} event */ _logEvent: function(event) { inspectedGlobalObject.console.log(event.type, event); } } injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); return injectedScript; }) /* * Copyright (C) 2010 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ "use strict"; (function () { var DebuggerScript = {}; DebuggerScript.PauseOnExceptionsState = { DontPauseOnExceptions: 0, PauseOnAllExceptions: 1, PauseOnUncaughtExceptions: 2 }; DebuggerScript.ScopeInfoDetails = { AllScopes: 0, FastAsyncScopes: 1, NoScopes: 2 }; DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.DontPauseOnExceptions; Debug.clearBreakOnException(); Debug.clearBreakOnUncaughtException(); DebuggerScript.getAfterCompileScript = function(eventData) { return DebuggerScript._formatScript(eventData.script_.script_); } DebuggerScript.getFunctionScopes = function(fun) { var mirror = MakeMirror(fun); if (!mirror.isFunction()) return null; var count = mirror.scopeCount(); if (count == 0) return null; var result = []; for (var i = 0; i < count; i++) { var scopeDetails = mirror.scope(i).details(); var scopeObject = DebuggerScript._buildScopeObject(scopeDetails.type(), scopeDetails.object()); if (!scopeObject) continue; result.push({ type: scopeDetails.type(), object: scopeObject, name: scopeDetails.name() }); } return result; } DebuggerScript.getGeneratorObjectDetails = function(object) { var mirror = MakeMirror(object, true /* transient */); if (!mirror.isGenerator()) return null; var funcMirror = mirror.func(); if (!funcMirror.resolved()) return null; var result = { "function": funcMirror.value(), "functionName": funcMirror.debugName(), "status": mirror.status() }; var script = funcMirror.script(); var location = mirror.sourceLocation() || funcMirror.sourceLocation(); if (script && location) { result["location"] = { "scriptId": String(script.id()), "lineNumber": location.line, "columnNumber": location.column }; } return result; } DebuggerScript.getCollectionEntries = function(object) { var mirror = MakeMirror(object, true /* transient */); if (mirror.isMap()) return mirror.entries(); if (mirror.isSet() || mirror.isIterator()) { var result = []; var values = mirror.isSet() ? mirror.values() : mirror.preview(); for (var i = 0; i < values.length; ++i) result.push({ value: values[i] }); return result; } } DebuggerScript.setFunctionVariableValue = function(functionValue, scopeIndex, variableName, newValue) { var mirror = MakeMirror(functionValue); if (!mirror.isFunction()) throw new Error("Function value has incorrect type"); return DebuggerScript._setScopeVariableValue(mirror, scopeIndex, variableName, newValue); } DebuggerScript._setScopeVariableValue = function(scopeHolder, scopeIndex, variableName, newValue) { var scopeMirror = scopeHolder.scope(scopeIndex); if (!scopeMirror) throw new Error("Incorrect scope index"); scopeMirror.setVariableValue(variableName, newValue); return undefined; } DebuggerScript.getScripts = function(contextGroupId) { var result = []; var scripts = Debug.scripts(); var contextDataPrefix = null; if (contextGroupId) contextDataPrefix = contextGroupId + ","; for (var i = 0; i < scripts.length; ++i) { var script = scripts[i]; if (contextDataPrefix) { if (!script.context_data) continue; // Context data is a string in the following format: // <id>,<contextId>,("page"|"injected"|"worker") if (script.context_data.indexOf(contextDataPrefix) !== 0) continue; } result.push(DebuggerScript._formatScript(script)); } return result; } DebuggerScript._formatScript = function(script) { var lineEnds = script.line_ends; var lineCount = lineEnds.length; var endLine = script.line_offset + lineCount - 1; var endColumn; // V8 will not count last line if script source ends with \n. if (script.source[script.source.length - 1] === '\n') { endLine += 1; endColumn = 0; } else { if (lineCount === 1) endColumn = script.source.length + script.column_offset; else endColumn = script.source.length - (lineEnds[lineCount - 2] + 1); } /** * @return {number} */ function executionContextId() { var context_data = script.context_data; if (!context_data) return 0; var firstComma = context_data.indexOf(","); if (firstComma === -1) return 0; var secondComma = context_data.indexOf(",", firstComma + 1); if (secondComma === -1) return 0; return parseInt(context_data.substring(firstComma + 1, secondComma), 10) || 0; } return { id: script.id, name: script.nameOrSourceURL(), sourceURL: script.source_url, sourceMappingURL: script.source_mapping_url, source: script.source, startLine: script.line_offset, startColumn: script.column_offset, endLine: endLine, endColumn: endColumn, executionContextId: executionContextId(), isContentScript: !!script.context_data && script.context_data.endsWith(",injected"), isInternalScript: script.is_debugger_script }; } DebuggerScript.setBreakpoint = function(execState, info) { var positionAlignment = info.interstatementLocation ? Debug.BreakPositionAlignment.BreakPosition : Debug.BreakPositionAlignment.Statement; var breakId = Debug.setScriptBreakPointById(info.sourceID, info.lineNumber, info.columnNumber, info.condition, undefined, positionAlignment); var locations = Debug.findBreakPointActualLocations(breakId); if (!locations.length) return undefined; info.lineNumber = locations[0].line; info.columnNumber = locations[0].column; return breakId.toString(); } DebuggerScript.removeBreakpoint = function(execState, info) { Debug.findBreakPoint(info.breakpointId, true); } DebuggerScript.pauseOnExceptionsState = function() { return DebuggerScript._pauseOnExceptionsState; } DebuggerScript.setPauseOnExceptionsState = function(newState) { DebuggerScript._pauseOnExceptionsState = newState; if (DebuggerScript.PauseOnExceptionsState.PauseOnAllExceptions === newState) Debug.setBreakOnException(); else Debug.clearBreakOnException(); if (DebuggerScript.PauseOnExceptionsState.PauseOnUncaughtExceptions === newState) Debug.setBreakOnUncaughtException(); else Debug.clearBreakOnUncaughtException(); } DebuggerScript.frameCount = function(execState) { return execState.frameCount(); } DebuggerScript.currentCallFrame = function(execState, data) { var maximumLimit = data >> 2; var scopeDetailsLevel = data & 3; var frameCount = execState.frameCount(); if (maximumLimit && maximumLimit < frameCount) frameCount = maximumLimit; var topFrame = undefined; for (var i = frameCount - 1; i >= 0; i--) { var frameMirror = execState.frame(i); topFrame = DebuggerScript._frameMirrorToJSCallFrame(frameMirror, topFrame, scopeDetailsLevel); } return topFrame; } DebuggerScript.currentCallFrameByIndex = function(execState, index) { if (index < 0) return undefined; var frameCount = execState.frameCount(); if (index >= frameCount) return undefined; return DebuggerScript._frameMirrorToJSCallFrame(execState.frame(index), undefined, DebuggerScript.ScopeInfoDetails.NoScopes); } DebuggerScript.stepIntoStatement = function(execState) { execState.prepareStep(Debug.StepAction.StepIn); } DebuggerScript.stepFrameStatement = function(execState) { execState.prepareStep(Debug.StepAction.StepFrame); } DebuggerScript.stepOverStatement = function(execState, callFrame) { execState.prepareStep(Debug.StepAction.StepNext); } DebuggerScript.stepOutOfFunction = function(execState, callFrame) { execState.prepareStep(Debug.StepAction.StepOut); } DebuggerScript.clearStepping = function() { Debug.clearStepping(); } // Returns array in form: // [ 0, <v8_result_report> ] in case of success // or [ 1, <general_error_message>, <compiler_message>, <line_number>, <column_number> ] in case of compile error, numbers are 1-based. // or throws exception with message. DebuggerScript.liveEditScriptSource = function(scriptId, newSource, preview) { var scripts = Debug.scripts(); var scriptToEdit = null; for (var i = 0; i < scripts.length; i++) { if (scripts[i].id == scriptId) { scriptToEdit = scripts[i]; break; } } if (!scriptToEdit) throw("Script not found"); var changeLog = []; try { var result = Debug.LiveEdit.SetScriptSource(scriptToEdit, newSource, preview, changeLog); return [0, result.stack_modified]; } catch (e) { if (e instanceof Debug.LiveEdit.Failure && "details" in e) { var details = e.details; if (details.type === "liveedit_compile_error") { var startPosition = details.position.start; return [1, String(e), String(details.syntaxErrorMessage), Number(startPosition.line), Number(startPosition.column)]; } } throw e; } } DebuggerScript.clearBreakpoints = function(execState, info) { Debug.clearAllBreakPoints(); } DebuggerScript.setBreakpointsActivated = function(execState, info) { Debug.debuggerFlags().breakPointsActive.setValue(info.enabled); } DebuggerScript.getScriptSource = function(eventData) { return eventData.script().source(); } DebuggerScript.setScriptSource = function(eventData, source) { if (eventData.script().data() === "injected-script") return; eventData.script().setSource(source); } DebuggerScript.getScriptName = function(eventData) { return eventData.script().script_.nameOrSourceURL(); } DebuggerScript.getBreakpointNumbers = function(eventData) { var breakpoints = eventData.breakPointsHit(); var numbers = []; if (!breakpoints) return numbers; for (var i = 0; i < breakpoints.length; i++) { var breakpoint = breakpoints[i]; var scriptBreakPoint = breakpoint.script_break_point(); numbers.push(scriptBreakPoint ? scriptBreakPoint.number() : breakpoint.number()); } return numbers; } DebuggerScript.isEvalCompilation = function(eventData) { var script = eventData.script(); return (script.compilationType() === Debug.ScriptCompilationType.Eval); } // NOTE: This function is performance critical, as it can be run on every // statement that generates an async event (like addEventListener) to support // asynchronous call stacks. Thus, when possible, initialize the data lazily. DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame, scopeDetailsLevel) { // Stuff that can not be initialized lazily (i.e. valid while paused with a valid break_id). // The frameMirror and scopeMirror can be accessed only while paused on the debugger. var frameDetails = frameMirror.details(); var funcObject = frameDetails.func(); var sourcePosition = frameDetails.sourcePosition(); var thisObject = frameDetails.receiver(); var isAtReturn = !!frameDetails.isAtReturn(); var returnValue = isAtReturn ? frameDetails.returnValue() : undefined; var scopeMirrors = (scopeDetailsLevel === DebuggerScript.ScopeInfoDetails.NoScopes ? [] : frameMirror.allScopes(scopeDetailsLevel === DebuggerScript.ScopeInfoDetails.FastAsyncScopes)); var scopeTypes = new Array(scopeMirrors.length); var scopeObjects = new Array(scopeMirrors.length); var scopeNames = new Array(scopeMirrors.length); for (var i = 0; i < scopeMirrors.length; ++i) { var scopeDetails = scopeMirrors[i].details(); scopeTypes[i] = scopeDetails.type(); scopeObjects[i] = scopeDetails.object(); scopeNames[i] = scopeDetails.name(); } // Calculated lazily. var scopeChain; var funcMirror; var location; function lazyScopeChain() { if (!scopeChain) { scopeChain = []; for (var i = 0, j = 0; i < scopeObjects.length; ++i) { var scopeObject = DebuggerScript._buildScopeObject(scopeTypes[i], scopeObjects[i], scopeNames[i]); if (scopeObject) { scopeTypes[j] = scopeTypes[i]; scopeNames[j] = scopeNames[i]; scopeChain[j] = scopeObject; ++j; } } scopeTypes.length = scopeChain.length; scopeNames.length = scopeChain.length; scopeObjects = null; // Free for GC. } return scopeChain; } function lazyScopeTypes() { if (!scopeChain) lazyScopeChain(); return scopeTypes; } function lazyScopeNames() { if (!scopeChain) lazyScopeChain(); return scopeNames; } function ensureFuncMirror() { if (!funcMirror) { funcMirror = MakeMirror(funcObject); if (!funcMirror.isFunction()) funcMirror = new UnresolvedFunctionMirror(funcObject); } return funcMirror; } function ensureLocation() { if (!location) { var script = ensureFuncMirror().script(); if (script) location = script.locationFromPosition(sourcePosition, true); if (!location) location = { line: 0, column: 0 }; } return location; } function line() { return ensureLocation().line; } function column() { return ensureLocation().column; } function sourceID() { var script = ensureFuncMirror().script(); return script && script.id(); } function scriptName() { var script = ensureFuncMirror().script(); return script && script.name(); } function functionName() { return ensureFuncMirror().debugName(); } function functionLine() { var location = ensureFuncMirror().sourceLocation(); return location ? location.line : 0; } function functionColumn() { var location = ensureFuncMirror().sourceLocation(); return location ? location.column : 0; } function evaluate(expression, scopeExtension) { return frameMirror.evaluate(expression, false, scopeExtension).value(); } function restart() { return frameMirror.restart(); } function setVariableValue(scopeNumber, variableName, newValue) { return DebuggerScript._setScopeVariableValue(frameMirror, scopeNumber, variableName, newValue); } function stepInPositions() { var stepInPositionsV8 = frameMirror.stepInPositions(); var stepInPositionsProtocol; if (stepInPositionsV8) { stepInPositionsProtocol = []; var script = ensureFuncMirror().script(); if (script) { var scriptId = String(script.id()); for (var i = 0; i < stepInPositionsV8.length; i++) { var item = { scriptId: scriptId, lineNumber: stepInPositionsV8[i].position.line, columnNumber: stepInPositionsV8[i].position.column }; stepInPositionsProtocol.push(item); } } } return JSON.stringify(stepInPositionsProtocol); } return { "sourceID": sourceID, "line": line, "column": column, "scriptName": scriptName, "functionName": functionName, "functionLine": functionLine, "functionColumn": functionColumn, "thisObject": thisObject, "scopeChain": lazyScopeChain, "scopeType": lazyScopeTypes, "scopeName": lazyScopeNames, "evaluate": evaluate, "caller": callerFrame, "restart": restart, "setVariableValue": setVariableValue, "stepInPositions": stepInPositions, "isAtReturn": isAtReturn, "returnValue": returnValue }; } DebuggerScript._buildScopeObject = function(scopeType, scopeObject) { var result; switch (scopeType) { case ScopeType.Local: case ScopeType.Closure: case ScopeType.Catch: case ScopeType.Block: case ScopeType.Script: // For transient objects we create a "persistent" copy that contains // the same properties. // Reset scope object prototype to null so that the proto properties // don't appear in the local scope section. var properties = MakeMirror(scopeObject, true /* transient */).properties(); // Almost always Script scope will be empty, so just filter out that noise. // Also drop empty Block scopes, should we get any. if (!properties.length && (scopeType === ScopeType.Script || scopeType === ScopeType.Block)) break; result = { __proto__: null }; for (var j = 0; j < properties.length; j++) { var name = properties[j].name(); if (name.charAt(0) === ".") continue; // Skip internal variables like ".arguments" result[name] = properties[j].value_; } break; case ScopeType.Global: case ScopeType.With: result = scopeObject; break; } return result; } DebuggerScript.getPromiseDetails = function(eventData) { return { "promise": eventData.promise().value(), "parentPromise": eventData.parentPromise().value(), "status": eventData.status() }; } // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirrors in the cache we disable it. ToggleMirrorCache(false); return DebuggerScript; })(); /** * This is a placeholder to create the * IDR_PRIVATE_SCRIPT_DOCUMENTEXECCOMMAND_JS resource. * * It will be replaced by a complete file in: * https://codereview.chromium.org/530663002/ */ /* Copyright 2014 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ div.header { border-bottom: 2px solid black; padding-bottom: 5px; margin: 10px; } div.collapsible > div.hidden { display:none; } .pretty-print { margin-top: 1em; margin-left: 20px; font-family: monospace; font-size: 13px; } #webkit-xml-viewer-source-xml { display: none; } .collapsible-content { margin-left: 1em; } .comment { white-space: pre; } .button { -webkit-user-select: none; cursor: pointer; display: inline-block; margin-left: -10px; width: 10px; background-repeat: no-repeat; background-position: left top; vertical-align: bottom; } .collapse-button { background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#909090' width='10' height='10'><path d='M0 0 L8 0 L4 7 Z'/></svg>"); height: 10px; } .expand-button { background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#909090' width='10' height='10'><path d='M0 0 L0 8 L7 4 Z'/></svg>"); height: 10px; } // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. "use strict"; var xmlTreeViewerCSS = privateScriptController.import("DocumentXMLTreeViewer.css"); privateScriptController.installClass("Document", function(DocumentPrototype) { var nodeParentPairs = []; var tree; function prepareWebKitXMLViewer(noStyleMessage) { var html = createHTMLElement('html'); var head = createHTMLElement('head'); html.appendChild(head); var style = createHTMLElement('style'); style.id = 'xml-viewer-style'; style.appendChild(document.createTextNode(xmlTreeViewerCSS)); head.appendChild(style); var body = createHTMLElement('body'); html.appendChild(body); var sourceXML = createHTMLElement('div'); sourceXML.id = 'webkit-xml-viewer-source-xml'; body.appendChild(sourceXML); var child; while (child = document.firstChild) { document.removeChild(child); if (child.nodeType != Node.DOCUMENT_TYPE_NODE) sourceXML.appendChild(child); } document.appendChild(html); var header = createHTMLElement('div'); body.appendChild(header); header.classList.add('header'); var headerSpan = createHTMLElement('span'); header.appendChild(headerSpan); headerSpan.textContent = noStyleMessage; header.appendChild(createHTMLElement('br')); tree = createHTMLElement('div'); body.appendChild(tree); tree.classList.add('pretty-print'); window.onload = sourceXMLLoaded; } function sourceXMLLoaded() { var sourceXML = document.getElementById('webkit-xml-viewer-source-xml'); if (!sourceXML) return; // Stop if some XML tree extension is already processing this document for (var child = sourceXML.firstChild; child; child = child.nextSibling) nodeParentPairs.push({parentElement: tree, node: child}); for (var i = 0; i < nodeParentPairs.length; i++) processNode(nodeParentPairs[i].parentElement, nodeParentPairs[i].node); initButtons(); return false; } // Tree processing. function processNode(parentElement, node) { var map = processNode.processorsMap; if (!map) { map = {}; processNode.processorsMap = map; map[Node.PROCESSING_INSTRUCTION_NODE] = processProcessingInstruction; map[Node.ELEMENT_NODE] = processElement; map[Node.COMMENT_NODE] = processComment; map[Node.TEXT_NODE] = processText; map[Node.CDATA_SECTION_NODE] = processCDATA; } if (processNode.processorsMap[node.nodeType]) processNode.processorsMap[node.nodeType].call(this, parentElement, node); } function processElement(parentElement, node) { if (!node.firstChild) processEmptyElement(parentElement, node); else { var child = node.firstChild; if (child.nodeType == Node.TEXT_NODE && isShort(child.nodeValue) && !child.nextSibling) processShortTextOnlyElement(parentElement, node); else processComplexElement(parentElement, node); } } function processEmptyElement(parentElement, node) { var line = createLine(); line.appendChild(createTag(node, false, true)); parentElement.appendChild(line); } function processShortTextOnlyElement(parentElement, node) { var line = createLine(); line.appendChild(createTag(node, false, false)); for (var child = node.firstChild; child; child = child.nextSibling) line.appendChild(createText(child.nodeValue)); line.appendChild(createTag(node, true, false)); parentElement.appendChild(line); } function processComplexElement(parentElement, node) { var collapsible = createCollapsible(); collapsible.expanded.start.appendChild(createTag(node, false, false)); for (var child = node.firstChild; child; child = child.nextSibling) nodeParentPairs.push({parentElement: collapsible.expanded.content, node: child}); collapsible.expanded.end.appendChild(createTag(node, true, false)); collapsible.collapsed.content.appendChild(createTag(node, false, false)); collapsible.collapsed.content.appendChild(createText('...')); collapsible.collapsed.content.appendChild(createTag(node, true, false)); parentElement.appendChild(collapsible); } function processComment(parentElement, node) { if (isShort(node.nodeValue)) { var line = createLine(); line.appendChild(createComment('<!-- ' + node.nodeValue + ' -->')); parentElement.appendChild(line); } else { var collapsible = createCollapsible(); collapsible.expanded.start.appendChild(createComment('<!--')); collapsible.expanded.content.appendChild(createComment(node.nodeValue)); collapsible.expanded.end.appendChild(createComment('-->')); collapsible.collapsed.content.appendChild(createComment('<!--')); collapsible.collapsed.content.appendChild(createComment('...')); collapsible.collapsed.content.appendChild(createComment('-->')); parentElement.appendChild(collapsible); } } function processCDATA(parentElement, node) { if (isShort(node.nodeValue)) { var line = createLine(); line.appendChild(createText('<![CDATA[ ' + node.nodeValue + ' ]]>')); parentElement.appendChild(line); } else { var collapsible = createCollapsible(); collapsible.expanded.start.appendChild(createText('<![CDATA[')); collapsible.expanded.content.appendChild(createText(node.nodeValue)); collapsible.expanded.end.appendChild(createText(']]>')); collapsible.collapsed.content.appendChild(createText('<![CDATA[')); collapsible.collapsed.content.appendChild(createText('...')); collapsible.collapsed.content.appendChild(createText(']]>')); parentElement.appendChild(collapsible); } } function processProcessingInstruction(parentElement, node) { if (isShort(node.nodeValue)) { var line = createLine(); line.appendChild(createComment('<?' + node.nodeName + ' ' + node.nodeValue + '?>')); parentElement.appendChild(line); } else { var collapsible = createCollapsible(); collapsible.expanded.start.appendChild(createComment('<?' + node.nodeName)); collapsible.expanded.content.appendChild(createComment(node.nodeValue)); collapsible.expanded.end.appendChild(createComment('?>')); collapsible.collapsed.content.appendChild(createComment('<?' + node.nodeName)); collapsible.collapsed.content.appendChild(createComment('...')); collapsible.collapsed.content.appendChild(createComment('?>')); parentElement.appendChild(collapsible); } } function processText(parentElement, node) { parentElement.appendChild(createText(node.nodeValue)); } // Processing utils. function trim(value) { return value.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function isShort(value) { return trim(value).length <= 50; } // Tree rendering. function createHTMLElement(elementName) { return document.createElementNS('http://www.w3.org/1999/xhtml', elementName) } function createCollapsible() { var collapsible = createHTMLElement('div'); collapsible.classList.add('collapsible'); collapsible.expanded = createHTMLElement('div'); collapsible.expanded.classList.add('expanded'); collapsible.appendChild(collapsible.expanded); collapsible.expanded.start = createLine(); collapsible.expanded.start.appendChild(createCollapseButton()); collapsible.expanded.appendChild(collapsible.expanded.start); collapsible.expanded.content = createHTMLElement('div'); collapsible.expanded.content.classList.add('collapsible-content'); collapsible.expanded.appendChild(collapsible.expanded.content); collapsible.expanded.end = createLine(); collapsible.expanded.appendChild(collapsible.expanded.end); collapsible.collapsed = createHTMLElement('div'); collapsible.collapsed.classList.add('collapsed'); collapsible.collapsed.classList.add('hidden'); collapsible.appendChild(collapsible.collapsed); collapsible.collapsed.content = createLine(); collapsible.collapsed.content.appendChild(createExpandButton()); collapsible.collapsed.appendChild(collapsible.collapsed.content); return collapsible; } function createButton() { var button = createHTMLElement('span'); button.classList.add('button'); return button; } function createCollapseButton(str) { var button = createButton(); button.classList.add('collapse-button'); return button; } function createExpandButton(str) { var button = createButton(); button.classList.add('expand-button'); return button; } function createComment(commentString) { var comment = createHTMLElement('span'); comment.classList.add('comment'); comment.classList.add('html-comment'); comment.textContent = commentString; return comment; } function createText(value) { var text = createHTMLElement('span'); text.textContent = trim(value); text.classList.add('text'); return text; } function createLine() { var line = createHTMLElement('div'); line.classList.add('line'); return line; } function createTag(node, isClosing, isEmpty) { var tag = createHTMLElement('span'); tag.classList.add('html-tag'); var stringBeforeAttrs = '<'; if (isClosing) stringBeforeAttrs += '/'; stringBeforeAttrs += node.nodeName; var textBeforeAttrs = document.createTextNode(stringBeforeAttrs); tag.appendChild(textBeforeAttrs); if (!isClosing) { for (var i = 0; i < node.attributes.length; i++) tag.appendChild(createAttribute(node.attributes[i])); } var stringAfterAttrs = ''; if (isEmpty) stringAfterAttrs += '/'; stringAfterAttrs += '>'; var textAfterAttrs = document.createTextNode(stringAfterAttrs); tag.appendChild(textAfterAttrs); return tag; } function createAttribute(attributeNode) { var attribute = createHTMLElement('span'); attribute.classList.add('html-attribute'); var attributeName = createHTMLElement('span'); attributeName.classList.add('html-attribute-name'); attributeName.textContent = attributeNode.name; var textBefore = document.createTextNode(' '); var textBetween = document.createTextNode('="'); var attributeValue = createHTMLElement('span'); attributeValue.classList.add('html-attribute-value'); attributeValue.textContent = attributeNode.value; var textAfter = document.createTextNode('"'); attribute.appendChild(textBefore); attribute.appendChild(attributeName); attribute.appendChild(textBetween); attribute.appendChild(attributeValue); attribute.appendChild(textAfter); return attribute; } function expandFunction(sectionId) { return function() { document.querySelector('#' + sectionId + ' > .expanded').className = 'expanded'; document.querySelector('#' + sectionId + ' > .collapsed').className = 'collapsed hidden'; }; } function collapseFunction(sectionId) { return function() { document.querySelector('#' + sectionId + ' > .expanded').className = 'expanded hidden'; document.querySelector('#' + sectionId + ' > .collapsed').className = 'collapsed'; }; } function initButtons() { var sections = document.querySelectorAll('.collapsible'); for (var i = 0; i < sections.length; i++) { var sectionId = 'collapsible' + i; sections[i].id = sectionId; var expandedPart = sections[i].querySelector('#' + sectionId + ' > .expanded'); var collapseButton = expandedPart.querySelector('.collapse-button'); collapseButton.onclick = collapseFunction(sectionId); collapseButton.onmousedown = handleButtonMouseDown; var collapsedPart = sections[i].querySelector('#' + sectionId + ' > .collapsed'); var expandButton = collapsedPart.querySelector('.expand-button'); expandButton.onclick = expandFunction(sectionId); expandButton.onmousedown = handleButtonMouseDown; } } function handleButtonMouseDown(e) { // To prevent selection on double click e.preventDefault(); } DocumentPrototype.transformDocumentToTreeView = function(noStyleMessage) { prepareWebKitXMLViewer(noStyleMessage); } }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; privateScriptController.installClass('HTMLMarqueeElement', function(HTMLMarqueeElementPrototype) { var kDefaultScrollAmount = 6; var kDefaultScrollDelayMS = 85; var kMinimumScrollDelayMS = 60; var kDefaultLoopLimit = -1; var kBehaviorScroll = 'scroll'; var kBehaviorSlide = 'slide'; var kBehaviorAlternate = 'alternate'; var kDirectionLeft = 'left'; var kDirectionRight = 'right'; var kDirectionUp = 'up'; var kDirectionDown = 'down'; var kPresentationalAttributes = [ 'bgcolor', 'height', 'hspace', 'vspace', 'width', ]; function convertHTMLLengthToCSSLength(value) { var match = value.match(/^\s*([\d.]+)(%)?\s*/); if (match) return match[2] === '%' ? match[1] + '%' : match[1] + 'px'; return null; } // FIXME: Consider moving these utility functions to PrivateScriptRunner.js. var kInt32Max = Math.pow(2, 31); function convertToLong(n) { // Using parseInt() is wrong but this aligns with the existing behavior of StringImpl::toInt(). // FIXME: Implement a correct algorithm of the Web IDL value conversion. var value = parseInt(n); if (!isNaN(value) && -kInt32Max <= value && value < kInt32Max) return value; return NaN; } function reflectAttribute(prototype, attributeName, propertyName) { Object.defineProperty(prototype, propertyName, { get: function() { return this.getAttribute(attributeName) || ''; }, set: function(value) { this.setAttribute(attributeName, value); }, configurable: true, enumerable: true, }); } function reflectBooleanAttribute(prototype, attributeName, propertyName) { Object.defineProperty(prototype, propertyName, { get: function() { return this.getAttribute(attributeName); }, set: function(value) { if (value) this.setAttribute(attributeName, ''); else this.removeAttribute(attributeName); }, }); } reflectAttribute(HTMLMarqueeElementPrototype, 'behavior', 'behavior'); reflectAttribute(HTMLMarqueeElementPrototype, 'bgcolor', 'bgColor'); reflectAttribute(HTMLMarqueeElementPrototype, 'direction', 'direction'); reflectAttribute(HTMLMarqueeElementPrototype, 'height', 'height'); reflectAttribute(HTMLMarqueeElementPrototype, 'hspace', 'hspace'); reflectAttribute(HTMLMarqueeElementPrototype, 'vspace', 'vspace'); reflectAttribute(HTMLMarqueeElementPrototype, 'width', 'width'); reflectBooleanAttribute(HTMLMarqueeElementPrototype, 'truespeed', 'trueSpeed'); HTMLMarqueeElementPrototype.createdCallback = function() { var shadow = this.createShadowRoot(); var style = document.createElement('style'); style.textContent = ':host { display: inline-block; width: -webkit-fill-available; overflow: hidden; text-align: initial; white-space: nowrap; }' + ':host([direction="up"]), :host([direction="down"]) { overflow: initial; overflow-y: hidden; white-space: initial; }'; shadow.appendChild(style); var mover = document.createElement('div'); shadow.appendChild(mover); mover.appendChild(document.createElement('content')); this.loopCount_ = 0; this.mover_ = mover; this.player_ = null; this.continueCallback_ = null; }; HTMLMarqueeElementPrototype.attachedCallback = function() { for (var i = 0; i < kPresentationalAttributes.length; ++i) { this.initializeAttribute_(kPresentationalAttributes[i]); } this.start(); }; HTMLMarqueeElementPrototype.detachedCallback = function() { this.stop(); }; HTMLMarqueeElementPrototype.attributeChangedCallback = function(name, oldValue, newValue) { switch (name) { case 'bgcolor': this.style.backgroundColor = newValue; break; case 'height': this.style.height = convertHTMLLengthToCSSLength(newValue); break; case 'hspace': var margin = convertHTMLLengthToCSSLength(newValue); this.style.marginLeft = margin; this.style.marginRight = margin; break; case 'vspace': var margin = convertHTMLLengthToCSSLength(newValue); this.style.marginTop = margin; this.style.marginBottom = margin; break; case 'width': this.style.width = convertHTMLLengthToCSSLength(newValue); break; case 'behavior': case 'direction': case 'loop': case 'scrollAmount': case 'scrollDelay': case 'trueSpeed': // FIXME: Not implemented. break; } }; HTMLMarqueeElementPrototype.initializeAttribute_ = function(name) { var value = this.getAttribute(name); if (value === null) return; this.attributeChangedCallback(name, null, value); }; Object.defineProperty(HTMLMarqueeElementPrototype, 'scrollAmount', { get: function() { var value = this.getAttribute('scrollamount'); var scrollAmount = convertToLong(value); if (isNaN(scrollAmount) || scrollAmount < 0) return kDefaultScrollAmount; return scrollAmount; }, set: function(value) { if (value < 0) privateScriptController.throwException(privateScriptController.DOMException.IndexSizeError, "The provided value (" + value + ") is negative."); this.setAttribute('scrollamount', value); }, }); Object.defineProperty(HTMLMarqueeElementPrototype, 'scrollDelay', { get: function() { var value = this.getAttribute('scrolldelay'); var scrollDelay = convertToLong(value); if (isNaN(scrollDelay) || scrollDelay < 0) return kDefaultScrollDelayMS; return scrollDelay; }, set: function(value) { if (value < 0) privateScriptController.throwException(privateScriptController.DOMException.IndexSizeError, "The provided value (" + value + ") is negative."); this.setAttribute('scrolldelay', value); }, }); Object.defineProperty(HTMLMarqueeElementPrototype, 'loop', { get: function() { var value = this.getAttribute('loop'); var loop = convertToLong(value); if (isNaN(loop) || loop <= 0) return kDefaultLoopLimit; return loop; }, set: function(value) { if (value <= 0 && value != -1) privateScriptController.throwException(privateScriptController.DOMException.IndexSizeError, "The provided value (" + value + ") is neither positive nor -1."); this.setAttribute('loop', value); }, }); HTMLMarqueeElementPrototype.getGetMetrics_ = function() { var direction = this.direction.toLowerCase(); if (direction === 'up' || direction === 'down') this.mover_.style.height = '-webkit-max-content'; else this.mover_.style.width = '-webkit-max-content'; var moverStyle = getComputedStyle(this.mover_); var marqueeStyle = getComputedStyle(this); var metrics = {}; metrics.contentWidth = parseInt(moverStyle.width); metrics.contentHeight = parseInt(moverStyle.height); metrics.marqueeWidth = parseInt(marqueeStyle.width); metrics.marqueeHeight = parseInt(marqueeStyle.height); if (direction === 'up' || direction === 'down') this.mover_.style.height = ''; else this.mover_.style.width = ''; return metrics; }; HTMLMarqueeElementPrototype.getAnimationParameters_ = function() { var metrics = this.getGetMetrics_(); var totalWidth = metrics.marqueeWidth + metrics.contentWidth; var totalHeight = metrics.marqueeHeight + metrics.contentHeight; var innerWidth = metrics.marqueeWidth - metrics.contentWidth; var innerHeight = metrics.marqueeHeight - metrics.contentHeight; var parameters = {}; var direction = this.direction.toLowerCase(); switch (this.behavior) { case kBehaviorScroll: default: switch (direction) { case kDirectionLeft: default: parameters.transformBegin = 'translateX(' + metrics.marqueeWidth + 'px)'; parameters.transformEnd = 'translateX(-' + metrics.contentWidth + 'px)'; parameters.distance = totalWidth; break; case kDirectionRight: parameters.transformBegin = 'translateX(-' + metrics.contentWidth + 'px)'; parameters.transformEnd = 'translateX(' + metrics.marqueeWidth + 'px)'; parameters.distance = totalWidth; break; case kDirectionUp: parameters.transformBegin = 'translateY(' + metrics.marqueeHeight + 'px)'; parameters.transformEnd = 'translateY(-' + metrics.contentHeight + 'px)'; parameters.distance = totalHeight; break; case kDirectionDown: parameters.transformBegin = 'translateY(-' + metrics.contentHeight + 'px)'; parameters.transformEnd = 'translateY(' + metrics.marqueeHeight + 'px)'; parameters.distance = totalHeight; break; } break; case kBehaviorAlternate: switch (direction) { case kDirectionLeft: default: parameters.transformBegin = 'translateX(' + (innerWidth >= 0 ? innerWidth : 0) + 'px)'; parameters.transformEnd = 'translateX(' + (innerWidth >= 0 ? 0 : innerWidth) + 'px)'; parameters.distance = Math.abs(innerWidth); break; case kDirectionRight: parameters.transformBegin = 'translateX(' + (innerWidth >= 0 ? 0 : innerWidth) + 'px)'; parameters.transformEnd = 'translateX(' + (innerWidth >= 0 ? innerWidth : 0) + 'px)'; parameters.distance = Math.abs(innerWidth); break; case kDirectionUp: parameters.transformBegin = 'translateY(' + (innerHeight >= 0 ? innerHeight : 0) + 'px)'; parameters.transformEnd = 'translateY(' + (innerHeight >= 0 ? 0 : innerHeight) + 'px)'; parameters.distance = Math.abs(innerHeight); break; case kDirectionDown: parameters.transformBegin = 'translateY(' + (innerHeight >= 0 ? 0 : innerHeight) + 'px)'; parameters.transformEnd = 'translateY(' + (innerHeight >= 0 ? innerHeight : 0) + 'px)'; parameters.distance = Math.abs(innerHeight); break; } if (this.loopCount_ % 2) { var transform = parameters.transformBegin; parameters.transformBegin = parameters.transformEnd; parameters.transformEnd = transform; } break; case kBehaviorSlide: switch (direction) { case kDirectionLeft: default: parameters.transformBegin = 'translateX(' + metrics.marqueeWidth + 'px)'; parameters.transformEnd = 'translateX(0)'; parameters.distance = metrics.marqueeWidth; break; case kDirectionRight: parameters.transformBegin = 'translateX(-' + metrics.contentWidth + 'px)'; parameters.transformEnd = 'translateX(' + innerWidth + 'px)'; parameters.distance = metrics.marqueeWidth; break; case kDirectionUp: parameters.transformBegin = 'translateY(' + metrics.marqueeHeight + 'px)'; parameters.transformEnd = 'translateY(0)'; parameters.distance = metrics.marqueeHeight; break; case kDirectionDown: parameters.transformBegin = 'translateY(-' + metrics.contentHeight + 'px)'; parameters.transformEnd = 'translateY(' + innerHeight + 'px)'; parameters.distance = metrics.marqueeHeight; break; } break; } return parameters }; function animationFinished_(event) { var player = event.target; var marquee = player.marquee_; marquee.loopCount_++; marquee.start(); }; HTMLMarqueeElementPrototype.shouldContinue_ = function() { var loop = this.loop; // By default, slide loops only once. if (loop <= 0 && this.behavior === kBehaviorSlide) loop = 1; if (loop <= 0) return true; return this.loopCount_ < loop; }; HTMLMarqueeElementPrototype.continue_ = function() { if (!this.shouldContinue_()) { return; } if (this.player_ && this.player_.playState === 'paused') { this.player_.play(); return; } var parameters = this.getAnimationParameters_(); var scrollDelay = this.scrollDelay; if (scrollDelay < kMinimumScrollDelayMS && !this.trueSpeed) scrollDelay = kDefaultScrollDelayMS; var player = this.mover_.animate([ { transform: parameters.transformBegin }, { transform: parameters.transformEnd }, ], { duration: this.scrollAmount == 0 ? 0 : parameters.distance * scrollDelay / this.scrollAmount, fill: 'forwards', }); player.marquee_ = this; player.onfinish = animationFinished_; this.player_ = player; }; HTMLMarqueeElementPrototype.start = function() { if (this.continueCallback_) return; this.continueCallback_ = requestAnimationFrame(function() { this.continueCallback_ = null; this.continue_(); }.bind(this)); }; HTMLMarqueeElementPrototype.stop = function() { if (this.continueCallback_) { cancelAnimationFrame(this.continueCallback_); this.continueCallback_ = null; return; } if (this.player_) { this.player_.pause(); } }; }); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. "use strict"; function PrivateScriptController() { this._installedClasses = {}; this._DOMException = {}; this._JSError = {}; // This list must be in sync with the enum in ExceptionCode.h. The order matters. var domExceptions = [ "IndexSizeError", "HierarchyRequestError", "WrongDocumentError", "InvalidCharacterError", "NoModificationAllowedError", "NotFoundError", "NotSupportedError", "InUseAttributeError", // Historical. Only used in setAttributeNode etc which have been removed from the DOM specs. // Introduced in DOM Level 2: "InvalidStateError", "SyntaxError", "InvalidModificationError", "NamespaceError", "InvalidAccessError", // Introduced in DOM Level 3: "TypeMismatchError", // Historical; use TypeError instead // XMLHttpRequest extension: "SecurityError", // Others introduced in HTML5: "NetworkError", "AbortError", "URLMismatchError", "QuotaExceededError", "TimeoutError", "InvalidNodeTypeError", "DataCloneError", // These are IDB-specific. "UnknownError", "ConstraintError", "DataError", "TransactionInactiveError", "ReadOnlyError", "VersionError", // File system "NotReadableError", "EncodingError", "PathExistsError", // SQL "SQLDatabaseError", // Naming conflict with DatabaseError class. // Web Crypto "OperationError", // Push API "PermissionDeniedError", ]; // This list must be in sync with the enum in ExceptionCode.h. The order matters. var jsErrors = [ "Error", "TypeError", "RangeError", "SyntaxError", "ReferenceError", ]; var code = 1; domExceptions.forEach(function (exception) { this._DOMException[exception] = code; ++code; }.bind(this)); var code = 1000; jsErrors.forEach(function (exception) { this._JSError[exception] = code; ++code; }.bind(this)); } PrivateScriptController.prototype = { get installedClasses() { return this._installedClasses; }, get DOMException() { return this._DOMException; }, get JSError() { return this._JSError; }, installClass: function(className, implementation) { function PrivateScriptClass() { } if (!(className in this._installedClasses)) this._installedClasses[className] = new PrivateScriptClass(); implementation(this._installedClasses[className]); }, // Private scripts can throw JS errors and DOM exceptions as follows: // throwException(privateScriptController.DOMException.IndexSizeError, "..."); // throwException(privateScriptController.JSError.TypeError, "..."); // // Note that normal JS errors thrown by private scripts are treated // as real JS errors caused by programming mistake and the execution crashes. // If you want to intentially throw JS errors from private scripts, // you need to use throwException(privateScriptController.JSError.TypeError, "..."). throwException: function(code, message) { function PrivateScriptException() { } var exception = new PrivateScriptException(); exception.code = code; exception.message = message; exception.name = "PrivateScriptException"; throw exception; }, } if (typeof window.privateScriptController === 'undefined') window.privateScriptController = new PrivateScriptController(); // This line must be the last statement of this JS file. // A parenthesis is needed, because the caller of this script (PrivateScriptRunner.cpp) // is depending on the completion value of this script. (privateScriptController.installedClasses); "use strict"; /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @param {!string} id */ function $(id) { return document.getElementById(id); } /** * @param {!string} tagName * @param {string=} opt_class * @param {string=} opt_text * @return {!Element} */ function createElement(tagName, opt_class, opt_text) { var element = document.createElement(tagName); if (opt_class) element.setAttribute("class", opt_class); if (opt_text) element.appendChild(document.createTextNode(opt_text)); return element; } /** * @constructor * @param {!number|Rectangle|Object} xOrRect * @param {!number} y * @param {!number} width * @param {!number} height */ function Rectangle(xOrRect, y, width, height) { if (typeof xOrRect === "object") { y = xOrRect.y; width = xOrRect.width; height = xOrRect.height; xOrRect = xOrRect.x; } this.x = xOrRect; this.y = y; this.width = width; this.height = height; } Rectangle.prototype = { get maxX() { return this.x + this.width; }, get maxY() { return this.y + this.height; }, toString: function() { return "Rectangle(" + this.x + "," + this.y + "," + this.width + "," + this.height + ")"; } }; /** * @param {!Rectangle} rect1 * @param {!Rectangle} rect2 * @return {?Rectangle} */ Rectangle.intersection = function(rect1, rect2) { var x = Math.max(rect1.x, rect2.x); var maxX = Math.min(rect1.maxX, rect2.maxX); var y = Math.max(rect1.y, rect2.y); var maxY = Math.min(rect1.maxY, rect2.maxY); var width = maxX - x; var height = maxY - y; if (width < 0 || height < 0) return null; return new Rectangle(x, y, width, height); }; /** * @param {!number} width in CSS pixel * @param {!number} height in CSS pixel */ function resizeWindow(width, height) { var zoom = global.params.zoomFactor ? global.params.zoomFactor : 1; setWindowRect(adjustWindowRect(width * zoom, height * zoom, width * zoom, height * zoom)); } /** * @param {!number} width in physical pixel * @param {!number} height in physical pixel * @param {?number} minWidth in physical pixel * @param {?number} minHeight in physical pixel * @return {!Rectangle} Adjusted rectangle with physical pixels */ function adjustWindowRect(width, height, minWidth, minHeight) { if (typeof minWidth !== "number") minWidth = 0; if (typeof minHeight !== "number") minHeight = 0; var windowRect = new Rectangle(0, 0, Math.ceil(width), Math.ceil(height)); if (!global.params.anchorRectInScreen) return windowRect; var anchorRect = new Rectangle(global.params.anchorRectInScreen); var availRect = new Rectangle(window.screen.availLeft, window.screen.availTop, window.screen.availWidth, window.screen.availHeight); _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeight); _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth); return windowRect; } /** * Arguments are physical pixels. */ function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeight) { var availableSpaceAbove = anchorRect.y - availRect.y; availableSpaceAbove = Math.max(0, Math.min(availRect.height, availableSpaceAbove)); var availableSpaceBelow = availRect.maxY - anchorRect.maxY; availableSpaceBelow = Math.max(0, Math.min(availRect.height, availableSpaceBelow)); if (windowRect.height > availableSpaceBelow && availableSpaceBelow < availableSpaceAbove) { windowRect.height = Math.min(windowRect.height, availableSpaceAbove); windowRect.height = Math.max(windowRect.height, minHeight); windowRect.y = anchorRect.y - windowRect.height; } else { windowRect.height = Math.min(windowRect.height, availableSpaceBelow); windowRect.height = Math.max(windowRect.height, minHeight); windowRect.y = anchorRect.maxY; } } /** * Arguments are physical pixels. */ function _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth) { windowRect.width = Math.min(windowRect.width, availRect.width); windowRect.width = Math.max(windowRect.width, minWidth); windowRect.x = anchorRect.x; // If we are getting clipped, we want to switch alignment to the right side // of the anchor rect as long as doing so will make the popup not clipped. var rightAlignedX = windowRect.x + anchorRect.width - windowRect.width; if (rightAlignedX >= availRect.x && (windowRect.maxX > availRect.maxX || global.params.isRTL)) windowRect.x = rightAlignedX; } /** * @param {!Rectangle} rect Window position and size with physical pixels. */ function setWindowRect(rect) { if (window.frameElement) { window.frameElement.style.width = rect.width + "px"; window.frameElement.style.height = rect.height + "px"; } else { window.pagePopupController.setWindowRect(rect.x, rect.y, rect.width, rect.height); } } function hideWindow() { setWindowRect(adjustWindowRect(1, 1, 1, 1)); } /** * @return {!boolean} */ function isWindowHidden() { // window.innerWidth and innerHeight are zoom-adjusted values. If we call // setWindowRect with width=100 and the zoom-level is 2.0, innerWidth will // return 50. return window.innerWidth <= 1 && window.innerHeight <= 1; } window.addEventListener("resize", function() { if (isWindowHidden()) window.dispatchEvent(new CustomEvent("didHide")); else window.dispatchEvent(new CustomEvent("didOpenPicker")); }, false); /** * @return {!number} */ function getScrollbarWidth() { if (typeof window.scrollbarWidth === "undefined") { var scrollDiv = document.createElement("div"); scrollDiv.style.opacity = "0"; scrollDiv.style.overflow = "scroll"; scrollDiv.style.width = "50px"; scrollDiv.style.height = "50px"; document.body.appendChild(scrollDiv); window.scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; scrollDiv.parentNode.removeChild(scrollDiv); } return window.scrollbarWidth; } /** * @param {!string} className * @return {?Element} */ function enclosingNodeOrSelfWithClass(selfNode, className) { for (var node = selfNode; node && node !== selfNode.ownerDocument; node = node.parentNode) { if (node.nodeType === Node.ELEMENT_NODE && node.classList.contains(className)) return node; } return null; } /** * @constructor */ function EventEmitter() { }; /** * @param {!string} type * @param {!function({...*})} callback */ EventEmitter.prototype.on = function(type, callback) { console.assert(callback instanceof Function); if (!this._callbacks) this._callbacks = {}; if (!this._callbacks[type]) this._callbacks[type] = []; this._callbacks[type].push(callback); }; EventEmitter.prototype.hasListener = function(type) { if (!this._callbacks) return false; var callbacksForType = this._callbacks[type]; if (!callbacksForType) return false; return callbacksForType.length > 0; }; /** * @param {!string} type * @param {!function(Object)} callback */ EventEmitter.prototype.removeListener = function(type, callback) { if (!this._callbacks) return; var callbacksForType = this._callbacks[type]; if (!callbacksForType) return; callbacksForType.splice(callbacksForType.indexOf(callback), 1); if (callbacksForType.length === 0) delete this._callbacks[type]; }; /** * @param {!string} type * @param {...*} var_args */ EventEmitter.prototype.dispatchEvent = function(type) { if (!this._callbacks) return; var callbacksForType = this._callbacks[type]; if (!callbacksForType) return; callbacksForType = callbacksForType.slice(0); for (var i = 0; i < callbacksForType.length; ++i) { callbacksForType[i].apply(this, Array.prototype.slice.call(arguments, 1)); } }; /** * @constructor * @extends EventEmitter * @param {!Element} element * @param {!Object} config */ function Picker(element, config) { this._element = element; this._config = config; } Picker.prototype = Object.create(EventEmitter.prototype); /** * @enum {number} */ Picker.Actions = { SetValue: 0, Cancel: -1, ChooseOtherColor: -2 }; /** * @param {!string} value */ Picker.prototype.submitValue = function(value) { window.pagePopupController.setValue(value); window.pagePopupController.closePopup(); }; Picker.prototype.handleCancel = function() { window.pagePopupController.closePopup(); }; Picker.prototype.chooseOtherColor = function() { window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherColor, ""); }; Picker.prototype.cleanup = function() {}; window.addEventListener("keyup", function(event) { // JAWS dispatches extra Alt events and unless we handle them they move the // focus and close the popup. if (event.keyIdentifier === "Alt") event.preventDefault(); }, true); /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ body { -webkit-user-select: none; background-color: white; font: -webkit-small-control; margin: 0; overflow: hidden; } .rtl { direction: rtl; } /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ body { -webkit-user-select: none; background-color: white; font: -webkit-control; font-size: 12px; } .rtl { direction: rtl; } .scroll-view { overflow: hidden; width: 0; height: 0; } .list-cell { position: absolute; left: 0; top: 0; width: 0; height: 0; } .list-cell.hidden { display: none; } .week-number-cell, .day-cell { position: static; text-align: center; box-sizing: border-box; display: inline-block; cursor: default; transition: color 1s; padding: 1px; } .week-number-cell { box-sizing: border-box; color: black; padding-right: 0; box-shadow: 1px 0 0 #bfbfbf; margin-right: 1px; } .day-cell { color: #bfbfbf; } .day-cell.highlighted.today, .day-cell.today { border: 1px solid #bfbfbf; padding: 0; } .week-number-cell.highlighted, .day-cell.highlighted { background-color: #e5ecf8; } .week-number-cell.highlighted.disabled, .day-cell.highlighted.disabled { border: 1px solid #e5ecf8; padding: 0; } .week-number-cell.selected, .day-cell.selected { background-color: #bccdec; } .week-number-cell.disabled, .day-cell.disabled { background-color: #f5f5f5; } .day-cell.current-month { color: #000000; } .calendar-table-view { border: 1px solid #bfbfbf; outline: none; } .week-number-label, .week-day-label { text-align: center; display: inline-block; line-height: 23px; padding-top: 1px; box-sizing: padding-box; } .week-number-label { box-sizing: border-box; border-right: 1px solid #bfbfbf; } .calendar-table-header-view { background-color: #f5f5f5; border-bottom: 1px solid #bfbfbf; height: 24px; } .calendar-picker { border: 1px solid #bfbfbf; border-radius: 2px; position: absolute; padding: 10px; background-color: white; overflow: hidden; cursor: default; } .calendar-header-view { margin-bottom: 10px; display: flex; flex-flow: row; } .calendar-title { -webkit-align-self: center; flex: 1; text-align: left; } .rtl .calendar-title { text-align: right; } .month-popup-button, .month-popup-button:hover, .month-popup-button:disabled { background-color: transparent !important; background-image: none !important; box-shadow: none !important; color: black; } .month-popup-button:disabled { opacity: 0.7; } .month-popup-button { font-size: 12px; padding: 4px; display: inline-block; cursor: default; border: 1px solid transparent !important; height: 24px !important; } .month-popup-button .disclosure-triangle { margin: 0 6px; } .month-popup-button .disclosure-triangle svg { padding-bottom: 2px; } .today-button::after { content: ""; display: block; border-radius: 3px; width: 6px; height: 6px; background-color: #6e6e6e; margin: 0 auto; } .calendar-navigation-button { -webkit-align-self: center; width: 24px; height: 24px; min-width: 0 !important; padding-left: 0 !important; padding-right: 0 !important; -webkit-margin-start: 4px !important; } .year-list-view { border: 1px solid #bfbfbf; background-color: white; position: absolute; } .year-list-cell { box-sizing: border-box; border-bottom: 1px solid #bfbfbf; background-color: white; overflow: hidden; } .year-list-cell .label { height: 24px; line-height: 24px; -webkit-padding-start: 8px; background-color: #f5f5f5; border-bottom: 1px solid #bfbfbf; } .year-list-cell .month-chooser { padding: 0; } .month-buttons-row { display: flex; } .month-button { flex: 1; height: 32px; line-height: 32px; padding: 0 !important; margin: 0 !important; background-image: none !important; background-color: #ffffff; border-width: 0 !important; box-shadow: none !important; text-align: center; } .month-button.highlighted { background-color: #e5ecf8; } .month-button[aria-disabled="true"] { color: GrayText; } .scrubby-scroll-bar { width: 14px; height: 60px; background-color: white; border-left: 1px solid #bfbfbf; position: absolute; top: 0; } .scrubby-scroll-thumb { width: 10px; margin: 2px; height: 30px; background-color: #d8d8d8; position: absolute; left: 0; top: 0; } .month-popup-view { position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .year-list-view .scrubby-scroll-bar { right: 0; } .rtl .year-list-view .scrubby-scroll-bar { left: 0; right: auto; border-left-width: 0; border-right: 1px solid #bfbfbf; } .year-month-button { width: 24px; height: 24px; min-width: 0; padding: 0; } .month-popup-button:focus, .year-list-view:focus, .calendar-table-view:focus { transition: border-color 200ms; /* We use border color because it follows the border radius (unlike outline). * This is particularly noticeable on mac. */ border-color: rgb(77, 144, 254) !important; outline: none; } .preparing button:focus, .preparing .year-list-view:focus, .preparing .calendar-table-view:focus { transition: none; } "use strict"; /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @enum {number} */ var WeekDay = { Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday: 6 }; /** * @type {Object} */ var global = { picker: null, params: { locale: "en-US", weekStartDay: WeekDay.Sunday, dayLabels: ["S", "M", "T", "W", "T", "F", "S"], shortMonthLabels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"], isLocaleRTL: false, mode: "date", weekLabel: "Week", anchorRectInScreen: new Rectangle(0, 0, 0, 0), currentValue: null } }; // ---------------------------------------------------------------- // Utility functions /** * @return {!boolean} */ function hasInaccuratePointingDevice() { return matchMedia("(pointer: coarse)").matches; } /** * @return {!string} lowercase locale name. e.g. "en-us" */ function getLocale() { return (global.params.locale || "en-us").toLowerCase(); } /** * @return {!string} lowercase language code. e.g. "en" */ function getLanguage() { var locale = getLocale(); var result = locale.match(/^([a-z]+)/); if (!result) return "en"; return result[1]; } /** * @param {!number} number * @return {!string} */ function localizeNumber(number) { return window.pagePopupController.localizeNumberString(number); } /** * @const * @type {number} */ var ImperialEraLimit = 2087; /** * @param {!number} year * @param {!number} month * @return {!string} */ function formatJapaneseImperialEra(year, month) { // We don't show an imperial era if it is greater than 99 becase of space // limitation. if (year > ImperialEraLimit) return ""; if (year > 1989) return "(\u5e73\u6210" + localizeNumber(year - 1988) + "\u5e74)"; if (year == 1989) return "(\u5e73\u6210\u5143\u5e74)"; if (year >= 1927) return "(\u662d\u548c" + localizeNumber(year - 1925) + "\u5e74)"; if (year > 1912) return "(\u5927\u6b63" + localizeNumber(year - 1911) + "\u5e74)"; if (year == 1912 && month >= 7) return "(\u5927\u6b63\u5143\u5e74)"; if (year > 1868) return "(\u660e\u6cbb" + localizeNumber(year - 1867) + "\u5e74)"; if (year == 1868) return "(\u660e\u6cbb\u5143\u5e74)"; return ""; } function createUTCDate(year, month, date) { var newDate = new Date(0); newDate.setUTCFullYear(year); newDate.setUTCMonth(month); newDate.setUTCDate(date); return newDate; } /** * @param {string} dateString * @return {?Day|Week|Month} */ function parseDateString(dateString) { var month = Month.parse(dateString); if (month) return month; var week = Week.parse(dateString); if (week) return week; return Day.parse(dateString); } /** * @const * @type {number} */ var DaysPerWeek = 7; /** * @const * @type {number} */ var MonthsPerYear = 12; /** * @const * @type {number} */ var MillisecondsPerDay = 24 * 60 * 60 * 1000; /** * @const * @type {number} */ var MillisecondsPerWeek = DaysPerWeek * MillisecondsPerDay; /** * @constructor */ function DateType() { } /** * @constructor * @extends DateType * @param {!number} year * @param {!number} month * @param {!number} date */ function Day(year, month, date) { var dateObject = createUTCDate(year, month, date); if (isNaN(dateObject.valueOf())) throw "Invalid date"; /** * @type {number} * @const */ this.year = dateObject.getUTCFullYear(); /** * @type {number} * @const */ this.month = dateObject.getUTCMonth(); /** * @type {number} * @const */ this.date = dateObject.getUTCDate(); }; Day.prototype = Object.create(DateType.prototype); Day.ISOStringRegExp = /^(\d+)-(\d+)-(\d+)/; /** * @param {!string} str * @return {?Day} */ Day.parse = function(str) { var match = Day.ISOStringRegExp.exec(str); if (!match) return null; var year = parseInt(match[1], 10); var month = parseInt(match[2], 10) - 1; var date = parseInt(match[3], 10); return new Day(year, month, date); }; /** * @param {!number} value * @return {!Day} */ Day.createFromValue = function(millisecondsSinceEpoch) { return Day.createFromDate(new Date(millisecondsSinceEpoch)) }; /** * @param {!Date} date * @return {!Day} */ Day.createFromDate = function(date) { if (isNaN(date.valueOf())) throw "Invalid date"; return new Day(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()); }; /** * @param {!Day} day * @return {!Day} */ Day.createFromDay = function(day) { return day; }; /** * @return {!Day} */ Day.createFromToday = function() { var now = new Date(); return new Day(now.getFullYear(), now.getMonth(), now.getDate()); }; /** * @param {!DateType} other * @return {!boolean} */ Day.prototype.equals = function(other) { return other instanceof Day && this.year === other.year && this.month === other.month && this.date === other.date; }; /** * @param {!number=} offset * @return {!Day} */ Day.prototype.previous = function(offset) { if (typeof offset === "undefined") offset = 1; return new Day(this.year, this.month, this.date - offset); }; /** * @param {!number=} offset * @return {!Day} */ Day.prototype.next = function(offset) { if (typeof offset === "undefined") offset = 1; return new Day(this.year, this.month, this.date + offset); }; /** * @return {!Date} */ Day.prototype.startDate = function() { return createUTCDate(this.year, this.month, this.date); }; /** * @return {!Date} */ Day.prototype.endDate = function() { return createUTCDate(this.year, this.month, this.date + 1); }; /** * @return {!Day} */ Day.prototype.firstDay = function() { return this; }; /** * @return {!Day} */ Day.prototype.middleDay = function() { return this; }; /** * @return {!Day} */ Day.prototype.lastDay = function() { return this; }; /** * @return {!number} */ Day.prototype.valueOf = function() { return createUTCDate(this.year, this.month, this.date).getTime(); }; /** * @return {!WeekDay} */ Day.prototype.weekDay = function() { return createUTCDate(this.year, this.month, this.date).getUTCDay(); }; /** * @return {!string} */ Day.prototype.toString = function() { var yearString = String(this.year); if (yearString.length < 4) yearString = ("000" + yearString).substr(-4, 4); return yearString + "-" + ("0" + (this.month + 1)).substr(-2, 2) + "-" + ("0" + this.date).substr(-2, 2); }; /** * @return {!string} */ Day.prototype.format = function() { if (!Day.formatter) { Day.formatter = new Intl.DateTimeFormat(getLocale(), { weekday: "long", year: "numeric", month: "long", day: "numeric", timeZone: "UTC" }); } return Day.formatter.format(this.startDate()); }; // See WebCore/platform/DateComponents.h. Day.Minimum = Day.createFromValue(-62135596800000.0); Day.Maximum = Day.createFromValue(8640000000000000.0); // See WebCore/html/DayInputType.cpp. Day.DefaultStep = 86400000; Day.DefaultStepBase = 0; /** * @constructor * @extends DateType * @param {!number} year * @param {!number} week */ function Week(year, week) { /** * @type {number} * @const */ this.year = year; /** * @type {number} * @const */ this.week = week; // Number of years per year is either 52 or 53. if (this.week < 1 || (this.week > 52 && this.week > Week.numberOfWeeksInYear(this.year))) { var normalizedWeek = Week.createFromDay(this.firstDay()); this.year = normalizedWeek.year; this.week = normalizedWeek.week; } } Week.ISOStringRegExp = /^(\d+)-[wW](\d+)$/; // See WebCore/platform/DateComponents.h. Week.Minimum = new Week(1, 1); Week.Maximum = new Week(275760, 37); // See WebCore/html/WeekInputType.cpp. Week.DefaultStep = 604800000; Week.DefaultStepBase = -259200000; Week.EpochWeekDay = createUTCDate(1970, 0, 0).getUTCDay(); /** * @param {!string} str * @return {?Week} */ Week.parse = function(str) { var match = Week.ISOStringRegExp.exec(str); if (!match) return null; var year = parseInt(match[1], 10); var week = parseInt(match[2], 10); return new Week(year, week); }; /** * @param {!number} millisecondsSinceEpoch * @return {!Week} */ Week.createFromValue = function(millisecondsSinceEpoch) { return Week.createFromDate(new Date(millisecondsSinceEpoch)) }; /** * @param {!Date} date * @return {!Week} */ Week.createFromDate = function(date) { if (isNaN(date.valueOf())) throw "Invalid date"; var year = date.getUTCFullYear(); if (year <= Week.Maximum.year && Week.weekOneStartDateForYear(year + 1).getTime() <= date.getTime()) year++; else if (year > 1 && Week.weekOneStartDateForYear(year).getTime() > date.getTime()) year--; var week = 1 + Week._numberOfWeeksSinceDate(Week.weekOneStartDateForYear(year), date); return new Week(year, week); }; /** * @param {!Day} day * @return {!Week} */ Week.createFromDay = function(day) { var year = day.year; if (year <= Week.Maximum.year && Week.weekOneStartDayForYear(year + 1) <= day) year++; else if (year > 1 && Week.weekOneStartDayForYear(year) > day) year--; var week = Math.floor(1 + (day.valueOf() - Week.weekOneStartDayForYear(year).valueOf()) / MillisecondsPerWeek); return new Week(year, week); }; /** * @return {!Week} */ Week.createFromToday = function() { var now = new Date(); return Week.createFromDate(createUTCDate(now.getFullYear(), now.getMonth(), now.getDate())); }; /** * @param {!number} year * @return {!Date} */ Week.weekOneStartDateForYear = function(year) { if (year < 1) return createUTCDate(1, 0, 1); // The week containing January 4th is week one. var yearStartDay = createUTCDate(year, 0, 4).getUTCDay(); return createUTCDate(year, 0, 4 - (yearStartDay + 6) % DaysPerWeek); }; /** * @param {!number} year * @return {!Day} */ Week.weekOneStartDayForYear = function(year) { if (year < 1) return Day.Minimum; // The week containing January 4th is week one. var yearStartDay = createUTCDate(year, 0, 4).getUTCDay(); return new Day(year, 0, 4 - (yearStartDay + 6) % DaysPerWeek); }; /** * @param {!number} year * @return {!number} */ Week.numberOfWeeksInYear = function(year) { if (year < 1 || year > Week.Maximum.year) return 0; else if (year === Week.Maximum.year) return Week.Maximum.week; return Week._numberOfWeeksSinceDate(Week.weekOneStartDateForYear(year), Week.weekOneStartDateForYear(year + 1)); }; /** * @param {!Date} baseDate * @param {!Date} date * @return {!number} */ Week._numberOfWeeksSinceDate = function(baseDate, date) { return Math.floor((date.getTime() - baseDate.getTime()) / MillisecondsPerWeek); }; /** * @param {!DateType} other * @return {!boolean} */ Week.prototype.equals = function(other) { return other instanceof Week && this.year === other.year && this.week === other.week; }; /** * @param {!number=} offset * @return {!Week} */ Week.prototype.previous = function(offset) { if (typeof offset === "undefined") offset = 1; return new Week(this.year, this.week - offset); }; /** * @param {!number=} offset * @return {!Week} */ Week.prototype.next = function(offset) { if (typeof offset === "undefined") offset = 1; return new Week(this.year, this.week + offset); }; /** * @return {!Date} */ Week.prototype.startDate = function() { var weekStartDate = Week.weekOneStartDateForYear(this.year); weekStartDate.setUTCDate(weekStartDate.getUTCDate() + (this.week - 1) * 7); return weekStartDate; }; /** * @return {!Date} */ Week.prototype.endDate = function() { if (this.equals(Week.Maximum)) return Day.Maximum.startDate(); return this.next().startDate(); }; /** * @return {!Day} */ Week.prototype.firstDay = function() { var weekOneStartDay = Week.weekOneStartDayForYear(this.year); return weekOneStartDay.next((this.week - 1) * DaysPerWeek); }; /** * @return {!Day} */ Week.prototype.middleDay = function() { return this.firstDay().next(3); }; /** * @return {!Day} */ Week.prototype.lastDay = function() { if (this.equals(Week.Maximum)) return Day.Maximum; return this.next().firstDay().previous(); }; /** * @return {!number} */ Week.prototype.valueOf = function() { return this.firstDay().valueOf() - createUTCDate(1970, 0, 1).getTime(); }; /** * @return {!string} */ Week.prototype.toString = function() { var yearString = String(this.year); if (yearString.length < 4) yearString = ("000" + yearString).substr(-4, 4); return yearString + "-W" + ("0" + this.week).substr(-2, 2); }; /** * @constructor * @extends DateType * @param {!number} year * @param {!number} month */ function Month(year, month) { /** * @type {number} * @const */ this.year = year + Math.floor(month / MonthsPerYear); /** * @type {number} * @const */ this.month = month % MonthsPerYear < 0 ? month % MonthsPerYear + MonthsPerYear : month % MonthsPerYear; }; Month.ISOStringRegExp = /^(\d+)-(\d+)$/; // See WebCore/platform/DateComponents.h. Month.Minimum = new Month(1, 0); Month.Maximum = new Month(275760, 8); // See WebCore/html/MonthInputType.cpp. Month.DefaultStep = 1; Month.DefaultStepBase = 0; /** * @param {!string} str * @return {?Month} */ Month.parse = function(str) { var match = Month.ISOStringRegExp.exec(str); if (!match) return null; var year = parseInt(match[1], 10); var month = parseInt(match[2], 10) - 1; return new Month(year, month); }; /** * @param {!number} value * @return {!Month} */ Month.createFromValue = function(monthsSinceEpoch) { return new Month(1970, monthsSinceEpoch) }; /** * @param {!Date} date * @return {!Month} */ Month.createFromDate = function(date) { if (isNaN(date.valueOf())) throw "Invalid date"; return new Month(date.getUTCFullYear(), date.getUTCMonth()); }; /** * @param {!Day} day * @return {!Month} */ Month.createFromDay = function(day) { return new Month(day.year, day.month); }; /** * @return {!Month} */ Month.createFromToday = function() { var now = new Date(); return new Month(now.getFullYear(), now.getMonth()); }; /** * @return {!boolean} */ Month.prototype.containsDay = function(day) { return this.year === day.year && this.month === day.month; }; /** * @param {!Month} other * @return {!boolean} */ Month.prototype.equals = function(other) { return other instanceof Month && this.year === other.year && this.month === other.month; }; /** * @param {!number=} offset * @return {!Month} */ Month.prototype.previous = function(offset) { if (typeof offset === "undefined") offset = 1; return new Month(this.year, this.month - offset); }; /** * @param {!number=} offset * @return {!Month} */ Month.prototype.next = function(offset) { if (typeof offset === "undefined") offset = 1; return new Month(this.year, this.month + offset); }; /** * @return {!Date} */ Month.prototype.startDate = function() { return createUTCDate(this.year, this.month, 1); }; /** * @return {!Date} */ Month.prototype.endDate = function() { if (this.equals(Month.Maximum)) return Day.Maximum.startDate(); return this.next().startDate(); }; /** * @return {!Day} */ Month.prototype.firstDay = function() { return new Day(this.year, this.month, 1); }; /** * @return {!Day} */ Month.prototype.middleDay = function() { return new Day(this.year, this.month, this.month === 2 ? 14 : 15); }; /** * @return {!Day} */ Month.prototype.lastDay = function() { if (this.equals(Month.Maximum)) return Day.Maximum; return this.next().firstDay().previous(); }; /** * @return {!number} */ Month.prototype.valueOf = function() { return (this.year - 1970) * MonthsPerYear + this.month; }; /** * @return {!string} */ Month.prototype.toString = function() { var yearString = String(this.year); if (yearString.length < 4) yearString = ("000" + yearString).substr(-4, 4); return yearString + "-" + ("0" + (this.month + 1)).substr(-2, 2); }; /** * @return {!string} */ Month.prototype.toLocaleString = function() { if (global.params.locale === "ja") return "" + this.year + "\u5e74" + formatJapaneseImperialEra(this.year, this.month) + " " + (this.month + 1) + "\u6708"; return window.pagePopupController.formatMonth(this.year, this.month); }; /** * @return {!string} */ Month.prototype.toShortLocaleString = function() { return window.pagePopupController.formatShortMonth(this.year, this.month); }; // ---------------------------------------------------------------- // Initialization /** * @param {Event} event */ function handleMessage(event) { if (global.argumentsReceived) return; global.argumentsReceived = true; initialize(JSON.parse(event.data)); } /** * @param {!Object} params */ function setGlobalParams(params) { var name; for (name in global.params) { if (typeof params[name] === "undefined") console.warn("Missing argument: " + name); } for (name in params) { global.params[name] = params[name]; } }; /** * @param {!Object} args */ function initialize(args) { setGlobalParams(args); if (global.params.suggestionValues && global.params.suggestionValues.length) openSuggestionPicker(); else openCalendarPicker(); } function closePicker() { if (global.picker) global.picker.cleanup(); var main = $("main"); main.innerHTML = ""; main.className = ""; }; function openSuggestionPicker() { closePicker(); global.picker = new SuggestionPicker($("main"), global.params); }; function openCalendarPicker() { closePicker(); global.picker = new CalendarPicker(global.params.mode, global.params); global.picker.attachTo($("main")); }; // Parameter t should be a number between 0 and 1. var AnimationTimingFunction = { Linear: function(t){ return t; }, EaseInOut: function(t){ t *= 2; if (t < 1) return Math.pow(t, 3) / 2; t -= 2; return Math.pow(t, 3) / 2 + 1; } }; /** * @constructor * @extends EventEmitter */ function AnimationManager() { EventEmitter.call(this); this._isRunning = false; this._runningAnimatorCount = 0; this._runningAnimators = {}; this._animationFrameCallbackBound = this._animationFrameCallback.bind(this); } AnimationManager.prototype = Object.create(EventEmitter.prototype); AnimationManager.EventTypeAnimationFrameWillFinish = "animationFrameWillFinish"; AnimationManager.prototype._startAnimation = function() { if (this._isRunning) return; this._isRunning = true; window.requestAnimationFrame(this._animationFrameCallbackBound); }; AnimationManager.prototype._stopAnimation = function() { if (!this._isRunning) return; this._isRunning = false; }; /** * @param {!Animator} animator */ AnimationManager.prototype.add = function(animator) { if (this._runningAnimators[animator.id]) return; this._runningAnimators[animator.id] = animator; this._runningAnimatorCount++; if (this._needsTimer()) this._startAnimation(); }; /** * @param {!Animator} animator */ AnimationManager.prototype.remove = function(animator) { if (!this._runningAnimators[animator.id]) return; delete this._runningAnimators[animator.id]; this._runningAnimatorCount--; if (!this._needsTimer()) this._stopAnimation(); }; AnimationManager.prototype._animationFrameCallback = function(now) { if (this._runningAnimatorCount > 0) { for (var id in this._runningAnimators) { this._runningAnimators[id].onAnimationFrame(now); } } this.dispatchEvent(AnimationManager.EventTypeAnimationFrameWillFinish); if (this._isRunning) window.requestAnimationFrame(this._animationFrameCallbackBound); }; /** * @return {!boolean} */ AnimationManager.prototype._needsTimer = function() { return this._runningAnimatorCount > 0 || this.hasListener(AnimationManager.EventTypeAnimationFrameWillFinish); }; /** * @param {!string} type * @param {!Function} callback * @override */ AnimationManager.prototype.on = function(type, callback) { EventEmitter.prototype.on.call(this, type, callback); if (this._needsTimer()) this._startAnimation(); }; /** * @param {!string} type * @param {!Function} callback * @override */ AnimationManager.prototype.removeListener = function(type, callback) { EventEmitter.prototype.removeListener.call(this, type, callback); if (!this._needsTimer()) this._stopAnimation(); }; AnimationManager.shared = new AnimationManager(); /** * @constructor * @extends EventEmitter */ function Animator() { EventEmitter.call(this); /** * @type {!number} * @const */ this.id = Animator._lastId++; /** * @type {!number} */ this.duration = 100; /** * @type {?function} */ this.step = null; /** * @type {!boolean} * @protected */ this._isRunning = false; /** * @type {!number} */ this.currentValue = 0; /** * @type {!number} * @protected */ this._lastStepTime = 0; } Animator.prototype = Object.create(EventEmitter.prototype); Animator._lastId = 0; Animator.EventTypeDidAnimationStop = "didAnimationStop"; /** * @return {!boolean} */ Animator.prototype.isRunning = function() { return this._isRunning; }; Animator.prototype.start = function() { this._lastStepTime = performance.now(); this._isRunning = true; AnimationManager.shared.add(this); }; Animator.prototype.stop = function() { if (!this._isRunning) return; this._isRunning = false; AnimationManager.shared.remove(this); this.dispatchEvent(Animator.EventTypeDidAnimationStop, this); }; /** * @param {!number} now */ Animator.prototype.onAnimationFrame = function(now) { this._lastStepTime = now; this.step(this); }; /** * @constructor * @extends Animator */ function TransitionAnimator() { Animator.call(this); /** * @type {!number} * @protected */ this._from = 0; /** * @type {!number} * @protected */ this._to = 0; /** * @type {!number} * @protected */ this._delta = 0; /** * @type {!number} */ this.progress = 0.0; /** * @type {!function} */ this.timingFunction = AnimationTimingFunction.Linear; } TransitionAnimator.prototype = Object.create(Animator.prototype); /** * @param {!number} value */ TransitionAnimator.prototype.setFrom = function(value) { this._from = value; this._delta = this._to - this._from; }; TransitionAnimator.prototype.start = function() { console.assert(isFinite(this.duration)); this.progress = 0.0; this.currentValue = this._from; Animator.prototype.start.call(this); }; /** * @param {!number} value */ TransitionAnimator.prototype.setTo = function(value) { this._to = value; this._delta = this._to - this._from; }; /** * @param {!number} now */ TransitionAnimator.prototype.onAnimationFrame = function(now) { this.progress += (now - this._lastStepTime) / this.duration; this.progress = Math.min(1.0, this.progress); this._lastStepTime = now; this.currentValue = this.timingFunction(this.progress) * this._delta + this._from; this.step(this); if (this.progress === 1.0) { this.stop(); return; } }; /** * @constructor * @extends Animator * @param {!number} initialVelocity * @param {!number} initialValue */ function FlingGestureAnimator(initialVelocity, initialValue) { Animator.call(this); /** * @type {!number} */ this.initialVelocity = initialVelocity; /** * @type {!number} */ this.initialValue = initialValue; /** * @type {!number} * @protected */ this._elapsedTime = 0; var startVelocity = Math.abs(this.initialVelocity); if (startVelocity > this._velocityAtTime(0)) startVelocity = this._velocityAtTime(0); if (startVelocity < 0) startVelocity = 0; /** * @type {!number} * @protected */ this._timeOffset = this._timeAtVelocity(startVelocity); /** * @type {!number} * @protected */ this._positionOffset = this._valueAtTime(this._timeOffset); /** * @type {!number} */ this.duration = this._timeAtVelocity(0); } FlingGestureAnimator.prototype = Object.create(Animator.prototype); // Velocity is subject to exponential decay. These parameters are coefficients // that determine the curve. FlingGestureAnimator._P0 = -5707.62; FlingGestureAnimator._P1 = 0.172; FlingGestureAnimator._P2 = 0.0037; /** * @param {!number} t */ FlingGestureAnimator.prototype._valueAtTime = function(t) { return FlingGestureAnimator._P0 * Math.exp(-FlingGestureAnimator._P2 * t) - FlingGestureAnimator._P1 * t - FlingGestureAnimator._P0; }; /** * @param {!number} t */ FlingGestureAnimator.prototype._velocityAtTime = function(t) { return -FlingGestureAnimator._P0 * FlingGestureAnimator._P2 * Math.exp(-FlingGestureAnimator._P2 * t) - FlingGestureAnimator._P1; }; /** * @param {!number} v */ FlingGestureAnimator.prototype._timeAtVelocity = function(v) { return -Math.log((v + FlingGestureAnimator._P1) / (-FlingGestureAnimator._P0 * FlingGestureAnimator._P2)) / FlingGestureAnimator._P2; }; FlingGestureAnimator.prototype.start = function() { this._lastStepTime = performance.now(); Animator.prototype.start.call(this); }; /** * @param {!number} now */ FlingGestureAnimator.prototype.onAnimationFrame = function(now) { this._elapsedTime += now - this._lastStepTime; this._lastStepTime = now; if (this._elapsedTime + this._timeOffset >= this.duration) { this.stop(); return; } var position = this._valueAtTime(this._elapsedTime + this._timeOffset) - this._positionOffset; if (this.initialVelocity < 0) position = -position; this.currentValue = position + this.initialValue; this.step(this); }; /** * @constructor * @extends EventEmitter * @param {?Element} element * View adds itself as a property on the element so we can access it from Event.target. */ function View(element) { EventEmitter.call(this); /** * @type {Element} * @const */ this.element = element || createElement("div"); this.element.$view = this; this.bindCallbackMethods(); } View.prototype = Object.create(EventEmitter.prototype); /** * @param {!Element} ancestorElement * @return {?Object} */ View.prototype.offsetRelativeTo = function(ancestorElement) { var x = 0; var y = 0; var element = this.element; while (element) { x += element.offsetLeft || 0; y += element.offsetTop || 0; element = element.offsetParent; if (element === ancestorElement) return {x: x, y: y}; } return null; }; /** * @param {!View|Node} parent * @param {?View|Node=} before */ View.prototype.attachTo = function(parent, before) { if (parent instanceof View) return this.attachTo(parent.element, before); if (typeof before === "undefined") before = null; if (before instanceof View) before = before.element; parent.insertBefore(this.element, before); }; View.prototype.bindCallbackMethods = function() { for (var methodName in this) { if (!/^on[A-Z]/.test(methodName)) continue; if (this.hasOwnProperty(methodName)) continue; var method = this[methodName]; if (!(method instanceof Function)) continue; this[methodName] = method.bind(this); } }; /** * @constructor * @extends View */ function ScrollView() { View.call(this, createElement("div", ScrollView.ClassNameScrollView)); /** * @type {Element} * @const */ this.contentElement = createElement("div", ScrollView.ClassNameScrollViewContent); this.element.appendChild(this.contentElement); /** * @type {number} */ this.minimumContentOffset = -Infinity; /** * @type {number} */ this.maximumContentOffset = Infinity; /** * @type {number} * @protected */ this._contentOffset = 0; /** * @type {number} * @protected */ this._width = 0; /** * @type {number} * @protected */ this._height = 0; /** * @type {Animator} * @protected */ this._scrollAnimator = null; /** * @type {?Object} */ this.delegate = null; /** * @type {!number} */ this._lastTouchPosition = 0; /** * @type {!number} */ this._lastTouchVelocity = 0; /** * @type {!number} */ this._lastTouchTimeStamp = 0; this.element.addEventListener("mousewheel", this.onMouseWheel, false); this.element.addEventListener("touchstart", this.onTouchStart, false); /** * The content offset is partitioned so the it can go beyond the CSS limit * of 33554433px. * @type {number} * @protected */ this._partitionNumber = 0; } ScrollView.prototype = Object.create(View.prototype); ScrollView.PartitionHeight = 100000; ScrollView.ClassNameScrollView = "scroll-view"; ScrollView.ClassNameScrollViewContent = "scroll-view-content"; /** * @param {!Event} event */ ScrollView.prototype.onTouchStart = function(event) { var touch = event.touches[0]; this._lastTouchPosition = touch.clientY; this._lastTouchVelocity = 0; this._lastTouchTimeStamp = event.timeStamp; if (this._scrollAnimator) this._scrollAnimator.stop(); window.addEventListener("touchmove", this.onWindowTouchMove, false); window.addEventListener("touchend", this.onWindowTouchEnd, false); }; /** * @param {!Event} event */ ScrollView.prototype.onWindowTouchMove = function(event) { var touch = event.touches[0]; var deltaTime = event.timeStamp - this._lastTouchTimeStamp; var deltaY = this._lastTouchPosition - touch.clientY; this.scrollBy(deltaY, false); this._lastTouchVelocity = deltaY / deltaTime; this._lastTouchPosition = touch.clientY; this._lastTouchTimeStamp = event.timeStamp; event.stopPropagation(); event.preventDefault(); }; /** * @param {!Event} event */ ScrollView.prototype.onWindowTouchEnd = function(event) { if (Math.abs(this._lastTouchVelocity) > 0.01) { this._scrollAnimator = new FlingGestureAnimator(this._lastTouchVelocity, this._contentOffset); this._scrollAnimator.step = this.onFlingGestureAnimatorStep; this._scrollAnimator.start(); } window.removeEventListener("touchmove", this.onWindowTouchMove, false); window.removeEventListener("touchend", this.onWindowTouchEnd, false); }; /** * @param {!Animator} animator */ ScrollView.prototype.onFlingGestureAnimatorStep = function(animator) { this.scrollTo(animator.currentValue, false); }; /** * @return {!Animator} */ ScrollView.prototype.scrollAnimator = function() { return this._scrollAnimator; }; /** * @param {!number} width */ ScrollView.prototype.setWidth = function(width) { console.assert(isFinite(width)); if (this._width === width) return; this._width = width; this.element.style.width = this._width + "px"; }; /** * @return {!number} */ ScrollView.prototype.width = function() { return this._width; }; /** * @param {!number} height */ ScrollView.prototype.setHeight = function(height) { console.assert(isFinite(height)); if (this._height === height) return; this._height = height; this.element.style.height = height + "px"; if (this.delegate) this.delegate.scrollViewDidChangeHeight(this); }; /** * @return {!number} */ ScrollView.prototype.height = function() { return this._height; }; /** * @param {!Animator} animator */ ScrollView.prototype.onScrollAnimatorStep = function(animator) { this.setContentOffset(animator.currentValue); }; /** * @param {!number} offset * @param {?boolean} animate */ ScrollView.prototype.scrollTo = function(offset, animate) { console.assert(isFinite(offset)); if (!animate) { this.setContentOffset(offset); return; } if (this._scrollAnimator) this._scrollAnimator.stop(); this._scrollAnimator = new TransitionAnimator(); this._scrollAnimator.step = this.onScrollAnimatorStep; this._scrollAnimator.setFrom(this._contentOffset); this._scrollAnimator.setTo(offset); this._scrollAnimator.duration = 300; this._scrollAnimator.start(); }; /** * @param {!number} offset * @param {?boolean} animate */ ScrollView.prototype.scrollBy = function(offset, animate) { this.scrollTo(this._contentOffset + offset, animate); }; /** * @return {!number} */ ScrollView.prototype.contentOffset = function() { return this._contentOffset; }; /** * @param {?Event} event */ ScrollView.prototype.onMouseWheel = function(event) { this.setContentOffset(this._contentOffset - event.wheelDelta / 30); event.stopPropagation(); event.preventDefault(); }; /** * @param {!number} value */ ScrollView.prototype.setContentOffset = function(value) { console.assert(isFinite(value)); value = Math.min(this.maximumContentOffset - this._height, Math.max(this.minimumContentOffset, Math.floor(value))); if (this._contentOffset === value) return; this._contentOffset = value; this._updateScrollContent(); if (this.delegate) this.delegate.scrollViewDidChangeContentOffset(this); }; ScrollView.prototype._updateScrollContent = function() { var newPartitionNumber = Math.floor(this._contentOffset / ScrollView.PartitionHeight); var partitionChanged = this._partitionNumber !== newPartitionNumber; this._partitionNumber = newPartitionNumber; this.contentElement.style.webkitTransform = "translate(0, " + (-this.contentPositionForContentOffset(this._contentOffset)) + "px)"; if (this.delegate && partitionChanged) this.delegate.scrollViewDidChangePartition(this); }; /** * @param {!View|Node} parent * @param {?View|Node=} before * @override */ ScrollView.prototype.attachTo = function(parent, before) { View.prototype.attachTo.call(this, parent, before); this._updateScrollContent(); }; /** * @param {!number} offset */ ScrollView.prototype.contentPositionForContentOffset = function(offset) { return offset - this._partitionNumber * ScrollView.PartitionHeight; }; /** * @constructor * @extends View */ function ListCell() { View.call(this, createElement("div", ListCell.ClassNameListCell)); /** * @type {!number} */ this.row = NaN; /** * @type {!number} */ this._width = 0; /** * @type {!number} */ this._position = 0; } ListCell.prototype = Object.create(View.prototype); ListCell.DefaultRecycleBinLimit = 64; ListCell.ClassNameListCell = "list-cell"; ListCell.ClassNameHidden = "hidden"; /** * @return {!Array} An array to keep thrown away cells. */ ListCell.prototype._recycleBin = function() { console.assert(false, "NOT REACHED: ListCell.prototype._recycleBin needs to be overridden."); return []; }; ListCell.prototype.throwAway = function() { this.hide(); var limit = typeof this.constructor.RecycleBinLimit === "undefined" ? ListCell.DefaultRecycleBinLimit : this.constructor.RecycleBinLimit; var recycleBin = this._recycleBin(); if (recycleBin.length < limit) recycleBin.push(this); }; ListCell.prototype.show = function() { this.element.classList.remove(ListCell.ClassNameHidden); }; ListCell.prototype.hide = function() { this.element.classList.add(ListCell.ClassNameHidden); }; /** * @return {!number} Width in pixels. */ ListCell.prototype.width = function(){ return this._width; }; /** * @param {!number} width Width in pixels. */ ListCell.prototype.setWidth = function(width){ if (this._width === width) return; this._width = width; this.element.style.width = this._width + "px"; }; /** * @return {!number} Position in pixels. */ ListCell.prototype.position = function(){ return this._position; }; /** * @param {!number} y Position in pixels. */ ListCell.prototype.setPosition = function(y) { if (this._position === y) return; this._position = y; this.element.style.webkitTransform = "translate(0, " + this._position + "px)"; }; /** * @param {!boolean} selected */ ListCell.prototype.setSelected = function(selected) { if (this._selected === selected) return; this._selected = selected; if (this._selected) this.element.classList.add("selected"); else this.element.classList.remove("selected"); }; /** * @constructor * @extends View */ function ListView() { View.call(this, createElement("div", ListView.ClassNameListView)); this.element.tabIndex = 0; this.element.setAttribute("role", "grid"); /** * @type {!number} * @private */ this._width = 0; /** * @type {!Object} * @private */ this._cells = {}; /** * @type {!number} */ this.selectedRow = ListView.NoSelection; /** * @type {!ScrollView} */ this.scrollView = new ScrollView(); this.scrollView.delegate = this; this.scrollView.minimumContentOffset = 0; this.scrollView.setWidth(0); this.scrollView.setHeight(0); this.scrollView.attachTo(this); this.element.addEventListener("click", this.onClick, false); /** * @type {!boolean} * @private */ this._needsUpdateCells = false; } ListView.prototype = Object.create(View.prototype); ListView.NoSelection = -1; ListView.ClassNameListView = "list-view"; ListView.prototype.onAnimationFrameWillFinish = function() { if (this._needsUpdateCells) this.updateCells(); }; /** * @param {!boolean} needsUpdateCells */ ListView.prototype.setNeedsUpdateCells = function(needsUpdateCells) { if (this._needsUpdateCells === needsUpdateCells) return; this._needsUpdateCells = needsUpdateCells; if (this._needsUpdateCells) AnimationManager.shared.on(AnimationManager.EventTypeAnimationFrameWillFinish, this.onAnimationFrameWillFinish); else AnimationManager.shared.removeListener(AnimationManager.EventTypeAnimationFrameWillFinish, this.onAnimationFrameWillFinish); }; /** * @param {!number} row * @return {?ListCell} */ ListView.prototype.cellAtRow = function(row) { return this._cells[row]; }; /** * @param {!number} offset Scroll offset in pixels. * @return {!number} */ ListView.prototype.rowAtScrollOffset = function(offset) { console.assert(false, "NOT REACHED: ListView.prototype.rowAtScrollOffset needs to be overridden."); return 0; }; /** * @param {!number} row * @return {!number} Scroll offset in pixels. */ ListView.prototype.scrollOffsetForRow = function(row) { console.assert(false, "NOT REACHED: ListView.prototype.scrollOffsetForRow needs to be overridden."); return 0; }; /** * @param {!number} row * @return {!ListCell} */ ListView.prototype.addCellIfNecessary = function(row) { var cell = this._cells[row]; if (cell) return cell; cell = this.prepareNewCell(row); cell.attachTo(this.scrollView.contentElement); cell.setWidth(this._width); cell.setPosition(this.scrollView.contentPositionForContentOffset(this.scrollOffsetForRow(row))); this._cells[row] = cell; return cell; }; /** * @param {!number} row * @return {!ListCell} */ ListView.prototype.prepareNewCell = function(row) { console.assert(false, "NOT REACHED: ListView.prototype.prepareNewCell should be overridden."); return new ListCell(); }; /** * @param {!ListCell} cell */ ListView.prototype.throwAwayCell = function(cell) { delete this._cells[cell.row]; cell.throwAway(); }; /** * @return {!number} */ ListView.prototype.firstVisibleRow = function() { return this.rowAtScrollOffset(this.scrollView.contentOffset()); }; /** * @return {!number} */ ListView.prototype.lastVisibleRow = function() { return this.rowAtScrollOffset(this.scrollView.contentOffset() + this.scrollView.height() - 1); }; /** * @param {!ScrollView} scrollView */ ListView.prototype.scrollViewDidChangeContentOffset = function(scrollView) { this.setNeedsUpdateCells(true); }; /** * @param {!ScrollView} scrollView */ ListView.prototype.scrollViewDidChangeHeight = function(scrollView) { this.setNeedsUpdateCells(true); }; /** * @param {!ScrollView} scrollView */ ListView.prototype.scrollViewDidChangePartition = function(scrollView) { this.setNeedsUpdateCells(true); }; ListView.prototype.updateCells = function() { var firstVisibleRow = this.firstVisibleRow(); var lastVisibleRow = this.lastVisibleRow(); console.assert(firstVisibleRow <= lastVisibleRow); for (var c in this._cells) { var cell = this._cells[c]; if (cell.row < firstVisibleRow || cell.row > lastVisibleRow) this.throwAwayCell(cell); } for (var i = firstVisibleRow; i <= lastVisibleRow; ++i) { var cell = this._cells[i]; if (cell) cell.setPosition(this.scrollView.contentPositionForContentOffset(this.scrollOffsetForRow(cell.row))); else this.addCellIfNecessary(i); } this.setNeedsUpdateCells(false); }; /** * @return {!number} Width in pixels. */ ListView.prototype.width = function() { return this._width; }; /** * @param {!number} width Width in pixels. */ ListView.prototype.setWidth = function(width) { if (this._width === width) return; this._width = width; this.scrollView.setWidth(this._width); for (var c in this._cells) { this._cells[c].setWidth(this._width); } this.element.style.width = this._width + "px"; this.setNeedsUpdateCells(true); }; /** * @return {!number} Height in pixels. */ ListView.prototype.height = function() { return this.scrollView.height(); }; /** * @param {!number} height Height in pixels. */ ListView.prototype.setHeight = function(height) { this.scrollView.setHeight(height); }; /** * @param {?Event} event */ ListView.prototype.onClick = function(event) { var clickedCellElement = enclosingNodeOrSelfWithClass(event.target, ListCell.ClassNameListCell); if (!clickedCellElement) return; var clickedCell = clickedCellElement.$view; if (clickedCell.row !== this.selectedRow) this.select(clickedCell.row); }; /** * @param {!number} row */ ListView.prototype.select = function(row) { if (this.selectedRow === row) return; this.deselect(); if (row === ListView.NoSelection) return; this.selectedRow = row; var selectedCell = this._cells[this.selectedRow]; if (selectedCell) selectedCell.setSelected(true); }; ListView.prototype.deselect = function() { if (this.selectedRow === ListView.NoSelection) return; var selectedCell = this._cells[this.selectedRow]; if (selectedCell) selectedCell.setSelected(false); this.selectedRow = ListView.NoSelection; }; /** * @param {!number} row * @param {!boolean} animate */ ListView.prototype.scrollToRow = function(row, animate) { this.scrollView.scrollTo(this.scrollOffsetForRow(row), animate); }; /** * @constructor * @extends View * @param {!ScrollView} scrollView */ function ScrubbyScrollBar(scrollView) { View.call(this, createElement("div", ScrubbyScrollBar.ClassNameScrubbyScrollBar)); /** * @type {!Element} * @const */ this.thumb = createElement("div", ScrubbyScrollBar.ClassNameScrubbyScrollThumb); this.element.appendChild(this.thumb); /** * @type {!ScrollView} * @const */ this.scrollView = scrollView; /** * @type {!number} * @protected */ this._height = 0; /** * @type {!number} * @protected */ this._thumbHeight = 0; /** * @type {!number} * @protected */ this._thumbPosition = 0; this.setHeight(0); this.setThumbHeight(ScrubbyScrollBar.ThumbHeight); /** * @type {?Animator} * @protected */ this._thumbStyleTopAnimator = null; /** * @type {?number} * @protected */ this._timer = null; this.element.addEventListener("mousedown", this.onMouseDown, false); this.element.addEventListener("touchstart", this.onTouchStart, false); } ScrubbyScrollBar.prototype = Object.create(View.prototype); ScrubbyScrollBar.ScrollInterval = 16; ScrubbyScrollBar.ThumbMargin = 2; ScrubbyScrollBar.ThumbHeight = 30; ScrubbyScrollBar.ClassNameScrubbyScrollBar = "scrubby-scroll-bar"; ScrubbyScrollBar.ClassNameScrubbyScrollThumb = "scrubby-scroll-thumb"; /** * @param {?Event} event */ ScrubbyScrollBar.prototype.onTouchStart = function(event) { var touch = event.touches[0]; this._setThumbPositionFromEventPosition(touch.clientY); if (this._thumbStyleTopAnimator) this._thumbStyleTopAnimator.stop(); this._timer = setInterval(this.onScrollTimer, ScrubbyScrollBar.ScrollInterval); window.addEventListener("touchmove", this.onWindowTouchMove, false); window.addEventListener("touchend", this.onWindowTouchEnd, false); event.stopPropagation(); event.preventDefault(); }; /** * @param {?Event} event */ ScrubbyScrollBar.prototype.onWindowTouchMove = function(event) { var touch = event.touches[0]; this._setThumbPositionFromEventPosition(touch.clientY); event.stopPropagation(); event.preventDefault(); }; /** * @param {?Event} event */ ScrubbyScrollBar.prototype.onWindowTouchEnd = function(event) { this._thumbStyleTopAnimator = new TransitionAnimator(); this._thumbStyleTopAnimator.step = this.onThumbStyleTopAnimationStep; this._thumbStyleTopAnimator.setFrom(this.thumb.offsetTop); this._thumbStyleTopAnimator.setTo((this._height - this._thumbHeight) / 2); this._thumbStyleTopAnimator.timingFunction = AnimationTimingFunction.EaseInOut; this._thumbStyleTopAnimator.duration = 100; this._thumbStyleTopAnimator.start(); window.removeEventListener("touchmove", this.onWindowTouchMove, false); window.removeEventListener("touchend", this.onWindowTouchEnd, false); clearInterval(this._timer); }; /** * @return {!number} Height of the view in pixels. */ ScrubbyScrollBar.prototype.height = function() { return this._height; }; /** * @param {!number} height Height of the view in pixels. */ ScrubbyScrollBar.prototype.setHeight = function(height) { if (this._height === height) return; this._height = height; this.element.style.height = this._height + "px"; this.thumb.style.top = ((this._height - this._thumbHeight) / 2) + "px"; this._thumbPosition = 0; }; /** * @param {!number} height Height of the scroll bar thumb in pixels. */ ScrubbyScrollBar.prototype.setThumbHeight = function(height) { if (this._thumbHeight === height) return; this._thumbHeight = height; this.thumb.style.height = this._thumbHeight + "px"; this.thumb.style.top = ((this._height - this._thumbHeight) / 2) + "px"; this._thumbPosition = 0; }; /** * @param {number} position */ ScrubbyScrollBar.prototype._setThumbPositionFromEventPosition = function(position) { var thumbMin = ScrubbyScrollBar.ThumbMargin; var thumbMax = this._height - this._thumbHeight - ScrubbyScrollBar.ThumbMargin * 2; var y = position - this.element.getBoundingClientRect().top - this.element.clientTop + this.element.scrollTop; var thumbPosition = y - this._thumbHeight / 2; thumbPosition = Math.max(thumbPosition, thumbMin); thumbPosition = Math.min(thumbPosition, thumbMax); this.thumb.style.top = thumbPosition + "px"; this._thumbPosition = 1.0 - (thumbPosition - thumbMin) / (thumbMax - thumbMin) * 2; }; /** * @param {?Event} event */ ScrubbyScrollBar.prototype.onMouseDown = function(event) { this._setThumbPositionFromEventPosition(event.clientY); window.addEventListener("mousemove", this.onWindowMouseMove, false); window.addEventListener("mouseup", this.onWindowMouseUp, false); if (this._thumbStyleTopAnimator) this._thumbStyleTopAnimator.stop(); this._timer = setInterval(this.onScrollTimer, ScrubbyScrollBar.ScrollInterval); event.stopPropagation(); event.preventDefault(); }; /** * @param {?Event} event */ ScrubbyScrollBar.prototype.onWindowMouseMove = function(event) { this._setThumbPositionFromEventPosition(event.clientY); }; /** * @param {?Event} event */ ScrubbyScrollBar.prototype.onWindowMouseUp = function(event) { this._thumbStyleTopAnimator = new TransitionAnimator(); this._thumbStyleTopAnimator.step = this.onThumbStyleTopAnimationStep; this._thumbStyleTopAnimator.setFrom(this.thumb.offsetTop); this._thumbStyleTopAnimator.setTo((this._height - this._thumbHeight) / 2); this._thumbStyleTopAnimator.timingFunction = AnimationTimingFunction.EaseInOut; this._thumbStyleTopAnimator.duration = 100; this._thumbStyleTopAnimator.start(); window.removeEventListener("mousemove", this.onWindowMouseMove, false); window.removeEventListener("mouseup", this.onWindowMouseUp, false); clearInterval(this._timer); }; /** * @param {!Animator} animator */ ScrubbyScrollBar.prototype.onThumbStyleTopAnimationStep = function(animator) { this.thumb.style.top = animator.currentValue + "px"; }; ScrubbyScrollBar.prototype.onScrollTimer = function() { var scrollAmount = Math.pow(this._thumbPosition, 2) * 10; if (this._thumbPosition > 0) scrollAmount = -scrollAmount; this.scrollView.scrollBy(scrollAmount, false); }; /** * @constructor * @extends ListCell * @param {!Array} shortMonthLabels */ function YearListCell(shortMonthLabels) { ListCell.call(this); this.element.classList.add(YearListCell.ClassNameYearListCell); this.element.style.height = YearListCell.Height + "px"; /** * @type {!Element} * @const */ this.label = createElement("div", YearListCell.ClassNameLabel, "----"); this.element.appendChild(this.label); this.label.style.height = (YearListCell.Height - YearListCell.BorderBottomWidth) + "px"; this.label.style.lineHeight = (YearListCell.Height - YearListCell.BorderBottomWidth) + "px"; /** * @type {!Array} Array of the 12 month button elements. * @const */ this.monthButtons = []; var monthChooserElement = createElement("div", YearListCell.ClassNameMonthChooser); for (var r = 0; r < YearListCell.ButtonRows; ++r) { var buttonsRow = createElement("div", YearListCell.ClassNameMonthButtonsRow); buttonsRow.setAttribute("role", "row"); for (var c = 0; c < YearListCell.ButtonColumns; ++c) { var month = c + r * YearListCell.ButtonColumns; var button = createElement("div", YearListCell.ClassNameMonthButton, shortMonthLabels[month]); button.setAttribute("role", "gridcell"); button.dataset.month = month; buttonsRow.appendChild(button); this.monthButtons.push(button); } monthChooserElement.appendChild(buttonsRow); } this.element.appendChild(monthChooserElement); /** * @type {!boolean} * @private */ this._selected = false; /** * @type {!number} * @private */ this._height = 0; } YearListCell.prototype = Object.create(ListCell.prototype); YearListCell.Height = hasInaccuratePointingDevice() ? 31 : 25; YearListCell.BorderBottomWidth = 1; YearListCell.ButtonRows = 3; YearListCell.ButtonColumns = 4; YearListCell.SelectedHeight = hasInaccuratePointingDevice() ? 127 : 121; YearListCell.ClassNameYearListCell = "year-list-cell"; YearListCell.ClassNameLabel = "label"; YearListCell.ClassNameMonthChooser = "month-chooser"; YearListCell.ClassNameMonthButtonsRow = "month-buttons-row"; YearListCell.ClassNameMonthButton = "month-button"; YearListCell.ClassNameHighlighted = "highlighted"; YearListCell._recycleBin = []; /** * @return {!Array} * @override */ YearListCell.prototype._recycleBin = function() { return YearListCell._recycleBin; }; /** * @param {!number} row */ YearListCell.prototype.reset = function(row) { this.row = row; this.label.textContent = row + 1; for (var i = 0; i < this.monthButtons.length; ++i) { this.monthButtons[i].classList.remove(YearListCell.ClassNameHighlighted); } this.show(); }; /** * @return {!number} The height in pixels. */ YearListCell.prototype.height = function() { return this._height; }; /** * @param {!number} height Height in pixels. */ YearListCell.prototype.setHeight = function(height) { if (this._height === height) return; this._height = height; this.element.style.height = this._height + "px"; }; /** * @constructor * @extends ListView * @param {!Month} minimumMonth * @param {!Month} maximumMonth */ function YearListView(minimumMonth, maximumMonth) { ListView.call(this); this.element.classList.add("year-list-view"); /** * @type {?Month} */ this.highlightedMonth = null; /** * @type {!Month} * @const * @protected */ this._minimumMonth = minimumMonth; /** * @type {!Month} * @const * @protected */ this._maximumMonth = maximumMonth; this.scrollView.minimumContentOffset = (this._minimumMonth.year - 1) * YearListCell.Height; this.scrollView.maximumContentOffset = (this._maximumMonth.year - 1) * YearListCell.Height + YearListCell.SelectedHeight; /** * @type {!Object} * @const * @protected */ this._runningAnimators = {}; /** * @type {!Array} * @const * @protected */ this._animatingRows = []; /** * @type {!boolean} * @protected */ this._ignoreMouseOutUntillNextMouseOver = false; /** * @type {!ScrubbyScrollBar} * @const */ this.scrubbyScrollBar = new ScrubbyScrollBar(this.scrollView); this.scrubbyScrollBar.attachTo(this); this.element.addEventListener("mouseover", this.onMouseOver, false); this.element.addEventListener("mouseout", this.onMouseOut, false); this.element.addEventListener("keydown", this.onKeyDown, false); this.element.addEventListener("touchstart", this.onTouchStart, false); } YearListView.prototype = Object.create(ListView.prototype); YearListView.Height = YearListCell.SelectedHeight - 1; YearListView.EventTypeYearListViewDidHide = "yearListViewDidHide"; YearListView.EventTypeYearListViewDidSelectMonth = "yearListViewDidSelectMonth"; /** * @param {?Event} event */ YearListView.prototype.onTouchStart = function(event) { var touch = event.touches[0]; var monthButtonElement = enclosingNodeOrSelfWithClass(touch.target, YearListCell.ClassNameMonthButton); if (!monthButtonElement) return; var cellElement = enclosingNodeOrSelfWithClass(monthButtonElement, YearListCell.ClassNameYearListCell); var cell = cellElement.$view; this.highlightMonth(new Month(cell.row + 1, parseInt(monthButtonElement.dataset.month, 10))); }; /** * @param {?Event} event */ YearListView.prototype.onMouseOver = function(event) { var monthButtonElement = enclosingNodeOrSelfWithClass(event.target, YearListCell.ClassNameMonthButton); if (!monthButtonElement) return; var cellElement = enclosingNodeOrSelfWithClass(monthButtonElement, YearListCell.ClassNameYearListCell); var cell = cellElement.$view; this.highlightMonth(new Month(cell.row + 1, parseInt(monthButtonElement.dataset.month, 10))); this._ignoreMouseOutUntillNextMouseOver = false; }; /** * @param {?Event} event */ YearListView.prototype.onMouseOut = function(event) { if (this._ignoreMouseOutUntillNextMouseOver) return; var monthButtonElement = enclosingNodeOrSelfWithClass(event.target, YearListCell.ClassNameMonthButton); if (!monthButtonElement) { this.dehighlightMonth(); } }; /** * @param {!number} width Width in pixels. * @override */ YearListView.prototype.setWidth = function(width) { ListView.prototype.setWidth.call(this, width - this.scrubbyScrollBar.element.offsetWidth); this.element.style.width = width + "px"; }; /** * @param {!number} height Height in pixels. * @override */ YearListView.prototype.setHeight = function(height) { ListView.prototype.setHeight.call(this, height); this.scrubbyScrollBar.setHeight(height); }; /** * @enum {number} */ YearListView.RowAnimationDirection = { Opening: 0, Closing: 1 }; /** * @param {!number} row * @param {!YearListView.RowAnimationDirection} direction */ YearListView.prototype._animateRow = function(row, direction) { var fromValue = direction === YearListView.RowAnimationDirection.Closing ? YearListCell.SelectedHeight : YearListCell.Height; var oldAnimator = this._runningAnimators[row]; if (oldAnimator) { oldAnimator.stop(); fromValue = oldAnimator.currentValue; } var cell = this.cellAtRow(row); var animator = new TransitionAnimator(); animator.step = this.onCellHeightAnimatorStep; animator.setFrom(fromValue); animator.setTo(direction === YearListView.RowAnimationDirection.Opening ? YearListCell.SelectedHeight : YearListCell.Height); animator.timingFunction = AnimationTimingFunction.EaseInOut; animator.duration = 300; animator.row = row; animator.on(Animator.EventTypeDidAnimationStop, this.onCellHeightAnimatorDidStop); this._runningAnimators[row] = animator; this._animatingRows.push(row); this._animatingRows.sort(); animator.start(); }; /** * @param {?Animator} animator */ YearListView.prototype.onCellHeightAnimatorDidStop = function(animator) { delete this._runningAnimators[animator.row]; var index = this._animatingRows.indexOf(animator.row); this._animatingRows.splice(index, 1); }; /** * @param {!Animator} animator */ YearListView.prototype.onCellHeightAnimatorStep = function(animator) { var cell = this.cellAtRow(animator.row); if (cell) cell.setHeight(animator.currentValue); this.updateCells(); }; /** * @param {?Event} event */ YearListView.prototype.onClick = function(event) { var oldSelectedRow = this.selectedRow; ListView.prototype.onClick.call(this, event); var year = this.selectedRow + 1; if (this.selectedRow !== oldSelectedRow) { var month = this.highlightedMonth ? this.highlightedMonth.month : 0; this.dispatchEvent(YearListView.EventTypeYearListViewDidSelectMonth, this, new Month(year, month)); this.scrollView.scrollTo(this.selectedRow * YearListCell.Height, true); } else { var monthButton = enclosingNodeOrSelfWithClass(event.target, YearListCell.ClassNameMonthButton); if (!monthButton || monthButton.getAttribute("aria-disabled") == "true") return; var month = parseInt(monthButton.dataset.month, 10); this.dispatchEvent(YearListView.EventTypeYearListViewDidSelectMonth, this, new Month(year, month)); this.hide(); } }; /** * @param {!number} scrollOffset * @return {!number} * @override */ YearListView.prototype.rowAtScrollOffset = function(scrollOffset) { var remainingOffset = scrollOffset; var lastAnimatingRow = 0; var rowsWithIrregularHeight = this._animatingRows.slice(); if (this.selectedRow > -1 && !this._runningAnimators[this.selectedRow]) { rowsWithIrregularHeight.push(this.selectedRow); rowsWithIrregularHeight.sort(); } for (var i = 0; i < rowsWithIrregularHeight.length; ++i) { var row = rowsWithIrregularHeight[i]; var animator = this._runningAnimators[row]; var rowHeight = animator ? animator.currentValue : YearListCell.SelectedHeight; if (remainingOffset <= (row - lastAnimatingRow) * YearListCell.Height) { return lastAnimatingRow + Math.floor(remainingOffset / YearListCell.Height); } remainingOffset -= (row - lastAnimatingRow) * YearListCell.Height; if (remainingOffset <= (rowHeight - YearListCell.Height)) return row; remainingOffset -= rowHeight - YearListCell.Height; lastAnimatingRow = row; } return lastAnimatingRow + Math.floor(remainingOffset / YearListCell.Height); }; /** * @param {!number} row * @return {!number} * @override */ YearListView.prototype.scrollOffsetForRow = function(row) { var scrollOffset = row * YearListCell.Height; for (var i = 0; i < this._animatingRows.length; ++i) { var animatingRow = this._animatingRows[i]; if (animatingRow >= row) break; var animator = this._runningAnimators[animatingRow]; scrollOffset += animator.currentValue - YearListCell.Height; } if (this.selectedRow > -1 && this.selectedRow < row && !this._runningAnimators[this.selectedRow]) { scrollOffset += YearListCell.SelectedHeight - YearListCell.Height; } return scrollOffset; }; /** * @param {!number} row * @return {!YearListCell} * @override */ YearListView.prototype.prepareNewCell = function(row) { var cell = YearListCell._recycleBin.pop() || new YearListCell(global.params.shortMonthLabels); cell.reset(row); cell.setSelected(this.selectedRow === row); for (var i = 0; i < cell.monthButtons.length; ++i) { var month = new Month(row + 1, i); cell.monthButtons[i].id = month.toString(); cell.monthButtons[i].setAttribute("aria-disabled", this._minimumMonth > month || this._maximumMonth < month ? "true" : "false"); cell.monthButtons[i].setAttribute("aria-label", month.toLocaleString()); } if (this.highlightedMonth && row === this.highlightedMonth.year - 1) { var monthButton = cell.monthButtons[this.highlightedMonth.month]; monthButton.classList.add(YearListCell.ClassNameHighlighted); // aira-activedescendant assumes both elements have layoutObjects, and // |monthButton| might have no layoutObject yet. var element = this.element; setTimeout(function() { element.setAttribute("aria-activedescendant", monthButton.id); }, 0); } var animator = this._runningAnimators[row]; if (animator) cell.setHeight(animator.currentValue); else if (row === this.selectedRow) cell.setHeight(YearListCell.SelectedHeight); else cell.setHeight(YearListCell.Height); return cell; }; /** * @override */ YearListView.prototype.updateCells = function() { var firstVisibleRow = this.firstVisibleRow(); var lastVisibleRow = this.lastVisibleRow(); console.assert(firstVisibleRow <= lastVisibleRow); for (var c in this._cells) { var cell = this._cells[c]; if (cell.row < firstVisibleRow || cell.row > lastVisibleRow) this.throwAwayCell(cell); } for (var i = firstVisibleRow; i <= lastVisibleRow; ++i) { var cell = this._cells[i]; if (cell) cell.setPosition(this.scrollView.contentPositionForContentOffset(this.scrollOffsetForRow(cell.row))); else this.addCellIfNecessary(i); } this.setNeedsUpdateCells(false); }; /** * @override */ YearListView.prototype.deselect = function() { if (this.selectedRow === ListView.NoSelection) return; var selectedCell = this._cells[this.selectedRow]; if (selectedCell) selectedCell.setSelected(false); this._animateRow(this.selectedRow, YearListView.RowAnimationDirection.Closing); this.selectedRow = ListView.NoSelection; this.setNeedsUpdateCells(true); }; YearListView.prototype.deselectWithoutAnimating = function() { if (this.selectedRow === ListView.NoSelection) return; var selectedCell = this._cells[this.selectedRow]; if (selectedCell) { selectedCell.setSelected(false); selectedCell.setHeight(YearListCell.Height); } this.selectedRow = ListView.NoSelection; this.setNeedsUpdateCells(true); }; /** * @param {!number} row * @override */ YearListView.prototype.select = function(row) { if (this.selectedRow === row) return; this.deselect(); if (row === ListView.NoSelection) return; this.selectedRow = row; if (this.selectedRow !== ListView.NoSelection) { var selectedCell = this._cells[this.selectedRow]; this._animateRow(this.selectedRow, YearListView.RowAnimationDirection.Opening); if (selectedCell) selectedCell.setSelected(true); var month = this.highlightedMonth ? this.highlightedMonth.month : 0; this.highlightMonth(new Month(this.selectedRow + 1, month)); } this.setNeedsUpdateCells(true); }; /** * @param {!number} row */ YearListView.prototype.selectWithoutAnimating = function(row) { if (this.selectedRow === row) return; this.deselectWithoutAnimating(); if (row === ListView.NoSelection) return; this.selectedRow = row; if (this.selectedRow !== ListView.NoSelection) { var selectedCell = this._cells[this.selectedRow]; if (selectedCell) { selectedCell.setSelected(true); selectedCell.setHeight(YearListCell.SelectedHeight); } var month = this.highlightedMonth ? this.highlightedMonth.month : 0; this.highlightMonth(new Month(this.selectedRow + 1, month)); } this.setNeedsUpdateCells(true); }; /** * @param {!Month} month * @return {?HTMLDivElement} */ YearListView.prototype.buttonForMonth = function(month) { if (!month) return null; var row = month.year - 1; var cell = this.cellAtRow(row); if (!cell) return null; return cell.monthButtons[month.month]; }; YearListView.prototype.dehighlightMonth = function() { if (!this.highlightedMonth) return; var monthButton = this.buttonForMonth(this.highlightedMonth); if (monthButton) { monthButton.classList.remove(YearListCell.ClassNameHighlighted); } this.highlightedMonth = null; this.element.removeAttribute("aria-activedescendant"); }; /** * @param {!Month} month */ YearListView.prototype.highlightMonth = function(month) { if (this.highlightedMonth && this.highlightedMonth.equals(month)) return; this.dehighlightMonth(); this.highlightedMonth = month; if (!this.highlightedMonth) return; var monthButton = this.buttonForMonth(this.highlightedMonth); if (monthButton) { monthButton.classList.add(YearListCell.ClassNameHighlighted); this.element.setAttribute("aria-activedescendant", monthButton.id); } }; /** * @param {!Month} month */ YearListView.prototype.show = function(month) { this._ignoreMouseOutUntillNextMouseOver = true; this.scrollToRow(month.year - 1, false); this.selectWithoutAnimating(month.year - 1); this.highlightMonth(month); }; YearListView.prototype.hide = function() { this.dispatchEvent(YearListView.EventTypeYearListViewDidHide, this); }; /** * @param {!Month} month */ YearListView.prototype._moveHighlightTo = function(month) { this.highlightMonth(month); this.select(this.highlightedMonth.year - 1); this.dispatchEvent(YearListView.EventTypeYearListViewDidSelectMonth, this, month); this.scrollView.scrollTo(this.selectedRow * YearListCell.Height, true); return true; }; /** * @param {?Event} event */ YearListView.prototype.onKeyDown = function(event) { var key = event.keyIdentifier; var eventHandled = false; if (key == "U+0054") // 't' key. eventHandled = this._moveHighlightTo(Month.createFromToday()); else if (this.highlightedMonth) { if (global.params.isLocaleRTL ? key == "Right" : key == "Left") eventHandled = this._moveHighlightTo(this.highlightedMonth.previous()); else if (key == "Up") eventHandled = this._moveHighlightTo(this.highlightedMonth.previous(YearListCell.ButtonColumns)); else if (global.params.isLocaleRTL ? key == "Left" : key == "Right") eventHandled = this._moveHighlightTo(this.highlightedMonth.next()); else if (key == "Down") eventHandled = this._moveHighlightTo(this.highlightedMonth.next(YearListCell.ButtonColumns)); else if (key == "PageUp") eventHandled = this._moveHighlightTo(this.highlightedMonth.previous(MonthsPerYear)); else if (key == "PageDown") eventHandled = this._moveHighlightTo(this.highlightedMonth.next(MonthsPerYear)); else if (key == "Enter") { this.dispatchEvent(YearListView.EventTypeYearListViewDidSelectMonth, this, this.highlightedMonth); this.hide(); eventHandled = true; } } else if (key == "Up") { this.scrollView.scrollBy(-YearListCell.Height, true); eventHandled = true; } else if (key == "Down") { this.scrollView.scrollBy(YearListCell.Height, true); eventHandled = true; } else if (key == "PageUp") { this.scrollView.scrollBy(-this.scrollView.height(), true); eventHandled = true; } else if (key == "PageDown") { this.scrollView.scrollBy(this.scrollView.height(), true); eventHandled = true; } if (eventHandled) { event.stopPropagation(); event.preventDefault(); } }; /** * @constructor * @extends View * @param {!Month} minimumMonth * @param {!Month} maximumMonth */ function MonthPopupView(minimumMonth, maximumMonth) { View.call(this, createElement("div", MonthPopupView.ClassNameMonthPopupView)); /** * @type {!YearListView} * @const */ this.yearListView = new YearListView(minimumMonth, maximumMonth); this.yearListView.attachTo(this); /** * @type {!boolean} */ this.isVisible = false; this.element.addEventListener("click", this.onClick, false); } MonthPopupView.prototype = Object.create(View.prototype); MonthPopupView.ClassNameMonthPopupView = "month-popup-view"; MonthPopupView.prototype.show = function(initialMonth, calendarTableRect) { this.isVisible = true; document.body.appendChild(this.element); this.yearListView.setWidth(calendarTableRect.width - 2); this.yearListView.setHeight(YearListView.Height); if (global.params.isLocaleRTL) this.yearListView.element.style.right = calendarTableRect.x + "px"; else this.yearListView.element.style.left = calendarTableRect.x + "px"; this.yearListView.element.style.top = calendarTableRect.y + "px"; this.yearListView.show(initialMonth); this.yearListView.element.focus(); }; MonthPopupView.prototype.hide = function() { if (!this.isVisible) return; this.isVisible = false; this.element.parentNode.removeChild(this.element); this.yearListView.hide(); }; /** * @param {?Event} event */ MonthPopupView.prototype.onClick = function(event) { if (event.target !== this.element) return; this.hide(); }; /** * @constructor * @extends View * @param {!number} maxWidth Maximum width in pixels. */ function MonthPopupButton(maxWidth) { View.call(this, createElement("button", MonthPopupButton.ClassNameMonthPopupButton)); this.element.setAttribute("aria-label", global.params.axShowMonthSelector); /** * @type {!Element} * @const */ this.labelElement = createElement("span", MonthPopupButton.ClassNameMonthPopupButtonLabel, "-----"); this.element.appendChild(this.labelElement); /** * @type {!Element} * @const */ this.disclosureTriangleIcon = createElement("span", MonthPopupButton.ClassNameDisclosureTriangle); this.disclosureTriangleIcon.innerHTML = "<svg width='7' height='5'><polygon points='0,1 7,1 3.5,5' style='fill:#000000;' /></svg>"; this.element.appendChild(this.disclosureTriangleIcon); /** * @type {!boolean} * @protected */ this._useShortMonth = this._shouldUseShortMonth(maxWidth); this.element.style.maxWidth = maxWidth + "px"; this.element.addEventListener("click", this.onClick, false); } MonthPopupButton.prototype = Object.create(View.prototype); MonthPopupButton.ClassNameMonthPopupButton = "month-popup-button"; MonthPopupButton.ClassNameMonthPopupButtonLabel = "month-popup-button-label"; MonthPopupButton.ClassNameDisclosureTriangle = "disclosure-triangle"; MonthPopupButton.EventTypeButtonClick = "buttonClick"; /** * @param {!number} maxWidth Maximum available width in pixels. * @return {!boolean} */ MonthPopupButton.prototype._shouldUseShortMonth = function(maxWidth) { document.body.appendChild(this.element); var month = Month.Maximum; for (var i = 0; i < MonthsPerYear; ++i) { this.labelElement.textContent = month.toLocaleString(); if (this.element.offsetWidth > maxWidth) return true; month = month.previous(); } document.body.removeChild(this.element); return false; }; /** * @param {!Month} month */ MonthPopupButton.prototype.setCurrentMonth = function(month) { this.labelElement.textContent = this._useShortMonth ? month.toShortLocaleString() : month.toLocaleString(); }; /** * @param {?Event} event */ MonthPopupButton.prototype.onClick = function(event) { this.dispatchEvent(MonthPopupButton.EventTypeButtonClick, this); }; /** * @constructor * @extends View */ function CalendarNavigationButton() { View.call(this, createElement("button", CalendarNavigationButton.ClassNameCalendarNavigationButton)); /** * @type {number} Threshold for starting repeating clicks in milliseconds. */ this.repeatingClicksStartingThreshold = CalendarNavigationButton.DefaultRepeatingClicksStartingThreshold; /** * @type {number} Interval between reapeating clicks in milliseconds. */ this.reapeatingClicksInterval = CalendarNavigationButton.DefaultRepeatingClicksInterval; /** * @type {?number} The ID for the timeout that triggers the repeating clicks. */ this._timer = null; this.element.addEventListener("click", this.onClick, false); this.element.addEventListener("mousedown", this.onMouseDown, false); this.element.addEventListener("touchstart", this.onTouchStart, false); }; CalendarNavigationButton.prototype = Object.create(View.prototype); CalendarNavigationButton.DefaultRepeatingClicksStartingThreshold = 600; CalendarNavigationButton.DefaultRepeatingClicksInterval = 300; CalendarNavigationButton.LeftMargin = 4; CalendarNavigationButton.Width = 24; CalendarNavigationButton.ClassNameCalendarNavigationButton = "calendar-navigation-button"; CalendarNavigationButton.EventTypeButtonClick = "buttonClick"; CalendarNavigationButton.EventTypeRepeatingButtonClick = "repeatingButtonClick"; /** * @param {!boolean} disabled */ CalendarNavigationButton.prototype.setDisabled = function(disabled) { this.element.disabled = disabled; }; /** * @param {?Event} event */ CalendarNavigationButton.prototype.onClick = function(event) { this.dispatchEvent(CalendarNavigationButton.EventTypeButtonClick, this); }; /** * @param {?Event} event */ CalendarNavigationButton.prototype.onTouchStart = function(event) { if (this._timer !== null) return; this._timer = setTimeout(this.onRepeatingClick, this.repeatingClicksStartingThreshold); window.addEventListener("touchend", this.onWindowTouchEnd, false); }; /** * @param {?Event} event */ CalendarNavigationButton.prototype.onWindowTouchEnd = function(event) { if (this._timer === null) return; clearTimeout(this._timer); this._timer = null; window.removeEventListener("touchend", this.onWindowMouseUp, false); }; /** * @param {?Event} event */ CalendarNavigationButton.prototype.onMouseDown = function(event) { if (this._timer !== null) return; this._timer = setTimeout(this.onRepeatingClick, this.repeatingClicksStartingThreshold); window.addEventListener("mouseup", this.onWindowMouseUp, false); }; /** * @param {?Event} event */ CalendarNavigationButton.prototype.onWindowMouseUp = function(event) { if (this._timer === null) return; clearTimeout(this._timer); this._timer = null; window.removeEventListener("mouseup", this.onWindowMouseUp, false); }; /** * @param {?Event} event */ CalendarNavigationButton.prototype.onRepeatingClick = function(event) { this.dispatchEvent(CalendarNavigationButton.EventTypeRepeatingButtonClick, this); this._timer = setTimeout(this.onRepeatingClick, this.reapeatingClicksInterval); }; /** * @constructor * @extends View * @param {!CalendarPicker} calendarPicker */ function CalendarHeaderView(calendarPicker) { View.call(this, createElement("div", CalendarHeaderView.ClassNameCalendarHeaderView)); this.calendarPicker = calendarPicker; this.calendarPicker.on(CalendarPicker.EventTypeCurrentMonthChanged, this.onCurrentMonthChanged); var titleElement = createElement("div", CalendarHeaderView.ClassNameCalendarTitle); this.element.appendChild(titleElement); /** * @type {!MonthPopupButton} */ this.monthPopupButton = new MonthPopupButton(this.calendarPicker.calendarTableView.width() - CalendarTableView.BorderWidth * 2 - CalendarNavigationButton.Width * 3 - CalendarNavigationButton.LeftMargin * 2); this.monthPopupButton.attachTo(titleElement); /** * @type {!CalendarNavigationButton} * @const */ this._previousMonthButton = new CalendarNavigationButton(); this._previousMonthButton.attachTo(this); this._previousMonthButton.on(CalendarNavigationButton.EventTypeButtonClick, this.onNavigationButtonClick); this._previousMonthButton.on(CalendarNavigationButton.EventTypeRepeatingButtonClick, this.onNavigationButtonClick); this._previousMonthButton.element.setAttribute("aria-label", global.params.axShowPreviousMonth); /** * @type {!CalendarNavigationButton} * @const */ this._todayButton = new CalendarNavigationButton(); this._todayButton.attachTo(this); this._todayButton.on(CalendarNavigationButton.EventTypeButtonClick, this.onNavigationButtonClick); this._todayButton.element.classList.add(CalendarHeaderView.ClassNameTodayButton); var monthContainingToday = Month.createFromToday(); this._todayButton.setDisabled(monthContainingToday < this.calendarPicker.minimumMonth || monthContainingToday > this.calendarPicker.maximumMonth); this._todayButton.element.setAttribute("aria-label", global.params.todayLabel); /** * @type {!CalendarNavigationButton} * @const */ this._nextMonthButton = new CalendarNavigationButton(); this._nextMonthButton.attachTo(this); this._nextMonthButton.on(CalendarNavigationButton.EventTypeButtonClick, this.onNavigationButtonClick); this._nextMonthButton.on(CalendarNavigationButton.EventTypeRepeatingButtonClick, this.onNavigationButtonClick); this._nextMonthButton.element.setAttribute("aria-label", global.params.axShowNextMonth); if (global.params.isLocaleRTL) { this._nextMonthButton.element.innerHTML = CalendarHeaderView._BackwardTriangle; this._previousMonthButton.element.innerHTML = CalendarHeaderView._ForwardTriangle; } else { this._nextMonthButton.element.innerHTML = CalendarHeaderView._ForwardTriangle; this._previousMonthButton.element.innerHTML = CalendarHeaderView._BackwardTriangle; } } CalendarHeaderView.prototype = Object.create(View.prototype); CalendarHeaderView.Height = 24; CalendarHeaderView.BottomMargin = 10; CalendarHeaderView._ForwardTriangle = "<svg width='4' height='7'><polygon points='0,7 0,0, 4,3.5' style='fill:#6e6e6e;' /></svg>"; CalendarHeaderView._BackwardTriangle = "<svg width='4' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /></svg>"; CalendarHeaderView.ClassNameCalendarHeaderView = "calendar-header-view"; CalendarHeaderView.ClassNameCalendarTitle = "calendar-title"; CalendarHeaderView.ClassNameTodayButton = "today-button"; CalendarHeaderView.prototype.onCurrentMonthChanged = function() { this.monthPopupButton.setCurrentMonth(this.calendarPicker.currentMonth()); this._previousMonthButton.setDisabled(this.disabled || this.calendarPicker.currentMonth() <= this.calendarPicker.minimumMonth); this._nextMonthButton.setDisabled(this.disabled || this.calendarPicker.currentMonth() >= this.calendarPicker.maximumMonth); }; CalendarHeaderView.prototype.onNavigationButtonClick = function(sender) { if (sender === this._previousMonthButton) this.calendarPicker.setCurrentMonth(this.calendarPicker.currentMonth().previous(), CalendarPicker.NavigationBehavior.WithAnimation); else if (sender === this._nextMonthButton) this.calendarPicker.setCurrentMonth(this.calendarPicker.currentMonth().next(), CalendarPicker.NavigationBehavior.WithAnimation); else this.calendarPicker.selectRangeContainingDay(Day.createFromToday()); }; /** * @param {!boolean} disabled */ CalendarHeaderView.prototype.setDisabled = function(disabled) { this.disabled = disabled; this.monthPopupButton.element.disabled = this.disabled; this._previousMonthButton.setDisabled(this.disabled || this.calendarPicker.currentMonth() <= this.calendarPicker.minimumMonth); this._nextMonthButton.setDisabled(this.disabled || this.calendarPicker.currentMonth() >= this.calendarPicker.maximumMonth); var monthContainingToday = Month.createFromToday(); this._todayButton.setDisabled(this.disabled || monthContainingToday < this.calendarPicker.minimumMonth || monthContainingToday > this.calendarPicker.maximumMonth); }; /** * @constructor * @extends ListCell */ function DayCell() { ListCell.call(this); this.element.classList.add(DayCell.ClassNameDayCell); this.element.style.width = DayCell.Width + "px"; this.element.style.height = DayCell.Height + "px"; this.element.style.lineHeight = (DayCell.Height - DayCell.PaddingSize * 2) + "px"; this.element.setAttribute("role", "gridcell"); /** * @type {?Day} */ this.day = null; }; DayCell.prototype = Object.create(ListCell.prototype); DayCell.Width = 34; DayCell.Height = hasInaccuratePointingDevice() ? 34 : 20; DayCell.PaddingSize = 1; DayCell.ClassNameDayCell = "day-cell"; DayCell.ClassNameHighlighted = "highlighted"; DayCell.ClassNameDisabled = "disabled"; DayCell.ClassNameCurrentMonth = "current-month"; DayCell.ClassNameToday = "today"; DayCell._recycleBin = []; DayCell.recycleOrCreate = function() { return DayCell._recycleBin.pop() || new DayCell(); }; /** * @return {!Array} * @override */ DayCell.prototype._recycleBin = function() { return DayCell._recycleBin; }; /** * @override */ DayCell.prototype.throwAway = function() { ListCell.prototype.throwAway.call(this); this.day = null; }; /** * @param {!boolean} highlighted */ DayCell.prototype.setHighlighted = function(highlighted) { if (highlighted) { this.element.classList.add(DayCell.ClassNameHighlighted); this.element.setAttribute("aria-selected", "true"); } else { this.element.classList.remove(DayCell.ClassNameHighlighted); this.element.setAttribute("aria-selected", "false"); } }; /** * @param {!boolean} disabled */ DayCell.prototype.setDisabled = function(disabled) { if (disabled) this.element.classList.add(DayCell.ClassNameDisabled); else this.element.classList.remove(DayCell.ClassNameDisabled); }; /** * @param {!boolean} selected */ DayCell.prototype.setIsInCurrentMonth = function(selected) { if (selected) this.element.classList.add(DayCell.ClassNameCurrentMonth); else this.element.classList.remove(DayCell.ClassNameCurrentMonth); }; /** * @param {!boolean} selected */ DayCell.prototype.setIsToday = function(selected) { if (selected) this.element.classList.add(DayCell.ClassNameToday); else this.element.classList.remove(DayCell.ClassNameToday); }; /** * @param {!Day} day */ DayCell.prototype.reset = function(day) { this.day = day; this.element.textContent = localizeNumber(this.day.date.toString()); this.element.setAttribute("aria-label", this.day.format()); this.element.id = this.day.toString(); this.show(); }; /** * @constructor * @extends ListCell */ function WeekNumberCell() { ListCell.call(this); this.element.classList.add(WeekNumberCell.ClassNameWeekNumberCell); this.element.style.width = (WeekNumberCell.Width - WeekNumberCell.SeparatorWidth) + "px"; this.element.style.height = WeekNumberCell.Height + "px"; this.element.style.lineHeight = (WeekNumberCell.Height - WeekNumberCell.PaddingSize * 2) + "px"; /** * @type {?Week} */ this.week = null; }; WeekNumberCell.prototype = Object.create(ListCell.prototype); WeekNumberCell.Width = 48; WeekNumberCell.Height = DayCell.Height; WeekNumberCell.SeparatorWidth = 1; WeekNumberCell.PaddingSize = 1; WeekNumberCell.ClassNameWeekNumberCell = "week-number-cell"; WeekNumberCell.ClassNameHighlighted = "highlighted"; WeekNumberCell.ClassNameDisabled = "disabled"; WeekNumberCell._recycleBin = []; /** * @return {!Array} * @override */ WeekNumberCell.prototype._recycleBin = function() { return WeekNumberCell._recycleBin; }; /** * @return {!WeekNumberCell} */ WeekNumberCell.recycleOrCreate = function() { return WeekNumberCell._recycleBin.pop() || new WeekNumberCell(); }; /** * @param {!Week} week */ WeekNumberCell.prototype.reset = function(week) { this.week = week; this.element.id = week.toString(); this.element.setAttribute("role", "gridcell"); this.element.setAttribute("aria-label", window.pagePopupController.formatWeek(week.year, week.week, week.firstDay().format())); this.element.textContent = localizeNumber(this.week.week.toString()); this.show(); }; /** * @override */ WeekNumberCell.prototype.throwAway = function() { ListCell.prototype.throwAway.call(this); this.week = null; }; WeekNumberCell.prototype.setHighlighted = function(highlighted) { if (highlighted) { this.element.classList.add(WeekNumberCell.ClassNameHighlighted); this.element.setAttribute("aria-selected", "true"); } else { this.element.classList.remove(WeekNumberCell.ClassNameHighlighted); this.element.setAttribute("aria-selected", "false"); } }; WeekNumberCell.prototype.setDisabled = function(disabled) { if (disabled) this.element.classList.add(WeekNumberCell.ClassNameDisabled); else this.element.classList.remove(WeekNumberCell.ClassNameDisabled); }; /** * @constructor * @extends View * @param {!boolean} hasWeekNumberColumn */ function CalendarTableHeaderView(hasWeekNumberColumn) { View.call(this, createElement("div", "calendar-table-header-view")); if (hasWeekNumberColumn) { var weekNumberLabelElement = createElement("div", "week-number-label", global.params.weekLabel); weekNumberLabelElement.style.width = WeekNumberCell.Width + "px"; this.element.appendChild(weekNumberLabelElement); } for (var i = 0; i < DaysPerWeek; ++i) { var weekDayNumber = (global.params.weekStartDay + i) % DaysPerWeek; var labelElement = createElement("div", "week-day-label", global.params.dayLabels[weekDayNumber]); labelElement.style.width = DayCell.Width + "px"; this.element.appendChild(labelElement); if (getLanguage() === "ja") { if (weekDayNumber === 0) labelElement.style.color = "red"; else if (weekDayNumber === 6) labelElement.style.color = "blue"; } } } CalendarTableHeaderView.prototype = Object.create(View.prototype); CalendarTableHeaderView.Height = 25; /** * @constructor * @extends ListCell */ function CalendarRowCell() { ListCell.call(this); this.element.classList.add(CalendarRowCell.ClassNameCalendarRowCell); this.element.style.height = CalendarRowCell.Height + "px"; this.element.setAttribute("role", "row"); /** * @type {!Array} * @protected */ this._dayCells = []; /** * @type {!number} */ this.row = 0; /** * @type {?CalendarTableView} */ this.calendarTableView = null; } CalendarRowCell.prototype = Object.create(ListCell.prototype); CalendarRowCell.Height = DayCell.Height; CalendarRowCell.ClassNameCalendarRowCell = "calendar-row-cell"; CalendarRowCell._recycleBin = []; /** * @return {!Array} * @override */ CalendarRowCell.prototype._recycleBin = function() { return CalendarRowCell._recycleBin; }; /** * @param {!number} row * @param {!CalendarTableView} calendarTableView */ CalendarRowCell.prototype.reset = function(row, calendarTableView) { this.row = row; this.calendarTableView = calendarTableView; if (this.calendarTableView.hasWeekNumberColumn) { var middleDay = this.calendarTableView.dayAtColumnAndRow(3, row); var week = Week.createFromDay(middleDay); this.weekNumberCell = this.calendarTableView.prepareNewWeekNumberCell(week); this.weekNumberCell.attachTo(this); } var day = calendarTableView.dayAtColumnAndRow(0, row); for (var i = 0; i < DaysPerWeek; ++i) { var dayCell = this.calendarTableView.prepareNewDayCell(day); dayCell.attachTo(this); this._dayCells.push(dayCell); day = day.next(); } this.show(); }; /** * @override */ CalendarRowCell.prototype.throwAway = function() { ListCell.prototype.throwAway.call(this); if (this.weekNumberCell) this.calendarTableView.throwAwayWeekNumberCell(this.weekNumberCell); this._dayCells.forEach(this.calendarTableView.throwAwayDayCell, this.calendarTableView); this._dayCells.length = 0; }; /** * @constructor * @extends ListView * @param {!CalendarPicker} calendarPicker */ function CalendarTableView(calendarPicker) { ListView.call(this); this.element.classList.add(CalendarTableView.ClassNameCalendarTableView); this.element.tabIndex = 0; /** * @type {!boolean} * @const */ this.hasWeekNumberColumn = calendarPicker.type === "week"; /** * @type {!CalendarPicker} * @const */ this.calendarPicker = calendarPicker; /** * @type {!Object} * @const */ this._dayCells = {}; var headerView = new CalendarTableHeaderView(this.hasWeekNumberColumn); headerView.attachTo(this, this.scrollView); if (this.hasWeekNumberColumn) { this.setWidth(DayCell.Width * DaysPerWeek + WeekNumberCell.Width); /** * @type {?Array} * @const */ this._weekNumberCells = []; } else { this.setWidth(DayCell.Width * DaysPerWeek); } /** * @type {!boolean} * @protected */ this._ignoreMouseOutUntillNextMouseOver = false; this.element.addEventListener("click", this.onClick, false); this.element.addEventListener("mouseover", this.onMouseOver, false); this.element.addEventListener("mouseout", this.onMouseOut, false); // You shouldn't be able to use the mouse wheel to scroll. this.scrollView.element.removeEventListener("mousewheel", this.scrollView.onMouseWheel, false); // You shouldn't be able to do gesture scroll. this.scrollView.element.removeEventListener("touchstart", this.scrollView.onTouchStart, false); } CalendarTableView.prototype = Object.create(ListView.prototype); CalendarTableView.BorderWidth = 1; CalendarTableView.ClassNameCalendarTableView = "calendar-table-view"; /** * @param {!number} scrollOffset * @return {!number} */ CalendarTableView.prototype.rowAtScrollOffset = function(scrollOffset) { return Math.floor(scrollOffset / CalendarRowCell.Height); }; /** * @param {!number} row * @return {!number} */ CalendarTableView.prototype.scrollOffsetForRow = function(row) { return row * CalendarRowCell.Height; }; /** * @param {?Event} event */ CalendarTableView.prototype.onClick = function(event) { if (this.hasWeekNumberColumn) { var weekNumberCellElement = enclosingNodeOrSelfWithClass(event.target, WeekNumberCell.ClassNameWeekNumberCell); if (weekNumberCellElement) { var weekNumberCell = weekNumberCellElement.$view; this.calendarPicker.selectRangeContainingDay(weekNumberCell.week.firstDay()); return; } } var dayCellElement = enclosingNodeOrSelfWithClass(event.target, DayCell.ClassNameDayCell); if (!dayCellElement) return; var dayCell = dayCellElement.$view; this.calendarPicker.selectRangeContainingDay(dayCell.day); }; /** * @param {?Event} event */ CalendarTableView.prototype.onMouseOver = function(event) { if (this.hasWeekNumberColumn) { var weekNumberCellElement = enclosingNodeOrSelfWithClass(event.target, WeekNumberCell.ClassNameWeekNumberCell); if (weekNumberCellElement) { var weekNumberCell = weekNumberCellElement.$view; this.calendarPicker.highlightRangeContainingDay(weekNumberCell.week.firstDay()); this._ignoreMouseOutUntillNextMouseOver = false; return; } } var dayCellElement = enclosingNodeOrSelfWithClass(event.target, DayCell.ClassNameDayCell); if (!dayCellElement) return; var dayCell = dayCellElement.$view; this.calendarPicker.highlightRangeContainingDay(dayCell.day); this._ignoreMouseOutUntillNextMouseOver = false; }; /** * @param {?Event} event */ CalendarTableView.prototype.onMouseOut = function(event) { if (this._ignoreMouseOutUntillNextMouseOver) return; var dayCellElement = enclosingNodeOrSelfWithClass(event.target, DayCell.ClassNameDayCell); if (!dayCellElement) { this.calendarPicker.highlightRangeContainingDay(null); } }; /** * @param {!number} row * @return {!CalendarRowCell} */ CalendarTableView.prototype.prepareNewCell = function(row) { var cell = CalendarRowCell._recycleBin.pop() || new CalendarRowCell(); cell.reset(row, this); return cell; }; /** * @return {!number} Height in pixels. */ CalendarTableView.prototype.height = function() { return this.scrollView.height() + CalendarTableHeaderView.Height + CalendarTableView.BorderWidth * 2; }; /** * @param {!number} height Height in pixels. */ CalendarTableView.prototype.setHeight = function(height) { this.scrollView.setHeight(height - CalendarTableHeaderView.Height - CalendarTableView.BorderWidth * 2); }; /** * @param {!Month} month * @param {!boolean} animate */ CalendarTableView.prototype.scrollToMonth = function(month, animate) { var rowForFirstDayInMonth = this.columnAndRowForDay(month.firstDay()).row; this.scrollView.scrollTo(this.scrollOffsetForRow(rowForFirstDayInMonth), animate); }; /** * @param {!number} column * @param {!number} row * @return {!Day} */ CalendarTableView.prototype.dayAtColumnAndRow = function(column, row) { var daysSinceMinimum = row * DaysPerWeek + column + global.params.weekStartDay - CalendarTableView._MinimumDayWeekDay; return Day.createFromValue(daysSinceMinimum * MillisecondsPerDay + CalendarTableView._MinimumDayValue); }; CalendarTableView._MinimumDayValue = Day.Minimum.valueOf(); CalendarTableView._MinimumDayWeekDay = Day.Minimum.weekDay(); /** * @param {!Day} day * @return {!Object} Object with properties column and row. */ CalendarTableView.prototype.columnAndRowForDay = function(day) { var daysSinceMinimum = (day.valueOf() - CalendarTableView._MinimumDayValue) / MillisecondsPerDay; var offset = daysSinceMinimum + CalendarTableView._MinimumDayWeekDay - global.params.weekStartDay; var row = Math.floor(offset / DaysPerWeek); var column = offset - row * DaysPerWeek; return { column: column, row: row }; }; CalendarTableView.prototype.updateCells = function() { ListView.prototype.updateCells.call(this); var selection = this.calendarPicker.selection(); var firstDayInSelection; var lastDayInSelection; if (selection) { firstDayInSelection = selection.firstDay().valueOf(); lastDayInSelection = selection.lastDay().valueOf(); } else { firstDayInSelection = Infinity; lastDayInSelection = Infinity; } var highlight = this.calendarPicker.highlight(); var firstDayInHighlight; var lastDayInHighlight; if (highlight) { firstDayInHighlight = highlight.firstDay().valueOf(); lastDayInHighlight = highlight.lastDay().valueOf(); } else { firstDayInHighlight = Infinity; lastDayInHighlight = Infinity; } var currentMonth = this.calendarPicker.currentMonth(); var firstDayInCurrentMonth = currentMonth.firstDay().valueOf(); var lastDayInCurrentMonth = currentMonth.lastDay().valueOf(); var activeCell = null; for (var dayString in this._dayCells) { var dayCell = this._dayCells[dayString]; var day = dayCell.day; dayCell.setIsToday(Day.createFromToday().equals(day)); dayCell.setSelected(day >= firstDayInSelection && day <= lastDayInSelection); var isHighlighted = day >= firstDayInHighlight && day <= lastDayInHighlight; dayCell.setHighlighted(isHighlighted); if (isHighlighted) { if (firstDayInHighlight == lastDayInHighlight) activeCell = dayCell; else if (this.calendarPicker.type == "month" && day == firstDayInHighlight) activeCell = dayCell; } dayCell.setIsInCurrentMonth(day >= firstDayInCurrentMonth && day <= lastDayInCurrentMonth); dayCell.setDisabled(!this.calendarPicker.isValidDay(day)); } if (this.hasWeekNumberColumn) { for (var weekString in this._weekNumberCells) { var weekNumberCell = this._weekNumberCells[weekString]; var week = weekNumberCell.week; var isWeekHighlighted = highlight && highlight.equals(week); weekNumberCell.setSelected(selection && selection.equals(week)); weekNumberCell.setHighlighted(isWeekHighlighted); if (isWeekHighlighted) activeCell = weekNumberCell; weekNumberCell.setDisabled(!this.calendarPicker.isValid(week)); } } if (activeCell) { // Ensure a layoutObject because an element with no layoutObject doesn't post // activedescendant events. This shouldn't run in the above |for| loop // to avoid CSS transition. activeCell.element.offsetLeft; this.element.setAttribute("aria-activedescendant", activeCell.element.id); } }; /** * @param {!Day} day * @return {!DayCell} */ CalendarTableView.prototype.prepareNewDayCell = function(day) { var dayCell = DayCell.recycleOrCreate(); dayCell.reset(day); if (this.calendarPicker.type == "month") dayCell.element.setAttribute("aria-label", Month.createFromDay(day).toLocaleString()); this._dayCells[dayCell.day.toString()] = dayCell; return dayCell; }; /** * @param {!Week} week * @return {!WeekNumberCell} */ CalendarTableView.prototype.prepareNewWeekNumberCell = function(week) { var weekNumberCell = WeekNumberCell.recycleOrCreate(); weekNumberCell.reset(week); this._weekNumberCells[weekNumberCell.week.toString()] = weekNumberCell; return weekNumberCell; }; /** * @param {!DayCell} dayCell */ CalendarTableView.prototype.throwAwayDayCell = function(dayCell) { delete this._dayCells[dayCell.day.toString()]; dayCell.throwAway(); }; /** * @param {!WeekNumberCell} weekNumberCell */ CalendarTableView.prototype.throwAwayWeekNumberCell = function(weekNumberCell) { delete this._weekNumberCells[weekNumberCell.week.toString()]; weekNumberCell.throwAway(); }; /** * @constructor * @extends View * @param {!Object} config */ function CalendarPicker(type, config) { View.call(this, createElement("div", CalendarPicker.ClassNameCalendarPicker)); this.element.classList.add(CalendarPicker.ClassNamePreparing); /** * @type {!string} * @const */ this.type = type; if (this.type === "week") this._dateTypeConstructor = Week; else if (this.type === "month") this._dateTypeConstructor = Month; else this._dateTypeConstructor = Day; /** * @type {!Object} * @const */ this.config = {}; this._setConfig(config); /** * @type {!Month} * @const */ this.minimumMonth = Month.createFromDay(this.config.minimum.firstDay()); /** * @type {!Month} * @const */ this.maximumMonth = Month.createFromDay(this.config.maximum.lastDay()); if (global.params.isLocaleRTL) this.element.classList.add("rtl"); /** * @type {!CalendarTableView} * @const */ this.calendarTableView = new CalendarTableView(this); this.calendarTableView.hasNumberColumn = this.type === "week"; /** * @type {!CalendarHeaderView} * @const */ this.calendarHeaderView = new CalendarHeaderView(this); this.calendarHeaderView.monthPopupButton.on(MonthPopupButton.EventTypeButtonClick, this.onMonthPopupButtonClick); /** * @type {!MonthPopupView} * @const */ this.monthPopupView = new MonthPopupView(this.minimumMonth, this.maximumMonth); this.monthPopupView.yearListView.on(YearListView.EventTypeYearListViewDidSelectMonth, this.onYearListViewDidSelectMonth); this.monthPopupView.yearListView.on(YearListView.EventTypeYearListViewDidHide, this.onYearListViewDidHide); this.calendarHeaderView.attachTo(this); this.calendarTableView.attachTo(this); /** * @type {!Month} * @protected */ this._currentMonth = new Month(NaN, NaN); /** * @type {?DateType} * @protected */ this._selection = null; /** * @type {?DateType} * @protected */ this._highlight = null; this.calendarTableView.element.addEventListener("keydown", this.onCalendarTableKeyDown, false); document.body.addEventListener("keydown", this.onBodyKeyDown, false); window.addEventListener("resize", this.onWindowResize, false); /** * @type {!number} * @protected */ this._height = -1; var initialSelection = parseDateString(config.currentValue); if (initialSelection) { this.setCurrentMonth(Month.createFromDay(initialSelection.middleDay()), CalendarPicker.NavigationBehavior.None); this.setSelection(initialSelection); } else this.setCurrentMonth(Month.createFromToday(), CalendarPicker.NavigationBehavior.None); } CalendarPicker.prototype = Object.create(View.prototype); CalendarPicker.Padding = 10; CalendarPicker.BorderWidth = 1; CalendarPicker.ClassNameCalendarPicker = "calendar-picker"; CalendarPicker.ClassNamePreparing = "preparing"; CalendarPicker.EventTypeCurrentMonthChanged = "currentMonthChanged"; CalendarPicker.commitDelayMs = 100; /** * @param {!Event} event */ CalendarPicker.prototype.onWindowResize = function(event) { this.element.classList.remove(CalendarPicker.ClassNamePreparing); window.removeEventListener("resize", this.onWindowResize, false); }; /** * @param {!YearListView} sender */ CalendarPicker.prototype.onYearListViewDidHide = function(sender) { this.monthPopupView.hide(); this.calendarHeaderView.setDisabled(false); this.adjustHeight(); }; /** * @param {!YearListView} sender * @param {!Month} month */ CalendarPicker.prototype.onYearListViewDidSelectMonth = function(sender, month) { this.setCurrentMonth(month, CalendarPicker.NavigationBehavior.None); }; /** * @param {!View|Node} parent * @param {?View|Node=} before * @override */ CalendarPicker.prototype.attachTo = function(parent, before) { View.prototype.attachTo.call(this, parent, before); this.calendarTableView.element.focus(); }; CalendarPicker.prototype.cleanup = function() { window.removeEventListener("resize", this.onWindowResize, false); this.calendarTableView.element.removeEventListener("keydown", this.onBodyKeyDown, false); // Month popup view might be attached to document.body. this.monthPopupView.hide(); }; /** * @param {?MonthPopupButton} sender */ CalendarPicker.prototype.onMonthPopupButtonClick = function(sender) { var clientRect = this.calendarTableView.element.getBoundingClientRect(); var calendarTableRect = new Rectangle(clientRect.left + document.body.scrollLeft, clientRect.top + document.body.scrollTop, clientRect.width, clientRect.height); this.monthPopupView.show(this.currentMonth(), calendarTableRect); this.calendarHeaderView.setDisabled(true); this.adjustHeight(); }; CalendarPicker.prototype._setConfig = function(config) { this.config.minimum = (typeof config.min !== "undefined" && config.min) ? parseDateString(config.min) : this._dateTypeConstructor.Minimum; this.config.maximum = (typeof config.max !== "undefined" && config.max) ? parseDateString(config.max) : this._dateTypeConstructor.Maximum; this.config.minimumValue = this.config.minimum.valueOf(); this.config.maximumValue = this.config.maximum.valueOf(); this.config.step = (typeof config.step !== undefined) ? Number(config.step) : this._dateTypeConstructor.DefaultStep; this.config.stepBase = (typeof config.stepBase !== "undefined") ? Number(config.stepBase) : this._dateTypeConstructor.DefaultStepBase; }; /** * @return {!Month} */ CalendarPicker.prototype.currentMonth = function() { return this._currentMonth; }; /** * @enum {number} */ CalendarPicker.NavigationBehavior = { None: 0, WithAnimation: 1 }; /** * @param {!Month} month * @param {!CalendarPicker.NavigationBehavior} animate */ CalendarPicker.prototype.setCurrentMonth = function(month, behavior) { if (month > this.maximumMonth) month = this.maximumMonth; else if (month < this.minimumMonth) month = this.minimumMonth; if (this._currentMonth.equals(month)) return; this._currentMonth = month; this.calendarTableView.scrollToMonth(this._currentMonth, behavior === CalendarPicker.NavigationBehavior.WithAnimation); this.adjustHeight(); this.calendarTableView.setNeedsUpdateCells(true); this.dispatchEvent(CalendarPicker.EventTypeCurrentMonthChanged, { target: this }); }; CalendarPicker.prototype.adjustHeight = function() { var rowForFirstDayInMonth = this.calendarTableView.columnAndRowForDay(this._currentMonth.firstDay()).row; var rowForLastDayInMonth = this.calendarTableView.columnAndRowForDay(this._currentMonth.lastDay()).row; var numberOfRows = rowForLastDayInMonth - rowForFirstDayInMonth + 1; var calendarTableViewHeight = CalendarTableHeaderView.Height + numberOfRows * DayCell.Height + CalendarTableView.BorderWidth * 2; var height = (this.monthPopupView.isVisible ? YearListView.Height : calendarTableViewHeight) + CalendarHeaderView.Height + CalendarHeaderView.BottomMargin + CalendarPicker.Padding * 2 + CalendarPicker.BorderWidth * 2; this.setHeight(height); }; CalendarPicker.prototype.selection = function() { return this._selection; }; CalendarPicker.prototype.highlight = function() { return this._highlight; }; /** * @return {!Day} */ CalendarPicker.prototype.firstVisibleDay = function() { var firstVisibleRow = this.calendarTableView.columnAndRowForDay(this.currentMonth().firstDay()).row; var firstVisibleDay = this.calendarTableView.dayAtColumnAndRow(0, firstVisibleRow); if (!firstVisibleDay) firstVisibleDay = Day.Minimum; return firstVisibleDay; }; /** * @return {!Day} */ CalendarPicker.prototype.lastVisibleDay = function() { var lastVisibleRow = this.calendarTableView.columnAndRowForDay(this.currentMonth().lastDay()).row; var lastVisibleDay = this.calendarTableView.dayAtColumnAndRow(DaysPerWeek - 1, lastVisibleRow); if (!lastVisibleDay) lastVisibleDay = Day.Maximum; return lastVisibleDay; }; /** * @param {?Day} day */ CalendarPicker.prototype.selectRangeContainingDay = function(day) { var selection = day ? this._dateTypeConstructor.createFromDay(day) : null; this.setSelectionAndCommit(selection); }; /** * @param {?Day} day */ CalendarPicker.prototype.highlightRangeContainingDay = function(day) { var highlight = day ? this._dateTypeConstructor.createFromDay(day) : null; this._setHighlight(highlight); }; /** * Select the specified date. * @param {?DateType} dayOrWeekOrMonth */ CalendarPicker.prototype.setSelection = function(dayOrWeekOrMonth) { if (!this._selection && !dayOrWeekOrMonth) return; if (this._selection && this._selection.equals(dayOrWeekOrMonth)) return; var firstDayInSelection = dayOrWeekOrMonth.firstDay(); var lastDayInSelection = dayOrWeekOrMonth.lastDay(); var candidateCurrentMonth = Month.createFromDay(firstDayInSelection); if (this.firstVisibleDay() > lastDayInSelection || this.lastVisibleDay() < firstDayInSelection) { // Change current month if the selection is not visible at all. this.setCurrentMonth(candidateCurrentMonth, CalendarPicker.NavigationBehavior.WithAnimation); } else if (this.firstVisibleDay() < firstDayInSelection || this.lastVisibleDay() > lastDayInSelection) { // If the selection is partly visible, only change the current month if // doing so will make the whole selection visible. var firstVisibleRow = this.calendarTableView.columnAndRowForDay(candidateCurrentMonth.firstDay()).row; var firstVisibleDay = this.calendarTableView.dayAtColumnAndRow(0, firstVisibleRow); var lastVisibleRow = this.calendarTableView.columnAndRowForDay(candidateCurrentMonth.lastDay()).row; var lastVisibleDay = this.calendarTableView.dayAtColumnAndRow(DaysPerWeek - 1, lastVisibleRow); if (firstDayInSelection >= firstVisibleDay && lastDayInSelection <= lastVisibleDay) this.setCurrentMonth(candidateCurrentMonth, CalendarPicker.NavigationBehavior.WithAnimation); } this._setHighlight(dayOrWeekOrMonth); if (!this.isValid(dayOrWeekOrMonth)) return; this._selection = dayOrWeekOrMonth; this.calendarTableView.setNeedsUpdateCells(true); }; /** * Select the specified date, commit it, and close the popup. * @param {?DateType} dayOrWeekOrMonth */ CalendarPicker.prototype.setSelectionAndCommit = function(dayOrWeekOrMonth) { this.setSelection(dayOrWeekOrMonth); // Redraw the widget immidiately, and wait for some time to give feedback to // a user. this.element.offsetLeft; var value = this._selection.toString(); if (CalendarPicker.commitDelayMs == 0) { // For testing. window.pagePopupController.setValueAndClosePopup(0, value); } else if (CalendarPicker.commitDelayMs < 0) { // For testing. window.pagePopupController.setValue(value); } else { setTimeout(function() { window.pagePopupController.setValueAndClosePopup(0, value); }, CalendarPicker.commitDelayMs); } }; /** * @param {?DateType} dayOrWeekOrMonth */ CalendarPicker.prototype._setHighlight = function(dayOrWeekOrMonth) { if (!this._highlight && !dayOrWeekOrMonth) return; if (!dayOrWeekOrMonth && !this._highlight) return; if (this._highlight && this._highlight.equals(dayOrWeekOrMonth)) return; this._highlight = dayOrWeekOrMonth; this.calendarTableView.setNeedsUpdateCells(true); }; /** * @param {!number} value * @return {!boolean} */ CalendarPicker.prototype._stepMismatch = function(value) { var nextAllowedValue = Math.ceil((value - this.config.stepBase) / this.config.step) * this.config.step + this.config.stepBase; return nextAllowedValue >= value + this._dateTypeConstructor.DefaultStep; }; /** * @param {!number} value * @return {!boolean} */ CalendarPicker.prototype._outOfRange = function(value) { return value < this.config.minimumValue || value > this.config.maximumValue; }; /** * @param {!DateType} dayOrWeekOrMonth * @return {!boolean} */ CalendarPicker.prototype.isValid = function(dayOrWeekOrMonth) { var value = dayOrWeekOrMonth.valueOf(); return dayOrWeekOrMonth instanceof this._dateTypeConstructor && !this._outOfRange(value) && !this._stepMismatch(value); }; /** * @param {!Day} day * @return {!boolean} */ CalendarPicker.prototype.isValidDay = function(day) { return this.isValid(this._dateTypeConstructor.createFromDay(day)); }; /** * @param {!DateType} dateRange * @return {!boolean} Returns true if the highlight was changed. */ CalendarPicker.prototype._moveHighlight = function(dateRange) { if (!dateRange) return false; if (this._outOfRange(dateRange.valueOf())) return false; if (this.firstVisibleDay() > dateRange.middleDay() || this.lastVisibleDay() < dateRange.middleDay()) this.setCurrentMonth(Month.createFromDay(dateRange.middleDay()), CalendarPicker.NavigationBehavior.WithAnimation); this._setHighlight(dateRange); return true; }; /** * @param {?Event} event */ CalendarPicker.prototype.onCalendarTableKeyDown = function(event) { var key = event.keyIdentifier; var eventHandled = false; if (key == "U+0054") { // 't' key. this.selectRangeContainingDay(Day.createFromToday()); eventHandled = true; } else if (key == "PageUp") { var previousMonth = this.currentMonth().previous(); if (previousMonth && previousMonth >= this.config.minimumValue) { this.setCurrentMonth(previousMonth, CalendarPicker.NavigationBehavior.WithAnimation); eventHandled = true; } } else if (key == "PageDown") { var nextMonth = this.currentMonth().next(); if (nextMonth && nextMonth >= this.config.minimumValue) { this.setCurrentMonth(nextMonth, CalendarPicker.NavigationBehavior.WithAnimation); eventHandled = true; } } else if (this._highlight) { if (global.params.isLocaleRTL ? key == "Right" : key == "Left") { eventHandled = this._moveHighlight(this._highlight.previous()); } else if (key == "Up") { eventHandled = this._moveHighlight(this._highlight.previous(this.type === "date" ? DaysPerWeek : 1)); } else if (global.params.isLocaleRTL ? key == "Left" : key == "Right") { eventHandled = this._moveHighlight(this._highlight.next()); } else if (key == "Down") { eventHandled = this._moveHighlight(this._highlight.next(this.type === "date" ? DaysPerWeek : 1)); } else if (key == "Enter") { this.setSelectionAndCommit(this._highlight); } } else if (key == "Left" || key == "Up" || key == "Right" || key == "Down") { // Highlight range near the middle. this.highlightRangeContainingDay(this.currentMonth().middleDay()); eventHandled = true; } if (eventHandled) { event.stopPropagation(); event.preventDefault(); } }; /** * @return {!number} Width in pixels. */ CalendarPicker.prototype.width = function() { return this.calendarTableView.width() + (CalendarTableView.BorderWidth + CalendarPicker.BorderWidth + CalendarPicker.Padding) * 2; }; /** * @return {!number} Height in pixels. */ CalendarPicker.prototype.height = function() { return this._height; }; /** * @param {!number} height Height in pixels. */ CalendarPicker.prototype.setHeight = function(height) { if (this._height === height) return; this._height = height; resizeWindow(this.width(), this._height); this.calendarTableView.setHeight(this._height - CalendarHeaderView.Height - CalendarHeaderView.BottomMargin - CalendarPicker.Padding * 2 - CalendarTableView.BorderWidth * 2); }; /** * @param {?Event} event */ CalendarPicker.prototype.onBodyKeyDown = function(event) { var key = event.keyIdentifier; var eventHandled = false; var offset = 0; switch (key) { case "U+001B": // Esc key. window.pagePopupController.closePopup(); eventHandled = true; break; case "U+004D": // 'm' key. offset = offset || 1; // Fall-through. case "U+0059": // 'y' key. offset = offset || MonthsPerYear; // Fall-through. case "U+0044": // 'd' key. offset = offset || MonthsPerYear * 10; var oldFirstVisibleRow = this.calendarTableView.columnAndRowForDay(this.currentMonth().firstDay()).row; this.setCurrentMonth(event.shiftKey ? this.currentMonth().previous(offset) : this.currentMonth().next(offset), CalendarPicker.NavigationBehavior.WithAnimation); var newFirstVisibleRow = this.calendarTableView.columnAndRowForDay(this.currentMonth().firstDay()).row; if (this._highlight) { var highlightMiddleDay = this._highlight.middleDay(); this.highlightRangeContainingDay(highlightMiddleDay.next((newFirstVisibleRow - oldFirstVisibleRow) * DaysPerWeek)); } eventHandled =true; break; } if (eventHandled) { event.stopPropagation(); event.preventDefault(); } }; if (window.dialogArguments) { initialize(dialogArguments); } else { window.addEventListener("message", handleMessage, false); } /* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ input[type='button'], button { -webkit-appearance: none; -webkit-user-select: none; background-image: linear-gradient(#ededed, #ededed 38%, #dedede); border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75); color: #444; font: inherit; text-shadow: 0 1px 0 rgb(240, 240, 240); min-height: 2em; min-width: 4em; -webkit-padding-end: 10px; -webkit-padding-start: 10px; margin: 0; } :enabled:hover:-webkit-any(button, input[type='button']) { background-image: linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0); border-color: rgba(0, 0, 0, 0.3); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95); color: black; } :enabled:active:-webkit-any(button, input[type='button']) { background-image: linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7); box-shadow: none; text-shadow: none; } :disabled:-webkit-any(button, input[type='button']) { background-image: linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6); border-color: rgba(80, 80, 80, 0.2); box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75); color: #aaa; } :enabled:focus:-webkit-any(button, input[type='button']) { transition: border-color 200ms; /* We use border color because it follows the border radius (unlike outline). * This is particularly noticeable on mac. */ border-color: rgb(77, 144, 254); outline: none; } .suggestion-list { list-style: none; padding: 0; margin: 0; font: -webkit-small-control; border: 1px solid #7f9db9; background-color: white; overflow: hidden; } .suggestion-list-entry { white-space: nowrap; height: 1.73em; line-height: 1.73em; -webkit-select: none; cursor: default; } .suggestion-list-entry:focus { outline: none; } .suggestion-list-entry .content { padding: 0 4px; } .suggestion-list-entry .label { text-align: right; color: #737373; float: right; padding: 0 4px 0 20px; } .rtl .suggestion-list-entry .label { float: left; padding: 0 20px 0 4px; } .suggestion-list-entry .title { direction: ltr; display: inline-block; } .locale-rtl .suggestion-list-entry .title { direction: rtl; } .measuring-width .suggestion-list-entry .label { float: none; margin-right: 0; } .suggestion-list .separator { border-top: 1px solid #dcdcdc; height: 0; } "use strict"; /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @constructor * @param {!Element} element * @param {!Object} config */ function SuggestionPicker(element, config) { Picker.call(this, element, config); this._isFocusByMouse = false; this._containerElement = null; this._setColors(); this._layout(); this._fixWindowSize(); this._handleBodyKeyDownBound = this._handleBodyKeyDown.bind(this); document.body.addEventListener("keydown", this._handleBodyKeyDownBound); this._element.addEventListener("mouseout", this._handleMouseOut.bind(this), false); } SuggestionPicker.prototype = Object.create(Picker.prototype); SuggestionPicker.NumberOfVisibleEntries = 20; // An entry needs to be at least this many pixels visible for it to be a visible entry. SuggestionPicker.VisibleEntryThresholdHeight = 4; SuggestionPicker.ActionNames = { OpenCalendarPicker: "openCalendarPicker" }; SuggestionPicker.ListEntryClass = "suggestion-list-entry"; SuggestionPicker.validateConfig = function(config) { if (config.showOtherDateEntry && !config.otherDateLabel) return "No otherDateLabel."; if (config.suggestionHighlightColor && !config.suggestionHighlightColor) return "No suggestionHighlightColor."; if (config.suggestionHighlightTextColor && !config.suggestionHighlightTextColor) return "No suggestionHighlightTextColor."; if (config.suggestionValues.length !== config.localizedSuggestionValues.length) return "localizedSuggestionValues.length must equal suggestionValues.length."; if (config.suggestionValues.length !== config.suggestionLabels.length) return "suggestionLabels.length must equal suggestionValues.length."; if (typeof config.inputWidth === "undefined") return "No inputWidth."; return null; }; SuggestionPicker.prototype._setColors = function() { var text = "." + SuggestionPicker.ListEntryClass + ":focus {\ background-color: " + this._config.suggestionHighlightColor + ";\ color: " + this._config.suggestionHighlightTextColor + "; }"; text += "." + SuggestionPicker.ListEntryClass + ":focus .label { color: " + this._config.suggestionHighlightTextColor + "; }"; document.head.appendChild(createElement("style", null, text)); }; SuggestionPicker.prototype.cleanup = function() { document.body.removeEventListener("keydown", this._handleBodyKeyDownBound, false); }; /** * @param {!string} title * @param {!string} label * @param {!string} value * @return {!Element} */ SuggestionPicker.prototype._createSuggestionEntryElement = function(title, label, value) { var entryElement = createElement("li", SuggestionPicker.ListEntryClass); entryElement.tabIndex = 0; entryElement.dataset.value = value; var content = createElement("span", "content"); entryElement.appendChild(content); var titleElement = createElement("span", "title", title); content.appendChild(titleElement); if (label) { var labelElement = createElement("span", "label", label); content.appendChild(labelElement); } entryElement.addEventListener("mouseover", this._handleEntryMouseOver.bind(this), false); return entryElement; }; /** * @param {!string} title * @param {!string} actionName * @return {!Element} */ SuggestionPicker.prototype._createActionEntryElement = function(title, actionName) { var entryElement = createElement("li", SuggestionPicker.ListEntryClass); entryElement.tabIndex = 0; entryElement.dataset.action = actionName; var content = createElement("span", "content"); entryElement.appendChild(content); var titleElement = createElement("span", "title", title); content.appendChild(titleElement); entryElement.addEventListener("mouseover", this._handleEntryMouseOver.bind(this), false); return entryElement; }; /** * @return {!number} */ SuggestionPicker.prototype._measureMaxContentWidth = function() { // To measure the required width, we first set the class to "measuring-width" which // left aligns all the content including label. this._containerElement.classList.add("measuring-width"); var maxContentWidth = 0; var contentElements = this._containerElement.getElementsByClassName("content"); for (var i=0; i < contentElements.length; ++i) { maxContentWidth = Math.max(maxContentWidth, contentElements[i].offsetWidth); } this._containerElement.classList.remove("measuring-width"); return maxContentWidth; }; SuggestionPicker.prototype._fixWindowSize = function() { var ListBorder = 2; var zoom = this._config.zoomFactor; var desiredWindowWidth = (this._measureMaxContentWidth() + ListBorder) * zoom; if (typeof this._config.inputWidth === "number") desiredWindowWidth = Math.max(this._config.inputWidth, desiredWindowWidth); var totalHeight = ListBorder; var maxHeight = 0; var entryCount = 0; for (var i = 0; i < this._containerElement.childNodes.length; ++i) { var node = this._containerElement.childNodes[i]; if (node.classList.contains(SuggestionPicker.ListEntryClass)) entryCount++; totalHeight += node.offsetHeight; if (maxHeight === 0 && entryCount == SuggestionPicker.NumberOfVisibleEntries) maxHeight = totalHeight; } var desiredWindowHeight = totalHeight * zoom; if (maxHeight !== 0 && totalHeight > maxHeight * zoom) { this._containerElement.style.maxHeight = (maxHeight - ListBorder) + "px"; desiredWindowWidth += getScrollbarWidth() * zoom; desiredWindowHeight = maxHeight * zoom; this._containerElement.style.overflowY = "scroll"; } var windowRect = adjustWindowRect(desiredWindowWidth, desiredWindowHeight, desiredWindowWidth, 0); this._containerElement.style.height = (windowRect.height / zoom - ListBorder) + "px"; setWindowRect(windowRect); }; SuggestionPicker.prototype._layout = function() { if (this._config.isRTL) this._element.classList.add("rtl"); if (this._config.isLocaleRTL) this._element.classList.add("locale-rtl"); this._containerElement = createElement("ul", "suggestion-list"); this._containerElement.addEventListener("click", this._handleEntryClick.bind(this), false); for (var i = 0; i < this._config.suggestionValues.length; ++i) { this._containerElement.appendChild(this._createSuggestionEntryElement(this._config.localizedSuggestionValues[i], this._config.suggestionLabels[i], this._config.suggestionValues[i])); } if (this._config.showOtherDateEntry) { // Add separator var separator = createElement("div", "separator"); this._containerElement.appendChild(separator); // Add "Other..." entry var otherEntry = this._createActionEntryElement(this._config.otherDateLabel, SuggestionPicker.ActionNames.OpenCalendarPicker); this._containerElement.appendChild(otherEntry); } this._element.appendChild(this._containerElement); }; /** * @param {!Element} entry */ SuggestionPicker.prototype.selectEntry = function(entry) { if (typeof entry.dataset.value !== "undefined") { this.submitValue(entry.dataset.value); } else if (entry.dataset.action === SuggestionPicker.ActionNames.OpenCalendarPicker) { window.addEventListener("didHide", SuggestionPicker._handleWindowDidHide, false); hideWindow(); } }; SuggestionPicker._handleWindowDidHide = function() { openCalendarPicker(); window.removeEventListener("didHide", SuggestionPicker._handleWindowDidHide); }; /** * @param {!Event} event */ SuggestionPicker.prototype._handleEntryClick = function(event) { var entry = enclosingNodeOrSelfWithClass(event.target, SuggestionPicker.ListEntryClass); if (!entry) return; this.selectEntry(entry); event.preventDefault(); }; /** * @return {?Element} */ SuggestionPicker.prototype._findFirstVisibleEntry = function() { var scrollTop = this._containerElement.scrollTop; var childNodes = this._containerElement.childNodes; for (var i = 0; i < childNodes.length; ++i) { var node = childNodes[i]; if (node.nodeType !== Node.ELEMENT_NODE || !node.classList.contains(SuggestionPicker.ListEntryClass)) continue; if (node.offsetTop + node.offsetHeight - scrollTop > SuggestionPicker.VisibleEntryThresholdHeight) return node; } return null; }; /** * @return {?Element} */ SuggestionPicker.prototype._findLastVisibleEntry = function() { var scrollBottom = this._containerElement.scrollTop + this._containerElement.offsetHeight; var childNodes = this._containerElement.childNodes; for (var i = childNodes.length - 1; i >= 0; --i){ var node = childNodes[i]; if (node.nodeType !== Node.ELEMENT_NODE || !node.classList.contains(SuggestionPicker.ListEntryClass)) continue; if (scrollBottom - node.offsetTop > SuggestionPicker.VisibleEntryThresholdHeight) return node; } return null; }; /** * @param {!Event} event */ SuggestionPicker.prototype._handleBodyKeyDown = function(event) { var eventHandled = false; var key = event.keyIdentifier; if (key === "U+001B") { // ESC this.handleCancel(); eventHandled = true; } else if (key == "Up") { if (document.activeElement && document.activeElement.classList.contains(SuggestionPicker.ListEntryClass)) { for (var node = document.activeElement.previousElementSibling; node; node = node.previousElementSibling) { if (node.classList.contains(SuggestionPicker.ListEntryClass)) { this._isFocusByMouse = false; node.focus(); break; } } } else { this._element.querySelector("." + SuggestionPicker.ListEntryClass + ":last-child").focus(); } eventHandled = true; } else if (key == "Down") { if (document.activeElement && document.activeElement.classList.contains(SuggestionPicker.ListEntryClass)) { for (var node = document.activeElement.nextElementSibling; node; node = node.nextElementSibling) { if (node.classList.contains(SuggestionPicker.ListEntryClass)) { this._isFocusByMouse = false; node.focus(); break; } } } else { this._element.querySelector("." + SuggestionPicker.ListEntryClass + ":first-child").focus(); } eventHandled = true; } else if (key === "Enter") { this.selectEntry(document.activeElement); eventHandled = true; } else if (key === "PageUp") { this._containerElement.scrollTop -= this._containerElement.clientHeight; // Scrolling causes mouseover event to be called and that tries to move the focus too. // To prevent flickering we won't focus if the current focus was caused by the mouse. if (!this._isFocusByMouse) this._findFirstVisibleEntry().focus(); eventHandled = true; } else if (key === "PageDown") { this._containerElement.scrollTop += this._containerElement.clientHeight; if (!this._isFocusByMouse) this._findLastVisibleEntry().focus(); eventHandled = true; } if (eventHandled) event.preventDefault(); }; /** * @param {!Event} event */ SuggestionPicker.prototype._handleEntryMouseOver = function(event) { var entry = enclosingNodeOrSelfWithClass(event.target, SuggestionPicker.ListEntryClass); if (!entry) return; this._isFocusByMouse = true; entry.focus(); event.preventDefault(); }; /** * @param {!Event} event */ SuggestionPicker.prototype._handleMouseOut = function(event) { if (!document.activeElement.classList.contains(SuggestionPicker.ListEntryClass)) return; this._isFocusByMouse = false; document.activeElement.blur(); event.preventDefault(); }; /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ body { -webkit-user-select: none; background-color: white; font: -webkit-small-control; margin: 0; overflow: hidden; } #main { background-color: white; border: solid 1px #8899aa; box-shadow: inset 2px 2px 2px white, inset -2px -2px 1px rgba(0,0,0,0.1); padding: 6px; float: left; } .color-swatch { float: left; width: 20px; height: 20px; margin: 1px; padding: 0; border: 1px solid #e0e0e0; box-sizing: content-box; } .color-swatch:focus { border: 1px solid #000000; outline: none; } .color-swatch-container { width: 100%; max-height: 104px; overflow: auto; display: flex; flex-flow: row wrap; align-items: center; } .other-color { width: 100%; margin: 4px 0 0 0; } "use strict"; /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var global = { argumentsReceived: false, params: null }; /** * @param {Event} event */ function handleMessage(event) { initialize(JSON.parse(event.data)); global.argumentsReceived = true; } /** * @param {!Object} args */ function initialize(args) { global.params = args; var main = $("main"); main.innerHTML = ""; var errorString = validateArguments(args); if (errorString) { main.textContent = "Internal error: " + errorString; resizeWindow(main.offsetWidth, main.offsetHeight); } else new ColorPicker(main, args); } // The DefaultColorPalette is used when the list of values are empty. var DefaultColorPalette = ["#000000", "#404040", "#808080", "#c0c0c0", "#ffffff", "#980000", "#ff0000", "#ff9900", "#ffff00", "#00ff00", "#00ffff", "#4a86e8", "#0000ff", "#9900ff", "#ff00ff"]; function handleArgumentsTimeout() { if (global.argumentsReceived) return; var args = { values : DefaultColorPalette, otherColorLabel: "Other..." }; initialize(args); } /** * @param {!Object} args * @return {?string} An error message, or null if the argument has no errors. */ function validateArguments(args) { if (!args.values) return "No values."; if (!args.otherColorLabel) return "No otherColorLabel."; return null; } function ColorPicker(element, config) { Picker.call(this, element, config); this._config = config; if (this._config.values.length === 0) this._config.values = DefaultColorPalette; this._container = null; this._layout(); document.body.addEventListener("keydown", this._handleKeyDown.bind(this)); this._element.addEventListener("mousemove", this._handleMouseMove.bind(this)); this._element.addEventListener("mousedown", this._handleMouseDown.bind(this)); } ColorPicker.prototype = Object.create(Picker.prototype); var SwatchBorderBoxWidth = 24; // keep in sync with CSS var SwatchBorderBoxHeight = 24; // keep in sync with CSS var SwatchesPerRow = 5; var SwatchesMaxRow = 4; ColorPicker.prototype._layout = function() { var container = createElement("div", "color-swatch-container"); container.addEventListener("click", this._handleSwatchClick.bind(this), false); for (var i = 0; i < this._config.values.length; ++i) { var swatch = createElement("button", "color-swatch"); swatch.dataset.index = i; swatch.dataset.value = this._config.values[i]; swatch.title = this._config.values[i]; swatch.style.backgroundColor = this._config.values[i]; container.appendChild(swatch); } var containerWidth = SwatchBorderBoxWidth * SwatchesPerRow; if (this._config.values.length > SwatchesPerRow * SwatchesMaxRow) containerWidth += getScrollbarWidth(); container.style.width = containerWidth + "px"; container.style.maxHeight = (SwatchBorderBoxHeight * SwatchesMaxRow) + "px"; this._element.appendChild(container); var otherButton = createElement("button", "other-color", this._config.otherColorLabel); otherButton.addEventListener("click", this.chooseOtherColor.bind(this), false); this._element.appendChild(otherButton); this._container = container; this._otherButton = otherButton; var elementWidth = this._element.offsetWidth; var elementHeight = this._element.offsetHeight; resizeWindow(elementWidth, elementHeight); }; ColorPicker.prototype.selectColorAtIndex = function(index) { index = Math.max(Math.min(this._container.childNodes.length - 1, index), 0); this._container.childNodes[index].focus(); }; ColorPicker.prototype._handleMouseMove = function(event) { if (event.target.classList.contains("color-swatch")) event.target.focus(); }; ColorPicker.prototype._handleMouseDown = function(event) { // Prevent blur. if (event.target.classList.contains("color-swatch")) event.preventDefault(); }; ColorPicker.prototype._handleKeyDown = function(event) { var key = event.keyIdentifier; if (key === "U+001B") // ESC this.handleCancel(); else if (key == "Left" || key == "Up" || key == "Right" || key == "Down") { var selectedElement = document.activeElement; var index = 0; if (selectedElement.classList.contains("other-color")) { if (key != "Right" && key != "Up") return; index = this._container.childNodes.length - 1; } else if (selectedElement.classList.contains("color-swatch")) { index = parseInt(selectedElement.dataset.index, 10); switch (key) { case "Left": index--; break; case "Right": index++; break; case "Up": index -= SwatchesPerRow; break; case "Down": index += SwatchesPerRow; break; } if (index > this._container.childNodes.length - 1) { this._otherButton.focus(); return; } } this.selectColorAtIndex(index); } event.preventDefault(); }; ColorPicker.prototype._handleSwatchClick = function(event) { if (event.target.classList.contains("color-swatch")) this.submitValue(event.target.dataset.value); }; if (window.dialogArguments) { initialize(dialogArguments); } else { window.addEventListener("message", handleMessage, false); window.setTimeout(handleArgumentsTimeout, 1000); } select { display: block; overflow-y: auto; } select hr { border-style: none; border-bottom: 1px solid black; margin: 0 0.5em; } option, optgroup { -webkit-padding-end: 2px; } .wrap option { white-space: pre-wrap; } "use strict"; // Copyright (c) 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var global = { argumentsReceived: false, params: null, picker: null }; /** * @param {Event} event */ function handleMessage(event) { window.removeEventListener("message", handleMessage, false); initialize(JSON.parse(event.data)); global.argumentsReceived = true; } /** * @param {!Object} args */ function initialize(args) { global.params = args; var main = $("main"); main.innerHTML = ""; global.picker = new ListPicker(main, args); } function handleArgumentsTimeout() { if (global.argumentsReceived) return; initialize({}); } /** * @constructor * @param {!Element} element * @param {!Object} config */ function ListPicker(element, config) { Picker.call(this, element, config); window.pagePopupController.selectFontsFromOwnerDocument(document); this._selectElement = createElement("select"); this._selectElement.size = 20; this._element.appendChild(this._selectElement); this._delayedChildrenConfig = null; this._delayedChildrenConfigIndex = 0; this._layout(); this._selectElement.addEventListener("mouseup", this._handleMouseUp.bind(this), false); this._selectElement.addEventListener("touchstart", this._handleTouchStart.bind(this), false); this._selectElement.addEventListener("keydown", this._handleKeyDown.bind(this), false); this._selectElement.addEventListener("change", this._handleChange.bind(this), false); window.addEventListener("message", this._handleWindowMessage.bind(this), false); window.addEventListener("mousemove", this._handleWindowMouseMove.bind(this), false); this._handleWindowTouchMoveBound = this._handleWindowTouchMove.bind(this); this._handleWindowTouchEndBound = this._handleWindowTouchEnd.bind(this); this._handleTouchSelectModeScrollBound = this._handleTouchSelectModeScroll.bind(this); this.lastMousePositionX = Infinity; this.lastMousePositionY = Infinity; this._selectionSetByMouseHover = false; this._trackingTouchId = null; this._handleWindowDidHide(); this._selectElement.focus(); this._selectElement.value = this._config.selectedIndex; } ListPicker.prototype = Object.create(Picker.prototype); ListPicker.prototype._handleWindowDidHide = function() { this._fixWindowSize(); var selectedOption = this._selectElement.options[this._selectElement.selectedIndex]; if (selectedOption) selectedOption.scrollIntoView(false); window.removeEventListener("didHide", this._handleWindowDidHideBound, false); }; ListPicker.prototype._handleWindowMessage = function(event) { eval(event.data); if (window.updateData.type === "update") { this._config.baseStyle = window.updateData.baseStyle; this._config.children = window.updateData.children; this._update(); } delete window.updateData; }; // This should be matched to the border width of the internal listbox // SELECT. See listPicker.css and html.css. ListPicker.ListboxSelectBorder = 1; ListPicker.prototype._handleWindowMouseMove = function (event) { var visibleTop = ListPicker.ListboxSelectBorder; var visibleBottom = this._selectElement.offsetHeight - ListPicker.ListboxSelectBorder; var optionBounds = event.target.getBoundingClientRect(); if (optionBounds.height >= 1.0) { // If the height of the visible part of event.target is less than 1px, // ignore this event because it may be an error by sub-pixel layout. if (optionBounds.top < visibleTop) { if (optionBounds.bottom - visibleTop < 1.0) return; } else if (optionBounds.bottom > visibleBottom) { if (visibleBottom - optionBounds.top < 1.0) return; } } this.lastMousePositionX = event.clientX; this.lastMousePositionY = event.clientY; this._highlightOption(event.target); this._selectionSetByMouseHover = true; // Prevent the select element from firing change events for mouse input. event.preventDefault(); }; ListPicker.prototype._handleMouseUp = function(event) { if (event.target.tagName !== "OPTION") return; window.pagePopupController.setValueAndClosePopup(0, this._selectElement.value); }; ListPicker.prototype._handleTouchStart = function(event) { if (this._trackingTouchId !== null) return; // Enter touch select mode. In touch select mode the highlight follows the // finger and on touchend the highlighted item is selected. var touch = event.touches[0]; this._trackingTouchId = touch.identifier; this._highlightOption(touch.target); this._selectionSetByMouseHover = false; this._selectElement.addEventListener("scroll", this._handleTouchSelectModeScrollBound, false); window.addEventListener("touchmove", this._handleWindowTouchMoveBound, false); window.addEventListener("touchend", this._handleWindowTouchEndBound, false); }; ListPicker.prototype._handleTouchSelectModeScroll = function(event) { this._exitTouchSelectMode(); }; ListPicker.prototype._exitTouchSelectMode = function(event) { this._trackingTouchId = null; this._selectElement.removeEventListener("scroll", this._handleTouchSelectModeScrollBound, false); window.removeEventListener("touchmove", this._handleWindowTouchMoveBound, false); window.removeEventListener("touchend", this._handleWindowTouchEndBound, false); }; ListPicker.prototype._handleWindowTouchMove = function(event) { if (this._trackingTouchId === null) return; var touch = this._getTouchForId(event.touches, this._trackingTouchId); if (!touch) return; this._highlightOption(document.elementFromPoint(touch.clientX, touch.clientY)); this._selectionSetByMouseHover = false; }; ListPicker.prototype._handleWindowTouchEnd = function(event) { if (this._trackingTouchId === null) return; var touch = this._getTouchForId(event.changedTouches, this._trackingTouchId); if (!touch) return; var target = document.elementFromPoint(touch.clientX, touch.clientY) if (target.tagName === "OPTION") window.pagePopupController.setValueAndClosePopup(0, this._selectElement.value); this._exitTouchSelectMode(); }; ListPicker.prototype._getTouchForId = function (touchList, id) { for (var i = 0; i < touchList.length; i++) { if (touchList[i].identifier === id) return touchList[i]; } return null; }; ListPicker.prototype._highlightOption = function(target) { if (target.tagName !== "OPTION" || target.selected) return; var savedScrollTop = this._selectElement.scrollTop; // TODO(tkent): Updating HTMLOptionElement::selected is not efficient. We // should optimize it, or use an alternative way. target.selected = true; this._selectElement.scrollTop = savedScrollTop; }; ListPicker.prototype._handleChange = function(event) { window.pagePopupController.setValue(this._selectElement.value); this._selectionSetByMouseHover = false; }; ListPicker.prototype._handleKeyDown = function(event) { var key = event.keyIdentifier; if (key === "U+001B") { // ESC window.pagePopupController.closePopup(); event.preventDefault(); } else if (key === "U+0009" /* TAB */ || key === "Enter") { window.pagePopupController.setValueAndClosePopup(0, this._selectElement.value); event.preventDefault(); } else if (event.altKey && (key === "Down" || key === "Up")) { // We need to add a delay here because, if we do it immediately the key // press event will be handled by HTMLSelectElement and this popup will // be reopened. setTimeout(function () { window.pagePopupController.closePopup(); }, 0); event.preventDefault(); } }; ListPicker.prototype._fixWindowSize = function() { this._selectElement.style.height = ""; var zoom = this._config.zoomFactor; var maxHeight = this._selectElement.offsetHeight * zoom; var noScrollHeight = (this._calculateScrollHeight() + ListPicker.ListboxSelectBorder * 2) * zoom; var scrollbarWidth = getScrollbarWidth() * zoom; var elementOffsetWidth = this._selectElement.offsetWidth * zoom; var desiredWindowHeight = noScrollHeight; var desiredWindowWidth = elementOffsetWidth; var expectingScrollbar = false; if (desiredWindowHeight > maxHeight) { desiredWindowHeight = maxHeight; // Setting overflow to auto does not increase width for the scrollbar // so we need to do it manually. desiredWindowWidth += scrollbarWidth; expectingScrollbar = true; } desiredWindowWidth = Math.max(this._config.anchorRectInScreen.width, desiredWindowWidth); var windowRect = adjustWindowRect(desiredWindowWidth, desiredWindowHeight, elementOffsetWidth, 0); // If the available screen space is smaller than maxHeight, we will get an unexpected scrollbar. if (!expectingScrollbar && windowRect.height < noScrollHeight) { desiredWindowWidth = windowRect.width + scrollbarWidth; windowRect = adjustWindowRect(desiredWindowWidth, windowRect.height, windowRect.width, windowRect.height); } this._selectElement.style.width = (windowRect.width / zoom) + "px"; this._selectElement.style.height = (windowRect.height / zoom) + "px"; this._element.style.height = (windowRect.height / zoom) + "px"; setWindowRect(windowRect); }; ListPicker.prototype._calculateScrollHeight = function() { // Element.scrollHeight returns an integer value but this calculate the // actual fractional value. var top = Infinity; var bottom = -Infinity; for (var i = 0; i < this._selectElement.children.length; i++) { var rect = this._selectElement.children[i].getBoundingClientRect(); // Skip hidden elements. if (rect.width === 0 && rect.height === 0) continue; top = Math.min(top, rect.top); bottom = Math.max(bottom, rect.bottom); } return Math.max(bottom - top, 0); }; ListPicker.prototype._listItemCount = function() { return this._selectElement.querySelectorAll("option,optgroup,hr").length; }; ListPicker.prototype._layout = function() { if (this._config.isRTL) this._element.classList.add("rtl"); this._selectElement.style.backgroundColor = this._config.baseStyle.backgroundColor; this._selectElement.style.color = this._config.baseStyle.color; this._selectElement.style.textTransform = this._config.baseStyle.textTransform; this._selectElement.style.fontSize = this._config.baseStyle.fontSize + "px"; this._selectElement.style.fontFamily = this._config.baseStyle.fontFamily.join(","); this._selectElement.style.fontStyle = this._config.baseStyle.fontStyle; this._selectElement.style.fontVariant = this._config.baseStyle.fontVariant; this._updateChildren(this._selectElement, this._config); }; ListPicker.prototype._update = function() { var scrollPosition = this._selectElement.scrollTop; var oldValue = this._selectElement.value; this._layout(); this._selectElement.value = this._config.selectedIndex; this._selectElement.scrollTop = scrollPosition; var optionUnderMouse = null; if (this._selectionSetByMouseHover) { var elementUnderMouse = document.elementFromPoint(this.lastMousePositionX, this.lastMousePositionY); optionUnderMouse = elementUnderMouse && elementUnderMouse.closest("option"); } if (optionUnderMouse) optionUnderMouse.selected = true; else this._selectElement.value = oldValue; this._selectElement.scrollTop = scrollPosition; this.dispatchEvent("didUpdate"); }; ListPicker.DelayedLayoutThreshold = 1000; /** * @param {!Element} parent Select element or optgroup element. * @param {!Object} config */ ListPicker.prototype._updateChildren = function(parent, config) { var outOfDateIndex = 0; var fragment = null; var inGroup = parent.tagName === "OPTGROUP"; var lastListIndex = -1; var limit = Math.max(this._config.selectedIndex, ListPicker.DelayedLayoutThreshold); var i; for (i = 0; i < config.children.length; ++i) { if (!inGroup && lastListIndex >= limit) break; var childConfig = config.children[i]; var item = this._findReusableItem(parent, childConfig, outOfDateIndex) || this._createItemElement(childConfig); this._configureItem(item, childConfig, inGroup); lastListIndex = item.value ? Number(item.value) : -1; if (outOfDateIndex < parent.children.length) { parent.insertBefore(item, parent.children[outOfDateIndex]); } else { if (!fragment) fragment = document.createDocumentFragment(); fragment.appendChild(item); } outOfDateIndex++; } if (fragment) { parent.appendChild(fragment); } else { var unused = parent.children.length - outOfDateIndex; for (var j = 0; j < unused; j++) { parent.removeChild(parent.lastElementChild); } } if (i < config.children.length) { // We don't bind |config.children| and |i| to _updateChildrenLater // because config.children can get invalid before _updateChildrenLater // is called. this._delayedChildrenConfig = config.children; this._delayedChildrenConfigIndex = i; // Needs some amount of delay to kick the first paint. setTimeout(this._updateChildrenLater.bind(this), 100); } }; ListPicker.prototype._updateChildrenLater = function(timeStamp) { if (!this._delayedChildrenConfig) return; var fragment = document.createDocumentFragment(); var startIndex = this._delayedChildrenConfigIndex; for (; this._delayedChildrenConfigIndex < this._delayedChildrenConfig.length; ++this._delayedChildrenConfigIndex) { var childConfig = this._delayedChildrenConfig[this._delayedChildrenConfigIndex]; var item = this._createItemElement(childConfig); this._configureItem(item, childConfig, false); fragment.appendChild(item); } this._selectElement.appendChild(fragment); this._selectElement.classList.add("wrap"); this._delayedChildrenConfig = null; }; ListPicker.prototype._findReusableItem = function(parent, config, startIndex) { if (startIndex >= parent.children.length) return null; var tagName = "OPTION"; if (config.type === "optgroup") tagName = "OPTGROUP"; else if (config.type === "separator") tagName = "HR"; for (var i = startIndex; i < parent.children.length; i++) { var child = parent.children[i]; if (tagName === child.tagName) { return child; } } return null; }; ListPicker.prototype._createItemElement = function(config) { var element; if (!config.type || config.type === "option") element = createElement("option"); else if (config.type === "optgroup") element = createElement("optgroup"); else if (config.type === "separator") element = createElement("hr"); return element; }; ListPicker.prototype._applyItemStyle = function(element, styleConfig) { if (!styleConfig) return; var style = element.style; style.visibility = styleConfig.visibility ? styleConfig.visibility : ""; style.display = styleConfig.display ? styleConfig.display : ""; style.direction = styleConfig.direction ? styleConfig.direction : ""; style.unicodeBidi = styleConfig.unicodeBidi ? styleConfig.unicodeBidi : ""; style.color = styleConfig.color ? styleConfig.color : ""; style.backgroundColor = styleConfig.backgroundColor ? styleConfig.backgroundColor : ""; style.fontSize = styleConfig.fontSize ? styleConfig.fontSize + "px" : ""; style.fontWeight = styleConfig.fontWeight ? styleConfig.fontWeight : ""; style.fontFamily = styleConfig.fontFamily ? styleConfig.fontFamily.join(",") : ""; style.fontStyle = styleConfig.fontStyle ? styleConfig.fontStyle : ""; style.fontVariant = styleConfig.fontVariant ? styleConfig.fontVariant : ""; style.textTransform = styleConfig.textTransform ? styleConfig.textTransform : ""; }; ListPicker.prototype._configureItem = function(element, config, inGroup) { if (!config.type || config.type === "option") { element.label = config.label; element.value = config.value; if (config.title) element.title = config.title; else element.removeAttribute("title"); element.disabled = !!config.disabled if (config.ariaLabel) element.setAttribute("aria-label", config.ariaLabel); else element.removeAttribute("aria-label"); element.style.webkitPaddingStart = this._config.paddingStart + "px"; if (inGroup) { element.style.webkitMarginStart = (- this._config.paddingStart) + "px"; // Should be synchronized with padding-end in listPicker.css. element.style.webkitMarginEnd = "-2px"; } } else if (config.type === "optgroup") { element.label = config.label; element.title = config.title; element.disabled = config.disabled; element.setAttribute("aria-label", config.ariaLabel); this._updateChildren(element, config); element.style.webkitPaddingStart = this._config.paddingStart + "px"; } else if (config.type === "separator") { element.title = config.title; element.disabled = config.disabled; element.setAttribute("aria-label", config.ariaLabel); if (inGroup) { element.style.webkitMarginStart = (- this._config.paddingStart) + "px"; // Should be synchronized with padding-end in listPicker.css. element.style.webkitMarginEnd = "-2px"; } } this._applyItemStyle(element, config.style); }; if (window.dialogArguments) { initialize(dialogArguments); } else { window.addEventListener("message", handleMessage, false); window.setTimeout(handleArgumentsTimeout, 1000); } RIFF$? WAVEfmt D? ? data ? ???? ???? ???? ?? ?? ?? ?? ?? ??! ! ?????? f ?????? A A?? ? .?.???@@???????'?'?7?7e???g)g)U??M@?@?????$$6?6??????/?/???||OO~~??rr????PP??`?`???? ? ?? ? ?? ? p?p?B?B?????` ` i i @?@?? ? ? ? ? ? ? ? I I \?\?????m?m???????Z?Z???b b ]]??~ ~ T?T?n n y???? ?? ????????????U?????????????????j??????????????????????????????????????????????????????~??#?#???s?s???????g?g???5?5?6?6?h?h???t?t?P?P?????d?d???l?l?u?u?????B?B?6?6???e?e?3?3?!?!?W?W?b?b?I?I?(?(?Y?Y?\?\?n?n?%?%???^?^???$?$???W?W? z?z? ?????????????????????? ??????????5 5 ????v?v???????????????j?j???????H?H????? ????????????????&