// SSSSSSSSSSSSSSS TTTTTTTTTTTTTTTTTTTTTTT OOOOOOOOO PPPPPPPPPPPPPPPPP // SS:::::::::::::::ST:::::::::::::::::::::T OO:::::::::OO P::::::::::::::::P // S:::::SSSSSS::::::ST:::::::::::::::::::::T OO:::::::::::::OO P::::::PPPPPP:::::P // S:::::S SSSSSSST:::::TT:::::::TT:::::TO:::::::OOO:::::::OPP:::::P P:::::P // S:::::S TTTTTT T:::::T TTTTTTO::::::O O::::::O P::::P P:::::P // S:::::S T:::::T O:::::O O:::::O P::::P P:::::P // S::::SSSS P::::PPPPPP:::::P // SS::::::SSSSS This file is generated. To update it, P:::::::::::::PP // SSS::::::::SS run roll_closure_compiler. P::::PPPPPPPPP // SSSSSS::::S P::::P // S:::::S T:::::T O:::::O O:::::O P::::P // S:::::S T:::::T O::::::O O::::::O P::::P // SSSSSSS S:::::S TT:::::::TT O:::::::OOO:::::::OPP::::::PP // S::::::SSSSSS:::::S T:::::::::T OO:::::::::::::OO P::::::::P // S:::::::::::::::SS T:::::::::T OO:::::::::OO P::::::::P // SSSSSSSSSSSSSSS TTTTTTTTTTT OOOOOOOOO PPPPPPPPPP /* * Copyright 2016 The Closure Compiler Authors. * * 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. */ /** * @fileoverview Closure compiler externs for the Polymer library. * Originally part of the Polymer Project. Original license below. * * @externs * @license * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt. The complete set of authors may be * found at http://polymer.github.io/AUTHORS.txt. The complete set of * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code * distributed by Google as part of the polymer project is also subject to an * additional IP rights grant found at http://polymer.github.io/PATENTS.txt. */ if (Math.random() < 1) { throw "polymer externs should not be executed"; } /** * @param {!{is: string}} descriptor The Polymer descriptor of the element. * @see https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#custom-element-registration */ var Polymer = function(descriptor) {}; /** * Re-evaluates and applies custom CSS properties based on dynamic * changes to this element's scope, such as adding or removing classes. * * For performance reasons, Polymer's custom CSS property shim relies * on this explicit signal from the user to indicate when changes have * been made that affect the values of custom properties. * * @param {Object=} properties Properties object which is mixed into * the document root `customStyle` property. This argument provides a * shortcut for setting `customStyle` and then calling `updateStyles`. * * @see http://polymer.github.io/polymer/ */ Polymer.updateStyles = function(properties) {}; /** @constructor @extends {HTMLElement} */ var PolymerElement = function() {}; /** * A mapping from ID to element in this Polymer Element's local DOM. * @type {!Object} */ PolymerElement.prototype.$; /** * True if the element has been attached to the DOM. * @type {boolean} */ PolymerElement.prototype.isAttached; /** * The root node of the element. * @type {!Node} */ PolymerElement.prototype.root; /** * The root node for the element. * Only exists if running under Shady Dom. * You usually want to use `this.root`. * * @type {?Node|undefined} */ PolymerElement.prototype.shadyRoot; /** * Returns the first node in this element’s local DOM that matches selector. * @param {string} selector * @return {Element} Element found by the selector, or null if not found. */ PolymerElement.prototype.$$ = function(selector) {}; /** @type {string} The Custom element tag name. */ PolymerElement.prototype.is; /** @type {string} The native element this element extends. */ PolymerElement.prototype.extends; /** * An array of objects whose properties get added to this element. * @see https://www.polymer-project.org/1.0/docs/devguide/behaviors.html * @type {!Array|undefined} */ PolymerElement.prototype.behaviors; /** * A string-separated list of dependent properties that should result in a * change function being called. These observers differ from single-property * observers in that the change handler is called asynchronously. * * @type {!Object|undefined} */ PolymerElement.prototype.observers; /** On create callback. */ PolymerElement.prototype.created = function() {}; /** On ready callback. */ PolymerElement.prototype.ready = function() {}; /** On registered callback. */ PolymerElement.prototype.registered = function() {}; /** On attached to the DOM callback. */ PolymerElement.prototype.attached = function() {}; /** On detached from the DOM callback. */ PolymerElement.prototype.detached = function() {}; /** * Callback fired when an attribute on the element has been changed. * * @param {string} name The name of the attribute that changed. */ PolymerElement.prototype.attributeChanged = function(name) {}; /** @typedef {!{ * type: !Function, * reflectToAttribute: (boolean|undefined), * readOnly: (boolean|undefined), * notify: (boolean|undefined), * value: *, * computed: (string|undefined), * observer: (string|undefined) * }} */ PolymerElement.PropertyConfig; /** @typedef {!Object} */ PolymerElement.Properties; /** @type {!PolymerElement.Properties} */ PolymerElement.prototype.properties; /** @type {!Object} */ PolymerElement.prototype.hostAttributes; /** * An object that maps events to event handler function names. * @type {!Object} */ PolymerElement.prototype.listeners; /** * Force this element to distribute its children to its local dom. * A user should call `distributeContent` if distribution has been * invalidated due to changes to selectors on child elements that * effect distribution that were not made via `Polymer.dom`. * For example, if an element contains an insertion point with * `` and a `foo` class is added to a child, * then `distributeContent` must be called to update * local dom distribution. * @param {boolean} updateInsertionPoints Shady DOM does not detect * insertion that is nested in a sub-tree being appended. * Set to true to distribute to newly added nested 's. */ PolymerElement.prototype.distributeContent = function(updateInsertionPoints) {}; /** * Return the element whose local dom within which this element is contained. * @type {?Element} */ PolymerElement.prototype.domHost; /** * Notifies the event binding system of a change to a property. * @param {string} path The path to set. * @param {*=} value The value to send in the update notification. * @param {boolean=} fromAbove When true, specifies that the change came from * above this element and thus upward notification is not necessary. * @return {boolean} True if notification actually took place, based on a dirty * check of whether the new value was already known. */ PolymerElement.prototype.notifyPath = function(path, value, fromAbove) {}; /** * @param {string} path Path that should be notified. * @param {!Array} splices Array of splice records indicating * ordered changes that occurred to the array. */ PolymerElement.prototype.notifySplices = function(path, splices) {}; /** * Convienence method for setting a value to a path and notifying any * elements bound to the same path. * * Note, if any part in the path except for the last is undefined, * this method does nothing (this method does not throw when * dereferencing undefined paths). * * @param {(string|Array<(string|number)>)} path Path to the value * to read. The path may be specified as a string (e.g. `foo.bar.baz`) * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that * bracketed expressions are not supported; string-based path parts * *must* be separated by dots. Note that when dereferencing array * indicies, the index may be used as a dotted part directly * (e.g. `users.12.name` or `['users', 12, 'name']`). * @param {*} value Value to set at the specified path. * @param {Object=} root Root object from which the path is evaluated. */ PolymerElement.prototype.set = function(path, value, root) {}; /** * Convienence method for reading a value from a path. * * Note, if any part in the path is undefined, this method returns * `undefined` (this method does not throw when dereferencing undefined * paths). * * @param {(string|Array<(string|number)>)} path Path to the value * to read. The path may be specified as a string (e.g. `foo.bar.baz`) * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that * bracketed expressions are not supported; string-based path parts * *must* be separated by dots. Note that when dereferencing array * indicies, the index may be used as a dotted part directly * (e.g. `users.12.name` or `['users', 12, 'name']`). * @param {Object=} root Root object from which the path is evaluated. * @return {*} Value at the path, or `undefined` if any part of the path * is undefined. */ PolymerElement.prototype.get = function(path, root) {}; /** * Adds items onto the end of the array at the path specified. * * The arguments after `path` and return value match that of * `Array.prototype.push`. * * This method notifies other paths to the same array that a * splice occurred to the array. * * @param {string} path Path to array. * @param {...*} var_args Items to push onto array * @return {number} New length of the array. */ PolymerElement.prototype.push = function(path, var_args) {}; /** * Removes an item from the end of array at the path specified. * * The arguments after `path` and return value match that of * `Array.prototype.pop`. * * This method notifies other paths to the same array that a * splice occurred to the array. * * @param {string} path Path to array. * @return {*} Item that was removed. */ PolymerElement.prototype.pop = function(path) {}; /** * Starting from the start index specified, removes 0 or more items * from the array and inserts 0 or more new itms in their place. * * The arguments after `path` and return value match that of * `Array.prototype.splice`. * * This method notifies other paths to the same array that a * splice occurred to the array. * * @param {string} path Path to array. * @param {number} start Index from which to start removing/inserting. * @param {number} deleteCount Number of items to remove. * @param {...*} var_args Items to insert into array. * @return {!Array} Array of removed items. */ PolymerElement.prototype.splice = function(path, start, deleteCount, var_args) {}; /** * Removes an item from the beginning of array at the path specified. * * The arguments after `path` and return value match that of * `Array.prototype.pop`. * * This method notifies other paths to the same array that a * splice occurred to the array. * * @param {string} path Path to array. * @return {*} Item that was removed. */ PolymerElement.prototype.shift = function(path) {}; /** * Adds items onto the beginning of the array at the path specified. * * The arguments after `path` and return value match that of * `Array.prototype.push`. * * This method notifies other paths to the same array that a * splice occurred to the array. * * @param {string} path Path to array. * @param {...*} var_args Items to insert info array * @return {number} New length of the array. */ PolymerElement.prototype.unshift = function(path, var_args) {}; /** * Returns a list of element children distributed to this element's * ``. * * If this element contans more than one `` in its * local DOM, an optional selector may be passed to choose the desired * content. This method differs from `getContentChildNodes` in that only * elements are returned. * * @param {string=} slctr CSS selector to choose the desired * ``. Defaults to `content`. * @return {!Array} List of distributed nodes for the * ``. */ PolymerElement.prototype.getContentChildren = function(slctr) {}; /** * Returns a list of nodes that are the effective childNodes. The effective * childNodes list is the same as the element's childNodes except that * any `` elements are replaced with the list of nodes distributed * to the ``, the result of its `getDistributedNodes` method. * * @return {!Array} List of effective child nodes. */ PolymerElement.prototype.getEffectiveChildNodes = function() {}; /** * Returns a list of elements that are the effective children. The effective * children list is the same as the element's children except that * any `` elements are replaced with the list of elements * distributed to the ``. * * @return {!Array} List of effective children. */ PolymerElement.prototype.getEffectiveChildren = function() {}; /** * Returns a string of text content that is the concatenation of the * text content's of the element's effective childNodes (the elements * returned by , * removed: !Array * }} */ var PolymerKeySplice; /** * @typedef {{ * indexSplices: ?Array, * keySplices: ?Array * }} */ var PolymerSpliceChange; /** * The type of the object received by an observer function when deep * sub-property observation is enabled. See: * https://www.polymer-project.org/1.0/docs/devguide/properties.html#deep-observation * * @typedef {{ * path: string, * value: (?Object|undefined), * base: (?Object|undefined) * }} */ var PolymerDeepPropertyChange; /** * The interface that iconsets should obey. Iconsets are registered by setting * their name in the IronMeta 'iconset' db, and a value of type Polymer.Iconset. * * Used by iron-icon but needs to live here since iron-icon, iron-iconset, etc don't * depend on each other at all and talk only through iron-meta. * * @interface */ Polymer.Iconset = function() {}; /** * Applies an icon to the given element as a css background image. This * method does not size the element, and it's usually necessary to set * the element's height and width so that the background image is visible. * * @param {Element} element The element to which the icon is applied. * @param {string} icon The name of the icon to apply. * @param {string=} theme (optional) The name or index of the icon to apply. * @param {number=} scale (optional, defaults to 1) Icon scaling factor. */ Polymer.Iconset.prototype.applyIcon = function( element, icon, theme, scale) {}; /** * Remove an icon from the given element by undoing the changes effected * by `applyIcon`. * * @param {Element} element The element from which the icon is removed. */ Polymer.Iconset.prototype.removeIcon = function(element) {}; Polymer.ResolveUrl = {}; /** * @param {string} cssText Some CSS text taken from ownerDocument. * @param {!Document} ownerDocument The source of the css. * @return {string} The given CSS text with its URLs rewritten to be based on * the primary document of this window rather than the given ownerDocument. */ Polymer.ResolveUrl.resolveCss = function(cssText, ownerDocument) {} /** * @param {!Element} element An element whose URL attributes need to be renormed. * @param {!Document} ownerDocument The document whose URL is the base of the * element's current attributes. */ Polymer.ResolveUrl.resolveAttrs = function(element, ownerDocument) {} /** * @param {string} url A url that needs to be renormed. * @param {?string} baseURI The current base of URL for the URL. * @return {string} The given url rewritten to be based on * the primary document of this window rather than the given url. */ Polymer.ResolveUrl.resolveUrl = function(url, baseURI) {} /** @const */ Polymer.RenderStatus = {}; /** * Makes callback when first render occurs or immediately if render has occured. * @param {!function()} cb Callback function to be invoked. */ Polymer.RenderStatus.whenReady = function(cb) {} /** * Queue up function call on next render. * @param {!Element} element The element on which the function call is made. * @param {!function()} fn The function called on next render. * @param {...*} args The function arguments. */ Polymer.RenderStatus.afterNextRender = function(element, fn, args) {} /** * Static analysis for Polymer. * @const */ var hydrolysis = {}; /** * A database of Polymer metadata defined in HTML * @param {boolean} attachAST If true, attach a parse5 compliant AST * @param {Object=} opt_loader An optional FileLoader used to load * external resources */ hydrolysis.Analyzer = function(attachAST, opt_loader) {}; /** * Shorthand for transitively loading and processing all imports * beginning at href. * @param {string} href The root import to begin loading from. * @param {Object=} opt_options Any additional options for the load. */ hydrolysis.Analyzer.analyze = function(href, opt_options) {}; /** * Contains information useful for debugging. Should not be used in production * code and the API may change on short notice. * @const */ Polymer.telemetry = {}; /** * Number of elements instantiated so far. * @type {number} */ Polymer.telemetry.instanceCount; /** * Array of all registered element prototypes. Being prototypes, not all runtime * properties will be available, but eg. `is` is always there. * @type {!Array} */ Polymer.telemetry.registrations; /** @const */ Polymer.AppLayout = {}; /** @constructor */ Polymer.AppLayout.LocalDomWithBackground = function(){}; /** @type {!HTMLElement} */ Polymer.AppLayout.LocalDomWithBackground.prototype.backgroundFrontLayer; /** @type {!HTMLElement} */ Polymer.AppLayout.LocalDomWithBackground.prototype.backgroundRearLayer; /** @type {!HTMLElement} */ Polymer.AppLayout.LocalDomWithBackground.prototype.background; /** * @constructor * @extends {PolymerElement} */ Polymer.AppLayout.ElementWithBackground = function(){}; // TODO(ajo): Follow up with app-layout team and remove private api from this prototype Polymer.AppLayout.ElementWithBackground.prototype = { /** @type {!Polymer.AppLayout.LocalDomWithBackground} */ $: null, /** @return {boolean} True if there's content below the current element */ isContentBelow: function(){}, /** Updates the elements scroll state */ _updateScrollState: function(){}, /** @return {boolean} true if the element is on screen */ isOnScreen: function(){}, /** @type {number} Internal bookkeeping to track screen position */ _deltaHeight: 0, /** @return {?Element} Element in local dom by id. */ _getDOMRef: function(title){} } /** @const */ Polymer.ArraySplice = {}; /** * Returns an array of splice records indicating the minimum edits required * to transform the `previous` array into the `current` array. * * Splice records are ordered by index and contain the following fields: * - `index`: index where edit started * - `removed`: array of removed items from this index * - `addedCount`: number of items added at this index * * This function is based on the Levenshtein "minimum edit distance" * algorithm. Note that updates are treated as removal followed by addition. * * The worst-case time complexity of this algorithm is `O(l * p)` * l: The length of the current array * p: The length of the previous array * * However, the worst-case complexity is reduced by an `O(n)` optimization * to detect any shared prefix & suffix between the two arrays and only * perform the more expensive minimum edit distance calculation over the * non-shared portions of the arrays. * * @param {!Array} current The "changed" array for which splices will be * calculated. * @param {!Array} previous The "unchanged" original array to compare * `current` against to determine the splices. * @return {!Array} Returns an array of splice record objects. Each of these * contains: `index` the location where the splice occurred; `removed` * the array of removed items from this location; `addedCount` the number * of items added at this location. */ Polymer.ArraySplice.calculateSplices = function(current, previous) {}; /** * @constructor @extends {PolymerElement} */ Polymer.DomModule = function() {}; /** * Retrieves the dom specified by `selector` in the module specified by * `id`. For example, this.import('foo', 'img'); * @param {string} id * @param {string=} opt_selector * @return {?HTMLElement} Returns the dom which matches `selector` in the module * at the specified `id`. */ Polymer.DomModule.import = function(id, opt_selector) {}; /** @const */ Polymer.Path = { /** * @param {string=} base * @param {string=} newBase * @param {string=} path * @return {string} */ translate: function(base, newBase, path) {}, /** * @param {string=} base * @param {string=} wildcard * @param {string=} path * @return {boolean} */ matches: function(base, wildcard, path) {} }; /** * For compatibility with both Polymer 1.0 and 2.0, code may check for certain * objects and properties which don't exist in Polymer 1.0. * * We give those objects and properties the `undefined` type here, because * the dependency tree will either contain these externs and Polymer 1.0 or * it will contain Polymer 2.0 which defines the full types. */ /** @type {undefined} */ var ShadyDOM; Polymer.flush; Polymer.enqueueDebouncer; Polymer.Async.animationFrame; Polymer.Async.idlePeriod; Polymer.Async.microTask; Polymer.Debouncer.debounce; Polymer.Templatizer.mutableData; Polymer.Templatizer.parentModel; Polymer.Templatizer.forwardHostProp; Polymer.Templatizer.notifyInstanceProp; Polymer.Templatizer._setPendingPropertyOrPath; Polymer.Templatizer._setPendingProperty; Polymer.Templatizer._instanceProps; /** * @param {number} index * @return {boolean} */ ArraySelectorElement.prototype.isIndexSelected = function(index) {};