summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/polymer/platform/platform.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/polymer/platform/platform.js.map')
-rw-r--r--chromium/third_party/polymer/platform/platform.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/chromium/third_party/polymer/platform/platform.js.map b/chromium/third_party/polymer/platform/platform.js.map
new file mode 100644
index 00000000000..0ff9cc5357a
--- /dev/null
+++ b/chromium/third_party/polymer/platform/platform.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"build/platform.js","sources":["../PointerGestures/src/PointerGestureEvent.js","../WeakMap/weakmap.js","../observe-js/src/observe.js","build/if-poly.js","../ShadowDOM/src/wrappers.js","../ShadowDOM/src/microtask.js","../ShadowDOM/src/MutationObserver.js","../ShadowDOM/src/wrappers/events.js","../ShadowDOM/src/wrappers/NodeList.js","../ShadowDOM/src/wrappers/Node.js","../ShadowDOM/src/querySelector.js","../ShadowDOM/src/wrappers/node-interfaces.js","../ShadowDOM/src/wrappers/CharacterData.js","../ShadowDOM/src/wrappers/Element.js","../ShadowDOM/src/wrappers/HTMLElement.js","../ShadowDOM/src/wrappers/HTMLCanvasElement.js","../ShadowDOM/src/wrappers/HTMLContentElement.js","../ShadowDOM/src/wrappers/HTMLImageElement.js","../ShadowDOM/src/wrappers/HTMLShadowElement.js","../ShadowDOM/src/wrappers/HTMLTemplateElement.js","../ShadowDOM/src/wrappers/HTMLMediaElement.js","../ShadowDOM/src/wrappers/HTMLAudioElement.js","../ShadowDOM/src/wrappers/HTMLOptionElement.js","../ShadowDOM/src/wrappers/HTMLUnknownElement.js","../ShadowDOM/src/wrappers/CanvasRenderingContext2D.js","../ShadowDOM/src/wrappers/WebGLRenderingContext.js","../ShadowDOM/src/wrappers/Range.js","../ShadowDOM/src/wrappers/generic.js","../ShadowDOM/src/wrappers/ShadowRoot.js","../ShadowDOM/src/ShadowRenderer.js","../ShadowDOM/src/wrappers/elements-with-form-property.js","../ShadowDOM/src/wrappers/Document.js","../ShadowDOM/src/wrappers/Window.js","../ShadowDOM/src/wrappers/override-constructors.js","src/patches-shadowdom-polyfill.js","src/ShadowCSS.js","src/patches-shadowdom-native.js","src/lang.js","src/dom.js","src/template.js","src/inspector.js","src/unresolved.js","../HTMLImports/src/HTMLImports.js","../HTMLImports/src/Parser.js","../HTMLImports/src/boot.js","../MutationObservers/MutationObserver.js","../CustomElements/src/scope.js","../CustomElements/src/Observer.js","../CustomElements/src/CustomElements.js","../CustomElements/src/Parser.js","../CustomElements/src/boot.js","src/patches-custom-elements.js","src/microtask.js","../PointerEvents/src/boot.js","../PointerEvents/src/touch-action.js","../PointerEvents/src/PointerEvent.js","../PointerEvents/src/pointermap.js","../PointerEvents/src/dispatcher.js","../PointerEvents/src/installer.js","../PointerEvents/src/mouse.js","../PointerEvents/src/touch.js","../PointerEvents/src/ms.js","../PointerEvents/src/platform-events.js","../PointerEvents/src/capture.js","../PointerGestures/src/initialize.js","../PointerGestures/src/pointermap.js","../PointerGestures/src/dispatcher.js","../PointerGestures/src/hold.js","../PointerGestures/src/track.js","../PointerGestures/src/flick.js","../PointerGestures/src/tap.js","../NodeBind/src/NodeBind.js","../TemplateBinding/src/TemplateBinding.js","../polymer-expressions/third_party/esprima/esprima.js","../polymer-expressions/src/polymer-expressions.js","src/patches-mdv.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,QAAA,qBAAA,EAAA,GACA,GAAA,GAAA,MACA,EAAA,SAAA,YAAA,SACA,GACA,QAAA,QAAA,EAAA,WAAA,EAAA,UAAA,EACA,WAAA,QAAA,EAAA,cAAA,EAAA,aAAA,EAGA,GAAA,UAAA,EAAA,EAAA,QAAA,EAAA,WAGA,KAAA,GADA,GAAA,EAAA,OAAA,KAAA,GACA,EAAA,EAAA,EAAA,EAAA,OAAA,IACA,EAAA,EAAA,GACA,EAAA,GAAA,EAAA,EAKA,OAFA,GAAA,WAAA,KAAA,WAEA,EC7BA,mBAAA,WACA,WAC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AGA,EAAA,EAAA,EAAA,EAAA,OAGA,qBAAA,SAAA,GACA,GAAA,GAAA,EAAA,4BACA,IAAA,EAAA,CAGA,GAAA,GAAA,EAAA,iBACA,EAAA,iBAAA,MACA,EAAA,KAEA,OAAA,UAAA,GACA,GAAA,GAAA,OAAA,OAAA,EAEA,OADA,GAAA,GAAA,EACA,MAKA,EAAA,mBAAA,GAEA,MC5eA,SAAA,GAUA,QAAA,KACA,IACA,GAAA,EACA,EAAA,eAAA,WACA,GAAA,EACA,SAAA,MAAA,QAAA,MAAA,oBACA,EAAA,6BACA,SAAA,MAAA,QAAA,cAdA,GAAA,GAAA,SAAA,cAAA,QACA,GAAA,YAAA,oEACA,IAAA,GAAA,SAAA,cAAA,OACA,GAAA,aAAA,EAAA,EAAA,WAGA,IAAA,GAcA,EAAA,GAUA,IATA,OAAA,iBAAA,qBAAA,WACA,IAEA,SAAA,mBACA,EAAA,UAAA,YAAA,EAAA,MAKA,OAAA,iBAAA,eAAA,UAAA,CACA,GAAA,GAAA,SAAA,UAAA,UACA,UAAA,UAAA,WAAA,SAAA,EAAA,GACA,GAAA,GAAA,EAAA,KAAA,KAAA,EAAA,EAEA,OADA,gBAAA,WAAA,GACA,GAKA,EAAA,MAAA,GAEA,OAAA","sourcesContent":["/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * PointerGestureEvent is the constructor for all PointerGesture events.\n *\n * @module PointerGestures\n * @class PointerGestureEvent\n * @extends UIEvent\n * @constructor\n * @param {String} inType Event type\n * @param {Object} [inDict] Dictionary of properties to initialize on the event\n */\n\nfunction PointerGestureEvent(inType, inDict) {\n var dict = inDict || {};\n var e = document.createEvent('Event');\n var props = {\n bubbles: Boolean(dict.bubbles) === dict.bubbles || true,\n cancelable: Boolean(dict.cancelable) === dict.cancelable || true\n };\n\n e.initEvent(inType, props.bubbles, props.cancelable);\n\n var keys = Object.keys(dict), k;\n for (var i = 0; i < keys.length; i++) {\n k = keys[i];\n e[k] = dict[k];\n }\n\n e.preventTap = this.preventTap;\n\n return e;\n}\n\n/**\n * Allows for any gesture to prevent the tap gesture.\n *\n * @method preventTap\n */\nPointerGestureEvent.prototype.preventTap = function() {\n this.tapPrevented = true;\n};\n\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (entry && entry[0] === key)\n entry[1] = value;\n else\n defineProperty(key, this.name, {value: [key, value], writable: true});\n },\n get: function(key) {\n var entry;\n return (entry = key[this.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n this.set(key, undefined);\n }\n };\n\n window.WeakMap = WeakMap;\n })();\n}\n","// Copyright 2012 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n var PROP_ADD_TYPE = 'add';\n var PROP_UPDATE_TYPE = 'update';\n var PROP_RECONFIGURE_TYPE = 'reconfigure';\n var PROP_DELETE_TYPE = 'delete';\n var ARRAY_SPLICE_TYPE = 'splice';\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function detectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n typeof Array.observe !== 'function') {\n return false;\n }\n\n var records = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n Object.observe(test, callback);\n test.id = 1;\n test.id = 2;\n delete test.id;\n Object.deliverChangeRecords(callback);\n if (records.length !== 3)\n return false;\n\n // TODO(rafaelw): Remove this when new change record type names make it to\n // chrome release.\n if (records[0].type == 'new' &&\n records[1].type == 'updated' &&\n records[2].type == 'deleted') {\n PROP_ADD_TYPE = 'new';\n PROP_UPDATE_TYPE = 'updated';\n PROP_RECONFIGURE_TYPE = 'reconfigured';\n PROP_DELETE_TYPE = 'deleted';\n } else if (records[0].type != 'add' ||\n records[1].type != 'update' ||\n records[2].type != 'delete') {\n console.error('Unexpected change record names for Object.observe. ' +\n 'Using dirty-checking instead');\n return false;\n }\n Object.unobserve(test, callback);\n\n test = [0];\n Array.observe(test, callback);\n test[1] = 1;\n test.length = 0;\n Object.deliverChangeRecords(callback);\n if (records.length != 2)\n return false;\n if (records[0].type != ARRAY_SPLICE_TYPE ||\n records[1].type != ARRAY_SPLICE_TYPE) {\n return false;\n }\n Array.unobserve(test, callback);\n\n return true;\n }\n\n var hasObserve = detectObjectObserve();\n\n function detectEval() {\n // don't test for eval if document has CSP securityPolicy object and we can see that\n // eval is not supported. This avoids an error message in console even when the exception\n // is caught\n if (global.document &&\n 'securityPolicy' in global.document &&\n !global.document.securityPolicy.allowsEval) {\n return false;\n }\n\n try {\n var f = new Function('', 'return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0;\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(obj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number.isNaN || function isNaN(value) {\n return typeof value === 'number' && global.isNaN(value);\n }\n\n function areSameValue(left, right) {\n if (left === right)\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var ident = identStart + '+' + identPart + '*';\n var elementIndex = '(?:[0-9]|[1-9]+[0-9]+)';\n var identOrElementIndex = '(?:' + ident + '|' + elementIndex + ')';\n var path = '(?:' + identOrElementIndex + ')(?:\\\\s*\\\\.\\\\s*' + identOrElementIndex + ')*';\n var pathRegExp = new RegExp('^' + path + '$');\n\n function isPathValid(s) {\n if (typeof s != 'string')\n return false;\n s = s.trim();\n\n if (s == '')\n return true;\n\n if (s[0] == '.')\n return false;\n\n return pathRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(s, privateToken) {\n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.get to retrieve path objects');\n\n if (s.trim() == '')\n return this;\n\n if (isIndex(s)) {\n this.push(s);\n return this;\n }\n\n s.split(/\\s*\\.\\s*/).filter(function(part) {\n return part;\n }).forEach(function(part) {\n this.push(part);\n }, this);\n\n if (hasEval && !hasObserve && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO(rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pathString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null)\n pathString = '';\n\n if (typeof pathString !== 'string')\n pathString = String(pathString);\n\n var path = pathCache[pathString];\n if (path)\n return path;\n if (!isPathValid(pathString))\n return invalidPath;\n var path = new Path(pathString, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n\n Path.prototype = createObject({\n __proto__: [],\n valid: true,\n\n toString: function() {\n return this.join('.');\n },\n\n getValueFrom: function(obj, observedSet) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n return;\n if (observedSet)\n observedSet.observe(obj);\n obj = obj[this[i]];\n }\n return obj;\n },\n\n compiledGetValueFromFn: function() {\n var accessors = this.map(function(ident) {\n return isIndex(ident) ? '[\"' + ident + '\"]' : '.' + ident;\n });\n\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n for (; i < (this.length - 1); i++) {\n var ident = this[i];\n pathString += accessors[i];\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n pathString += accessors[i];\n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0; i < this.length - 1; i++) {\n if (!isObject(obj))\n return false;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n\n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {\n observer.report_();\n cycles++;\n }\n if (global.testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n }\n\n function objectIsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.added) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff.changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n var oldObjectHas = {};\n\n for (var prop in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(prop in object)) {\n removed[prop] = undefined;\n continue;\n }\n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n continue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(object) && object.length !== oldObject.length)\n changed.length = object.length;\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n function copyObject(object, opt_copy) {\n var copy = opt_copy || (Array.isArray(object) ? [] : {});\n for (var prop in object) {\n copy[prop] = object[prop];\n };\n if (Array.isArray(object))\n copy.length = object.length;\n return copy;\n }\n\n function Observer(object, callback, target) {\n this.closed_ = false;\n this.object_ = object;\n this.callback = callback; // TODO(rafaelw): Used in NodeBind\n // TODO(rafaelw): Hold this.target weakly when WeakRef is available.\n this.target = target; // TODO(rafaelw): Used in NodeBind\n this.reporting_ = true;\n if (hasObserve) {\n var self = this;\n this.boundInternalCallback_ = function(records) {\n self.internalCallback_(records);\n };\n }\n\n addToAll(this);\n }\n\n Observer.prototype = {\n internalCallback_: function(records) {\n if (this.closed_)\n return;\n if (this.reporting_ && this.check_(records)) {\n this.report_();\n if (this.testingResults)\n this.testingResults.anyChanged = true;\n }\n },\n\n close: function() {\n if (this.closed_)\n return;\n if (this.object_ && typeof this.object_.close === 'function')\n this.object_.close();\n\n this.disconnect_();\n this.object_ = undefined;\n this.closed_ = true;\n },\n\n deliver: function(testingResults) {\n if (this.closed_)\n return;\n if (hasObserve) {\n this.testingResults = testingResults;\n Object.deliverChangeRecords(this.boundInternalCallback_);\n this.testingResults = undefined;\n } else {\n dirtyCheck(this);\n }\n },\n\n report_: function() {\n if (!this.reporting_)\n return;\n\n this.sync_(false);\n if (this.callback) {\n this.invokeCallback_(this.reportArgs);\n }\n this.reportArgs = undefined;\n },\n\n invokeCallback_: function(args) {\n try {\n this.callback.apply(this.target, args);\n } catch (ex) {\n Observer._errorThrownDuringCallback = true;\n console.error('Exception caught during observer callback: ' + (ex.stack || ex));\n }\n },\n\n reset: function() {\n if (this.closed_)\n return;\n\n if (hasObserve) {\n this.reporting_ = false;\n Object.deliverChangeRecords(this.boundInternalCallback_);\n this.reporting_ = true;\n }\n\n this.sync_(true);\n }\n }\n\n var collectObservers = !hasObserve || global.forceCollectObservers;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectObservers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n Observer._allObserversCount++;\n }\n\n var runningMicrotaskCheckpoint = false;\n\n var hasDebugForceFullDelivery = typeof Object.deliverAllChangeRecords == 'function';\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runningMicrotaskCheckpoint)\n return;\n\n if (hasDebugForceFullDelivery) {\n Object.deliverAllChangeRecords();\n return;\n }\n\n if (!collectObservers)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var results = {};\n\n do {\n cycles++;\n var toCheck = allObservers;\n allObservers = [];\n results.anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.closed_)\n continue;\n\n if (hasObserve) {\n observer.deliver(results);\n } else if (observer.check_()) {\n results.anyChanged = true;\n observer.report_();\n }\n\n allObservers.push(observer);\n }\n } while (cycles < MAX_DIRTY_CHECK_CYCLES && results.anyChanged);\n\n if (global.testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n Observer._allObserversCount = allObservers.length;\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserver(object, callback, target) {\n Observer.call(this, object, callback, target);\n this.connect_();\n this.sync_(true);\n }\n\n ObjectObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n connect_: function() {\n if (hasObserve)\n Object.observe(this.object_, this.boundInternalCallback_);\n },\n\n sync_: function(hard) {\n if (!hasObserve)\n this.oldObject = copyObject(this.object_);\n },\n\n check_: function(changeRecords) {\n var diff;\n var oldValues;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n\n oldValues = {};\n diff = diffObjectFromChangeRecords(this.object_, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject;\n diff = diffObjectFromOldObject(this.object_, this.oldObject);\n }\n\n if (diffIsEmpty(diff))\n return false;\n\n this.reportArgs =\n [diff.added || {}, diff.removed || {}, diff.changed || {}];\n this.reportArgs.push(function(property) {\n return oldValues[property];\n });\n\n return true;\n },\n\n disconnect_: function() {\n if (!hasObserve)\n this.oldObject = undefined;\n else if (this.object_)\n Object.unobserve(this.object_, this.boundInternalCallback_);\n }\n });\n\n function ArrayObserver(array, callback, target) {\n if (!Array.isArray(array))\n throw Error('Provided object is not an Array');\n ObjectObserver.call(this, array, callback, target);\n }\n\n ArrayObserver.prototype = createObject({\n __proto__: ObjectObserver.prototype,\n\n connect_: function() {\n if (hasObserve)\n Array.observe(this.object_, this.boundInternalCallback_);\n },\n\n sync_: function() {\n if (!hasObserve)\n this.oldObject = this.object_.slice();\n },\n\n check_: function(changeRecords) {\n var splices;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n splices = projectArraySplices(this.object_, changeRecords);\n } else {\n splices = calcSplices(this.object_, 0, this.object_.length,\n this.oldObject, 0, this.oldObject.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n this.reportArgs = [splices];\n return true;\n }\n });\n\n ArrayObserver.applySplices = function(previous, current, splices) {\n splices.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.removed.length];\n var addIndex = splice.index;\n while (addIndex < splice.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, spliceArgs);\n });\n };\n\n function ObservedSet(callback) {\n this.arr = [];\n this.callback = callback;\n this.isObserved = true;\n }\n\n // TODO(rafaelw): Consider surfacing a way to avoid observing prototype\n // ancestors which are expected not to change (e.g. Element, Node...).\n var objProto = Object.getPrototypeOf({});\n var arrayProto = Object.getPrototypeOf([]);\n ObservedSet.prototype = {\n reset: function() {\n this.isObserved = !this.isObserved;\n },\n\n observe: function(obj) {\n if (!isObject(obj) || obj === objProto || obj === arrayProto)\n return;\n var i = this.arr.indexOf(obj);\n if (i >= 0 && this.arr[i+1] === this.isObserved)\n return;\n\n if (i < 0) {\n i = this.arr.length;\n this.arr[i] = obj;\n Object.observe(obj, this.callback);\n }\n\n this.arr[i+1] = this.isObserved;\n this.observe(Object.getPrototypeOf(obj));\n },\n\n cleanup: function() {\n var i = 0, j = 0;\n var isObserved = this.isObserved;\n while(j < this.arr.length) {\n var obj = this.arr[j];\n if (this.arr[j + 1] == isObserved) {\n if (i < j) {\n this.arr[i] = obj;\n this.arr[i + 1] = isObserved;\n }\n i += 2;\n } else {\n Object.unobserve(obj, this.callback);\n }\n j += 2;\n }\n\n this.arr.length = i;\n }\n };\n\n function PathObserver(object, path, callback, target, transformFn,\n setValueFn) {\n var path = path instanceof Path ? path : getPath(path);\n if (!path.valid || !path.length || !isObject(object)) {\n this.value_ = path.getValueFrom(object);\n this.value = transformFn ? transformFn(this.value_) : this.value_;\n this.closed_ = true;\n return;\n }\n\n Observer.call(this, object, callback, target);\n this.transformFn_ = transformFn;\n this.setValueFn_ = setValueFn;\n this.path_ = path;\n\n this.connect_();\n this.sync_(true);\n }\n\n PathObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n connect_: function() {\n if (hasObserve)\n this.observedSet_ = new ObservedSet(this.boundInternalCallback_);\n },\n\n disconnect_: function() {\n this.value = undefined;\n this.value_ = undefined;\n if (this.observedSet_) {\n this.observedSet_.reset();\n this.observedSet_.cleanup();\n this.observedSet_ = undefined;\n }\n },\n\n check_: function() {\n // Note: Extracting this to a member function for use here and below\n // regresses dirty-checking path perf by about 25% =-(.\n if (this.observedSet_)\n this.observedSet_.reset();\n\n this.value_ = this.path_.getValueFrom(this.object_, this.observedSet_);\n\n if (this.observedSet_)\n this.observedSet_.cleanup();\n\n if (areSameValue(this.value_, this.oldValue_))\n return false;\n\n this.value = this.transformFn_ ? this.transformFn_(this.value_)\n : this.value_;\n this.reportArgs = [this.value, this.oldValue];\n return true;\n },\n\n sync_: function(hard) {\n if (hard) {\n if (this.observedSet_)\n this.observedSet_.reset();\n\n this.value_ = this.path_.getValueFrom(this.object_, this.observedSet_);\n this.value = this.transformFn_ ? this.transformFn_(this.value_)\n : this.value_;\n\n if (this.observedSet_)\n this.observedSet_.cleanup();\n }\n\n this.oldValue_ = this.value_;\n this.oldValue = this.value;\n },\n\n setValue: function(newValue) {\n if (this.setValueFn_)\n this.setValueFn_(newValue);\n else if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function CompoundPathObserver(callback, target, transformFn, setValueFn) {\n Observer.call(this, undefined, callback, target);\n this.transformFn_ = transformFn;\n this.setValueFn_ = setValueFn;\n\n this.observed_ = [];\n this.values_ = [];\n this.value = undefined;\n this.oldValue = undefined;\n this.oldValues_ = undefined;\n this.changeFlags_ = undefined;\n this.started_ = false;\n }\n\n CompoundPathObserver.prototype = createObject({\n __proto__: PathObserver.prototype,\n\n // TODO(rafaelw): Consider special-casing when |object| is a PathObserver\n // and path 'value' to avoid explicit observation.\n addPath: function(object, path) {\n if (this.started_)\n throw Error('Cannot add more paths once started.');\n\n var path = path instanceof Path ? path : getPath(path);\n var value = path.getValueFrom(object);\n\n this.observed_.push(object, path);\n this.values_.push(value);\n },\n\n start: function() {\n this.started_ = true;\n this.connect_();\n this.sync_(true);\n },\n\n getValues_: function() {\n if (this.observedSet_)\n this.observedSet_.reset();\n\n var anyChanged = false;\n for (var i = 0; i < this.observed_.length; i = i+2) {\n var path = this.observed_[i+1];\n var object = this.observed_[i];\n var value = path.getValueFrom(object, this.observedSet_);\n var oldValue = this.values_[i/2];\n if (!areSameValue(value, oldValue)) {\n if (!anyChanged && !this.transformFn_) {\n this.oldValues_ = this.oldValues_ || [];\n this.changeFlags_ = this.changeFlags_ || [];\n for (var j = 0; j < this.values_.length; j++) {\n this.oldValues_[j] = this.values_[j];\n this.changeFlags_[j] = false;\n }\n }\n\n if (!this.transformFn_)\n this.changeFlags_[i/2] = true;\n\n this.values_[i/2] = value;\n anyChanged = true;\n }\n }\n\n if (this.observedSet_)\n this.observedSet_.cleanup();\n\n return anyChanged;\n },\n\n check_: function() {\n if (!this.getValues_())\n return;\n\n if (this.transformFn_) {\n this.value = this.transformFn_(this.values_);\n\n if (areSameValue(this.value, this.oldValue))\n return false;\n\n this.reportArgs = [this.value, this.oldValue];\n } else {\n this.reportArgs = [this.values_, this.oldValues_, this.changeFlags_,\n this.observed_];\n }\n\n return true;\n },\n\n sync_: function(hard) {\n if (hard) {\n this.getValues_();\n if (this.transformFn_)\n this.value = this.transformFn_(this.values_);\n }\n\n if (this.transformFn_)\n this.oldValue = this.value;\n },\n\n close: function() {\n if (this.observed_) {\n for (var i = 0; i < this.observed_.length; i = i + 2) {\n var object = this.observed_[i];\n if (object && typeof object.close === 'function')\n object.close();\n }\n this.observed_ = undefined;\n this.values_ = undefined;\n }\n\n Observer.prototype.close.call(this);\n }\n });\n\n var expectedRecordTypes = {};\n expectedRecordTypes[PROP_ADD_TYPE] = true;\n expectedRecordTypes[PROP_UPDATE_TYPE] = true;\n expectedRecordTypes[PROP_DELETE_TYPE] = true;\n\n function notifyFunction(object, name) {\n if (typeof Object.observe !== 'function')\n return;\n\n var notifier = Object.getNotifier(object);\n return function(type, oldValue) {\n var changeRecord = {\n object: object,\n type: type,\n name: name\n };\n if (arguments.length === 2)\n changeRecord.oldValue = oldValue;\n notifier.notify(changeRecord);\n }\n }\n\n // TODO(rafaelw): It should be possible for the Object.observe case to have\n // every PathObserver used by defineProperty share a single Object.observe\n // callback, and thus get() can simply call observer.deliver() and any changes\n // to any dependent value will be observed.\n PathObserver.defineProperty = function(target, name, object, path) {\n // TODO(rafaelw): Validate errors\n path = getPath(path);\n var notify = notifyFunction(target, name);\n\n var observer = new PathObserver(object, path,\n function(newValue, oldValue) {\n if (notify)\n notify(PROP_UPDATE_TYPE, oldValue);\n }\n );\n\n Object.defineProperty(target, name, {\n get: function() {\n return path.getValueFrom(object);\n },\n set: function(newValue) {\n path.setValueFrom(object, newValue);\n },\n configurable: true\n });\n\n return {\n close: function() {\n var oldValue = path.getValueFrom(object);\n if (notify)\n observer.deliver();\n observer.close();\n Object.defineProperty(target, name, {\n value: oldValue,\n writable: true,\n configurable: true\n });\n }\n };\n }\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n if (!expectedRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n\n if (!(record.name in oldValues))\n oldValues[record.name] = record.oldValue;\n\n if (record.type == PROP_UPDATE_TYPE)\n continue;\n\n if (record.type == PROP_ADD_TYPE) {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in added) {\n delete added[record.name];\n delete oldValues[record.name];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n function newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDIT_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array items in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy'\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n // leaves the substring '123' intact.\n calcEditDistances: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n var distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by finding\n // the minimum previous weight recursively until the origin of the weight\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n var northWest = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n /**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calcSplices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0;\n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n var splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldStart;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n },\n\n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(current, old, searchLength) {\n var index1 = current.length;\n var index2 = old.length;\n var count = 0;\n while (count < searchLength && this.equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previousValue) {\n return currentValue === previousValue;\n }\n };\n\n var arraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arraySplice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, start2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n return -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n return 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersect, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap\n else\n return end1 - start1; // Contained\n }\n }\n\n function mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSplice(index, removed, addedCount);\n\n var inserted = false;\n var insertionOffset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n current.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n splice.addedCount += current.addedCount - intersectCount;\n var deleteCount = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < current.index) {\n // some prefix of splice.removed is prepended to current.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.removed.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = splice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice.removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.index < current.index) {\n // Insert splice here.\n\n inserted = true;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecords) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n switch(record.type) {\n case ARRAY_SPLICE_TYPE:\n mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);\n break;\n case PROP_ADD_TYPE:\n case PROP_UPDATE_TYPE:\n case PROP_DELETE_TYPE:\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldValue], 1);\n break;\n default:\n console.error('Unexpected record type: ' + JSON.stringify(record));\n break;\n }\n }\n\n return splices;\n }\n\n function projectArraySplices(array, changeRecords) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).forEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.length == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.Observer.hasObjectObserve = hasObserve;\n global.ArrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = function(current, previous) {\n return arraySplice.calculateSplices(current, previous);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = ObjectObserver;\n global.PathObserver = PathObserver;\n global.CompoundPathObserver = CompoundPathObserver;\n global.Path = Path;\n\n // TODO(rafaelw): Only needed for testing until new change record names\n // make it to release.\n global.Observer.changeRecordTypes = {\n add: PROP_ADD_TYPE,\n update: PROP_UPDATE_TYPE,\n reconfigure: PROP_RECONFIGURE_TYPE,\n 'delete': PROP_DELETE_TYPE,\n splice: ARRAY_SPLICE_TYPE\n };\n})(typeof global !== 'undefined' && global ? global : this || window);\n","// prepoulate window.Platform.flags for default controls\r\nwindow.Platform = window.Platform || {};\r\n// prepopulate window.logFlags if necessary\r\nwindow.logFlags = window.logFlags || {};\r\n// process flags\r\n(function(scope){\r\n // import\r\n var flags = scope.flags || {};\r\n // populate flags from location\r\n location.search.slice(1).split('&').forEach(function(o) {\r\n o = o.split('=');\r\n o[0] && (flags[o[0]] = o[1] || true);\r\n });\r\n // If any of these flags match 'native', then force native ShadowDOM; any\r\n // other truthy value, or failure to detect native\r\n // ShadowDOM, results in polyfill \r\n flags.shadow = (flags.shadow || flags.shadowdom || flags.polyfill);\r\n if (flags.shadow === 'native') {\r\n flags.shadow = false;\r\n } else {\r\n flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot\r\n && 'polyfill';\r\n }\r\n\r\n\r\n\r\n // export\r\n scope.flags = flags;\r\n})(Platform);\r\n// select ShadowDOM impl\r\nif (Platform.flags.shadow === 'polyfill') {","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use strict';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = new WeakMap();\n var wrappers = Object.create(null);\n\n // Don't test for eval if document has CSP securityPolicy object and we can\n // see that eval is not supported. This avoids an error message in console\n // even when the exception is caught\n var hasEval = !('securityPolicy' in document) ||\n document.securityPolicy.allowsEval;\n if (hasEval) {\n try {\n var f = new Function('', 'return true;');\n hasEval = f();\n } catch (ex) {\n hasEval = false;\n }\n }\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to, from) {\n getOwnPropertyNames(from).forEach(function(name) {\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n });\n return to;\n };\n\n function mixinStatics(to, from) {\n getOwnPropertyNames(from).forEach(function(name) {\n switch (name) {\n case 'arguments':\n case 'caller':\n case 'length':\n case 'name':\n case 'prototype':\n case 'toString':\n return;\n }\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n });\n return to;\n };\n\n function oneOf(object, propertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (propertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=855844\n // Make sure they are create before we start modifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstructor(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n if (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrapperConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n installProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function registerInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(instanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.test(navigator.userAgent);\n\n // This is used as a fallback when getting the descriptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: function() {},\n set: function(v) {},\n configurable: true,\n enumerable: true\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test(name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9]*$/.test(name);\n }\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name) :\n function() { return this.impl[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('v', 'this.impl.' + name + ' = v') :\n function(v) { this.impl[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name +\n '.apply(this.impl, arguments)') :\n function() { return this.impl[name].apply(this.impl, arguments); };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception.\n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDescriptor;\n }\n }\n\n function installProperty(source, target, allowMethod, opt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'polymerBlackList_')\n continue;\n\n if (name in target)\n continue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindings.\n source.__lookupGetter__(name);\n }\n var descriptor = getDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name);\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || descriptor.set) {\n if (isEvent)\n setter = scope.getEventHandlerSetter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enumerable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance If present, this is used to extract\n * properties from an instance object.\n */\n function register(nativeConstructor, wrapperConstructor, opt_instance) {\n var nativePrototype = nativeConstructor.prototype;\n registerInternal(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperConstructor, nativeConstructor);\n }\n\n function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperConstructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefined);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nativePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingProperties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n registerInstanceProperties(wrapperPrototype, opt_instance);\n defineProperty(wrapperPrototype, 'constructor', {\n value: wrapperConstructor,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n\n function isWrapperFor(wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativeConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Creates a generic wrapper constructor based on |object| and its\n * constructor.\n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.getPrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor(nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object);\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(superWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWrapperConstructor.call(this, node);\n }\n GeneratedWrapper.prototype =\n Object.create(superWrapperConstructor.prototype);\n GeneratedWrapper.prototype.constructor = GeneratedWrapper;\n\n return GeneratedWrapper;\n }\n\n var OriginalDOMImplementation = window.DOMImplementation;\n var OriginalEvent = window.Event;\n var OriginalNode = window.Node;\n var OriginalWindow = window.Window;\n var OriginalRange = window.Range;\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n function isWrapper(object) {\n return object instanceof wrappers.EventTarget ||\n object instanceof wrappers.Event ||\n object instanceof wrappers.Range ||\n object instanceof wrappers.DOMImplementation ||\n object instanceof wrappers.CanvasRenderingContext2D ||\n wrappers.WebGLRenderingContext &&\n object instanceof wrappers.WebGLRenderingContext;\n }\n\n function isNative(object) {\n return object instanceof OriginalNode ||\n object instanceof OriginalEvent ||\n object instanceof OriginalWindow ||\n object instanceof OriginalRange ||\n object instanceof OriginalDOMImplementation ||\n object instanceof OriginalCanvasRenderingContext2D ||\n OriginalWebGLRenderingContext &&\n object instanceof OriginalWebGLRenderingContext;\n }\n\n /**\n * Wraps a node in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNode}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n\n assert(isNative(impl));\n return impl.polymerWrapper_ ||\n (impl.polymerWrapper_ = new (getWrapperConstructor(impl))(impl));\n }\n\n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) {\n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper));\n return wrapper.impl;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @param {Object} object\n * @return {Object} The native implementation object.\n */\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrapper.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null)\n return;\n assert(isNative(node));\n assert(wrapper === undefined || isWrapper(wrapper));\n node.polymerWrapper_ = wrapper;\n }\n\n function defineGetter(constructor, name, getter) {\n defineProperty(constructor.prototype, name, {\n get: getter,\n configurable: true,\n enumerable: true\n });\n }\n\n function defineWrapGetter(constructor, name) {\n defineGetter(constructor, name, function() {\n return wrap(this.impl[name]);\n });\n }\n\n /**\n * Forwards existing methods on the native object to the wrapper methods.\n * This does not wrap any of the arguments or the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n constructors.forEach(function(constructor) {\n names.forEach(function(name) {\n constructor.prototype[name] = function() {\n var w = wrapIfNeeded(this);\n return w[name].apply(w, arguments);\n };\n });\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = constructorTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defineWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n scope.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = oneOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = register;\n scope.rewrap = rewrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwrapIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope.wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalMutationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < copies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutationObserver) {\n var counter = 1;\n var observer = new OriginalMutationObserver(handle);\n var textNode = document.createTextNode(counter);\n observer.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n function setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.setEndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMicrotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function scheduleCallback(observer) {\n if (isScheduled)\n return;\n setEndOfMicrotask(notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg.org/#mutation-observers\n function notifyObservers() {\n isScheduled = false;\n\n do {\n var notifyList = globalMutationObservers.slice();\n var anyNonEmpty = false;\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n var queue = mo.takeRecords();\n removeTransientObserversFor(mo);\n if (queue.length) {\n mo.callback_(queue, mo);\n anyNonEmpty = true;\n }\n }\n } while (anyNonEmpty);\n }\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = new wrappers.NodeList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * Registers transient observers to ancestor and its ancesors for the node\n * which was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; ancestor = ancestor.parentNode) {\n var registrations = registrationsTable.get(ancestor);\n if (!registrations)\n continue;\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.options.subtree)\n registration.addTransientObserver(node);\n }\n }\n }\n\n function removeTransientObserversFor(observer) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var node = observer.nodes_[i];\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObservers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutation-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.create(null);\n\n // 2.\n for (var node = target; node; node = node.parentNode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n // 1.\n if (node !== target && !options.subtree)\n continue;\n\n // 2.\n if (type === 'attributes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either options's attributeFilter does not contain name or namespace\n // is non-null, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.indexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continue;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If either type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // interested observers to oldValue.\n if (type === 'attributes' && options.attributeOldValue ||\n type === 'characterData' && options.characterDataOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n var anyRecordsEnqueued = false;\n\n // 4.\n for (var uid in interestedObservers) {\n var observer = interestedObservers[uid];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = data.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data.removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.previousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSibling)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (associatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[uid];\n\n // 8.\n observer.records_.push(record);\n\n anyRecordsEnqueued = true;\n }\n\n if (anyRecordsEnqueued)\n scheduleCallback();\n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} options\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree;\n\n // 1. If either options' attributeOldValue or attributeFilter is present\n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' characterDataOldValue is present and options'\n // characterData is omitted, set options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!this.attributes &&\n (options.attributeOldValue || 'attributeFilter' in options) ||\n // 5.\n !this.characterData && options.characterDataOldValue) {\n throw new TypeError();\n }\n\n this.characterData = !!options.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attributeFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError();\n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n\n // This will leak. There is no way to implement this without WeakRefs :'(\n globalMutationObservers.push(this);\n }\n\n MutationObserver.prototype = {\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration(this, target, newOptions);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transientObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutation = enqueueMutation;\n scope.registerTransientObservers = registerTransientObservers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrappers.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap();\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmediatePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n return node instanceof wrappers.ShadowRoot;\n }\n\n function isInsertionPoint(node) {\n var localName = node.localName;\n return localName === 'content' || localName === 'shadow';\n }\n\n function isShadowHost(node) {\n return !!node.shadowRoot;\n }\n\n function getEventParent(node) {\n var dv;\n return node.parentNode || (dv = node.defaultView) && wrap(dv) || null;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-adjusted-parent\n function calculateParents(node, context, ancestors) {\n if (ancestors.length)\n return ancestors.shift();\n\n // 1.\n if (isShadowRoot(node))\n return getInsertionParent(node) || node.host;\n\n // 2.\n var eventParents = scope.eventParentsTable.get(node);\n if (eventParents) {\n // Copy over the remaining event parents for next iteration.\n for (var i = 1; i < eventParents.length; i++) {\n ancestors[i - 1] = eventParents[i];\n }\n return eventParents[0];\n }\n\n // 3.\n if (context && isInsertionPoint(node)) {\n var parentNode = node.parentNode;\n if (parentNode && isShadowHost(parentNode)) {\n var trees = scope.getShadowTrees(parentNode);\n var p = getInsertionParent(context);\n for (var i = 0; i < trees.length; i++) {\n if (trees[i].contains(p))\n return p;\n }\n }\n }\n\n return getEventParent(node);\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#event-retargeting\n function retarget(node) {\n var stack = []; // 1.\n var ancestor = node; // 2.\n var targets = [];\n var ancestors = [];\n while (ancestor) { // 3.\n var context = null; // 3.2.\n // TODO(arv): Change order of these. If the stack is empty we always end\n // up pushing ancestor, no matter what.\n if (isInsertionPoint(ancestor)) { // 3.1.\n context = topMostNotInsertionPoint(stack); // 3.1.1.\n var top = stack[stack.length - 1] || ancestor; // 3.1.2.\n stack.push(top);\n } else if (!stack.length) {\n stack.push(ancestor); // 3.3.\n }\n var target = stack[stack.length - 1]; // 3.4.\n targets.push({target: target, currentTarget: ancestor}); // 3.5.\n if (isShadowRoot(ancestor)) // 3.6.\n stack.pop(); // 3.6.1.\n\n ancestor = calculateParents(ancestor, context, ancestors); // 3.7.\n }\n return targets;\n }\n\n function topMostNotInsertionPoint(stack) {\n for (var i = stack.length - 1; i >= 0; i--) {\n if (!isInsertionPoint(stack[i]))\n return stack[i];\n }\n return null;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-adjusted-related-target\n function adjustRelatedTarget(target, related) {\n var ancestors = [];\n while (target) { // 3.\n var stack = []; // 3.1.\n var ancestor = related; // 3.2.\n var last = undefined; // 3.3. Needs to be reset every iteration.\n while (ancestor) {\n var context = null;\n if (!stack.length) {\n stack.push(ancestor);\n } else {\n if (isInsertionPoint(ancestor)) { // 3.4.3.\n context = topMostNotInsertionPoint(stack);\n // isDistributed is more general than checking whether last is\n // assigned into ancestor.\n if (isDistributed(last)) { // 3.4.3.2.\n var head = stack[stack.length - 1];\n stack.push(head);\n }\n }\n }\n\n if (inSameTree(ancestor, target)) // 3.4.4.\n return stack[stack.length - 1];\n\n if (isShadowRoot(ancestor)) // 3.4.5.\n stack.pop();\n\n last = ancestor; // 3.4.6.\n ancestor = calculateParents(ancestor, context, ancestors); // 3.4.7.\n }\n if (isShadowRoot(target)) // 3.5.\n target = target.host;\n else\n target = target.parentNode; // 3.6.\n }\n }\n\n function getInsertionParent(node) {\n return scope.insertionParentTable.get(node);\n }\n\n function isDistributed(node) {\n return getInsertionParent(node);\n }\n\n function rootOfNode(node) {\n var p;\n while (p = node.parentNode) {\n node = p;\n }\n return node;\n }\n\n function inSameTree(a, b) {\n return rootOfNode(a) === rootOfNode(b);\n }\n\n function enclosedBy(a, b) {\n if (a === b)\n return true;\n if (a instanceof wrappers.ShadowRoot)\n return enclosedBy(rootOfNode(a.host), b);\n return false;\n }\n\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n\n return dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (currentlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError')\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure that the event path is correct.\n scope.renderAllPending();\n var eventPath = retarget(originalWrapperTarget);\n\n // For window load events the load event is dispatched at the window but\n // the target is set to the document.\n //\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end\n //\n // TODO(arv): Find a less hacky way to do this.\n if (event.type === 'load' &&\n eventPath.length === 2 &&\n eventPath[0].target instanceof wrappers.Document) {\n eventPath.shift();\n }\n\n eventPathTable.set(event, eventPath);\n\n if (dispatchCapturing(event, eventPath)) {\n if (dispatchAtTarget(event, eventPath)) {\n dispatchBubbling(event, eventPath);\n }\n }\n\n eventPhaseTable.set(event, Event.NONE);\n currentTargetTable.delete(event, null);\n currentlyDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath) {\n var phase;\n\n for (var i = eventPath.length - 1; i > 0; i--) {\n var target = eventPath[i].target;\n var currentTarget = eventPath[i].currentTarget;\n if (target === currentTarget)\n continue;\n\n phase = Event.CAPTURING_PHASE;\n if (!invoke(eventPath[i], event, phase))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath) {\n var phase = Event.AT_TARGET;\n return invoke(eventPath[0], event, phase);\n }\n\n function dispatchBubbling(event, eventPath) {\n var bubbles = event.bubbles;\n var phase;\n\n for (var i = 1; i < eventPath.length; i++) {\n var target = eventPath[i].target;\n var currentTarget = eventPath[i].currentTarget;\n if (target === currentTarget)\n phase = Event.AT_TARGET;\n else if (bubbles && !stopImmediatePropagationTable.get(event))\n phase = Event.BUBBLING_PHASE;\n else\n continue;\n\n if (!invoke(eventPath[i], event, phase))\n return;\n }\n }\n\n function invoke(tuple, event, phase) {\n var target = tuple.target;\n var currentTarget = tuple.currentTarget;\n\n var listeners = listenersTable.get(currentTarget);\n if (!listeners)\n return true;\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (originalEvent.relatedTarget) {\n var relatedTarget = wrap(originalEvent.relatedTarget);\n\n var adjusted = adjustRelatedTarget(currentTarget, relatedTarget);\n if (adjusted === target)\n return true;\n\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.type;\n\n var anyRemoved = false;\n targetTable.set(event, target);\n currentTargetTable.set(event, currentTarget);\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listener.capture && phase === Event.CAPTURING_PHASE ||\n listener.capture && phase === Event.BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (typeof listener.handler === 'function')\n listener.handler.call(currentTarget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\n } catch (ex) {\n if (window.onerror)\n window.onerror(ex.message);\n else\n console.error(ex, ex.stack);\n }\n }\n\n if (anyRemoved) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTable.get(event);\n }\n\n function Listener(type, handler, capture) {\n this.type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\n }\n Listener.prototype = {\n equals: function(that) {\n return this.handler === that.handler && this.type === that.type &&\n this.capture === that.capture;\n },\n get removed() {\n return this.handler === null;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList_ = {returnValue: true};\n\n /**\n * Creates a new Event wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event(type, options) {\n if (type instanceof OriginalEvent)\n this.impl = type;\n else\n return wrap(constructEvent(OriginalEvent, 'Event', type, options));\n }\n Event.prototype = {\n get target() {\n return targetTable.get(this);\n },\n get currentTarget() {\n return currentTargetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTable.get(this);\n },\n get path() {\n var nodeList = new wrappers.NodeList();\n var eventPath = eventPathTable.get(this);\n if (eventPath) {\n var index = 0;\n var lastIndex = eventPath.length - 1;\n var baseRoot = rootOfNode(currentTargetTable.get(this));\n\n for (var i = 0; i <= lastIndex; i++) {\n var currentTarget = eventPath[i].currentTarget;\n var currentRoot = rootOfNode(currentTarget);\n if (enclosedBy(baseRoot, currentRoot) &&\n // Make sure we do not add Window to the path.\n (i !== lastIndex || currentTarget instanceof wrappers.Node)) {\n nodeList[index++] = currentTarget;\n }\n }\n nodeList.length = index;\n }\n return nodeList;\n },\n stopPropagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, true);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n registerWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function unwrapOptions(options) {\n if (!options || !options.relatedTarget)\n return options;\n return Object.create(options, {\n relatedTarget: {value: unwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(name, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var GenericEvent = function(type, options) {\n if (type instanceof OriginalEvent)\n this.impl = type;\n else\n return wrap(constructEvent(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Object.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent.prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Safari fails on new FocusEvent (and others?).\n // - IE does not support event constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(OriginalEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEvent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n return relatedTargetTable.get(this) || wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFunction(name, relatedTargetIndex) {\n return function() {\n arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(this);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEventProto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: getInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEvent = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEvent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In case the browser does not support event constructors we polyfill that\n // by calling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `initFooEvent` are derived from the registered default event init dict.\n var defaultInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function() {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a new native event.\n */\n function constructEvent(OriginalEvent, name, type, options) {\n if (supportsEventConstructors)\n return new OriginalEvent(type, unwrapOptions(options));\n\n // Create the arguments from the default dictionary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict).forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].apply(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInitDicts[name] = initDict;\n };\n\n // The order of the default event init dictionary keys is important, the\n // arguments to initFooEvent is derived from that.\n configureEventConstructor('Event', {bubbles: false, cancelable: false});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n function BeforeUnloadEvent(impl) {\n Event.call(this);\n }\n BeforeUnloadEvent.prototype = Object.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get returnValue() {\n return this.impl.returnValue;\n },\n set returnValue(v) {\n this.impl.returnValue = v;\n }\n });\n\n function isValidListener(fun) {\n if (typeof fun === 'function')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOMNodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRemovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTarget} impl The original event target.\n * @constructor\n */\n function EventTarget(impl) {\n this.impl = impl;\n }\n\n // Node and Window have different internal type checks in WebKit so we cannot\n // use the same method as the original function.\n var methodNames = [\n 'addEventListener',\n 'removeEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(function(constructor) {\n var p = constructor.prototype;\n methodNames.forEach(function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]});\n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper instanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap(wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(type, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n listeners = [];\n listenersTable.set(this, listeners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]))\n return;\n }\n }\n\n listeners.push(listener);\n\n var target = getTargetToListenAt(this);\n target.addEventListener_(type, dispatchOriginalEvent, true);\n },\n removeEventListener: function(type, fun, capture) {\n capture = Boolean(capture);\n var listeners = listenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this);\n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n dispatchEvent(event, this);\n }\n };\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventTarget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethodsToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = document.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) {\n scope.renderAllPending();\n\n var element = wrap(originalElementFromPoint.call(document.impl, x, y));\n var targets = retarget(element, this)\n for (var i = 0; i < targets.length; i++) {\n var target = targets[i];\n if (target.currentTarget === self)\n return target.target;\n }\n return null;\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inlineEventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[name].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlineEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inlineEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e.preventDefault();\n else if (name === 'onbeforeunload' && typeof rv === 'string')\n e.returnValue = rv;\n // mouseover uses true for preventDefault but preventDefault for\n // mouseover is ignored by browsers these day.\n };\n\n this.addEventListener(eventType, wrapped, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.adjustRelatedTarget = adjustRelatedTarget;\n scope.elementFromPoint = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTargetMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Event = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusEvent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers.UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var wrap = scope.wrap;\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, {enumerable: false});\n }\n\n function NodeList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n NodeList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n nonEnum(NodeList.prototype, 'item');\n\n function wrapNodeList(list) {\n if (list == null)\n return list;\n var wrapperList = new NodeList();\n for (var i = 0, length = list.length; i < length; i++) {\n wrapperList[i] = wrap(list[i]);\n }\n wrapperList.length = length;\n return wrapperList;\n }\n\n function addWrapNodeListMethod(wrapperConstructor, name) {\n wrapperConstructor.prototype[name] = function() {\n return wrapNodeList(this.impl[name].apply(this.impl, arguments));\n };\n }\n\n scope.wrappers.NodeList = NodeList;\n scope.addWrapNodeListMethod = addWrapNodeListMethod;\n scope.wrapNodeList = wrapNodeList;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var NodeList = scope.wrappers.NodeList;\n var assert = scope.assert;\n var defineWrapGetter = scope.defineWrapGetter;\n var enqueueMutation = scope.enqueueMutation;\n var isWrapper = scope.isWrapper;\n var mixin = scope.mixin;\n var registerTransientObservers = scope.registerTransientObservers;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapIfNeeded = scope.wrapIfNeeded;\n\n function assertIsNodeWrapper(node) {\n assert(node instanceof Node);\n }\n\n function createOneElementNodeList(node) {\n var nodes = new NodeList();\n nodes[0] = node;\n nodes.length = 1;\n return nodes;\n }\n\n var surpressMutations = false;\n\n /**\n * Called before node is inserted into a node to enqueue its removal from its\n * old parent.\n * @param {!Node} node The node that is about to be removed.\n * @param {!Node} parent The parent node that the node is being removed from.\n * @param {!NodeList} nodes The collected nodes.\n */\n function enqueueRemovalForInsertedNodes(node, parent, nodes) {\n enqueueMutation(parent, 'childList', {\n removedNodes: nodes,\n previousSibling: node.previousSibling,\n nextSibling: node.nextSibling\n });\n }\n\n function enqueueRemovalForInsertedDocumentFragment(df, nodes) {\n enqueueMutation(df, 'childList', {\n removedNodes: nodes\n });\n }\n\n /**\n * Collects nodes from a DocumentFragment or a Node for removal followed\n * by an insertion.\n *\n * This updates the internal pointers for node, previousNode and nextNode.\n */\n function collectNodes(node, parentNode, previousNode, nextNode) {\n if (node instanceof DocumentFragment) {\n var nodes = collectNodesForDocumentFragment(node);\n\n // The extra loop is to work around bugs with DocumentFragments in IE.\n surpressMutations = true;\n for (var i = nodes.length - 1; i >= 0; i--) {\n node.removeChild(nodes[i]);\n nodes[i].parentNode_ = parentNode;\n }\n surpressMutations = false;\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].previousSibling_ = nodes[i - 1] || previousNode;\n nodes[i].nextSibling_ = nodes[i + 1] || nextNode;\n }\n\n if (previousNode)\n previousNode.nextSibling_ = nodes[0];\n if (nextNode)\n nextNode.previousSibling_ = nodes[nodes.length - 1];\n\n return nodes;\n }\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent) {\n // This will enqueue the mutation record for the removal as needed.\n oldParent.removeChild(node);\n }\n\n node.parentNode_ = parentNode;\n node.previousSibling_ = previousNode;\n node.nextSibling_ = nextNode;\n if (previousNode)\n previousNode.nextSibling_ = node;\n if (nextNode)\n nextNode.previousSibling_ = node;\n\n return nodes;\n }\n\n function collectNodesNative(node) {\n if (node instanceof DocumentFragment)\n return collectNodesForDocumentFragment(node);\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent)\n enqueueRemovalForInsertedNodes(node, oldParent, nodes);\n return nodes;\n }\n\n function collectNodesForDocumentFragment(node) {\n var nodes = new NodeList();\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n nodes[i++] = child;\n }\n nodes.length = i;\n enqueueRemovalForInsertedDocumentFragment(node, nodes);\n return nodes;\n }\n\n function snapshotNodeList(nodeList) {\n // NodeLists are not live at the moment so just return the same object.\n return nodeList;\n }\n\n // http://dom.spec.whatwg.org/#node-is-inserted\n function nodeWasAdded(node) {\n node.nodeIsInserted_();\n }\n\n function nodesWereAdded(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n nodeWasAdded(nodes[i]);\n }\n }\n\n // http://dom.spec.whatwg.org/#node-is-removed\n function nodeWasRemoved(node) {\n // Nothing at this point in time.\n }\n\n function nodesWereRemoved(nodes) {\n // Nothing at this point in time.\n }\n\n function ensureSameOwnerDocument(parent, child) {\n var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ?\n parent : parent.ownerDocument;\n if (ownerDoc !== child.ownerDocument)\n ownerDoc.adoptNode(child);\n }\n\n function adoptNodesIfNeeded(owner, nodes) {\n if (!nodes.length)\n return;\n\n var ownerDoc = owner.ownerDocument;\n\n // All nodes have the same ownerDocument when we get here.\n if (ownerDoc === nodes[0].ownerDocument)\n return;\n\n for (var i = 0; i < nodes.length; i++) {\n scope.adoptNodeNoRemove(nodes[i], ownerDoc);\n }\n }\n\n function unwrapNodesForInsertion(owner, nodes) {\n adoptNodesIfNeeded(owner, nodes);\n var length = nodes.length;\n\n if (length === 1)\n return unwrap(nodes[0]);\n\n var df = unwrap(owner.ownerDocument.createDocumentFragment());\n for (var i = 0; i < length; i++) {\n df.appendChild(unwrap(nodes[i]));\n }\n return df;\n }\n\n function removeAllChildNodes(wrapper) {\n if (wrapper.invalidateShadowRenderer()) {\n var childWrapper = wrapper.firstChild;\n while (childWrapper) {\n assert(childWrapper.parentNode === wrapper);\n var nextSibling = childWrapper.nextSibling;\n var childNode = unwrap(childWrapper);\n var parentNode = childNode.parentNode;\n if (parentNode)\n originalRemoveChild.call(parentNode, childNode);\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = null;\n childWrapper = nextSibling;\n }\n wrapper.firstChild_ = wrapper.lastChild_ = null;\n } else {\n var node = unwrap(wrapper);\n var child = node.firstChild;\n var nextSibling;\n while (child) {\n nextSibling = child.nextSibling;\n originalRemoveChild.call(node, child);\n child = nextSibling;\n }\n }\n }\n\n function invalidateParent(node) {\n var p = node.parentNode;\n return p && p.invalidateShadowRenderer();\n }\n\n var OriginalNode = window.Node;\n\n /**\n * This represents a wrapper of a native DOM node.\n * @param {!Node} original The original DOM node, aka, the visual DOM node.\n * @constructor\n * @extends {EventTarget}\n */\n function Node(original) {\n assert(original instanceof OriginalNode);\n\n EventTarget.call(this, original);\n\n // These properties are used to override the visual references with the\n // logical ones. If the value is undefined it means that the logical is the\n // same as the visual.\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.parentNode_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.firstChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.lastChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.nextSibling_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.previousSibling_ = undefined;\n };\n\n var OriginalDocumentFragment = window.DocumentFragment;\n var originalAppendChild = OriginalNode.prototype.appendChild;\n var originalCompareDocumentPosition =\n OriginalNode.prototype.compareDocumentPosition;\n var originalInsertBefore = OriginalNode.prototype.insertBefore;\n var originalRemoveChild = OriginalNode.prototype.removeChild;\n var originalReplaceChild = OriginalNode.prototype.replaceChild;\n\n var isIe = /Trident/.test(navigator.userAgent);\n\n var removeChildOriginalHelper = isIe ?\n function(parent, child) {\n try {\n originalRemoveChild.call(parent, child);\n } catch (ex) {\n if (!(parent instanceof OriginalDocumentFragment))\n throw ex;\n }\n } :\n function(parent, child) {\n originalRemoveChild.call(parent, child);\n };\n\n Node.prototype = Object.create(EventTarget.prototype);\n mixin(Node.prototype, {\n appendChild: function(childWrapper) {\n return this.insertBefore(childWrapper, null);\n },\n\n insertBefore: function(childWrapper, refWrapper) {\n assertIsNodeWrapper(childWrapper);\n\n var refNode;\n if (refWrapper) {\n if (isWrapper(refWrapper)) {\n refNode = unwrap(refWrapper);\n } else {\n refNode = refWrapper;\n refWrapper = wrap(refNode);\n }\n } else {\n refWrapper = null;\n refNode = null;\n }\n\n refWrapper && assert(refWrapper.parentNode === this);\n\n var nodes;\n var previousNode =\n refWrapper ? refWrapper.previousSibling : this.lastChild;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(childWrapper);\n\n if (useNative)\n nodes = collectNodesNative(childWrapper);\n else\n nodes = collectNodes(childWrapper, this, previousNode, refWrapper);\n\n if (useNative) {\n ensureSameOwnerDocument(this, childWrapper);\n originalInsertBefore.call(this.impl, unwrap(childWrapper), refNode);\n } else {\n if (!previousNode)\n this.firstChild_ = nodes[0];\n if (!refWrapper)\n this.lastChild_ = nodes[nodes.length - 1];\n\n var parentNode = refNode ? refNode.parentNode : this.impl;\n\n // insertBefore refWrapper no matter what the parent is?\n if (parentNode) {\n originalInsertBefore.call(parentNode,\n unwrapNodesForInsertion(this, nodes), refNode);\n } else {\n adoptNodesIfNeeded(this, nodes);\n }\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n nextSibling: refWrapper,\n previousSibling: previousNode\n });\n\n nodesWereAdded(nodes);\n\n return childWrapper;\n },\n\n removeChild: function(childWrapper) {\n assertIsNodeWrapper(childWrapper);\n if (childWrapper.parentNode !== this) {\n // IE has invalid DOM trees at times.\n var found = false;\n var childNodes = this.childNodes;\n for (var ieChild = this.firstChild; ieChild;\n ieChild = ieChild.nextSibling) {\n if (ieChild === childWrapper) {\n found = true;\n break;\n }\n }\n if (!found) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n }\n\n var childNode = unwrap(childWrapper);\n var childWrapperNextSibling = childWrapper.nextSibling;\n var childWrapperPreviousSibling = childWrapper.previousSibling;\n\n if (this.invalidateShadowRenderer()) {\n // We need to remove the real node from the DOM before updating the\n // pointers. This is so that that mutation event is dispatched before\n // the pointers have changed.\n var thisFirstChild = this.firstChild;\n var thisLastChild = this.lastChild;\n\n var parentNode = childNode.parentNode;\n if (parentNode)\n removeChildOriginalHelper(parentNode, childNode);\n\n if (thisFirstChild === childWrapper)\n this.firstChild_ = childWrapperNextSibling;\n if (thisLastChild === childWrapper)\n this.lastChild_ = childWrapperPreviousSibling;\n if (childWrapperPreviousSibling)\n childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;\n if (childWrapperNextSibling) {\n childWrapperNextSibling.previousSibling_ =\n childWrapperPreviousSibling;\n }\n\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = undefined;\n } else {\n removeChildOriginalHelper(this.impl, childNode);\n }\n\n if (!surpressMutations) {\n enqueueMutation(this, 'childList', {\n removedNodes: createOneElementNodeList(childWrapper),\n nextSibling: childWrapperNextSibling,\n previousSibling: childWrapperPreviousSibling\n });\n }\n\n registerTransientObservers(this, childWrapper);\n\n return childWrapper;\n },\n\n replaceChild: function(newChildWrapper, oldChildWrapper) {\n assertIsNodeWrapper(newChildWrapper);\n\n var oldChildNode;\n if (isWrapper(oldChildWrapper)) {\n oldChildNode = unwrap(oldChildWrapper);\n } else {\n oldChildNode = oldChildWrapper;\n oldChildWrapper = wrap(oldChildNode);\n }\n\n if (oldChildWrapper.parentNode !== this) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n\n var nextNode = oldChildWrapper.nextSibling;\n var previousNode = oldChildWrapper.previousSibling;\n var nodes;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(newChildWrapper);\n\n if (useNative) {\n nodes = collectNodesNative(newChildWrapper);\n } else {\n if (nextNode === newChildWrapper)\n nextNode = newChildWrapper.nextSibling;\n nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);\n }\n\n if (!useNative) {\n if (this.firstChild === oldChildWrapper)\n this.firstChild_ = nodes[0];\n if (this.lastChild === oldChildWrapper)\n this.lastChild_ = nodes[nodes.length - 1];\n\n oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ =\n oldChildWrapper.parentNode_ = undefined;\n\n // replaceChild no matter what the parent is?\n if (oldChildNode.parentNode) {\n originalReplaceChild.call(\n oldChildNode.parentNode,\n unwrapNodesForInsertion(this, nodes),\n oldChildNode);\n }\n } else {\n ensureSameOwnerDocument(this, newChildWrapper);\n originalReplaceChild.call(this.impl, unwrap(newChildWrapper),\n oldChildNode);\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n removedNodes: createOneElementNodeList(oldChildWrapper),\n nextSibling: nextNode,\n previousSibling: previousNode\n });\n\n nodeWasRemoved(oldChildWrapper);\n nodesWereAdded(nodes);\n\n return oldChildWrapper;\n },\n\n /**\n * Called after a node was inserted. Subclasses override this to invalidate\n * the renderer as needed.\n * @private\n */\n nodeIsInserted_: function() {\n for (var child = this.firstChild; child; child = child.nextSibling) {\n child.nodeIsInserted_();\n }\n },\n\n hasChildNodes: function() {\n return this.firstChild !== null;\n },\n\n /** @type {Node} */\n get parentNode() {\n // If the parentNode has not been overridden, use the original parentNode.\n return this.parentNode_ !== undefined ?\n this.parentNode_ : wrap(this.impl.parentNode);\n },\n\n /** @type {Node} */\n get firstChild() {\n return this.firstChild_ !== undefined ?\n this.firstChild_ : wrap(this.impl.firstChild);\n },\n\n /** @type {Node} */\n get lastChild() {\n return this.lastChild_ !== undefined ?\n this.lastChild_ : wrap(this.impl.lastChild);\n },\n\n /** @type {Node} */\n get nextSibling() {\n return this.nextSibling_ !== undefined ?\n this.nextSibling_ : wrap(this.impl.nextSibling);\n },\n\n /** @type {Node} */\n get previousSibling() {\n return this.previousSibling_ !== undefined ?\n this.previousSibling_ : wrap(this.impl.previousSibling);\n },\n\n get parentElement() {\n var p = this.parentNode;\n while (p && p.nodeType !== Node.ELEMENT_NODE) {\n p = p.parentNode;\n }\n return p;\n },\n\n get textContent() {\n // TODO(arv): This should fallback to this.impl.textContent if there\n // are no shadow trees below or above the context node.\n var s = '';\n for (var child = this.firstChild; child; child = child.nextSibling) {\n s += child.textContent;\n }\n return s;\n },\n set textContent(textContent) {\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n removeAllChildNodes(this);\n if (textContent !== '') {\n var textNode = this.impl.ownerDocument.createTextNode(textContent);\n this.appendChild(textNode);\n }\n } else {\n this.impl.textContent = textContent;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes);\n },\n\n get childNodes() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstChild; child; child = child.nextSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n cloneNode: function(deep) {\n var clone = wrap(this.impl.cloneNode(false));\n if (deep) {\n for (var child = this.firstChild; child; child = child.nextSibling) {\n clone.appendChild(child.cloneNode(true));\n }\n }\n // TODO(arv): Some HTML elements also clone other data like value.\n return clone;\n },\n\n contains: function(child) {\n if (!child)\n return false;\n\n child = wrapIfNeeded(child);\n\n // TODO(arv): Optimize using ownerDocument etc.\n if (child === this)\n return true;\n var parentNode = child.parentNode;\n if (!parentNode)\n return false;\n return this.contains(parentNode);\n },\n\n compareDocumentPosition: function(otherNode) {\n // This only wraps, it therefore only operates on the composed DOM and not\n // the logical DOM.\n return originalCompareDocumentPosition.call(this.impl, unwrap(otherNode));\n }\n });\n\n defineWrapGetter(Node, 'ownerDocument');\n\n // We use a DocumentFragment as a base and then delete the properties of\n // DocumentFragment.prototype from the wrapper Node. Since delete makes\n // objects slow in some JS engines we recreate the prototype object.\n registerWrapper(OriginalNode, Node, document.createDocumentFragment());\n delete Node.prototype.querySelector;\n delete Node.prototype.querySelectorAll;\n Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);\n\n scope.nodeWasAdded = nodeWasAdded;\n scope.nodeWasRemoved = nodeWasRemoved;\n scope.nodesWereAdded = nodesWereAdded;\n scope.nodesWereRemoved = nodesWereRemoved;\n scope.snapshotNodeList = snapshotNodeList;\n scope.wrappers.Node = Node;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n function findOne(node, selector) {\n var m, el = node.firstElementChild;\n while (el) {\n if (el.matches(selector))\n return el;\n m = findOne(el, selector);\n if (m)\n return m;\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function findAll(node, selector, results) {\n var el = node.firstElementChild;\n while (el) {\n if (el.matches(selector))\n results[results.length++] = el;\n findAll(el, selector, results);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n // find and findAll will only match Simple Selectors,\n // Structural Pseudo Classes are not guarenteed to be correct\n // http://www.w3.org/TR/css3-selectors/#simple-selectors\n\n var SelectorsInterface = {\n querySelector: function(selector) {\n return findOne(this, selector);\n },\n querySelectorAll: function(selector) {\n return findAll(this, selector, new NodeList())\n }\n };\n\n var GetElementsByInterface = {\n getElementsByTagName: function(tagName) {\n // TODO(arv): Check tagName?\n return this.querySelectorAll(tagName);\n },\n getElementsByClassName: function(className) {\n // TODO(arv): Check className?\n return this.querySelectorAll('.' + className);\n },\n getElementsByTagNameNS: function(ns, tagName) {\n if (ns === '*')\n return this.getElementsByTagName(tagName);\n\n // TODO(arv): Check tagName?\n var result = new NodeList;\n var els = this.getElementsByTagName(tagName);\n for (var i = 0, j = 0; i < els.length; i++) {\n if (els[i].namespaceURI === ns)\n result[j++] = els[i];\n }\n result.length = j;\n return result;\n }\n };\n\n scope.GetElementsByInterface = GetElementsByInterface;\n scope.SelectorsInterface = SelectorsInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var NodeList = scope.wrappers.NodeList;\n\n function forwardElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.nextSibling;\n }\n return node;\n }\n\n function backwardsElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.previousSibling;\n }\n return node;\n }\n\n var ParentNodeInterface = {\n get firstElementChild() {\n return forwardElement(this.firstChild);\n },\n\n get lastElementChild() {\n return backwardsElement(this.lastChild);\n },\n\n get childElementCount() {\n var count = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n count++;\n }\n return count;\n },\n\n get children() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n }\n };\n\n var ChildNodeInterface = {\n get nextElementSibling() {\n return forwardElement(this.nextSibling);\n },\n\n get previousElementSibling() {\n return backwardsElement(this.previousSibling);\n }\n };\n\n scope.ChildNodeInterface = ChildNodeInterface;\n scope.ParentNodeInterface = ParentNodeInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var Node = scope.wrappers.Node;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalCharacterData = window.CharacterData;\n\n function CharacterData(node) {\n Node.call(this, node);\n }\n CharacterData.prototype = Object.create(Node.prototype);\n mixin(CharacterData.prototype, {\n get textContent() {\n return this.data;\n },\n set textContent(value) {\n this.data = value;\n },\n get data() {\n return this.impl.data;\n },\n set data(value) {\n var oldValue = this.impl.data;\n enqueueMutation(this, 'characterData', {\n oldValue: oldValue\n });\n this.impl.data = value;\n }\n });\n\n mixin(CharacterData.prototype, ChildNodeInterface);\n\n registerWrapper(OriginalCharacterData, CharacterData,\n document.createTextNode(''));\n\n scope.wrappers.CharacterData = CharacterData;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var addWrapNodeListMethod = scope.addWrapNodeListMethod;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var registerWrapper = scope.registerWrapper;\n var wrappers = scope.wrappers;\n\n var OriginalElement = window.Element;\n\n var matchesName = oneOf(OriginalElement.prototype, [\n 'matches',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'webkitMatchesSelector',\n ]);\n\n var originalMatches = OriginalElement.prototype[matchesName];\n\n function invalidateRendererBasedOnAttribute(element, name) {\n // Only invalidate if parent node is a shadow host.\n var p = element.parentNode;\n if (!p || !p.shadowRoot)\n return;\n\n var renderer = scope.getRendererForHost(p);\n if (renderer.dependsOnAttribute(name))\n renderer.invalidate();\n }\n\n function enqueAttributeChange(element, name, oldValue) {\n // This is not fully spec compliant. We should use localName (which might\n // have a different case than name) and the namespace (which requires us\n // to get the Attr object).\n enqueueMutation(element, 'attributes', {\n name: name,\n namespace: null,\n oldValue: oldValue\n });\n }\n\n function Element(node) {\n Node.call(this, node);\n }\n Element.prototype = Object.create(Node.prototype);\n mixin(Element.prototype, {\n createShadowRoot: function() {\n var newShadowRoot = new wrappers.ShadowRoot(this);\n this.impl.polymerShadowRoot_ = newShadowRoot;\n\n var renderer = scope.getRendererForHost(this);\n renderer.invalidate();\n\n return newShadowRoot;\n },\n\n get shadowRoot() {\n return this.impl.polymerShadowRoot_ || null;\n },\n\n setAttribute: function(name, value) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.setAttribute(name, value);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n removeAttribute: function(name) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.removeAttribute(name);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n matches: function(selector) {\n return originalMatches.call(this.impl, selector);\n }\n });\n\n if (matchesName != \"matches\") {\n Element.prototype[matchesName] = function(selector) {\n return this.matches(selector);\n };\n }\n\n if (OriginalElement.prototype.webkitCreateShadowRoot) {\n Element.prototype.webkitCreateShadowRoot =\n Element.prototype.createShadowRoot;\n }\n\n /**\n * Useful for generating the accessor pair for a property that reflects an\n * attribute.\n */\n function setterDirtiesAttribute(prototype, propertyName, opt_attrName) {\n var attrName = opt_attrName || propertyName;\n Object.defineProperty(prototype, propertyName, {\n get: function() {\n return this.impl[propertyName];\n },\n set: function(v) {\n this.impl[propertyName] = v;\n invalidateRendererBasedOnAttribute(this, attrName);\n },\n configurable: true,\n enumerable: true\n });\n }\n\n setterDirtiesAttribute(Element.prototype, 'id');\n setterDirtiesAttribute(Element.prototype, 'className', 'class');\n\n mixin(Element.prototype, ChildNodeInterface);\n mixin(Element.prototype, GetElementsByInterface);\n mixin(Element.prototype, ParentNodeInterface);\n mixin(Element.prototype, SelectorsInterface);\n\n registerWrapper(OriginalElement, Element);\n\n // TODO(arv): Export setterDirtiesAttribute and apply it to more bindings\n // that reflect attributes.\n scope.matchesName = matchesName;\n scope.wrappers.Element = Element;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var defineGetter = scope.defineGetter;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var nodesWereAdded = scope.nodesWereAdded;\n var nodesWereRemoved = scope.nodesWereRemoved;\n var registerWrapper = scope.registerWrapper;\n var snapshotNodeList = scope.snapshotNodeList;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n /////////////////////////////////////////////////////////////////////////////\n // innerHTML and outerHTML\n\n var escapeRegExp = /&|<|\"/g;\n\n function escapeReplace(c) {\n switch (c) {\n case '&':\n return '&amp;';\n case '<':\n return '&lt;';\n case '\"':\n return '&quot;'\n }\n }\n\n function escape(s) {\n return s.replace(escapeRegExp, escapeReplace);\n }\n\n // http://www.whatwg.org/specs/web-apps/current-work/#void-elements\n var voidElements = {\n 'area': true,\n 'base': true,\n 'br': true,\n 'col': true,\n 'command': true,\n 'embed': true,\n 'hr': true,\n 'img': true,\n 'input': true,\n 'keygen': true,\n 'link': true,\n 'meta': true,\n 'param': true,\n 'source': true,\n 'track': true,\n 'wbr': true\n };\n\n function getOuterHTML(node) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n var tagName = node.tagName.toLowerCase();\n var s = '<' + tagName;\n var attrs = node.attributes;\n for (var i = 0, attr; attr = attrs[i]; i++) {\n s += ' ' + attr.name + '=\"' + escape(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName])\n return s;\n\n return s + getInnerHTML(node) + '</' + tagName + '>';\n\n case Node.TEXT_NODE:\n return escape(node.nodeValue);\n\n case Node.COMMENT_NODE:\n return '<!--' + escape(node.nodeValue) + '-->';\n default:\n console.error(node);\n throw new Error('not implemented');\n }\n }\n\n function getInnerHTML(node) {\n var s = '';\n for (var child = node.firstChild; child; child = child.nextSibling) {\n s += getOuterHTML(child);\n }\n return s;\n }\n\n function setInnerHTML(node, value, opt_tagName) {\n var tagName = opt_tagName || 'div';\n node.textContent = '';\n var tempElement = unwrap(node.ownerDocument.createElement(tagName));\n tempElement.innerHTML = value;\n var firstChild;\n while (firstChild = tempElement.firstChild) {\n node.appendChild(wrap(firstChild));\n }\n }\n\n var OriginalHTMLElement = window.HTMLElement;\n\n function HTMLElement(node) {\n Element.call(this, node);\n }\n HTMLElement.prototype = Object.create(Element.prototype);\n mixin(HTMLElement.prototype, {\n get innerHTML() {\n // TODO(arv): This should fallback to this.impl.innerHTML if there\n // are no shadow trees below or above the context node.\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer())\n setInnerHTML(this, value, this.tagName);\n else\n this.impl.innerHTML = value;\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes);\n },\n\n get outerHTML() {\n // TODO(arv): This should fallback to HTMLElement_prototype.outerHTML if there\n // are no shadow trees below or above the context node.\n return getOuterHTML(this);\n },\n set outerHTML(value) {\n var p = this.parentNode;\n if (p) {\n p.invalidateShadowRenderer();\n var df = frag(p, value);\n p.replaceChild(df, this);\n }\n },\n\n insertAdjacentHTML: function(position, text) {\n var contextElement, refNode;\n switch (String(position).toLowerCase()) {\n case 'beforebegin':\n contextElement = this.parentNode;\n refNode = this;\n break;\n case 'afterend':\n contextElement = this.parentNode;\n refNode = this.nextSibling;\n break;\n case 'afterbegin':\n contextElement = this;\n refNode = this.firstChild;\n break;\n case 'beforeend':\n contextElement = this;\n refNode = null;\n break;\n default:\n return;\n }\n\n var df = frag(contextElement, text);\n contextElement.insertBefore(df, refNode);\n }\n });\n\n function frag(contextElement, html) {\n // TODO(arv): This does not work with SVG and other non HTML elements.\n var p = unwrap(contextElement.cloneNode(false));\n p.innerHTML = html;\n var df = unwrap(document.createDocumentFragment());\n var c;\n while (c = p.firstChild) {\n df.appendChild(c);\n }\n return wrap(df);\n }\n\n function getter(name) {\n return function() {\n scope.renderAllPending();\n return this.impl[name];\n };\n }\n\n function getterRequiresRendering(name) {\n defineGetter(HTMLElement, name, getter(name));\n }\n\n [\n 'clientHeight',\n 'clientLeft',\n 'clientTop',\n 'clientWidth',\n 'offsetHeight',\n 'offsetLeft',\n 'offsetTop',\n 'offsetWidth',\n 'scrollHeight',\n 'scrollWidth',\n ].forEach(getterRequiresRendering);\n\n function getterAndSetterRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n get: getter(name),\n set: function(v) {\n scope.renderAllPending();\n this.impl[name] = v;\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'scrollLeft',\n 'scrollTop',\n ].forEach(getterAndSetterRequiresRendering);\n\n function methodRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n value: function() {\n scope.renderAllPending();\n return this.impl[name].apply(this.impl, arguments);\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'getBoundingClientRect',\n 'getClientRects',\n 'scrollIntoView'\n ].forEach(methodRequiresRendering);\n\n // HTMLElement is abstract so we use a subclass that has no members.\n registerWrapper(OriginalHTMLElement, HTMLElement,\n document.createElement('b'));\n\n scope.wrappers.HTMLElement = HTMLElement;\n\n // TODO: Find a better way to share these two with WrapperShadowRoot.\n scope.getInnerHTML = getInnerHTML;\n scope.setInnerHTML = setInnerHTML\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalHTMLCanvasElement = window.HTMLCanvasElement;\n\n function HTMLCanvasElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLCanvasElement.prototype, {\n getContext: function() {\n var context = this.impl.getContext.apply(this.impl, arguments);\n return context && wrap(context);\n }\n });\n\n registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement,\n document.createElement('canvas'));\n\n scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLContentElement = window.HTMLContentElement;\n\n function HTMLContentElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLContentElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLContentElement.prototype, {\n get select() {\n return this.getAttribute('select');\n },\n set select(value) {\n this.setAttribute('select', value);\n },\n\n setAttribute: function(n, v) {\n HTMLElement.prototype.setAttribute.call(this, n, v);\n if (String(n).toLowerCase() === 'select')\n this.invalidateShadowRenderer(true);\n }\n\n // getDistributedNodes is added in ShadowRenderer\n\n // TODO: attribute boolean resetStyleInheritance;\n });\n\n if (OriginalHTMLContentElement)\n registerWrapper(OriginalHTMLContentElement, HTMLContentElement);\n\n scope.wrappers.HTMLContentElement = HTMLContentElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLImageElement = window.HTMLImageElement;\n\n function HTMLImageElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLImageElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLImageElement, HTMLImageElement,\n document.createElement('img'));\n\n function Image(width, height) {\n if (!(this instanceof Image)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('img'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (width !== undefined)\n node.width = width;\n if (height !== undefined)\n node.height = height;\n }\n\n Image.prototype = HTMLImageElement.prototype;\n\n scope.wrappers.HTMLImageElement = HTMLImageElement;\n scope.wrappers.Image = Image;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLShadowElement = window.HTMLShadowElement;\n\n function HTMLShadowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLShadowElement.prototype, {\n // TODO: attribute boolean resetStyleInheritance;\n });\n\n if (OriginalHTMLShadowElement)\n registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);\n\n scope.wrappers.HTMLShadowElement = HTMLShadowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var getInnerHTML = scope.getInnerHTML;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var setInnerHTML = scope.setInnerHTML;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var contentTable = new WeakMap();\n var templateContentsOwnerTable = new WeakMap();\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getTemplateContentsOwner(doc) {\n if (!doc.defaultView)\n return doc;\n var d = templateContentsOwnerTable.get(doc);\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n templateContentsOwnerTable.set(doc, d);\n }\n return d;\n }\n\n function extractContent(templateElement) {\n // templateElement is not a wrapper here.\n var doc = getTemplateContentsOwner(templateElement.ownerDocument);\n var df = unwrap(doc.createDocumentFragment());\n var child;\n while (child = templateElement.firstChild) {\n df.appendChild(child);\n }\n return df;\n }\n\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLTemplateElement(node) {\n HTMLElement.call(this, node);\n if (!OriginalHTMLTemplateElement) {\n var content = extractContent(node);\n contentTable.set(this, wrap(content));\n }\n }\n HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLTemplateElement.prototype, {\n get content() {\n if (OriginalHTMLTemplateElement)\n return wrap(this.impl.content);\n return contentTable.get(this);\n },\n\n get innerHTML() {\n return getInnerHTML(this.content);\n },\n set innerHTML(value) {\n setInnerHTML(this.content, value);\n }\n\n // TODO(arv): cloneNode needs to clone content.\n\n });\n\n if (OriginalHTMLTemplateElement)\n registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);\n\n scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLMediaElement = window.HTMLMediaElement;\n\n function HTMLMediaElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement,\n document.createElement('audio'));\n\n scope.wrappers.HTMLMediaElement = HTMLMediaElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLMediaElement = scope.wrappers.HTMLMediaElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLAudioElement = window.HTMLAudioElement;\n\n function HTMLAudioElement(node) {\n HTMLMediaElement.call(this, node);\n }\n HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);\n\n registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement,\n document.createElement('audio'));\n\n function Audio(src) {\n if (!(this instanceof Audio)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('audio'));\n HTMLMediaElement.call(this, node);\n rewrap(node, this);\n\n node.setAttribute('preload', 'auto');\n if (src !== undefined)\n node.setAttribute('src', src);\n }\n\n Audio.prototype = HTMLAudioElement.prototype;\n\n scope.wrappers.HTMLAudioElement = HTMLAudioElement;\n scope.wrappers.Audio = Audio;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLOptionElement = window.HTMLOptionElement;\n\n function trimText(s) {\n return s.replace(/\\s+/g, ' ').trim();\n }\n\n function HTMLOptionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLOptionElement.prototype, {\n get text() {\n return trimText(this.textContent);\n },\n set text(value) {\n this.textContent = trimText(String(value));\n },\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement,\n document.createElement('option'));\n\n function Option(text, value, defaultSelected, selected) {\n if (!(this instanceof Option)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('option'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (text !== undefined)\n node.text = text;\n if (value !== undefined)\n node.setAttribute('value', value);\n if (defaultSelected === true)\n node.setAttribute('selected', '');\n node.selected = selected === true;\n }\n\n Option.prototype = HTMLOptionElement.prototype;\n\n scope.wrappers.HTMLOptionElement = HTMLOptionElement;\n scope.wrappers.Option = Option;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLElement = scope.wrappers.HTMLElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLUnknownElement = window.HTMLUnknownElement;\n\n function HTMLUnknownElement(node) {\n switch (node.localName) {\n case 'content':\n return new HTMLContentElement(node);\n case 'shadow':\n return new HTMLShadowElement(node);\n case 'template':\n return new HTMLTemplateElement(node);\n }\n HTMLElement.call(this, node);\n }\n HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);\n registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);\n scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n function CanvasRenderingContext2D(impl) {\n this.impl = impl;\n }\n\n mixin(CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n drawImage: function() {\n arguments[0] = unwrapIfNeeded(arguments[0]);\n this.impl.drawImage.apply(this.impl, arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return this.impl.createPattern.apply(this.impl, arguments);\n }\n });\n\n registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n document.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!OriginalWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n this.impl = impl;\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]);\n this.impl.texImage2D.apply(this.impl, arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(arguments[6]);\n this.impl.texSubImage2D.apply(this.impl, arguments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail so we use a dummy\n // object with dummy instance properties for these broken browsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties);\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range;\n\n function Range(impl) {\n this.impl = impl;\n }\n Range.prototype = {\n get startContainer() {\n return wrap(this.impl.startContainer);\n },\n get endContainer() {\n return wrap(this.impl.endContainer);\n },\n get commonAncestorContainer() {\n return wrap(this.impl.commonAncestorContainer);\n },\n setStart: function(refNode,offset) {\n this.impl.setStart(unwrapIfNeeded(refNode), offset);\n },\n setEnd: function(refNode,offset) {\n this.impl.setEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(refNode) {\n this.impl.setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n this.impl.setStartAfter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n this.impl.setEndBefore(unwrapIfNeeded(refNode));\n },\n setEndAfter: function(refNode) {\n this.impl.setEndAfter(unwrapIfNeeded(refNode));\n },\n selectNode: function(refNode) {\n this.impl.selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: function(refNode) {\n this.impl.selectNodeContents(unwrapIfNeeded(refNode));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n return this.impl.compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(this.impl.extractContents());\n },\n cloneContents: function() {\n return wrap(this.impl.cloneContents());\n },\n insertNode: function(node) {\n this.impl.insertNode(unwrapIfNeeded(node));\n },\n surroundContents: function(newParent) {\n this.impl.surroundContents(unwrapIfNeeded(newParent));\n },\n cloneRange: function() {\n return wrap(this.impl.cloneRange());\n },\n isPointInRange: function(node, offset) {\n return this.impl.isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return this.impl.comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: function(node) {\n return this.impl.intersectsNode(unwrapIfNeeded(node));\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (OriginalRange.prototype.createContextualFragment) {\n Range.prototype.createContextualFragment = function(html) {\n return wrap(this.impl.createContextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFragment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragment.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, SelectorsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Text = registerObject(document.createTextNode(''));\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers.Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n scope.wrappers.Text = Text;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = scope.wrappers.DocumentFragment;\n var elementFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\n var mixin = scope.mixin;\n var rewrap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(hostWrapper.impl.ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n nextOlderShadowTreeTable.set(this, oldShadowRoot);\n\n shadowHostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(DocumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidateShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlderShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return shadowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: function() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n return this.querySelector('#' + id);\n }\n });\n\n scope.wrappers.ShadowRoot = ShadowRoot;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wrappers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope.assert;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNode\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSibling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down means first and last child\n * @param {!Node} wrapper\n */\n function updateWrapperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper.lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNodeWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childWrapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWrapper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapper);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNode = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove(newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (!refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n var lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } else {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parentNodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;\n }\n\n parentNode.insertBefore(newChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwrap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperUpAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibling)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (parentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n parentNodeWrapper.firstChild_ = nodeWrapper;\n\n parentNode.removeChild(node);\n }\n\n var distributedChildNodesTable = new WeakMap();\n var eventParentsTable = new WeakMap();\n var insertionParentTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n function distributeChildToInsertionPoint(child, insertionPoint) {\n getDistributedChildNodes(insertionPoint).push(child);\n assignToInsertionPoint(child, insertionPoint);\n\n var eventParents = eventParentsTable.get(child);\n if (!eventParents)\n eventParentsTable.set(child, eventParents = []);\n eventParents.push(insertionPoint);\n }\n\n function resetDistributedChildNodes(insertionPoint) {\n distributedChildNodesTable.set(insertionPoint, []);\n }\n\n function getDistributedChildNodes(insertionPoint) {\n return distributedChildNodesTable.get(insertionPoint);\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child;\n }\n return result;\n }\n\n /**\n * Visits all nodes in the tree that fulfils the |predicate|. If the |visitor|\n * function returns |false| the traversal is aborted.\n * @param {!Node} tree\n * @param {function(!Node) : boolean} predicate\n * @param {function(!Node) : *} visitor\n */\n function visit(tree, predicate, visitor) {\n // This operates on logical DOM.\n for (var node = tree.firstChild; node; node = node.nextSibling) {\n if (predicate(node)) {\n if (visitor(node) === false)\n return;\n } else {\n visit(node, predicate, visitor);\n }\n }\n }\n\n // Matching Insertion Points\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#matching-insertion-points\n\n // TODO(arv): Verify this... I don't remember why I picked this regexp.\n var selectorMatchRegExp = /^[*.:#[a-zA-Z_|]/;\n\n var allowedPseudoRegExp = new RegExp('^:(' + [\n 'link',\n 'visited',\n 'target',\n 'enabled',\n 'disabled',\n 'checked',\n 'indeterminate',\n 'nth-child',\n 'nth-last-child',\n 'nth-of-type',\n 'nth-last-of-type',\n 'first-child',\n 'last-child',\n 'first-of-type',\n 'last-of-type',\n 'only-of-type',\n ].join('|') + ')');\n\n\n /**\n * @param {Element} node\n * @oaram {Element} point The insertion point element.\n * @return {boolean} Whether the node matches the insertion point.\n */\n function matchesCriteria(node, point) {\n var select = point.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.trim();\n if (!select)\n return true;\n\n if (!(node instanceof Element))\n return false;\n\n // TODO(arv): This does not seem right. Need to check for a simple selector.\n if (!selectorMatchRegExp.test(select))\n return false;\n\n if (select[0] === ':' && !allowedPseudoRegExp.test(select))\n return false;\n\n try {\n return node.matches(select);\n } catch (ex) {\n // Invalid selector.\n return false;\n }\n }\n\n var request = oneOf(window, [\n 'requestAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimationFrame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var renderTimer;\n\n function renderAllPending() {\n for (var i = 0; i < pendingDirtyRenderers.length; i++) {\n pendingDirtyRenderers[i].render();\n }\n pendingDirtyRenderers = [];\n }\n\n function handleRequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n }\n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\n function getRendererForHost(host) {\n var renderer = rendererForHostTable.get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\n\n function getShadowRootAncestor(node) {\n for (; node; node = node.parentNode) {\n if (node instanceof ShadowRoot)\n return node;\n }\n return null;\n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendererForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spliceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.node) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"render tree\". When we render the\n * composed tree we create a tree of RenderNodes, then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this.node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.childNodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var splices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var newIndex = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[newIndex++].sync(added);\n }\n\n var removedCount = splice.removed.length;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = newChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node;\n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // has been added.\n added.set(newChildWrapper, true);\n\n newChildRenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChildren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\n this.host = host;\n this.dirty = false;\n this.invalidateAttributes();\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty)\n return;\n\n this.invalidateAttributes();\n this.treeComposition();\n\n var host = this.host;\n var shadowRoot = host.shadowRoot;\n\n this.associateNode(host);\n var topMostRenderer = !renderNode;\n var renderNode = opt_renderNode || new RenderNode(host);\n\n for (var node = shadowRoot.firstChild; node; node = node.nextSibling) {\n this.renderNode(shadowRoot, renderNode, node, false);\n }\n\n if (topMostRenderer)\n renderNode.sync();\n\n this.dirty = false;\n },\n\n invalidate: function() {\n if (!this.dirty) {\n this.dirty = true;\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRequestAnimationFrame, 0);\n }\n },\n\n renderNode: function(shadowRoot, renderNode, node, isNested) {\n if (isShadowHost(node)) {\n renderNode = renderNode.append(node);\n var renderer = getRendererForHost(node);\n renderer.dirty = true; // Need to rerender due to reprojection.\n renderer.render(renderNode);\n } else if (isInsertionPoint(node)) {\n this.renderInsertionPoint(shadowRoot, renderNode, node, isNested);\n } else if (isShadowInsertionPoint(node)) {\n this.renderShadowInsertionPoint(shadowRoot, renderNode, node);\n } else {\n this.renderAsAnyDomTree(shadowRoot, renderNode, node, isNested);\n }\n },\n\n renderAsAnyDomTree: function(shadowRoot, renderNode, node, isNested) {\n renderNode = renderNode.append(node);\n\n if (isShadowHost(node)) {\n var renderer = getRendererForHost(node);\n renderNode.skip = !renderer.dirty;\n renderer.render(renderNode);\n } else {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.renderNode(shadowRoot, renderNode, child, isNested);\n }\n }\n },\n\n renderInsertionPoint: function(shadowRoot, renderNode, insertionPoint,\n isNested) {\n var distributedChildNodes = getDistributedChildNodes(insertionPoint);\n if (distributedChildNodes.length) {\n this.associateNode(insertionPoint);\n\n for (var i = 0; i < distributedChildNodes.length; i++) {\n var child = distributedChildNodes[i];\n if (isInsertionPoint(child) && isNested)\n this.renderInsertionPoint(shadowRoot, renderNode, child, isNested);\n else\n this.renderAsAnyDomTree(shadowRoot, renderNode, child, isNested);\n }\n } else {\n this.renderFallbackContent(shadowRoot, renderNode, insertionPoint);\n }\n this.associateNode(insertionPoint.parentNode);\n },\n\n renderShadowInsertionPoint: function(shadowRoot, renderNode,\n shadowInsertionPoint) {\n var nextOlderTree = shadowRoot.olderShadowRoot;\n if (nextOlderTree) {\n assignToInsertionPoint(nextOlderTree, shadowInsertionPoint);\n this.associateNode(shadowInsertionPoint.parentNode);\n for (var node = nextOlderTree.firstChild;\n node;\n node = node.nextSibling) {\n this.renderNode(nextOlderTree, renderNode, node, true);\n }\n } else {\n this.renderFallbackContent(shadowRoot, renderNode,\n shadowInsertionPoint);\n }\n },\n\n renderFallbackContent: function(shadowRoot, renderNode, fallbackHost) {\n this.associateNode(fallbackHost);\n this.associateNode(fallbackHost.parentNode);\n for (var node = fallbackHost.firstChild; node; node = node.nextSibling) {\n this.renderAsAnyDomTree(shadowRoot, renderNode, node, false);\n }\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttributes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attribute\n * being used in the selector.\n * @param {string} selector\n */\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n // #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n attributes[name] = true;\n });\n\n // Pseudo selectors have been removed from the spec.\n },\n\n dependsOnAttribute: function(name) {\n return this.attributes[name];\n },\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-distribution-algorithm\n distribute: function(tree, pool) {\n var self = this;\n\n visit(tree, isActiveInsertionPoint,\n function(insertionPoint) {\n resetDistributedChildNodes(insertionPoint);\n self.updateDependentAttributes(\n insertionPoint.getAttribute('select'));\n\n for (var i = 0; i < pool.length; i++) { // 1.2\n var node = pool[i]; // 1.2.1\n if (node === undefined) // removed\n continue;\n if (matchesCriteria(node, insertionPoint)) { // 1.2.2\n distributeChildToInsertionPoint(node, insertionPoint); // 1.2.2.1\n pool[i] = undefined; // 1.2.2.2\n }\n }\n });\n },\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-tree-composition\n treeComposition: function () {\n var shadowHost = this.host;\n var tree = shadowHost.shadowRoot; // 1.\n var pool = []; // 2.\n\n for (var child = shadowHost.firstChild;\n child;\n child = child.nextSibling) { // 3.\n if (isInsertionPoint(child)) { // 3.2.\n var reprojected = getDistributedChildNodes(child); // 3.2.1.\n // if reprojected is undef... reset it?\n if (!reprojected || !reprojected.length) // 3.2.2.\n reprojected = getChildNodesSnapshot(child);\n pool.push.apply(pool, reprojected); // 3.2.3.\n } else {\n pool.push(child); // 3.3.\n }\n }\n\n var shadowInsertionPoint, point;\n while (tree) { // 4.\n // 4.1.\n shadowInsertionPoint = undefined; // Reset every iteration.\n visit(tree, isActiveShadowInsertionPoint, function(point) {\n shadowInsertionPoint = point;\n return false;\n });\n point = shadowInsertionPoint;\n\n this.distribute(tree, pool); // 4.2.\n if (point) { // 4.3.\n var nextOlderTree = tree.olderShadowRoot; // 4.3.1.\n if (!nextOlderTree) {\n break; // 4.3.1.1.\n } else {\n tree = nextOlderTree; // 4.3.2.2.\n assignToInsertionPoint(tree, point); // 4.3.2.2.\n continue; // 4.3.2.3.\n }\n } else {\n break; // 4.4.\n }\n }\n },\n\n associateNode: function(node) {\n node.impl.polymerShadowRenderer_ = this;\n }\n };\n\n function isInsertionPoint(node) {\n // Should this include <shadow>?\n return node instanceof HTMLContentElement;\n }\n\n function isActiveInsertionPoint(node) {\n // <content> inside another <content> or <shadow> is considered inactive.\n return node instanceof HTMLContentElement;\n }\n\n function isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement;\n }\n\n function isActiveShadowInsertionPoint(node) {\n // <shadow> inside another <content> or <shadow> is considered inactive.\n return node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees.push(tree);\n }\n return trees;\n }\n\n function assignToInsertionPoint(tree, point) {\n insertionParentTable.set(tree, point);\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when:\n //\n // - a direct child to the ShadowRoot is added or removed\n // - a direct child to the host is added or removed\n // - a new shadow root is created\n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /**\n * This gets called when a node was added or removed to it.\n */\n Node.prototype.invalidateShadowRenderer = function(force) {\n var renderer = this.impl.polymerShadowRenderer_;\n if (renderer) {\n renderer.invalidate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentElement.prototype.getDistributedNodes = function() {\n // TODO(arv): We should only rerender the dirty ancestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedChildNodes(this);\n };\n\n HTMLShadowElement.prototype.nodeIsInserted_ =\n HTMLContentElement.prototype.nodeIsInserted_ = function() {\n // Invalidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var shadowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\n renderer = getRendererForShadowRoot(shadowRoot);\n this.impl.polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate();\n };\n\n scope.eventParentsTable = eventParentsTable;\n scope.getRendererForHost = getRendererForHost;\n scope.getShadowTrees = getShadowTrees;\n scope.insertionParentTable = insertionParentTable;\n scope.renderAllPending = renderAllPending;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: remove,\n };\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonElement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenElement',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElement',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutputElement',\n 'HTMLSelectElement',\n 'HTMLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an already existing constructor.\n assert(!scope.wrappers[name]);\n\n var GeneratedWrapper = function(node) {\n // At this point all of them extend HTMLElement.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\n get form() {\n return wrap(unwrap(this).form);\n },\n });\n\n registerWrapper(window[name], GeneratedWrapper,\n document.createElement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n\n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var matchesName = scope.matchesName;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var rewrap = scope.rewrap;\n var wrapEventTargetMethods = scope.wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var implementationTable = new WeakMap();\n\n function Document(node) {\n Node.call(this, node);\n }\n Document.prototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'documentElement');\n\n // Conceptually both body and head can be in a shadow but suporting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'body');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridden so we override a bunch of its methods\n // directly on the instance.\n\n function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById',\n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(doc.impl, unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubtree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot);\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shadowRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (oldShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalImportNode = document.importNode;\n\n mixin(Document.prototype, {\n adoptNode: function(node) {\n if (node.parentNode)\n node.parentNode.removeChild(node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y);\n },\n importNode: function(node, deep) {\n // We need to manually walk the tree to ensure we do not include rendered\n // shadow trees.\n var clone = wrap(originalImportNode.call(this.impl, unwrap(node), false));\n if (deep) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n clone.appendChild(this.importNode(child, true));\n }\n }\n return clone;\n }\n });\n\n if (document.register) {\n var originalRegister = document.register;\n Document.prototype.register = function(tagName, object) {\n var prototype = object.prototype;\n\n // If we already used the object as a prototype for another custom\n // element.\n if (scope.nativePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // Find first object on the prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n nativePrototype = scope.nativePrototypeTable.get(proto);\n if (nativePrototype)\n break;\n prototypes.push(proto);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newPrototype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs&l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'enteredViewCallback',\n 'leftViewCallback',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPrototype[name] = function() {\n // if this element has been wrapped prior to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewrap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (object.extends)\n p.extends = object.extends;\n\n function CustomElementConstructor(node) {\n if (!node) {\n if (object.extends) {\n return document.createElement(object.extends, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n this.impl = node;\n }\n CustomElementConstructor.prototype = prototype;\n CustomElementConstructor.prototype.constructor = CustomElementConstructor;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor);\n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // registration is synchronous so do it last\n var nativeConstructor = originalRegister.call(unwrap(this), tagName, p);\n return CustomElementConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'register',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrapper([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTMLHtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'contains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getElementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelectorAll',\n 'removeChild',\n 'replaceChild',\n matchesName,\n ]);\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementById',\n ]);\n\n mixin(Document.prototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterface);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prototype, {\n get implementation() {\n var implementation = implementationTable.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation);\n implementationTable.set(this, implementation);\n return implementation;\n }\n });\n\n registerWrapper(window.Document, Document,\n document.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and IE implements the standard correctly.\n if (window.HTMLDocument)\n registerWrapper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplementation(impl) {\n this.impl = impl;\n }\n\n function wrapImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n function forwardImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return original.apply(this.impl, arguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentType');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod(DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation, 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementation);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n 'createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'hasFeature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrappers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Document;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n var renderAllPending = scope.renderAllPending;\n\n var OriginalWindow = window.Window;\n\n function Window(impl) {\n EventTarget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prototype);\n\n var originalGetComputedStyle = window.getComputedStyle;\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\n renderAllPending();\n return originalGetComputedStyle.call(this || window, unwrapIfNeeded(el),\n pseudo);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window.getComputedStyle;\n\n ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(\n function(name) {\n OriginalWindow.prototype[name] = function() {\n var w = wrap(this || window);\n return w[name].apply(w, arguments);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window[name];\n });\n\n mixin(Window.prototype, {\n getComputedStyle: function(el, pseudo) {\n return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),\n pseudo);\n }\n });\n\n registerWrapper(OriginalWindow, Window);\n\n scope.wrappers.Window = Window;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope.isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement',\n 'applet': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'br': 'HTMLBRElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'button': 'HTMLButtonElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'dl': 'HTMLDListElement',\n 'datalist': 'HTMLDataListElement',\n 'data': 'HTMLDataElement',\n 'dir': 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement',\n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': 'HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'hr': 'HTMLHRElement',\n 'head': 'HTMLHeadElement',\n 'h1': 'HTMLHeadingElement',\n 'html': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'input': 'HTMLInputElement',\n 'li': 'HTMLLIElement',\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement',\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'menuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'HTMLMeterElement',\n 'del': 'HTMLModElement',\n 'ol': 'HTMLOListElement',\n 'object': 'HTMLObjectElement',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement',\n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'param': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLProgressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement',\n 'select': 'HTMLSelectElement',\n 'source': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTMLStyleElement',\n 'time': 'HTMLTimeElement',\n 'caption': 'HTMLTableCaptionElement',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show_bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'col': 'HTMLTableColElement',\n 'table': 'HTMLTableElement',\n 'tr': 'HTMLTableRowElement',\n 'thead': 'HTMLTableSectionElement',\n 'tbody': 'HTMLTableSectionElement',\n 'textarea': 'HTMLTextAreaElement',\n 'track': 'HTMLTrackElement',\n 'title': 'HTMLTitleElement',\n 'ul': 'HTMLUListElement',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tagName) {\n var nativeConstructorName = elements[tagName];\n var nativeConstructor = window[nativeConstructorName];\n if (!nativeConstructor)\n return;\n var element = document.createElement(tagName);\n var wrapperConstructor = element.constructor;\n window[nativeConstructorName] = wrapperConstructor;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = scope.wrappers[name]\n });\n\n // Export for testing.\n scope.knownElements = elements;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function() {\n\n // convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize other types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, but\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\n for (var c in elts) {\n window[c] = function() { throw 'Patched Constructor'; };\n window[c].prototype = Object.getPrototypeOf(\n document.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name\n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.getOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n})();\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n \n The intention here is to support only the styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromising performance significantly. \n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * @host: ShadowDOM allows styling of the shadowRoot's host element using the \n @host rule. To shim this feature, the @host styles are reformatted and \n prefixed with a given scope name and promoted to a document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n @host {\n * {\n background: red;\n }\n }\n \n becomes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Styles defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polymer uses one of two techniques to imlement\n this feature.\n \n By default, rules are prefixed with the host element tag name \n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element \n in the element's ShadowDOM template is also given the scope attribute. \n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * ::pseudo: These rules are converted to rules that take advantage of the\n pseudo attribute. For example, a shadowRoot like this inside an x-foo\n\n <div pseudo=\"x-special\">Special</div>\n\n with a rule like this:\n\n x-foo::x-special { ... }\n\n becomes:\n\n x-foo [pseudo=x-special] { ... }\n\n * ::part(): These rules are converted to rules that take advantage of the\n part attribute. For example, a shadowRoot like this inside an x-foo\n\n <div part=\"special\">Special</div>\n\n with a rule like this:\n\n x-foo::part(special) { ... }\n\n becomes:\n\n x-foo [part=special] { ... } \n \n Unaddressed ShadowDOM styling features:\n \n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that \n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n \n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n \n <style>\n content::-webkit-distributed(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n content::-webkit-distributed(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector \n in comments in lieu of the next selector when running under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictStyling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally tag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim @host and scoping\n shimStyling: function(root, name, extendsName) {\n var typeExtension = this.isTypeExtension(extendsName);\n // use caching to make working with styles nodes easier and to facilitate\n // lookup of extendee\n var def = this.registerDefinition(root, name, extendsName);\n // find styles and apply shimming...\n if (this.strictStyling) {\n this.applyScopeToContent(root, name);\n }\n var cssText = this.stylesToShimmedCssText(def.rootStyles, def.scopeStyles,\n name, typeExtension);\n // provide shimmedStyle for user extensibility\n def.shimmedStyle = cssTextToStyle(cssText);\n if (root) {\n root.shimmedStyle = def.shimmedStyle;\n }\n // remove existing style elements\n for (var i=0, l=def.rootStyles.length, s; (i<l) && (s=def.rootStyles[i]); \n i++) {\n s.parentNode.removeChild(s);\n }\n // add style to document\n addCssToDocument(cssText);\n },\n // apply @polyfill rules + @host and scope shimming\n stylesToShimmedCssText: function(rootStyles, scopeStyles, name,\n typeExtension) {\n name = name || '';\n // insert @polyfill and @polyfill-rule rules into style elements\n // scoping process takes care of shimming these\n this.insertPolyfillDirectives(rootStyles);\n this.insertPolyfillRules(rootStyles);\n var cssText = this.shimAtHost(scopeStyles, name, typeExtension) +\n this.shimScoping(scopeStyles, name, typeExtension);\n // note: we only need to do rootStyles since these are unscoped.\n cssText += this.extractPolyfillUnscopedRules(rootStyles);\n return cssText;\n },\n registerDefinition: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = root ? root.querySelectorAll('style') : [];\n styles = styles ? Array.prototype.slice.call(styles, 0) : [];\n def.rootStyles = styles;\n def.scopeStyles = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n if (extendee && (!root || root.querySelector('shadow'))) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);\n }\n return def;\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n applyScopeToContent: function(root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySelectorAll('template'),\n function(template) {\n this.applyScopeToContent(template.content, name);\n },\n this);\n }\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with comments.\n * \n * For example, we convert this rule:\n * \n * (comment start) @polyfill :host menu-item (comment end)\n * shadow::-webkit-distributed(menu-item) {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDirectives: function(styles) {\n if (styles) {\n Array.prototype.forEach.call(styles, function(s) {\n s.textContent = this.insertPolyfillDirectivesInCssText(s.textContent);\n }, this);\n }\n },\n insertPolyfillDirectivesInCssText: function(cssText) {\n return cssText.replace(cssPolyfillCommentRe, function(match, p1) {\n // remove end comment delimiter and add block start\n return p1.slice(0, -2) + '{';\n });\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * (comment start) @polyfill-rule :host menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRules: function(styles) {\n if (styles) {\n Array.prototype.forEach.call(styles, function(s) {\n s.textContent = this.insertPolyfillRulesInCssText(s.textContent);\n }, this);\n }\n },\n insertPolyfillRulesInCssText: function(cssText) {\n return cssText.replace(cssPolyfillRuleCommentRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n * \n * (comment start) @polyfill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractPolyfillUnscopedRules: function(styles) {\n var cssText = '';\n if (styles) {\n Array.prototype.forEach.call(styles, function(s) {\n cssText += this.extractPolyfillUnscopedRulesFromCssText(\n s.textContent) + '\\n\\n';\n }, this);\n }\n return cssText;\n },\n extractPolyfillUnscopedRulesFromCssText: function(cssText) {\n var r = '', matches;\n while (matches = cssPolyfillUnscopedRuleCommentRe.exec(cssText)) {\n r += matches[1].slice(0, -1) + '\\n\\n';\n }\n return r;\n },\n // form: @host { .foo { declarations } }\n // becomes: scopeName.foo { declarations }\n shimAtHost: function(styles, name, typeExtension) {\n if (styles) {\n return this.convertAtHostStyles(styles, name, typeExtension);\n }\n },\n convertAtHostStyles: function(styles, name, typeExtension) {\n var cssText = stylesToCssText(styles), self = this;\n cssText = cssText.replace(hostRuleRe, function(m, p1) {\n return self.scopeHostCss(p1, name, typeExtension);\n });\n cssText = rulesToCss(this.findAtHostRules(cssToRules(cssText),\n this.makeScopeMatcher(name, typeExtension)));\n return cssText;\n },\n scopeHostCss: function(cssText, name, typeExtension) {\n var self = this;\n return cssText.replace(selectorRe, function(m, p1, p2) {\n return self.scopeHostSelector(p1, name, typeExtension) + ' ' + p2 + '\\n\\t';\n });\n },\n // supports scopig by name and [is=name] syntax\n scopeHostSelector: function(selector, name, typeExtension) {\n var r = [], parts = selector.split(','), is = '[is=' + name + ']';\n parts.forEach(function(p) {\n p = p.trim();\n // selector: *|:scope -> name\n if (p.match(hostElementRe)) {\n p = p.replace(hostElementRe, typeExtension ? is + '$1$3' :\n name + '$1$3');\n // selector: .foo -> name.foo (OR) [bar] -> name[bar]\n } else if (p.match(hostFixableRe)) {\n p = typeExtension ? is + p : name + p;\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n // consider styles that do not include component name in the selector to be\n // unscoped and in need of promotion; \n // for convenience, also consider keyframe rules this way.\n findAtHostRules: function(cssRules, matcher) {\n return Array.prototype.filter.call(cssRules, \n this.isHostRule.bind(this, matcher));\n },\n isHostRule: function(matcher, cssRule) {\n return (cssRule.selectorText && cssRule.selectorText.match(matcher)) ||\n (cssRule.cssRules && this.findAtHostRules(cssRule.cssRules, matcher).length) ||\n (cssRule.type == CSSRule.WEBKIT_KEYFRAMES_RULE);\n },\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {... } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n shimScoping: function(styles, name, typeExtension) {\n if (styles) {\n return this.convertScopedStyles(styles, name, typeExtension);\n }\n },\n convertScopedStyles: function(styles, name, typeExtension) {\n var cssText = stylesToCssText(styles).replace(hostRuleRe, '');\n cssText = this.insertPolyfillHostInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssText = this.convertPseudos(cssText);\n cssText = this.convertParts(cssText);\n cssText = this.convertCombinators(cssText);\n var rules = cssToRules(cssText);\n if (name) {\n cssText = this.scopeRules(rules, name, typeExtension);\n }\n return cssText;\n },\n convertPseudos: function(cssText) {\n return cssText.replace(cssPseudoRe, ' [pseudo=$1]');\n },\n convertParts: function(cssText) {\n return cssText.replace(cssPartRe, ' [part=$1]');\n },\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .foo scopeName > .bar { }\n * \n * and\n *\n * :host(.foo:host) .bar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n convertColonHost: function(cssText) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(cssColonHostRe, function(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n if (p.match(polyfillHost)) {\n r.push(p1 + p.replace(polyfillHost, '') + p3);\n } else {\n r.push(p1 + p + p3 + ', ' + p + ' ' + p1 + p3);\n }\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n /*\n * Convert ^ and ^^ combinators by replacing with space.\n */\n convertCombinators: function(cssText) {\n return cssText.replace(/\\^\\^/g, ' ').replace(/\\^/g, ' ');\n },\n // change a selector like 'div' to 'name div'\n scopeRules: function(cssRules, name, typeExtension) {\n var cssText = '';\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText)) {\n cssText += this.scopeSelector(rule.selectorText, name, typeExtension, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.propertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.media) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n';\n cssText += this.scopeRules(rule.cssRules, name, typeExtension);\n cssText += '\\n}\\n\\n';\n } else if (rule.cssText) {\n cssText += rule.cssText + '\\n\\n';\n }\n }, this);\n return cssText;\n },\n scopeSelector: function(selector, name, typeExtension, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach(function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, name, typeExtension)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, name) :\n this.applySimpleSelectorScope(p, name, typeExtension);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, name, typeExtension) {\n var re = this.makeScopeMatcher(name, typeExtension);\n return !selector.match(re);\n },\n makeScopeMatcher: function(name, typeExtension) {\n var matchScope = typeExtension ? '\\\\[is=[\\'\"]?' + name + '[\\'\"]?\\\\]' : name;\n return new RegExp('^(' + matchScope + ')' + selectorReSuffix, 'm');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: function(selector, name, typeExtension) {\n var scoper = typeExtension ? '[is=' + name + ']' : name;\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scoper);\n return selector.replace(polyfillHostRe, scoper + ' ');\n } else {\n return scoper + ' ' + selector;\n }\n },\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, name) {\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + name + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().replace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf(attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(hostRe, polyfillHost).replace(colonHostRe,\n polyfillHost);\n },\n propertiesFromRule: function(rule) {\n return rule.style.cssText;\n }\n};\n\nvar hostRuleRe = /@host[^{]*{(([^}]*?{[^{]*?}[\\s\\S]*?)+)}/gim,\n selectorRe = /([^{]*)({[\\s\\S]*?})/gim,\n hostElementRe = /(.*)((?:\\*)|(?:\\:scope))(.*)/,\n hostFixableRe = /^[.\\[:]/,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n cssPolyfillCommentRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssPolyfillRuleCommentRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssPolyfillUnscopedRuleCommentRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n cssColonHostRe = new RegExp('(' + polyfillHost +\n ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)', 'gim'),\n selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n hostRe = /@host/gim,\n colonHostRe = /\\:host/gim,\n /* host name without combinator */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n polyfillHostRe = new RegExp(polyfillHost, 'gim');\n\nfunction stylesToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.forEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n });\n // strip comments for easier processing\n if (!preserveComments) {\n cssText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunction cssTextToStyle(cssText) {\n var style = document.createElement('style');\n style.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = style.sheet.cssRules;\n style.parentNode.removeChild(style);\n return rules;\n}\n\nfunction rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunction addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(document.createTextNode(cssText));\n }\n}\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.setAttribute('ShadowCSSShim', '');\n sheet.shadowCssShim = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowDOMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.insertBefore(getSheet(), head.childNodes[0]);\n\n document.addEventListener('DOMContentLoaded', function() {\n if (window.HTMLImports) {\n HTMLImports.importer.preloadSelectors += \n ', link[rel=stylesheet]:not([nopolyfill])';\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt.shadowCssShim) {\n return;\n }\n var style = elt;\n if (!elt.hasAttribute('nopolyfill')) {\n if (elt.__resource) {\n style = doc.createElement('style');\n style.textContent = elt.__resource;\n // remove links from main document\n if (elt.ownerDocument === doc) {\n elt.parentNode.removeChild(elt);\n }\n }\n var styles = [style];\n style.textContent = ShadowCSS.stylesToShimmedCssText(styles, styles);\n style.shadowCssShim = true;\n }\n // place in document\n if (style.parentNode !== head) {\n head.appendChild(style);\n }\n }\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS;\n\n})(window.Platform);","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function() {\n\n // poor man's adapter for template.content on various platform scenarios\n window.templateContent = window.templateContent || function(inTemplate) {\n return inTemplate.content;\n };\n\n // so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n\n window.wrap = window.unwrap = function(n){\n return n;\n }\n\n var originalCreateShadowRoot = Element.prototype.webkitCreateShadowRoot;\n Element.prototype.webkitCreateShadowRoot = function() {\n var elderRoot = this.webkitShadowRoot;\n var root = originalCreateShadowRoot.call(this);\n root.olderShadowRoot = elderRoot;\n root.host = this;\n CustomElements.watchShadow(this);\n return root;\n }\n\n Object.defineProperties(Element.prototype, {\n shadowRoot: {\n get: function() {\n return this.webkitShadowRoot;\n }\n },\n createShadowRoot: {\n value: function() {\n return this.webkitCreateShadowRoot();\n }\n }\n });\n\n window.templateContent = function(inTemplate) {\n // if MDV exists, it may need to boostrap this template to reveal content\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(inTemplate);\n }\n // fallback when there is no Shadow DOM polyfill, no MDV polyfill, and no\n // native template support\n if (!inTemplate.content && !inTemplate._content) {\n var frag = document.createDocumentFragment();\n while (inTemplate.firstChild) {\n frag.appendChild(inTemplate.firstChild);\n }\n inTemplate._content = frag;\n }\n return inTemplate.content || inTemplate._content;\n };\n\n})();","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function(scope) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 1);\n return function() {\n var args2 = args.slice();\n args2.push.apply(args2, arguments);\n return self.apply(scope, args2);\n };\n };\n}\n\n// mixin\n\n// copy all properties from inProps (et al) to inObj\nfunction mixin(inObj/*, inProps, inMoreProps, ...*/) {\n var obj = inObj || {};\n for (var i = 1; i < arguments.length; i++) {\n var p = arguments[i];\n try {\n for (var n in p) {\n copyProperty(n, p, obj);\n }\n } catch(x) {\n }\n }\n return obj;\n}\n\n// copy property inName from inSource object to inTarget object\nfunction copyProperty(inName, inSource, inTarget) {\n var pd = getPropertyDescriptor(inSource, inName);\n Object.defineProperty(inTarget, inName, pd);\n}\n\n// get property descriptor for inName on inObject, even if\n// inName exists on some link in inObject's prototype chain\nfunction getPropertyDescriptor(inObject, inName) {\n if (inObject) {\n var pd = Object.getOwnPropertyDescriptor(inObject, inName);\n return pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);\n }\n}\n\n// export\n\nscope.mixin = mixin;\n\n})(window.Platform);","// Copyright 2011 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(scope) {\n\n 'use strict';\n\n // polyfill DOMTokenList\n // * add/remove: allow these methods to take multiple classNames\n // * toggle: add a 2nd argument which forces the given state rather\n // than toggling.\n\n var add = DOMTokenList.prototype.add;\n var remove = DOMTokenList.prototype.remove;\n DOMTokenList.prototype.add = function() {\n for (var i = 0; i < arguments.length; i++) {\n add.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.remove = function() {\n for (var i = 0; i < arguments.length; i++) {\n remove.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.toggle = function(name, bool) {\n if (arguments.length == 1) {\n bool = !this.contains(name);\n }\n bool ? this.add(name) : this.remove(name);\n };\n DOMTokenList.prototype.switch = function(oldName, newName) {\n oldName && this.remove(oldName);\n newName && this.add(newName);\n };\n\n // add array() to NodeList, NamedNodeMap, HTMLCollection\n\n var ArraySlice = function() {\n return Array.prototype.slice.call(this);\n };\n\n var namedNodeMap = (window.NamedNodeMap || window.MozNamedAttrMap || {});\n\n NodeList.prototype.array = ArraySlice;\n namedNodeMap.prototype.array = ArraySlice;\n HTMLCollection.prototype.array = ArraySlice;\n\n // polyfill performance.now\n\n if (!window.performance) {\n var start = Date.now();\n // only at millisecond precision\n window.performance = {now: function(){ return Date.now() - start }};\n }\n\n // polyfill for requestAnimationFrame\n\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = (function() {\n var nativeRaf = window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame;\n\n return nativeRaf ?\n function(callback) {\n return nativeRaf(function() {\n callback(performance.now());\n });\n } :\n function( callback ){\n return window.setTimeout(callback, 1000 / 60);\n };\n })();\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = (function() {\n return window.webkitCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n function(id) {\n clearTimeout(id);\n };\n })();\n }\n\n // TODO(sorvell): workaround for bug:\n // https://code.google.com/p/chromium/issues/detail?id=229142\n // remove when this bug is addressed\n // give main document templates a base that allows them to fetch eagerly\n // resolved paths relative to the main document\n var template = document.createElement('template');\n var base = document.createElement('base');\n base.href = document.baseURI;\n template.content.ownerDocument.appendChild(base);\n \n\n // utility\n\n function createDOM(inTagOrNode, inHTML, inAttrs) {\n var dom = typeof inTagOrNode == 'string' ?\n document.createElement(inTagOrNode) : inTagOrNode.cloneNode(true);\n dom.innerHTML = inHTML;\n if (inAttrs) {\n for (var n in inAttrs) {\n dom.setAttribute(n, inAttrs[n]);\n }\n }\n return dom;\n }\n\n var polymer = function(name, dictionary) {\n window.addEventListener('WebComponentsReady', function() {\n // avoid re-entrancy. If polymer is not redefined by this time, do nothing\n if (window.Polymer !== polymer) {\n Polymer(name, dictionary);\n } else {\n console.warn('You tried to use polymer without loading it first. To ' +\n 'load polymer, <link rel=\"import\" href=\"' + \n 'components/polymer/plymer.html\">');\n }\n });\n }\n\n window.Polymer = polymer\n // exports\n\n scope.createDOM = createDOM;\n\n})(window.Platform);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n// poor man's adapter for template.content on various platform scenarios\nwindow.templateContent = window.templateContent || function(inTemplate) {\n return inTemplate.content;\n};","(function(scope) {\n \n scope = scope || (window.Inspector = {});\n \n var inspector;\n\n window.sinspect = function(inNode, inProxy) {\n if (!inspector) {\n inspector = window.open('', 'ShadowDOM Inspector', null, true);\n inspector.document.write(inspectorHTML);\n //inspector.document.close();\n inspector.api = {\n shadowize: shadowize\n };\n }\n inspect(inNode || wrap(document.body), inProxy);\n };\n\n var inspectorHTML = [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <title>ShadowDOM Inspector</title>',\n ' <style>',\n ' body {',\n ' }',\n ' pre {',\n ' font: 9pt \"Courier New\", monospace;',\n ' line-height: 1.5em;',\n ' }',\n ' tag {',\n ' color: purple;',\n ' }',\n ' ul {',\n ' margin: 0;',\n ' padding: 0;',\n ' list-style: none;',\n ' }',\n ' li {',\n ' display: inline-block;',\n ' background-color: #f1f1f1;',\n ' padding: 4px 6px;',\n ' border-radius: 4px;',\n ' margin-right: 4px;',\n ' }',\n ' </style>',\n ' </head>',\n ' <body>',\n ' <ul id=\"crumbs\">',\n ' </ul>',\n ' <div id=\"tree\"></div>',\n ' </body>',\n '</html>'\n ].join('\\n');\n \n var crumbs = [];\n\n var displayCrumbs = function() {\n // alias our document\n var d = inspector.document;\n // get crumbbar\n var cb = d.querySelector('#crumbs');\n // clear crumbs\n cb.textContent = '';\n // build new crumbs\n for (var i=0, c; c=crumbs[i]; i++) {\n var a = d.createElement('a');\n a.href = '#';\n a.textContent = c.localName;\n a.idx = i;\n a.onclick = function(event) {\n var c;\n while (crumbs.length > this.idx) {\n c = crumbs.pop();\n }\n inspect(c.shadow || c, c);\n event.preventDefault();\n };\n cb.appendChild(d.createElement('li')).appendChild(a);\n }\n };\n\n var inspect = function(inNode, inProxy) {\n // alias our document\n var d = inspector.document;\n // reset list of drillable nodes\n drillable = [];\n // memoize our crumb proxy\n var proxy = inProxy || inNode;\n crumbs.push(proxy);\n // update crumbs\n displayCrumbs();\n // reflect local tree\n d.body.querySelector('#tree').innerHTML =\n '<pre>' + output(inNode, inNode.childNodes) + '</pre>';\n };\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n var blacklisted = {STYLE:1, SCRIPT:1, \"#comment\": 1, TEMPLATE: 1};\n var blacklist = function(inNode) {\n return blacklisted[inNode.nodeName];\n };\n\n var output = function(inNode, inChildNodes, inIndent) {\n if (blacklist(inNode)) {\n return '';\n }\n var indent = inIndent || '';\n if (inNode.localName || inNode.nodeType == 11) {\n var name = inNode.localName || 'shadow-root';\n //inChildNodes = ShadowDOM.localNodes(inNode);\n var info = indent + describe(inNode);\n // if only textNodes\n // TODO(sjmiles): make correct for ShadowDOM\n /*if (!inNode.children.length && inNode.localName !== 'content' && inNode.localName !== 'shadow') {\n info += catTextContent(inChildNodes);\n } else*/ {\n // TODO(sjmiles): native <shadow> has no reference to its projection\n if (name == 'content' /*|| name == 'shadow'*/) {\n inChildNodes = inNode.getDistributedNodes();\n }\n info += '<br/>';\n var ind = indent + '&nbsp;&nbsp;';\n forEach(inChildNodes, function(n) {\n info += output(n, n.childNodes, ind);\n });\n info += indent;\n }\n if (!({br:1}[name])) {\n info += '<tag>&lt;/' + name + '&gt;</tag>';\n info += '<br/>';\n }\n } else {\n var text = inNode.textContent.trim();\n info = text ? indent + '\"' + text + '\"' + '<br/>' : '';\n }\n return info;\n };\n\n var catTextContent = function(inChildNodes) {\n var info = '';\n forEach(inChildNodes, function(n) {\n info += n.textContent.trim();\n });\n return info;\n };\n\n var drillable = [];\n\n var describe = function(inNode) {\n var tag = '<tag>' + '&lt;';\n var name = inNode.localName || 'shadow-root';\n if (inNode.webkitShadowRoot || inNode.shadowRoot) {\n tag += ' <button idx=\"' + drillable.length +\n '\" onclick=\"api.shadowize.call(this)\">' + name + '</button>';\n drillable.push(inNode);\n } else {\n tag += name || 'shadow-root';\n }\n if (inNode.attributes) {\n forEach(inNode.attributes, function(a) {\n tag += ' ' + a.name + (a.value ? '=\"' + a.value + '\"' : '');\n });\n }\n tag += '&gt;'+ '</tag>';\n return tag;\n };\n\n // remote api\n\n shadowize = function() {\n var idx = Number(this.attributes.idx.value);\n //alert(idx);\n var node = drillable[idx];\n if (node) {\n inspect(node.webkitShadowRoot || node.shadowRoot, node)\n } else {\n console.log(\"bad shadowize node\");\n console.dir(this);\n }\n };\n \n // export\n \n scope.output = output;\n \n})(window.Inspector);\n\n\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n /*\n Shim :unresolved via an attribute unresolved.\n TODO(sorvell): This is currently done once when the first\n round of elements are upgraded. This is incorrect, and it will\n need to be done dynamically.\n The 'resolved' attribute is experimental and may be removed.\n */\n var TRANSITION_TIME = 0.2;\n var UNRESOLVED = 'unresolved';\n var RESOLVED = 'resolved';\n var UNRESOLVED_SELECTOR = '[' + UNRESOLVED + ']';\n var RESOLVED_SELECTOR = '[' + RESOLVED + ']';\n var style = document.createElement('style');\n \n style.textContent = UNRESOLVED_SELECTOR + ' { ' +\n 'opacity: 0; display: block; overflow: hidden; } \\n' +\n RESOLVED_SELECTOR + '{ display: block; overflow: hidden;\\n' +\n '-webkit-transition: opacity ' + TRANSITION_TIME + 's; ' +\n 'transition: opacity ' + TRANSITION_TIME +'s; }\\n';\n var head = document.querySelector('head');\n head.insertBefore(style, head.firstChild);\n\n // remove unresolved and apply resolved class\n function resolveElements() {\n requestAnimationFrame(function() {\n var nodes = document.querySelectorAll(UNRESOLVED_SELECTOR);\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n n.removeAttribute(UNRESOLVED);\n n.setAttribute(RESOLVED, '');\n }\n\n // NOTE: depends on transition end event to remove 'resolved' class.\n if (nodes.length) {\n var removeResolved = function() {\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n n.removeAttribute(RESOLVED);\n }\n document.body.removeEventListener(endEvent, removeResolved, false);\n }\n document.body.addEventListener(endEvent, removeResolved, false);\n };\n\n });\n }\n\n // determine transition end event\n var endEvent = (document.documentElement.style.webkitTransition !== undefined) ?\n 'webkitTransitionEnd' : 'transitionend';\n\n // hookup auto-unveiling\n window.addEventListener('WebComponentsReady', resolveElements);\n\n})(Platform);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\nif (!scope) {\n scope = window.HTMLImports = {flags:{}};\n}\n\n// imports\n\nvar xhr = scope.xhr;\n\n// importer\n\nvar IMPORT_LINK_TYPE = 'import';\nvar STYLE_LINK_TYPE = 'stylesheet';\n\n// highlander object represents a primary document (the argument to 'load')\n// at the root of a tree of documents\n\n// for any document, importer:\n// - loads any linked documents (with deduping), modifies paths and feeds them back into importer\n// - loads text of external script tags\n// - loads text of external style tags inside of <element>, modifies paths\n\n// when importer 'modifies paths' in a document, this includes\n// - href/src/action in node attributes\n// - paths in inline stylesheets\n// - all content inside templates\n\n// linked style sheets in an import have their own path fixed up when their containing import modifies paths\n// linked style sheets in an <element> are loaded, and the content gets path fixups\n// inline style sheets get path fixups when their containing import modifies paths\n\nvar loader;\n\nvar importer = {\n documents: {},\n cache: {},\n preloadSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']',\n 'element link[rel=' + STYLE_LINK_TYPE + ']',\n 'template',\n 'script[src]:not([type])',\n 'script[src][type=\"text/javascript\"]'\n ].join(','),\n loader: function(next) {\n // construct a loader instance\n loader = new Loader(importer.loaded, next);\n // alias the importer cache (for debugging)\n loader.cache = importer.cache;\n return loader;\n },\n load: function(doc, next) {\n // get a loader instance from the factory\n loader = importer.loader(next);\n // add nodes from document into loader queue\n importer.preload(doc);\n },\n preload: function(doc) {\n // all preloadable nodes in inDocument\n var nodes = doc.querySelectorAll(importer.preloadSelectors);\n // from the main document, only load imports\n // TODO(sjmiles): do this by altering the selector list instead\n nodes = this.filterMainDocumentNodes(doc, nodes);\n // extra link nodes from templates, filter templates out of the nodes list\n nodes = this.extractTemplateNodes(nodes);\n // add these nodes to loader's queue\n loader.addNodes(nodes);\n },\n filterMainDocumentNodes: function(doc, nodes) {\n if (doc === document) {\n nodes = Array.prototype.filter.call(nodes, function(n) {\n return !isScript(n);\n });\n }\n return nodes;\n },\n extractTemplateNodes: function(nodes) {\n var extra = [];\n nodes = Array.prototype.filter.call(nodes, function(n) {\n if (n.localName === 'template') {\n if (n.content) {\n var l$ = n.content.querySelectorAll('link[rel=' + STYLE_LINK_TYPE +\n ']');\n if (l$.length) {\n extra = extra.concat(Array.prototype.slice.call(l$, 0));\n }\n }\n return false;\n }\n return true;\n });\n if (extra.length) {\n nodes = nodes.concat(extra);\n }\n return nodes;\n },\n loaded: function(url, elt, resource) {\n if (isDocumentLink(elt)) {\n var document = importer.documents[url];\n // if we've never seen a document at this url\n if (!document) {\n // generate an HTMLDocument from data\n document = makeDocument(resource, url);\n // resolve resource paths relative to host document\n path.resolvePathsInHTML(document);\n // cache document\n importer.documents[url] = document;\n // add nodes from this document to the loader queue\n importer.preload(document);\n }\n // store import record\n elt.import = document;\n elt.import.href = url;\n elt.import.ownerNode = elt;\n // store document resource\n elt.content = resource = document;\n }\n // store generic resource\n // TODO(sorvell): fails for nodes inside <template>.content\n // see https://code.google.com/p/chromium/issues/detail?id=249381.\n elt.__resource = resource;\n // css path fixups\n if (isStylesheetLink(elt)) {\n path.resolvePathsInStylesheet(elt);\n }\n }\n};\n\nfunction isDocumentLink(elt) {\n return isLinkRel(elt, IMPORT_LINK_TYPE);\n}\n\nfunction isStylesheetLink(elt) {\n return isLinkRel(elt, STYLE_LINK_TYPE);\n}\n\nfunction isLinkRel(elt, rel) {\n return elt.localName === 'link' && elt.getAttribute('rel') === rel;\n}\n\nfunction isScript(elt) {\n return elt.localName === 'script';\n}\n\nfunction makeDocument(resource, url) {\n // create a new HTML document\n var doc = resource;\n if (!(doc instanceof Document)) {\n doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);\n }\n // cache the new document's source url\n doc._URL = url;\n // establish a relative path via <base>\n var base = doc.createElement('base');\n base.setAttribute('href', document.baseURI || document.URL);\n doc.head.appendChild(base);\n // install HTML last as it may trigger CustomElement upgrades\n // TODO(sjmiles): problem wrt to template boostrapping below,\n // template bootstrapping must (?) come before element upgrade\n // but we cannot bootstrap templates until they are in a document\n // which is too late\n if (!(resource instanceof Document)) {\n // install html\n doc.body.innerHTML = resource;\n }\n // TODO(sorvell): ideally this code is not aware of Template polyfill,\n // but for now the polyfill needs help to bootstrap these templates\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(doc);\n }\n return doc;\n}\n\nvar Loader = function(onLoad, onComplete) {\n this.onload = onLoad;\n this.oncomplete = onComplete;\n this.inflight = 0;\n this.pending = {};\n this.cache = {};\n};\n\nLoader.prototype = {\n addNodes: function(nodes) {\n // number of transactions to complete\n this.inflight += nodes.length;\n // commence transactions\n forEach(nodes, this.require, this);\n // anything to do?\n this.checkDone();\n },\n require: function(elt) {\n var url = path.nodeUrl(elt);\n // ensure we have a standard url that can be used\n // reliably for deduping.\n url = path.makeAbsUrl(url);\n // TODO(sjmiles): ad-hoc\n elt.__nodeUrl = url;\n // deduplication\n if (!this.dedupe(url, elt)) {\n // fetch this resource\n this.fetch(url, elt);\n }\n },\n dedupe: function(url, elt) {\n if (this.pending[url]) {\n // add to list of nodes waiting for inUrl\n this.pending[url].push(elt);\n // don't need fetch\n return true;\n }\n if (this.cache[url]) {\n // complete load using cache data\n this.onload(url, elt, loader.cache[url]);\n // finished this transaction\n this.tail();\n // don't need fetch\n return true;\n }\n // first node waiting for inUrl\n this.pending[url] = [elt];\n // need fetch (not a dupe)\n return false;\n },\n fetch: function(url, elt) {\n var receiveXhr = function(err, resource) {\n this.receive(url, elt, err, resource);\n }.bind(this);\n xhr.load(url, receiveXhr);\n // TODO(sorvell): blocked on\n // https://code.google.com/p/chromium/issues/detail?id=257221\n // xhr'ing for a document makes scripts in imports runnable; otherwise\n // they are not; however, it requires that we have doctype=html in\n // the import which is unacceptable. This is only needed on Chrome\n // to avoid the bug above.\n /*\n if (isDocumentLink(elt)) {\n xhr.loadDocument(url, receiveXhr);\n } else {\n xhr.load(url, receiveXhr);\n }\n */\n },\n receive: function(url, elt, err, resource) {\n if (!err) {\n loader.cache[url] = resource;\n }\n loader.pending[url].forEach(function(e) {\n if (!err) {\n this.onload(url, e, resource);\n }\n this.tail();\n }, this);\n loader.pending[url] = null;\n },\n tail: function() {\n --this.inflight;\n this.checkDone();\n },\n checkDone: function() {\n if (!this.inflight) {\n this.oncomplete();\n }\n }\n};\n\nvar URL_ATTRS = ['href', 'src', 'action'];\nvar URL_ATTRS_SELECTOR = '[' + URL_ATTRS.join('],[') + ']';\nvar URL_TEMPLATE_SEARCH = '{{.*}}';\n\nvar path = {\n nodeUrl: function(node) {\n return path.resolveUrl(path.documentURL, path.hrefOrSrc(node));\n },\n hrefOrSrc: function(node) {\n return node.getAttribute(\"href\") || node.getAttribute(\"src\");\n },\n documentUrlFromNode: function(node) {\n return path.getDocumentUrl(node.ownerDocument || node);\n },\n getDocumentUrl: function(doc) {\n var url = doc &&\n // TODO(sjmiles): ShadowDOMPolyfill intrusion\n (doc._URL || (doc.impl && doc.impl._URL)\n || doc.baseURI || doc.URL)\n || '';\n // take only the left side if there is a #\n return url.split('#')[0];\n },\n resolveUrl: function(baseUrl, url) {\n if (this.isAbsUrl(url)) {\n return url;\n }\n return this.compressUrl(this.urlToPath(baseUrl) + url);\n },\n resolveRelativeUrl: function(baseUrl, url) {\n if (this.isAbsUrl(url)) {\n return url;\n }\n return this.makeDocumentRelPath(this.resolveUrl(baseUrl, url));\n },\n isAbsUrl: function(url) {\n return /(^data:)|(^http[s]?:)|(^\\/)/.test(url);\n },\n urlToPath: function(baseUrl) {\n var parts = baseUrl.split(\"/\");\n parts.pop();\n parts.push('');\n return parts.join(\"/\");\n },\n compressUrl: function(url) {\n var search = '';\n var searchPos = url.indexOf('?');\n // query string is not part of the path\n if (searchPos > -1) {\n search = url.substring(searchPos);\n url = url.substring(searchPos, 0);\n }\n var parts = url.split('/');\n for (var i=0, p; i<parts.length; i++) {\n p = parts[i];\n if (p === '..') {\n parts.splice(i-1, 2);\n i -= 2;\n }\n }\n return parts.join('/') + search;\n },\n makeDocumentRelPath: function(url) {\n // test url against document to see if we can construct a relative path\n path.urlElt.href = url;\n // IE does not set host if same as document\n if (!path.urlElt.host || \n (path.urlElt.host === window.location.host &&\n path.urlElt.protocol === window.location.protocol)) {\n return this.makeRelPath(path.documentURL, path.urlElt.href);\n } else {\n return url;\n }\n },\n // make a relative path from source to target\n makeRelPath: function(source, target) {\n var s = source.split('/');\n var t = target.split('/');\n while (s.length && s[0] === t[0]){\n s.shift();\n t.shift();\n }\n for(var i = 0, l = s.length-1; i < l; i++) {\n t.unshift('..');\n }\n var r = t.join('/');\n return r;\n },\n makeAbsUrl: function(url) {\n path.urlElt.href = url;\n return path.urlElt.href;\n },\n resolvePathsInHTML: function(root, url) {\n url = url || path.documentUrlFromNode(root)\n path.resolveAttributes(root, url);\n path.resolveStyleElts(root, url);\n // handle template.content\n var templates = root.querySelectorAll('template');\n if (templates) {\n forEach(templates, function(t) {\n if (t.content) {\n path.resolvePathsInHTML(t.content, url);\n }\n });\n }\n },\n resolvePathsInStylesheet: function(sheet) {\n var docUrl = path.nodeUrl(sheet);\n sheet.__resource = path.resolveCssText(sheet.__resource, docUrl);\n },\n resolveStyleElts: function(root, url) {\n var styles = root.querySelectorAll('style');\n if (styles) {\n forEach(styles, function(style) {\n style.textContent = path.resolveCssText(style.textContent, url);\n });\n }\n },\n resolveCssText: function(cssText, baseUrl) {\n return cssText.replace(/url\\([^)]*\\)/g, function(match) {\n // find the url path, ignore quotes in url string\n var urlPath = match.replace(/[\"']/g, \"\").slice(4, -1);\n urlPath = path.resolveRelativeUrl(baseUrl, urlPath);\n return \"url(\" + urlPath + \")\";\n });\n },\n resolveAttributes: function(root, url) {\n // search for attributes that host urls\n var nodes = root && root.querySelectorAll(URL_ATTRS_SELECTOR);\n if (nodes) {\n forEach(nodes, function(n) {\n this.resolveNodeAttributes(n, url);\n }, this);\n }\n },\n resolveNodeAttributes: function(node, url) {\n URL_ATTRS.forEach(function(v) {\n var attr = node.attributes[v];\n if (attr && attr.value &&\n (attr.value.search(URL_TEMPLATE_SEARCH) < 0)) {\n var urlPath = path.resolveRelativeUrl(url, attr.value);\n attr.value = urlPath;\n }\n });\n }\n};\n\npath.documentURL = path.getDocumentUrl(document);\npath.urlElt = document.createElement('a');\n\nxhr = xhr || {\n async: true,\n ok: function(request) {\n return (request.status >= 200 && request.status < 300)\n || (request.status === 304)\n || (request.status === 0);\n },\n load: function(url, next, nextContext) {\n var request = new XMLHttpRequest();\n if (scope.flags.debug || scope.flags.bust) {\n url += '?' + Math.random();\n }\n request.open('GET', url, xhr.async);\n request.addEventListener('readystatechange', function(e) {\n if (request.readyState === 4) {\n next.call(nextContext, !xhr.ok(request) && request,\n request.response || request.responseText, url);\n }\n });\n request.send();\n return request;\n },\n loadDocument: function(url, next, nextContext) {\n this.load(url, next, nextContext).responseType = 'document';\n }\n};\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n// expose _currentScript\nObject.defineProperty(document, '_currentScript', {\n get: function() {\n return HTMLImports.currentScript || document.currentScript;\n },\n writeable: true,\n configurable: true\n});\n\n\n// exports\n\nscope.path = path;\nscope.xhr = xhr;\nscope.importer = importer;\nscope.getDocumentUrl = path.getDocumentUrl;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\nvar IMPORT_LINK_TYPE = 'import';\n\n// highlander object for parsing a document tree\n\nvar importParser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']',\n 'link[rel=stylesheet]',\n 'style',\n 'script:not([type])',\n 'script[type=\"text/javascript\"]'\n ],\n map: {\n link: 'parseLink',\n script: 'parseScript',\n style: 'parseGeneric'\n },\n // TODO(sorvell): because dynamic imports are not supported, users are \n // writing code like in https://github.com/Polymer/HTMLImports/issues/40\n // as a workaround. The code here checking for the existence of\n // document.scripts is here only to support the workaround.\n parse: function(document) {\n if (!document.__importParsed) {\n // only parse once\n document.__importParsed = true;\n // all parsable elements in inDocument (depth-first pre-order traversal)\n var elts = document.querySelectorAll(importParser.selectors);\n // memoize the number of scripts\n var scriptCount = document.scripts ? document.scripts.length : 0;\n // for each parsable node type, call the mapped parsing method\n for (var i=0, e; i<elts.length && (e=elts[i]); i++) {\n importParser[importParser.map[e.localName]](e);\n // if a script was injected, we need to requery our nodes\n // TODO(sjmiles): injecting nodes above the current script will\n // result in errors\n if (document.scripts && scriptCount !== document.scripts.length) {\n // memoize the new count\n scriptCount = document.scripts.length;\n // ensure we have any new nodes in our list\n elts = document.querySelectorAll(importParser.selectors);\n }\n }\n }\n },\n parseLink: function(linkElt) {\n if (isDocumentLink(linkElt)) {\n if (linkElt.import) {\n importParser.parse(linkElt.import);\n // fire load event\n linkElt.dispatchEvent(new CustomEvent('load'));\n }\n } else {\n this.parseGeneric(linkElt);\n }\n },\n parseGeneric: function(elt) {\n if (needsMainDocumentContext(elt)) {\n document.head.appendChild(elt);\n }\n },\n parseScript: function(scriptElt) {\n if (needsMainDocumentContext(scriptElt)) {\n // acquire code to execute\n var code = (scriptElt.__resource || scriptElt.textContent).trim();\n if (code) {\n // calculate source map hint\n var moniker = scriptElt.__nodeUrl;\n if (!moniker) {\n var moniker = scope.path.documentUrlFromNode(scriptElt);\n // there could be more than one script this url\n var tag = '[' + Math.floor((Math.random()+1)*1000) + ']';\n // TODO(sjmiles): Polymer hack, should be pluggable if we need to allow \n // this sort of thing\n var matches = code.match(/Polymer\\(['\"]([^'\"]*)/);\n tag = matches && matches[1] || tag;\n // tag the moniker\n moniker += '/' + tag + '.js';\n }\n // source map hint\n code += \"\\n//# sourceURL=\" + moniker + \"\\n\";\n // evaluate the code\n scope.currentScript = scriptElt;\n eval.call(window, code);\n scope.currentScript = null;\n }\n }\n }\n};\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\nfunction isDocumentLink(elt) {\n return elt.localName === 'link'\n && elt.getAttribute('rel') === IMPORT_LINK_TYPE;\n}\n\nfunction needsMainDocumentContext(node) {\n // nodes can be moved to the main document:\n // if they are in a tree but not in the main document and not children of <element>\n return node.parentNode && !inMainDocument(node) \n && !isElementElementChild(node);\n}\n\nfunction inMainDocument(elt) {\n return elt.ownerDocument === document ||\n // TODO(sjmiles): ShadowDOMPolyfill intrusion\n elt.ownerDocument.impl === document;\n}\n\nfunction isElementElementChild(elt) {\n return elt.parentNode && elt.parentNode.localName === 'element';\n}\n\n// exports\n\nscope.parser = importParser;\n\n})(HTMLImports);","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(){\n\n// bootstrap\n\n// IE shim for CustomEvent\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType, true, true);\n return e;\n };\n}\n\nfunction bootstrap() {\n // preload document resource trees\n HTMLImports.importer.load(document, function() {\n HTMLImports.parser.parse(document);\n HTMLImports.ready = true;\n HTMLImports.readyTime = new Date().getTime();\n // send HTMLImportsLoaded when finished\n document.dispatchEvent(\n new CustomEvent('HTMLImportsLoaded', {bubbles: true})\n );\n });\n}\n\n// Allow for asynchronous loading when minified\n// readyState 'interactive' is expected when loaded with 'async' or 'defer' attributes\n// note: use interactive state only when not on IE since it can become \n// interactive early (see https://github.com/mobify/mobifyjs/issues/136)\nif (document.readyState === 'complete' ||\n (document.readyState === 'interactive' && !window.attachEvent)) {\n bootstrap();\n} else {\n window.addEventListener('DOMContentLoaded', bootstrap);\n}\n\n})();\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(global) {\n\n var registrationsTable = new WeakMap();\n\n // We use setImmediate or postMessage for our future callback.\n var setImmediate = window.msSetImmediate;\n\n // Use post message to emulate setImmediate.\n if (!setImmediate) {\n var setImmediateQueue = [];\n var sentinel = String(Math.random());\n window.addEventListener('message', function(e) {\n if (e.data === sentinel) {\n var queue = setImmediateQueue;\n setImmediateQueue = [];\n queue.forEach(function(func) {\n func();\n });\n }\n });\n setImmediate = function(func) {\n setImmediateQueue.push(func);\n window.postMessage(sentinel, '*');\n };\n }\n\n // This is used to ensure that we never schedule 2 callas to setImmediate\n var isScheduled = false;\n\n // Keep track of observers that needs to be notified next time.\n var scheduledObservers = [];\n\n /**\n * Schedules |dispatchCallback| to be called in the future.\n * @param {MutationObserver} observer\n */\n function scheduleCallback(observer) {\n scheduledObservers.push(observer);\n if (!isScheduled) {\n isScheduled = true;\n setImmediate(dispatchCallbacks);\n }\n }\n\n function wrapIfNeeded(node) {\n return window.ShadowDOMPolyfill &&\n window.ShadowDOMPolyfill.wrapIfNeeded(node) ||\n node;\n }\n\n function dispatchCallbacks() {\n // http://dom.spec.whatwg.org/#mutation-observers\n\n isScheduled = false; // Used to allow a new setImmediate call above.\n\n var observers = scheduledObservers;\n scheduledObservers = [];\n // Sort observers based on their creation UID (incremental).\n observers.sort(function(o1, o2) {\n return o1.uid_ - o2.uid_;\n });\n\n var anyNonEmpty = false;\n observers.forEach(function(observer) {\n\n // 2.1, 2.2\n var queue = observer.takeRecords();\n // 2.3. Remove all transient registered observers whose observer is mo.\n removeTransientObserversFor(observer);\n\n // 2.4\n if (queue.length) {\n observer.callback_(queue, observer);\n anyNonEmpty = true;\n }\n });\n\n // 3.\n if (anyNonEmpty)\n dispatchCallbacks();\n }\n\n function removeTransientObserversFor(observer) {\n observer.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n registrations.forEach(function(registration) {\n if (registration.observer === observer)\n registration.removeTransientObservers();\n });\n });\n }\n\n /**\n * This function is used for the \"For each registered observer observer (with\n * observer's options as options) in target's list of registered observers,\n * run these substeps:\" and the \"For each ancestor ancestor of target, and for\n * each registered observer observer (with options options) in ancestor's list\n * of registered observers, run these substeps:\" part of the algorithms. The\n * |options.subtree| is checked to ensure that the callback is called\n * correctly.\n *\n * @param {Node} target\n * @param {function(MutationObserverInit):MutationRecord} callback\n */\n function forEachAncestorAndObserverEnqueueRecord(target, callback) {\n for (var node = target; node; node = node.parentNode) {\n var registrations = registrationsTable.get(node);\n\n if (registrations) {\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n\n // Only target ignores subtree.\n if (node !== target && !options.subtree)\n continue;\n\n var record = callback(options);\n if (record)\n registration.enqueue(record);\n }\n }\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function JsMutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n }\n\n JsMutationObserver.prototype = {\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n // 1.1\n if (!options.childList && !options.attributes && !options.characterData ||\n\n // 1.2\n options.attributeOldValue && !options.attributes ||\n\n // 1.3\n options.attributeFilter && options.attributeFilter.length &&\n !options.attributes ||\n\n // 1.4\n options.characterDataOldValue && !options.characterData) {\n\n throw new SyntaxError();\n }\n\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n // 2\n // If target's list of registered observers already includes a registered\n // observer associated with the context object, replace that registered\n // observer's options with options.\n var registration;\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n registration.removeListeners();\n registration.options = options;\n break;\n }\n }\n\n // 3.\n // Otherwise, add a new registered observer to target's list of registered\n // observers with the context object as the observer and options as the\n // options, and add target to context object's list of nodes on which it\n // is registered.\n if (!registration) {\n registration = new Registration(this, target, options);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n\n registration.addListeners();\n },\n\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registration.removeListeners();\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = [];\n this.removedNodes = [];\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n function copyMutationRecord(original) {\n var record = new MutationRecord(original.type, original.target);\n record.addedNodes = original.addedNodes.slice();\n record.removedNodes = original.removedNodes.slice();\n record.previousSibling = original.previousSibling;\n record.nextSibling = original.nextSibling;\n record.attributeName = original.attributeName;\n record.attributeNamespace = original.attributeNamespace;\n record.oldValue = original.oldValue;\n return record;\n };\n\n // We keep track of the two (possibly one) records used in a single mutation.\n var currentRecord, recordWithOldValue;\n\n /**\n * Creates a record without |oldValue| and caches it as |currentRecord| for\n * later use.\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecord(type, target) {\n return currentRecord = new MutationRecord(type, target);\n }\n\n /**\n * Gets or creates a record with |oldValue| based in the |currentRecord|\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecordWithOldValue(oldValue) {\n if (recordWithOldValue)\n return recordWithOldValue;\n recordWithOldValue = copyMutationRecord(currentRecord);\n recordWithOldValue.oldValue = oldValue;\n return recordWithOldValue;\n }\n\n function clearRecords() {\n currentRecord = recordWithOldValue = undefined;\n }\n\n /**\n * @param {MutationRecord} record\n * @return {boolean} Whether the record represents a record from the current\n * mutation event.\n */\n function recordRepresentsCurrentMutation(record) {\n return record === recordWithOldValue || record === currentRecord;\n }\n\n /**\n * Selects which record, if any, to replace the last record in the queue.\n * This returns |null| if no record should be replaced.\n *\n * @param {MutationRecord} lastRecord\n * @param {MutationRecord} newRecord\n * @param {MutationRecord}\n */\n function selectRecord(lastRecord, newRecord) {\n if (lastRecord === newRecord)\n return lastRecord;\n\n // Check if the the record we are adding represents the same record. If\n // so, we keep the one with the oldValue in it.\n if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord))\n return recordWithOldValue;\n\n return null;\n }\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverInit} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n enqueue: function(record) {\n var records = this.observer.records_;\n var length = records.length;\n\n // There are cases where we replace the last record with the new record.\n // For example if the record represents the same mutation we need to use\n // the one with the oldValue. If we get same record (this can happen as we\n // walk up the tree) we ignore the new record.\n if (records.length > 0) {\n var lastRecord = records[length - 1];\n var recordToReplaceLast = selectRecord(lastRecord, record);\n if (recordToReplaceLast) {\n records[length - 1] = recordToReplaceLast;\n return;\n }\n } else {\n scheduleCallback(this.observer);\n }\n\n records[length] = record;\n },\n\n addListeners: function() {\n this.addListeners_(this.target);\n },\n\n addListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.addEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.addEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.addEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.addEventListener('DOMNodeRemoved', this, true);\n },\n\n removeListeners: function() {\n this.removeListeners_(this.target);\n },\n\n removeListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.removeEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.removeEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.removeEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.removeEventListener('DOMNodeRemoved', this, true);\n },\n\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.addListeners_(node);\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n transientObservedNodes.forEach(function(node) {\n // Transient observers are never added to the target.\n this.removeListeners_(node);\n\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i] === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n },\n\n handleEvent: function(e) {\n // Stop propagation since we are managing the propagation manually.\n // This means that other mutation events on the page will not work\n // correctly but that is by design.\n e.stopImmediatePropagation();\n\n switch (e.type) {\n case 'DOMAttrModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-attributes\n\n var name = e.attrName;\n var namespace = e.relatedNode.namespaceURI;\n var target = e.target;\n\n // 1.\n var record = new getRecord('attributes', target);\n record.attributeName = name;\n record.attributeNamespace = namespace;\n\n // 2.\n var oldValue =\n e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.attributes)\n return;\n\n // 3.2, 4.3\n if (options.attributeFilter && options.attributeFilter.length &&\n options.attributeFilter.indexOf(name) === -1 &&\n options.attributeFilter.indexOf(namespace) === -1) {\n return;\n }\n // 3.3, 4.4\n if (options.attributeOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.4, 4.5\n return record;\n });\n\n break;\n\n case 'DOMCharacterDataModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-characterdata\n var target = e.target;\n\n // 1.\n var record = getRecord('characterData', target);\n\n // 2.\n var oldValue = e.prevValue;\n\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.characterData)\n return;\n\n // 3.2, 4.3\n if (options.characterDataOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.3, 4.4\n return record;\n });\n\n break;\n\n case 'DOMNodeRemoved':\n this.addTransientObserver(e.target);\n // Fall through.\n case 'DOMNodeInserted':\n // http://dom.spec.whatwg.org/#concept-mo-queue-childlist\n var target = e.relatedNode;\n var changedNode = e.target;\n var addedNodes, removedNodes;\n if (e.type === 'DOMNodeInserted') {\n addedNodes = [changedNode];\n removedNodes = [];\n } else {\n\n addedNodes = [];\n removedNodes = [changedNode];\n }\n var previousSibling = changedNode.previousSibling;\n var nextSibling = changedNode.nextSibling;\n\n // 1.\n var record = getRecord('childList', target);\n record.addedNodes = addedNodes;\n record.removedNodes = removedNodes;\n record.previousSibling = previousSibling;\n record.nextSibling = nextSibling;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 2.1, 3.2\n if (!options.childList)\n return;\n\n // 2.2, 3.3\n return record;\n });\n\n }\n\n clearRecords();\n }\n };\n\n global.JsMutationObserver = JsMutationObserver;\n\n // Provide unprefixed MutationObserver with native or JS implementation\n if (!global.MutationObserver && global.WebKitMutationObserver)\n global.MutationObserver = global.WebKitMutationObserver;\n\n if (!global.MutationObserver)\n global.MutationObserver = JsMutationObserver;\n\n\n})(this);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\nwindow.CustomElements = window.CustomElements || {flags:{}};"," /*\r\nCopyright 2013 The Polymer Authors. All rights reserved.\r\nUse of this source code is governed by a BSD-style\r\nlicense that can be found in the LICENSE file.\r\n*/\r\n\r\n(function(scope){\r\n\r\nvar logFlags = window.logFlags || {};\r\n\r\n// walk the subtree rooted at node, applying 'find(element, data)' function\r\n// to each element\r\n// if 'find' returns true for 'element', do not search element's subtree\r\nfunction findAll(node, find, data) {\r\n var e = node.firstElementChild;\r\n if (!e) {\r\n e = node.firstChild;\r\n while (e && e.nodeType !== Node.ELEMENT_NODE) {\r\n e = e.nextSibling;\r\n }\r\n }\r\n while (e) {\r\n if (find(e, data) !== true) {\r\n findAll(e, find, data);\r\n }\r\n e = e.nextElementSibling;\r\n }\r\n return null;\r\n}\r\n\r\n// walk all shadowRoots on a given node.\r\nfunction forRoots(node, cb) {\r\n var root = node.shadowRoot;\r\n while(root) {\r\n forSubtree(root, cb);\r\n root = root.olderShadowRoot;\r\n }\r\n}\r\n\r\n// walk the subtree rooted at node, including descent into shadow-roots,\r\n// applying 'cb' to each element\r\nfunction forSubtree(node, cb) {\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.group('subTree: ', node);\r\n findAll(node, function(e) {\r\n if (cb(e)) {\r\n return true;\r\n }\r\n forRoots(e, cb);\r\n });\r\n forRoots(node, cb);\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.groupEnd();\r\n}\r\n\r\n// manage lifecycle on added node\r\nfunction added(node) {\r\n if (upgrade(node)) {\r\n insertedNode(node);\r\n return true;\r\n }\r\n inserted(node);\r\n}\r\n\r\n// manage lifecycle on added node's subtree only\r\nfunction addedSubtree(node) {\r\n forSubtree(node, function(e) {\r\n if (added(e)) {\r\n return true;\r\n }\r\n });\r\n}\r\n\r\n// manage lifecycle on added node and it's subtree\r\nfunction addedNode(node) {\r\n return added(node) || addedSubtree(node);\r\n}\r\n\r\n// upgrade custom elements at node, if applicable\r\nfunction upgrade(node) {\r\n if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {\r\n var type = node.getAttribute('is') || node.localName;\r\n var definition = scope.registry[type];\r\n if (definition) {\r\n logFlags.dom && console.group('upgrade:', node.localName);\r\n scope.upgrade(node);\r\n logFlags.dom && console.groupEnd();\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nfunction insertedNode(node) {\r\n inserted(node);\r\n if (inDocument(node)) {\r\n forSubtree(node, function(e) {\r\n inserted(e);\r\n });\r\n }\r\n}\r\n\r\n\r\n// TODO(sorvell): on platforms without MutationObserver, mutations may not be \r\n// reliable and therefore entered/leftView are not reliable.\r\n// To make these callbacks less likely to fail, we defer all inserts and removes\r\n// to give a chance for elements to be inserted into dom. \r\n// This ensures enteredViewCallback fires for elements that are created and \r\n// immediately added to dom.\r\nvar hasPolyfillMutations = (!window.MutationObserver ||\r\n (window.MutationObserver === window.JsMutationObserver));\r\nscope.hasPolyfillMutations = hasPolyfillMutations;\r\n\r\nvar isPendingMutations = false;\r\nvar pendingMutations = [];\r\nfunction deferMutation(fn) {\r\n pendingMutations.push(fn);\r\n if (!isPendingMutations) {\r\n isPendingMutations = true;\r\n var async = (window.Platform && window.Platform.endOfMicrotask) ||\r\n setTimeout;\r\n async(takeMutations);\r\n }\r\n}\r\n\r\nfunction takeMutations() {\r\n isPendingMutations = false;\r\n var $p = pendingMutations;\r\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\r\n p();\r\n }\r\n pendingMutations = [];\r\n}\r\n\r\nfunction inserted(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _inserted(element);\r\n });\r\n } else {\r\n _inserted(element);\r\n }\r\n}\r\n\r\n// TODO(sjmiles): if there are descents into trees that can never have inDocument(*) true, fix this\r\nfunction _inserted(element) {\r\n // TODO(sjmiles): it's possible we were inserted and removed in the space\r\n // of one microtask, in which case we won't be 'inDocument' here\r\n // But there are other cases where we are testing for inserted without\r\n // specific knowledge of mutations, and must test 'inDocument' to determine\r\n // whether to call inserted\r\n // If we can factor these cases into separate code paths we can have\r\n // better diagnostics.\r\n // TODO(sjmiles): when logging, do work on all custom elements so we can\r\n // track behavior even when callbacks not defined\r\n //console.log('inserted: ', element.localName);\r\n if (element.enteredViewCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('inserted:', element.localName);\r\n if (inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) + 1;\r\n // if we are in a 'removed' state, bluntly adjust to an 'inserted' state\r\n if (element.__inserted < 1) {\r\n element.__inserted = 1;\r\n }\r\n // if we are 'over inserted', squelch the callback\r\n if (element.__inserted > 1) {\r\n logFlags.dom && console.warn('inserted:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.enteredViewCallback) {\r\n logFlags.dom && console.log('inserted:', element.localName);\r\n element.enteredViewCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\nfunction removedNode(node) {\r\n removed(node);\r\n forSubtree(node, function(e) {\r\n removed(e);\r\n });\r\n}\r\n\r\n\r\nfunction removed(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _removed(element);\r\n });\r\n } else {\r\n _removed(element);\r\n }\r\n}\r\n\r\nfunction _removed(element) {\r\n // TODO(sjmiles): temporary: do work on all custom elements so we can track\r\n // behavior even when callbacks not defined\r\n if (element.leftViewCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.log('removed:', element.localName);\r\n if (!inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) - 1;\r\n // if we are in a 'inserted' state, bluntly adjust to an 'removed' state\r\n if (element.__inserted > 0) {\r\n element.__inserted = 0;\r\n }\r\n // if we are 'over removed', squelch the callback\r\n if (element.__inserted < 0) {\r\n logFlags.dom && console.warn('removed:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.leftViewCallback) {\r\n element.leftViewCallback();\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction inDocument(element) {\r\n var p = element;\r\n var doc = window.ShadowDOMPolyfill &&\r\n window.ShadowDOMPolyfill.wrapIfNeeded(document) || document;\r\n while (p) {\r\n if (p == doc) {\r\n return true;\r\n }\r\n p = p.parentNode || p.host;\r\n }\r\n}\r\n\r\nfunction watchShadow(node) {\r\n if (node.shadowRoot && !node.shadowRoot.__watched) {\r\n logFlags.dom && console.log('watching shadow-root for: ', node.localName);\r\n // watch all unwatched roots...\r\n var root = node.shadowRoot;\r\n while (root) {\r\n watchRoot(root);\r\n root = root.olderShadowRoot;\r\n }\r\n }\r\n}\r\n\r\nfunction watchRoot(root) {\r\n if (!root.__watched) {\r\n observe(root);\r\n root.__watched = true;\r\n }\r\n}\r\n\r\nfunction handler(mutations) {\r\n //\r\n if (logFlags.dom) {\r\n var mx = mutations[0];\r\n if (mx && mx.type === 'childList' && mx.addedNodes) {\r\n if (mx.addedNodes) {\r\n var d = mx.addedNodes[0];\r\n while (d && d !== document && !d.host) {\r\n d = d.parentNode;\r\n }\r\n var u = d && (d.URL || d._URL || (d.host && d.host.localName)) || '';\r\n u = u.split('/?').shift().split('/').pop();\r\n }\r\n }\r\n console.group('mutations (%d) [%s]', mutations.length, u || '');\r\n }\r\n //\r\n mutations.forEach(function(mx) {\r\n //logFlags.dom && console.group('mutation');\r\n if (mx.type === 'childList') {\r\n forEach(mx.addedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n // nodes added may need lifecycle management\r\n addedNode(n);\r\n });\r\n // removed nodes may need lifecycle management\r\n forEach(mx.removedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n removedNode(n);\r\n });\r\n }\r\n //logFlags.dom && console.groupEnd();\r\n });\r\n logFlags.dom && console.groupEnd();\r\n};\r\n\r\nvar observer = new MutationObserver(handler);\r\n\r\nfunction takeRecords() {\r\n // TODO(sjmiles): ask Raf why we have to call handler ourselves\r\n handler(observer.takeRecords());\r\n takeMutations();\r\n}\r\n\r\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\r\n\r\nfunction observe(inRoot) {\r\n observer.observe(inRoot, {childList: true, subtree: true});\r\n}\r\n\r\nfunction observeDocument(document) {\r\n observe(document);\r\n}\r\n\r\nfunction upgradeDocument(document) {\r\n logFlags.dom && console.group('upgradeDocument: ', (document.URL || document._URL || '').split('/').pop());\r\n addedNode(document);\r\n logFlags.dom && console.groupEnd();\r\n}\r\n\r\n// exports\r\n\r\nscope.watchShadow = watchShadow;\r\nscope.upgradeAll = addedNode;\r\nscope.upgradeSubtree = addedSubtree;\r\n\r\nscope.observeDocument = observeDocument;\r\nscope.upgradeDocument = upgradeDocument;\r\n\r\nscope.takeRecords = takeRecords;\r\n\r\n})(window.CustomElements);\r\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * Implements `document.register`\n * @module CustomElements\n*/\n\n/**\n * Polyfilled extensions to the `document` object.\n * @class Document\n*/\n\n(function(scope) {\n\n// imports\n\nif (!scope) {\n scope = window.CustomElements = {flags:{}};\n}\nvar flags = scope.flags;\n\n// native document.register?\n\nvar hasNative = Boolean(document.register);\nvar useNative = !flags.register && hasNative;\n\nif (useNative) {\n\n // stub\n var nop = function() {};\n\n // exports\n scope.registry = {};\n scope.upgradeElement = nop;\n \n scope.watchShadow = nop;\n scope.upgrade = nop;\n scope.upgradeAll = nop;\n scope.upgradeSubtree = nop;\n scope.observeDocument = nop;\n scope.upgradeDocument = nop;\n scope.takeRecords = nop;\n\n} else {\n\n /**\n * Registers a custom tag name with the document.\n *\n * When a registered element is created, a `readyCallback` method is called\n * in the scope of the element. The `readyCallback` method can be specified on\n * either `options.prototype` or `options.lifecycle` with the latter taking\n * precedence.\n *\n * @method register\n * @param {String} name The tag name to register. Must include a dash ('-'),\n * for example 'x-component'.\n * @param {Object} options\n * @param {String} [options.extends]\n * (_off spec_) Tag name of an element to extend (or blank for a new\n * element). This parameter is not part of the specification, but instead\n * is a hint for the polyfill because the extendee is difficult to infer.\n * Remember that the input prototype must chain to the extended element's\n * prototype (or HTMLElement.prototype) regardless of the value of\n * `extends`.\n * @param {Object} options.prototype The prototype to use for the new\n * element. The prototype must inherit from HTMLElement.\n * @param {Object} [options.lifecycle]\n * Callbacks that fire at important phases in the life of the custom\n * element.\n *\n * @example\n * FancyButton = document.register(\"fancy-button\", {\n * extends: 'button',\n * prototype: Object.create(HTMLButtonElement.prototype, {\n * readyCallback: {\n * value: function() {\n * console.log(\"a fancy-button was created\",\n * }\n * }\n * })\n * });\n * @return {Function} Constructor for the newly registered type.\n */\n function register(name, options) {\n //console.warn('document.register(\"' + name + '\", ', options, ')');\n // construct a defintion out of options\n // TODO(sjmiles): probably should clone options instead of mutating it\n var definition = options || {};\n if (!name) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.register: first argument `name` must not be empty');\n }\n if (name.indexOf('-') < 0) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.register: first argument (\\'name\\') must contain a dash (\\'-\\'). Argument provided was \\'' + String(name) + '\\'.');\n }\n // elements may only be registered once\n if (getRegisteredDefinition(name)) {\n throw new Error('DuplicateDefinitionError: a type with name \\'' + String(name) + '\\' is already registered');\n }\n // must have a prototype, default to an extension of HTMLElement\n // TODO(sjmiles): probably should throw if no prototype, check spec\n if (!definition.prototype) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('Options missing required prototype property');\n }\n // record name\n definition.name = name.toLowerCase();\n // ensure a lifecycle object so we don't have to null test it\n definition.lifecycle = definition.lifecycle || {};\n // build a list of ancestral custom elements (for native base detection)\n // TODO(sjmiles): we used to need to store this, but current code only\n // uses it in 'resolveTagName': it should probably be inlined\n definition.ancestry = ancestry(definition.extends);\n // extensions of native specializations of HTMLElement require localName\n // to remain native, and use secondary 'is' specifier for extension type\n resolveTagName(definition);\n // some platforms require modifications to the user-supplied prototype\n // chain\n resolvePrototypeChain(definition);\n // overrides to implement attributeChanged callback\n overrideAttributeApi(definition.prototype);\n // 7.1.5: Register the DEFINITION with DOCUMENT\n registerDefinition(definition.name, definition);\n // 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE\n // 7.1.8. Return the output of the previous step.\n definition.ctor = generateConstructor(definition);\n definition.ctor.prototype = definition.prototype;\n // force our .constructor to be our actual constructor\n definition.prototype.constructor = definition.ctor;\n // if initial parsing is complete\n if (scope.ready) {\n // upgrade any pre-existing nodes of this type\n scope.upgradeAll(document);\n }\n return definition.ctor;\n }\n\n function ancestry(extnds) {\n var extendee = getRegisteredDefinition(extnds);\n if (extendee) {\n return ancestry(extendee.extends).concat([extendee]);\n }\n return [];\n }\n\n function resolveTagName(definition) {\n // if we are explicitly extending something, that thing is our\n // baseTag, unless it represents a custom component\n var baseTag = definition.extends;\n // if our ancestry includes custom components, we only have a\n // baseTag if one of them does\n for (var i=0, a; (a=definition.ancestry[i]); i++) {\n baseTag = a.is && a.tag;\n }\n // our tag is our baseTag, if it exists, and otherwise just our name\n definition.tag = baseTag || definition.name;\n if (baseTag) {\n // if there is a base tag, use secondary 'is' specifier\n definition.is = definition.name;\n }\n }\n\n function resolvePrototypeChain(definition) {\n // if we don't support __proto__ we need to locate the native level\n // prototype for precise mixing in\n if (!Object.__proto__) {\n // default prototype\n var nativePrototype = HTMLElement.prototype;\n // work out prototype when using type-extension\n if (definition.is) {\n var inst = document.createElement(definition.tag);\n nativePrototype = Object.getPrototypeOf(inst);\n }\n // ensure __proto__ reference is installed at each point on the prototype\n // chain.\n // NOTE: On platforms without __proto__, a mixin strategy is used instead\n // of prototype swizzling. In this case, this generated __proto__ provides\n // limited support for prototype traversal.\n var proto = definition.prototype, ancestor;\n while (proto && (proto !== nativePrototype)) {\n var ancestor = Object.getPrototypeOf(proto);\n proto.__proto__ = ancestor;\n proto = ancestor;\n }\n }\n // cache this in case of mixin\n definition.native = nativePrototype;\n }\n\n // SECTION 4\n\n function instantiate(definition) {\n // 4.a.1. Create a new object that implements PROTOTYPE\n // 4.a.2. Let ELEMENT by this new object\n //\n // the custom element instantiation algorithm must also ensure that the\n // output is a valid DOM element with the proper wrapper in place.\n //\n return upgrade(domCreateElement(definition.tag), definition);\n }\n\n function upgrade(element, definition) {\n // some definitions specify an 'is' attribute\n if (definition.is) {\n element.setAttribute('is', definition.is);\n }\n // remove 'unresolved' attr, which is a standin for :unresolved.\n element.removeAttribute('unresolved');\n // make 'element' implement definition.prototype\n implement(element, definition);\n // flag as upgraded\n element.__upgraded__ = true;\n // there should never be a shadow root on element at this point\n // we require child nodes be upgraded before `created`\n scope.upgradeSubtree(element);\n // lifecycle management\n created(element);\n // OUTPUT\n return element;\n }\n\n function implement(element, definition) {\n // prototype swizzling is best\n if (Object.__proto__) {\n element.__proto__ = definition.prototype;\n } else {\n // where above we can re-acquire inPrototype via\n // getPrototypeOf(Element), we cannot do so when\n // we use mixin, so we install a magic reference\n customMixin(element, definition.prototype, definition.native);\n element.__proto__ = definition.prototype;\n }\n }\n\n function customMixin(inTarget, inSrc, inNative) {\n // TODO(sjmiles): 'used' allows us to only copy the 'youngest' version of\n // any property. This set should be precalculated. We also need to\n // consider this for supporting 'super'.\n var used = {};\n // start with inSrc\n var p = inSrc;\n // sometimes the default is HTMLUnknownElement.prototype instead of\n // HTMLElement.prototype, so we add a test\n // the idea is to avoid mixing in native prototypes, so adding\n // the second test is WLOG\n while (p !== inNative && p !== HTMLUnknownElement.prototype) {\n var keys = Object.getOwnPropertyNames(p);\n for (var i=0, k; k=keys[i]; i++) {\n if (!used[k]) {\n Object.defineProperty(inTarget, k,\n Object.getOwnPropertyDescriptor(p, k));\n used[k] = 1;\n }\n }\n p = Object.getPrototypeOf(p);\n }\n }\n\n function created(element) {\n // invoke createdCallback\n if (element.createdCallback) {\n element.createdCallback();\n }\n }\n\n // attribute watching\n\n function overrideAttributeApi(prototype) {\n // overrides to implement callbacks\n // TODO(sjmiles): should support access via .attributes NamedNodeMap\n // TODO(sjmiles): preserves user defined overrides, if any\n if (prototype.setAttribute._polyfilled) {\n return;\n }\n var setAttribute = prototype.setAttribute;\n prototype.setAttribute = function(name, value) {\n changeAttribute.call(this, name, value, setAttribute);\n }\n var removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function(name) {\n changeAttribute.call(this, name, null, removeAttribute);\n }\n prototype.setAttribute._polyfilled = true;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/\n // index.html#dfn-attribute-changed-callback\n function changeAttribute(name, value, operation) {\n var oldValue = this.getAttribute(name);\n operation.apply(this, arguments);\n var newValue = this.getAttribute(name);\n if (this.attributeChangedCallback\n && (newValue !== oldValue)) {\n this.attributeChangedCallback(name, oldValue, newValue);\n }\n }\n\n // element registry (maps tag names to definitions)\n\n var registry = {};\n\n function getRegisteredDefinition(name) {\n if (name) {\n return registry[name.toLowerCase()];\n }\n }\n\n function registerDefinition(name, definition) {\n registry[name] = definition;\n }\n\n function generateConstructor(definition) {\n return function() {\n return instantiate(definition);\n };\n }\n\n function createElement(tag, typeExtension) {\n // TODO(sjmiles): ignore 'tag' when using 'typeExtension', we could\n // error check it, or perhaps there should only ever be one argument\n var definition = getRegisteredDefinition(typeExtension || tag);\n if (definition) {\n return new definition.ctor();\n }\n return domCreateElement(tag);\n }\n\n function upgradeElement(element) {\n if (!element.__upgraded__ && (element.nodeType === Node.ELEMENT_NODE)) {\n var type = element.getAttribute('is') || element.localName;\n var definition = getRegisteredDefinition(type);\n return definition && upgrade(element, definition);\n }\n }\n\n function cloneNode(deep) {\n // call original clone\n var n = domCloneNode.call(this, deep);\n // upgrade the element and subtree\n scope.upgradeAll(n);\n // return the clone\n return n;\n }\n // capture native createElement before we override it\n\n var domCreateElement = document.createElement.bind(document);\n\n // capture native cloneNode before we override it\n\n var domCloneNode = Node.prototype.cloneNode;\n\n // exports\n\n document.register = register;\n document.createElement = createElement; // override\n Node.prototype.cloneNode = cloneNode; // override\n\n scope.registry = registry;\n\n /**\n * Upgrade an element to a custom element. Upgrading an element\n * causes the custom prototype to be applied, an `is` attribute \n * to be attached (as needed), and invocation of the `readyCallback`.\n * `upgrade` does nothing if the element is already upgraded, or\n * if it matches no registered custom tag name.\n *\n * @method ugprade\n * @param {Element} element The element to upgrade.\n * @return {Element} The upgraded element.\n */\n scope.upgrade = upgradeElement;\n}\n\nscope.hasNative = hasNative;\nscope.useNative = useNative;\n\n})(window.CustomElements);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function() {\n\n// import\n\nvar IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse once\n inDocument.__parsed = true;\n // all parsable elements in inDocument (depth-first pre-order traversal)\n var elts = inDocument.querySelectorAll(parser.selectors);\n // for each parsable node type, call the mapped parsing method\n forEach(elts, function(e) {\n parser[parser.map[e.localName]](e);\n });\n // upgrade all upgradeable static elements, anything dynamically\n // created should be caught by observer\n CustomElements.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: function(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.parseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (linkElt.content) {\n parser.parse(linkElt.content);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.getAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nCustomElements.parser = parser;\n\n})();","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope){\n\n// bootstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.parser.parse(document);\n // one more pass before register is 'live'\n CustomElements.upgradeDocument(document);\n // choose async\n var async = window.Platform && Platform.endOfMicrotask ? \n Platform.endOfMicrotask :\n setTimeout;\n async(function() {\n // set internal 'ready' flag, now document.register will trigger \n // synchronous upgrades\n CustomElements.ready = true;\n // capture blunt profiling data\n CustomElements.readyTime = Date.now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.body.dispatchEvent(\n new CustomEvent('WebComponentsReady', {bubbles: true})\n );\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType, true, true);\n return e;\n };\n}\n\n// When loading at readyState complete time (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLImports must already be loaded.\nif (document.readyState === 'complete' || scope.flags.eager) {\n bootstrap();\n// When loading at readyState interactive time, bootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready)) {\n bootstrap();\n// When loading at other readyStates, wait for the appropriate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImports ? 'HTMLImportsLoaded' : 'DOMContentLoaded';\n window.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function() {\n\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textContent = 'element {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChild);\n\nif (window.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocument'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach(function(fn) {\n CustomElements[fn] = function(inNode) {\n return original[fn](wrap(inNode));\n };\n });\n\n}\n\n})();\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\nvar iterations = 0;\nvar callbacks = [];\nvar twiddle = document.createTextNode('');\n\nfunction endOfMicrotask(callback) {\n twiddle.textContent = iterations++;\n callbacks.push(callback);\n}\n\nfunction atEndOfMicrotask() {\n while (callbacks.length) {\n callbacks.shift()();\n }\n}\n\nnew (window.MutationObserver || JsMutationObserver)(atEndOfMicrotask)\n .observe(twiddle, {characterData: true})\n ;\n\n// exports\n\nscope.endOfMicrotask = endOfMicrotask;\n\n})(Platform);\n\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n scope = scope || {};\n scope.external = scope.external || {};\n var target = {\n shadow: function(inEl) {\n if (inEl) {\n return inEl.shadowRoot || inEl.webkitShadowRoot;\n }\n },\n canTarget: function(shadow) {\n return shadow && Boolean(shadow.elementFromPoint);\n },\n targetingShadow: function(inEl) {\n var s = this.shadow(inEl);\n if (this.canTarget(s)) {\n return s;\n }\n },\n olderShadow: function(shadow) {\n var os = shadow.olderShadowRoot;\n if (!os) {\n var se = shadow.querySelector('shadow');\n if (se) {\n os = se.olderShadowRoot;\n }\n }\n return os;\n },\n allShadows: function(element) {\n var shadows = [], s = this.shadow(element);\n while(s) {\n shadows.push(s);\n s = this.olderShadow(s);\n }\n return shadows;\n },\n searchRoot: function(inRoot, x, y) {\n if (inRoot) {\n var t = inRoot.elementFromPoint(x, y);\n var st, sr, os;\n // is element a shadow host?\n sr = this.targetingShadow(t);\n while (sr) {\n // find the the element inside the shadow root\n st = sr.elementFromPoint(x, y);\n if (!st) {\n // check for older shadows\n sr = this.olderShadow(sr);\n } else {\n // shadowed element may contain a shadow root\n var ssr = this.targetingShadow(st);\n return this.searchRoot(ssr, x, y) || st;\n }\n }\n // light dom element is the target\n return t;\n }\n },\n owner: function(element) {\n var s = element;\n // walk up until you hit the shadow root or document\n while (s.parentNode) {\n s = s.parentNode;\n }\n return s;\n },\n findTarget: function(inEvent) {\n var x = inEvent.clientX, y = inEvent.clientY;\n // if the listener is in the shadow root, it is much faster to start there\n var s = this.owner(inEvent.target);\n // if x, y is not in this root, fall back to document search\n if (!s.elementFromPoint(x, y)) {\n s = document;\n }\n return this.searchRoot(s, x, y);\n }\n };\n scope.targetFinding = target;\n scope.findTarget = target.findTarget.bind(target);\n\n window.PointerEventsPolyfill = scope;\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function() {\n function shadowSelector(v) {\n return 'body ^^ ' + selector(v);\n }\n function selector(v) {\n return '[touch-action=\"' + v + '\"]';\n }\n function rule(v) {\n return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + '; touch-action-delay: none; }';\n }\n var attrib2css = [\n 'none',\n 'auto',\n 'pan-x',\n 'pan-y',\n {\n rule: 'pan-x pan-y',\n selectors: [\n 'pan-x pan-y',\n 'pan-y pan-x'\n ]\n }\n ];\n var styles = '';\n attrib2css.forEach(function(r) {\n if (String(r) === r) {\n styles += selector(r) + rule(r) + '\\n';\n styles += shadowSelector(r) + rule(r) + '\\n';\n } else {\n styles += r.selectors.map(selector) + rule(r.rule) + '\\n';\n styles += r.selectors.map(shadowSelector) + rule(r.rule) + '\\n';\n }\n });\n var el = document.createElement('style');\n el.textContent = styles;\n document.head.appendChild(el);\n})();\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This is the constructor for new PointerEvents.\n *\n * New Pointer Events must be given a type, and an optional dictionary of\n * initialization properties.\n *\n * Due to certain platform requirements, events returned from the constructor\n * identify as MouseEvents.\n *\n * @constructor\n * @param {String} inType The type of the event to create.\n * @param {Object} [inDict] An optional dictionary of initial event properties.\n * @return {Event} A new PointerEvent of type `inType` and initialized with properties from `inDict`.\n */\n(function(scope) {\n // test for DOM Level 4 Events\n var NEW_MOUSE_EVENT = false;\n var HAS_BUTTONS = false;\n try {\n var ev = new MouseEvent('click', {buttons: 1});\n NEW_MOUSE_EVENT = true;\n HAS_BUTTONS = ev.buttons === 1;\n } catch(e) {\n }\n\n var MOUSE_PROPS = [\n 'bubbles',\n 'cancelable',\n 'view',\n 'detail',\n 'screenX',\n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n ];\n\n var MOUSE_DEFAULTS = [\n false,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\n false,\n false,\n false,\n 0,\n null\n ];\n\n function PointerEvent(inType, inDict) {\n inDict = inDict || {};\n // According to the w3c spec,\n // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button\n // MouseEvent.button == 0 can mean either no mouse button depressed, or the\n // left mouse button depressed.\n //\n // As of now, the only way to distinguish between the two states of\n // MouseEvent.button is by using the deprecated MouseEvent.which property, as\n // this maps mouse buttons to positive integers > 0, and uses 0 to mean that\n // no mouse button is held.\n //\n // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,\n // but initMouseEvent does not expose an argument with which to set\n // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set\n // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations\n // of app developers.\n //\n // The only way to propagate the correct state of MouseEvent.which and\n // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0\n // is to call initMouseEvent with a buttonArg value of -1.\n //\n // This is fixed with DOM Level 4's use of buttons\n var buttons = inDict.buttons;\n if (buttons === undefined) {\n switch (inDict.which) {\n case 1: buttons = 1; break;\n case 2: buttons = 4; break;\n case 3: buttons = 2; break;\n default: buttons = 0;\n }\n }\n\n var e;\n if (NEW_MOUSE_EVENT) {\n e = new MouseEvent(inType, inDict);\n } else {\n e = document.createEvent('MouseEvent');\n\n // import values from the given dictionary\n var props = {}, p;\n for(var i = 0; i < MOUSE_PROPS.length; i++) {\n p = MOUSE_PROPS[i];\n props[p] = inDict[p] || MOUSE_DEFAULTS[i];\n }\n\n // define the properties inherited from MouseEvent\n e.initMouseEvent(\n inType, props.bubbles, props.cancelable, props.view, props.detail,\n props.screenX, props.screenY, props.clientX, props.clientY, props.ctrlKey,\n props.altKey, props.shiftKey, props.metaKey, props.button, props.relatedTarget\n );\n }\n\n // make the event pass instanceof checks\n e.__proto__ = PointerEvent.prototype;\n\n // define the buttons property according to DOM Level 3 spec\n if (!HAS_BUTTONS) {\n // IE 10 has buttons on MouseEvent.prototype as a getter w/o any setting\n // mechanism\n Object.defineProperty(e, 'buttons', {get: function(){ return buttons; }, enumerable: true});\n }\n\n // Spec requires that pointers without pressure specified use 0.5 for down\n // state and 0 for up state.\n var pressure = 0;\n if (inDict.pressure) {\n pressure = inDict.pressure;\n } else {\n pressure = buttons ? 0.5 : 0;\n }\n\n // define the properties of the PointerEvent interface\n Object.defineProperties(e, {\n pointerId: { value: inDict.pointerId || 0, enumerable: true },\n width: { value: inDict.width || 0, enumerable: true },\n height: { value: inDict.height || 0, enumerable: true },\n pressure: { value: pressure, enumerable: true },\n tiltX: { value: inDict.tiltX || 0, enumerable: true },\n tiltY: { value: inDict.tiltY || 0, enumerable: true },\n pointerType: { value: inDict.pointerType || '', enumerable: true },\n hwTimestamp: { value: inDict.hwTimestamp || 0, enumerable: true },\n isPrimary: { value: inDict.isPrimary || false, enumerable: true }\n });\n return e;\n }\n\n // PointerEvent extends MouseEvent\n PointerEvent.prototype = Object.create(MouseEvent.prototype);\n\n // attach to window\n if (!scope.PointerEvent) {\n scope.PointerEvent = PointerEvent;\n }\n})(window);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This module implements an map of pointer states\n */\n(function(scope) {\n var USE_MAP = window.Map && window.Map.prototype.forEach;\n var POINTERS_FN = function(){ return this.size; };\n function PointerMap() {\n if (USE_MAP) {\n var m = new Map();\n m.pointers = POINTERS_FN;\n return m;\n } else {\n this.keys = [];\n this.values = [];\n }\n }\n\n PointerMap.prototype = {\n set: function(inId, inEvent) {\n var i = this.keys.indexOf(inId);\n if (i > -1) {\n this.values[i] = inEvent;\n } else {\n this.keys.push(inId);\n this.values.push(inEvent);\n }\n },\n has: function(inId) {\n return this.keys.indexOf(inId) > -1;\n },\n 'delete': function(inId) {\n var i = this.keys.indexOf(inId);\n if (i > -1) {\n this.keys.splice(i, 1);\n this.values.splice(i, 1);\n }\n },\n get: function(inId) {\n var i = this.keys.indexOf(inId);\n return this.values[i];\n },\n clear: function() {\n this.keys.length = 0;\n this.values.length = 0;\n },\n // return value, key, map\n forEach: function(callback, thisArg) {\n this.values.forEach(function(v, i) {\n callback.call(thisArg, v, this.keys[i], this);\n }, this);\n },\n pointers: function() {\n return this.keys.length;\n }\n };\n\n scope.PointerMap = PointerMap;\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n var CLONE_PROPS = [\n // MouseEvent\n 'bubbles',\n 'cancelable',\n 'view',\n 'detail',\n 'screenX',\n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n // DOM Level 3\n 'buttons',\n // PointerEvent\n 'pointerId',\n 'width',\n 'height',\n 'pressure',\n 'tiltX',\n 'tiltY',\n 'pointerType',\n 'hwTimestamp',\n 'isPrimary',\n // event instance\n 'type',\n 'target',\n 'currentTarget',\n 'which'\n ];\n\n var CLONE_DEFAULTS = [\n // MouseEvent\n false,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\n false,\n false,\n false,\n 0,\n null,\n // DOM Level 3\n undefined,\n // PointerEvent\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n '',\n 0,\n false,\n // event instance\n '',\n null,\n null,\n 0\n ];\n\n /**\n * This module is for normalizing events. Mouse and Touch events will be\n * collected here, and fire PointerEvents that have the same semantics, no\n * matter the source.\n * Events fired:\n * - pointerdown: a pointing is added\n * - pointerup: a pointer is removed\n * - pointermove: a pointer is moved\n * - pointerover: a pointer crosses into an element\n * - pointerout: a pointer leaves an element\n * - pointercancel: a pointer will no longer generate events\n */\n var dispatcher = {\n targets: new WeakMap(),\n handledEvents: new WeakMap(),\n pointermap: new scope.PointerMap(),\n eventMap: {},\n // Scope objects for native events.\n // This exists for ease of testing.\n eventSources: {},\n eventSourceList: [],\n /**\n * Add a new event source that will generate pointer events.\n *\n * `inSource` must contain an array of event names named `events`, and\n * functions with the names specified in the `events` array.\n * @param {string} name A name for the event source\n * @param {Object} source A new source of platform events.\n */\n registerSource: function(name, source) {\n var s = source;\n var newEvents = s.events;\n if (newEvents) {\n newEvents.forEach(function(e) {\n if (s[e]) {\n this.eventMap[e] = s[e].bind(s);\n }\n }, this);\n this.eventSources[name] = s;\n this.eventSourceList.push(s);\n }\n },\n register: function(element) {\n var l = this.eventSourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n // call eventsource register\n es.register.call(es, element);\n }\n },\n unregister: function(element) {\n var l = this.eventSourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n // call eventsource register\n es.unregister.call(es, element);\n }\n },\n contains: scope.external.contains || function(container, contained) {\n return container.contains(contained);\n },\n // EVENTS\n down: function(inEvent) {\n this.fireEvent('pointerdown', inEvent);\n },\n move: function(inEvent) {\n this.fireEvent('pointermove', inEvent);\n },\n up: function(inEvent) {\n this.fireEvent('pointerup', inEvent);\n },\n enter: function(inEvent) {\n inEvent.bubbles = false;\n this.fireEvent('pointerenter', inEvent);\n },\n leave: function(inEvent) {\n inEvent.bubbles = false;\n this.fireEvent('pointerleave', inEvent);\n },\n over: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointerover', inEvent);\n },\n out: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointerout', inEvent);\n },\n cancel: function(inEvent) {\n this.fireEvent('pointercancel', inEvent);\n },\n leaveOut: function(event) {\n if (!this.contains(event.target, event.relatedTarget)) {\n this.leave(event);\n }\n this.out(event);\n },\n enterOver: function(event) {\n if (!this.contains(event.target, event.relatedTarget)) {\n this.enter(event);\n }\n this.over(event);\n },\n // LISTENER LOGIC\n eventHandler: function(inEvent) {\n // This is used to prevent multiple dispatch of pointerevents from\n // platform events. This can happen when two elements in different scopes\n // are set up to create pointer events, which is relevant to Shadow DOM.\n if (this.handledEvents.get(inEvent)) {\n return;\n }\n var type = inEvent.type;\n var fn = this.eventMap && this.eventMap[type];\n if (fn) {\n fn(inEvent);\n }\n this.handledEvents.set(inEvent, true);\n },\n // set up event listeners\n listen: function(target, events) {\n events.forEach(function(e) {\n this.addEvent(target, e);\n }, this);\n },\n // remove event listeners\n unlisten: function(target, events) {\n events.forEach(function(e) {\n this.removeEvent(target, e);\n }, this);\n },\n addEvent: scope.external.addEvent || function(target, eventName) {\n target.addEventListener(eventName, this.boundHandler);\n },\n removeEvent: scope.external.removeEvent || function(target, eventName) {\n target.removeEventListener(eventName, this.boundHandler);\n },\n // EVENT CREATION AND TRACKING\n /**\n * Creates a new Event of type `inType`, based on the information in\n * `inEvent`.\n *\n * @param {string} inType A string representing the type of event to create\n * @param {Event} inEvent A platform event with a target\n * @return {Event} A PointerEvent of type `inType`\n */\n makeEvent: function(inType, inEvent) {\n // relatedTarget must be null if pointer is captured\n if (this.captureInfo) {\n inEvent.relatedTarget = null;\n }\n var e = new PointerEvent(inType, inEvent);\n if (inEvent.preventDefault) {\n e.preventDefault = inEvent.preventDefault;\n }\n this.targets.set(e, this.targets.get(inEvent) || inEvent.target);\n return e;\n },\n // make and dispatch an event in one call\n fireEvent: function(inType, inEvent) {\n var e = this.makeEvent(inType, inEvent);\n return this.dispatchEvent(e);\n },\n /**\n * Returns a snapshot of inEvent, with writable properties.\n *\n * @param {Event} inEvent An event that contains properties to copy.\n * @return {Object} An object containing shallow copies of `inEvent`'s\n * properties.\n */\n cloneEvent: function(inEvent) {\n var eventCopy = {}, p;\n for (var i = 0; i < CLONE_PROPS.length; i++) {\n p = CLONE_PROPS[i];\n eventCopy[p] = inEvent[p] || CLONE_DEFAULTS[i];\n }\n // keep the semantics of preventDefault\n if (inEvent.preventDefault) {\n eventCopy.preventDefault = function() {\n inEvent.preventDefault();\n };\n }\n return eventCopy;\n },\n getTarget: function(inEvent) {\n // if pointer capture is set, route all events for the specified pointerId\n // to the capture target\n if (this.captureInfo) {\n if (this.captureInfo.id === inEvent.pointerId) {\n return this.captureInfo.target;\n }\n }\n return this.targets.get(inEvent);\n },\n setCapture: function(inPointerId, inTarget) {\n if (this.captureInfo) {\n this.releaseCapture(this.captureInfo.id);\n }\n this.captureInfo = {id: inPointerId, target: inTarget};\n var e = new PointerEvent('gotpointercapture', { bubbles: true });\n this.implicitRelease = this.releaseCapture.bind(this, inPointerId);\n document.addEventListener('pointerup', this.implicitRelease);\n document.addEventListener('pointercancel', this.implicitRelease);\n this.targets.set(e, inTarget);\n this.asyncDispatchEvent(e);\n },\n releaseCapture: function(inPointerId) {\n if (this.captureInfo && this.captureInfo.id === inPointerId) {\n var e = new PointerEvent('lostpointercapture', { bubbles: true });\n var t = this.captureInfo.target;\n this.captureInfo = null;\n document.removeEventListener('pointerup', this.implicitRelease);\n document.removeEventListener('pointercancel', this.implicitRelease);\n this.targets.set(e, t);\n this.asyncDispatchEvent(e);\n }\n },\n /**\n * Dispatches the event to its target.\n *\n * @param {Event} inEvent The event to be dispatched.\n * @return {Boolean} True if an event handler returns true, false otherwise.\n */\n dispatchEvent: scope.external.dispatchEvent || function(inEvent) {\n var t = this.getTarget(inEvent);\n if (t) {\n return t.dispatchEvent(inEvent);\n }\n },\n asyncDispatchEvent: function(inEvent) {\n setTimeout(this.dispatchEvent.bind(this, inEvent), 0);\n }\n };\n dispatcher.boundHandler = dispatcher.eventHandler.bind(dispatcher);\n scope.dispatcher = dispatcher;\n scope.register = dispatcher.register.bind(dispatcher);\n scope.unregister = dispatcher.unregister.bind(dispatcher);\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This module uses Mutation Observers to dynamically adjust which nodes will\n * generate Pointer Events.\n *\n * All nodes that wish to generate Pointer Events must have the attribute\n * `touch-action` set to `none`.\n */\n(function(scope) {\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n var map = Array.prototype.map.call.bind(Array.prototype.map);\n var toArray = Array.prototype.slice.call.bind(Array.prototype.slice);\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n var MO = window.MutationObserver || window.WebKitMutationObserver;\n var SELECTOR = '[touch-action]';\n var OBSERVER_INIT = {\n subtree: true,\n childList: true,\n attributes: true,\n attributeOldValue: true,\n attributeFilter: ['touch-action']\n };\n\n function Installer(add, remove, changed, binder) {\n this.addCallback = add.bind(binder);\n this.removeCallback = remove.bind(binder);\n this.changedCallback = changed.bind(binder);\n if (MO) {\n this.observer = new MO(this.mutationWatcher.bind(this));\n }\n }\n\n Installer.prototype = {\n watchSubtree: function(target) {\n // Only watch scopes that can target find, as these are top-level.\n // Otherwise we can see duplicate additions and removals that add noise.\n //\n // TODO(dfreedman): For some instances with ShadowDOMPolyfill, we can see\n // a removal without an insertion when a node is redistributed among\n // shadows. Since it all ends up correct in the document, watching only\n // the document will yield the correct mutations to watch.\n if (scope.targetFinding.canTarget(target)) {\n this.observer.observe(target, OBSERVER_INIT);\n }\n },\n enableOnSubtree: function(target) {\n this.watchSubtree(target);\n if (target === document && document.readyState !== 'complete') {\n this.installOnLoad();\n } else {\n this.installNewSubtree(target);\n }\n },\n installNewSubtree: function(target) {\n forEach(this.findElements(target), this.addElement, this);\n },\n findElements: function(target) {\n if (target.querySelectorAll) {\n return target.querySelectorAll(SELECTOR);\n }\n return [];\n },\n removeElement: function(el) {\n this.removeCallback(el);\n },\n addElement: function(el) {\n this.addCallback(el);\n },\n elementChanged: function(el, oldValue) {\n this.changedCallback(el, oldValue);\n },\n concatLists: function(accum, list) {\n return accum.concat(toArray(list));\n },\n // register all touch-action = none nodes on document load\n installOnLoad: function() {\n document.addEventListener('DOMContentLoaded', this.installNewSubtree.bind(this, document));\n },\n isElement: function(n) {\n return n.nodeType === Node.ELEMENT_NODE;\n },\n flattenMutationTree: function(inNodes) {\n // find children with touch-action\n var tree = map(inNodes, this.findElements, this);\n // make sure the added nodes are accounted for\n tree.push(filter(inNodes, this.isElement));\n // flatten the list\n return tree.reduce(this.concatLists, []);\n },\n mutationWatcher: function(mutations) {\n mutations.forEach(this.mutationHandler, this);\n },\n mutationHandler: function(m) {\n if (m.type === 'childList') {\n var added = this.flattenMutationTree(m.addedNodes);\n added.forEach(this.addElement, this);\n var removed = this.flattenMutationTree(m.removedNodes);\n removed.forEach(this.removeElement, this);\n } else if (m.type === 'attributes') {\n this.elementChanged(m.target, m.oldValue);\n }\n }\n };\n\n if (!MO) {\n Installer.prototype.watchSubtree = function(){\n console.warn('PointerEventsPolyfill: MutationObservers not found, touch-action will not be dynamically detected');\n };\n }\n\n scope.Installer = Installer;\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function (scope) {\n var dispatcher = scope.dispatcher;\n var pointermap = dispatcher.pointermap;\n // radius around touchend that swallows mouse events\n var DEDUP_DIST = 25;\n\n // handler block for native mouse events\n var mouseEvents = {\n POINTER_ID: 1,\n POINTER_TYPE: 'mouse',\n events: [\n 'mousedown',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout'\n ],\n register: function(target) {\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n lastTouches: [],\n // collide with the global mouse listener\n isEventSimulatedFromTouch: function(inEvent) {\n var lts = this.lastTouches;\n var x = inEvent.clientX, y = inEvent.clientY;\n for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {\n // simulated mouse events will be swallowed near a primary touchend\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {\n return true;\n }\n }\n },\n prepareEvent: function(inEvent) {\n var e = dispatcher.cloneEvent(inEvent);\n // forward mouse preventDefault\n var pd = e.preventDefault;\n e.preventDefault = function() {\n inEvent.preventDefault();\n pd();\n };\n e.pointerId = this.POINTER_ID;\n e.isPrimary = true;\n e.pointerType = this.POINTER_TYPE;\n return e;\n },\n mousedown: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var p = pointermap.has(this.POINTER_ID);\n // TODO(dfreedman) workaround for some elements not sending mouseup\n // http://crbug/149091\n if (p) {\n this.cancel(inEvent);\n }\n var e = this.prepareEvent(inEvent);\n pointermap.set(this.POINTER_ID, inEvent);\n dispatcher.down(e);\n }\n },\n mousemove: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n dispatcher.move(e);\n }\n },\n mouseup: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var p = pointermap.get(this.POINTER_ID);\n if (p && p.button === inEvent.button) {\n var e = this.prepareEvent(inEvent);\n dispatcher.up(e);\n this.cleanupMouse();\n }\n }\n },\n mouseover: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n dispatcher.enterOver(e);\n }\n },\n mouseout: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n dispatcher.leaveOut(e);\n }\n },\n cancel: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.cancel(e);\n this.cleanupMouse();\n },\n cleanupMouse: function() {\n pointermap['delete'](this.POINTER_ID);\n }\n };\n\n scope.mouseEvents = mouseEvents;\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var findTarget = scope.findTarget;\n var allShadows = scope.targetFinding.allShadows.bind(scope.targetFinding);\n var pointermap = dispatcher.pointermap;\n var touchMap = Array.prototype.map.call.bind(Array.prototype.map);\n // This should be long enough to ignore compat mouse events made by touch\n var DEDUP_TIMEOUT = 2500;\n var CLICK_COUNT_TIMEOUT = 200;\n var ATTRIB = 'touch-action';\n var INSTALLER;\n var HAS_TOUCH_ACTION = (typeof document.head.style.touchAction) === 'string';\n\n // handler block for native touch events\n var touchEvents = {\n scrollType: new WeakMap(),\n events: [\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel'\n ],\n register: function(target) {\n if (HAS_TOUCH_ACTION) {\n dispatcher.listen(target, this.events);\n } else {\n INSTALLER.enableOnSubtree(target);\n }\n },\n unregister: function(target) {\n if (HAS_TOUCH_ACTION) {\n dispatcher.unlisten(target, this.events);\n } else {\n // TODO(dfreedman): is it worth it to disconnect the MO?\n }\n },\n elementAdded: function(el) {\n var a = el.getAttribute(ATTRIB);\n var st = this.touchActionToScrollType(a);\n if (st) {\n this.scrollType.set(el, st);\n dispatcher.listen(el, this.events);\n // set touch-action on shadows as well\n allShadows(el).forEach(function(s) {\n this.scrollType.set(s, st);\n dispatcher.listen(s, this.events);\n }, this);\n }\n },\n elementRemoved: function(el) {\n this.scrollType['delete'](el);\n dispatcher.unlisten(el, this.events);\n // remove touch-action from shadow\n allShadows(el).forEach(function(s) {\n this.scrollType['delete'](s);\n dispatcher.unlisten(s, this.events);\n }, this);\n },\n elementChanged: function(el, oldValue) {\n var a = el.getAttribute(ATTRIB);\n var st = this.touchActionToScrollType(a);\n var oldSt = this.touchActionToScrollType(oldValue);\n // simply update scrollType if listeners are already established\n if (st && oldSt) {\n this.scrollType.set(el, st);\n allShadows(el).forEach(function(s) {\n this.scrollType.set(s, st);\n }, this);\n } else if (oldSt) {\n this.elementRemoved(el);\n } else if (st) {\n this.elementAdded(el);\n }\n },\n scrollTypes: {\n EMITTER: 'none',\n XSCROLLER: 'pan-x',\n YSCROLLER: 'pan-y',\n SCROLLER: /^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/\n },\n touchActionToScrollType: function(touchAction) {\n var t = touchAction;\n var st = this.scrollTypes;\n if (t === 'none') {\n return 'none';\n } else if (t === st.XSCROLLER) {\n return 'X';\n } else if (t === st.YSCROLLER) {\n return 'Y';\n } else if (st.SCROLLER.exec(t)) {\n return 'XY';\n }\n },\n POINTER_TYPE: 'touch',\n firstTouch: null,\n isPrimaryTouch: function(inTouch) {\n return this.firstTouch === inTouch.identifier;\n },\n setPrimaryTouch: function(inTouch) {\n // set primary touch if there no pointers, or the only pointer is the mouse\n if (pointermap.pointers() === 0 || (pointermap.pointers() === 1 && pointermap.has(1))) {\n this.firstTouch = inTouch.identifier;\n this.firstXY = {X: inTouch.clientX, Y: inTouch.clientY};\n this.scrolling = false;\n this.cancelResetClickCount();\n }\n },\n removePrimaryPointer: function(inPointer) {\n if (inPointer.isPrimary) {\n this.firstTouch = null;\n this.firstXY = null;\n this.resetClickCount();\n }\n },\n clickCount: 0,\n resetId: null,\n resetClickCount: function() {\n var fn = function() {\n this.clickCount = 0;\n this.resetId = null;\n }.bind(this);\n this.resetId = setTimeout(fn, CLICK_COUNT_TIMEOUT);\n },\n cancelResetClickCount: function() {\n if (this.resetId) {\n clearTimeout(this.resetId);\n }\n },\n touchToPointer: function(inTouch) {\n var e = dispatcher.cloneEvent(inTouch);\n // Spec specifies that pointerId 1 is reserved for Mouse.\n // Touch identifiers can start at 0.\n // Add 2 to the touch identifier for compatibility.\n e.pointerId = inTouch.identifier + 2;\n e.target = findTarget(e);\n e.bubbles = true;\n e.cancelable = true;\n e.detail = this.clickCount;\n e.button = 0;\n e.buttons = 1;\n e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;\n e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;\n e.pressure = inTouch.webkitForce || inTouch.force || 0.5;\n e.isPrimary = this.isPrimaryTouch(inTouch);\n e.pointerType = this.POINTER_TYPE;\n return e;\n },\n processTouches: function(inEvent, inFunction) {\n var tl = inEvent.changedTouches;\n var pointers = touchMap(tl, this.touchToPointer, this);\n // forward touch preventDefaults\n pointers.forEach(function(p) {\n p.preventDefault = function() {\n this.scrolling = false;\n this.firstXY = null;\n inEvent.preventDefault();\n };\n }, this);\n pointers.forEach(inFunction, this);\n },\n // For single axis scrollers, determines whether the element should emit\n // pointer events or behave as a scroller\n shouldScroll: function(inEvent) {\n if (this.firstXY) {\n var ret;\n var scrollAxis = this.scrollType.get(inEvent.currentTarget);\n if (scrollAxis === 'none') {\n // this element is a touch-action: none, should never scroll\n ret = false;\n } else if (scrollAxis === 'XY') {\n // this element should always scroll\n ret = true;\n } else {\n var t = inEvent.changedTouches[0];\n // check the intended scroll axis, and other axis\n var a = scrollAxis;\n var oa = scrollAxis === 'Y' ? 'X' : 'Y';\n var da = Math.abs(t['client' + a] - this.firstXY[a]);\n var doa = Math.abs(t['client' + oa] - this.firstXY[oa]);\n // if delta in the scroll axis > delta other axis, scroll instead of\n // making events\n ret = da >= doa;\n }\n this.firstXY = null;\n return ret;\n }\n },\n findTouch: function(inTL, inId) {\n for (var i = 0, l = inTL.length, t; i < l && (t = inTL[i]); i++) {\n if (t.identifier === inId) {\n return true;\n }\n }\n },\n // In some instances, a touchstart can happen without a touchend. This\n // leaves the pointermap in a broken state.\n // Therefore, on every touchstart, we remove the touches that did not fire a\n // touchend event.\n // To keep state globally consistent, we fire a\n // pointercancel for this \"abandoned\" touch\n vacuumTouches: function(inEvent) {\n var tl = inEvent.touches;\n // pointermap.pointers() should be < tl.length here, as the touchstart has not\n // been processed yet.\n if (pointermap.pointers() >= tl.length) {\n var d = [];\n pointermap.forEach(function(value, key) {\n // Never remove pointerId == 1, which is mouse.\n // Touch identifiers are 2 smaller than their pointerId, which is the\n // index in pointermap.\n if (key !== 1 && !this.findTouch(tl, key - 2)) {\n var p = value.out;\n d.push(this.touchToPointer(p));\n }\n }, this);\n d.forEach(this.cancelOut, this);\n }\n },\n touchstart: function(inEvent) {\n this.vacuumTouches(inEvent);\n this.setPrimaryTouch(inEvent.changedTouches[0]);\n this.dedupSynthMouse(inEvent);\n if (!this.scrolling) {\n this.clickCount++;\n this.processTouches(inEvent, this.overDown);\n }\n },\n overDown: function(inPointer) {\n var p = pointermap.set(inPointer.pointerId, {\n target: inPointer.target,\n out: inPointer,\n outTarget: inPointer.target\n });\n dispatcher.over(inPointer);\n dispatcher.down(inPointer);\n },\n touchmove: function(inEvent) {\n if (!this.scrolling) {\n if (this.shouldScroll(inEvent)) {\n this.scrolling = true;\n this.touchcancel(inEvent);\n } else {\n inEvent.preventDefault();\n this.processTouches(inEvent, this.moveOverOut);\n }\n }\n },\n moveOverOut: function(inPointer) {\n var event = inPointer;\n var pointer = pointermap.get(event.pointerId);\n // a finger drifted off the screen, ignore it\n if (!pointer) {\n return;\n }\n var outEvent = pointer.out;\n var outTarget = pointer.outTarget;\n dispatcher.move(event);\n if (outEvent && outTarget !== event.target) {\n outEvent.relatedTarget = event.target;\n event.relatedTarget = outTarget;\n // recover from retargeting by shadow\n outEvent.target = outTarget;\n if (event.target) {\n dispatcher.leaveOut(outEvent);\n dispatcher.enterOver(event);\n } else {\n // clean up case when finger leaves the screen\n event.target = outTarget;\n event.relatedTarget = null;\n this.cancelOut(event);\n }\n }\n pointer.out = event;\n pointer.outTarget = event.target;\n },\n touchend: function(inEvent) {\n this.dedupSynthMouse(inEvent);\n this.processTouches(inEvent, this.upOut);\n },\n upOut: function(inPointer) {\n if (!this.scrolling) {\n dispatcher.up(inPointer);\n dispatcher.out(inPointer);\n }\n this.cleanUpPointer(inPointer);\n },\n touchcancel: function(inEvent) {\n this.processTouches(inEvent, this.cancelOut);\n },\n cancelOut: function(inPointer) {\n dispatcher.cancel(inPointer);\n dispatcher.out(inPointer);\n this.cleanUpPointer(inPointer);\n },\n cleanUpPointer: function(inPointer) {\n pointermap['delete'](inPointer.pointerId);\n this.removePrimaryPointer(inPointer);\n },\n // prevent synth mouse events from creating pointer events\n dedupSynthMouse: function(inEvent) {\n var lts = scope.mouseEvents.lastTouches;\n var t = inEvent.changedTouches[0];\n // only the primary finger will synth mouse events\n if (this.isPrimaryTouch(t)) {\n // remember x/y of last touch\n var lt = {x: t.clientX, y: t.clientY};\n lts.push(lt);\n var fn = (function(lts, lt){\n var i = lts.indexOf(lt);\n if (i > -1) {\n lts.splice(i, 1);\n }\n }).bind(null, lts, lt);\n setTimeout(fn, DEDUP_TIMEOUT);\n }\n }\n };\n\n if (!HAS_TOUCH_ACTION) {\n INSTALLER = new scope.Installer(touchEvents.elementAdded, touchEvents.elementRemoved, touchEvents.elementChanged, touchEvents);\n }\n\n scope.touchEvents = touchEvents;\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var pointermap = dispatcher.pointermap;\n var HAS_BITMAP_TYPE = window.MSPointerEvent && typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE === 'number';\n var msEvents = {\n events: [\n 'MSPointerDown',\n 'MSPointerMove',\n 'MSPointerUp',\n 'MSPointerOut',\n 'MSPointerOver',\n 'MSPointerCancel',\n 'MSGotPointerCapture',\n 'MSLostPointerCapture'\n ],\n register: function(target) {\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n POINTER_TYPES: [\n '',\n 'unavailable',\n 'touch',\n 'pen',\n 'mouse'\n ],\n prepareEvent: function(inEvent) {\n var e = inEvent;\n if (HAS_BITMAP_TYPE) {\n e = dispatcher.cloneEvent(inEvent);\n e.pointerType = this.POINTER_TYPES[inEvent.pointerType];\n }\n return e;\n },\n cleanup: function(id) {\n pointermap['delete'](id);\n },\n MSPointerDown: function(inEvent) {\n pointermap.set(inEvent.pointerId, inEvent);\n var e = this.prepareEvent(inEvent);\n dispatcher.down(e);\n },\n MSPointerMove: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.move(e);\n },\n MSPointerUp: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.up(e);\n this.cleanup(inEvent.pointerId);\n },\n MSPointerOut: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.leaveOut(e);\n },\n MSPointerOver: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.enterOver(e);\n },\n MSPointerCancel: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.cancel(e);\n this.cleanup(inEvent.pointerId);\n },\n MSLostPointerCapture: function(inEvent) {\n var e = dispatcher.makeEvent('lostpointercapture', inEvent);\n dispatcher.dispatchEvent(e);\n },\n MSGotPointerCapture: function(inEvent) {\n var e = dispatcher.makeEvent('gotpointercapture', inEvent);\n dispatcher.dispatchEvent(e);\n }\n };\n\n scope.msEvents = msEvents;\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This module contains the handlers for native platform events.\n * From here, the dispatcher is called to create unified pointer events.\n * Included are touch events (v1), mouse events, and MSPointerEvents.\n */\n(function(scope) {\n var dispatcher = scope.dispatcher;\n\n // only activate if this platform does not have pointer events\n if (window.navigator.pointerEnabled === undefined) {\n Object.defineProperty(window.navigator, 'pointerEnabled', {value: true, enumerable: true});\n\n if (window.navigator.msPointerEnabled) {\n var tp = window.navigator.msMaxTouchPoints;\n Object.defineProperty(window.navigator, 'maxTouchPoints', {\n value: tp,\n enumerable: true\n });\n dispatcher.registerSource('ms', scope.msEvents);\n } else {\n dispatcher.registerSource('mouse', scope.mouseEvents);\n if (window.ontouchstart !== undefined) {\n dispatcher.registerSource('touch', scope.touchEvents);\n }\n }\n\n dispatcher.register(document);\n }\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var n = window.navigator;\n var s, r;\n function assertDown(id) {\n if (!dispatcher.pointermap.has(id)) {\n throw new Error('InvalidPointerId');\n }\n }\n if (n.msPointerEnabled) {\n s = function(pointerId) {\n assertDown(pointerId);\n this.msSetPointerCapture(pointerId);\n };\n r = function(pointerId) {\n assertDown(pointerId);\n this.msReleasePointerCapture(pointerId);\n };\n } else {\n s = function setPointerCapture(pointerId) {\n assertDown(pointerId);\n dispatcher.setCapture(pointerId, this);\n };\n r = function releasePointerCapture(pointerId) {\n assertDown(pointerId);\n dispatcher.releaseCapture(pointerId, this);\n };\n }\n if (window.Element && !Element.prototype.setPointerCapture) {\n Object.defineProperties(Element.prototype, {\n 'setPointerCapture': {\n value: s\n },\n 'releasePointerCapture': {\n value: r\n }\n });\n }\n})(window.PointerEventsPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n /**\n * This class contains the gesture recognizers that create the PointerGesture\n * events.\n *\n * @class PointerGestures\n * @static\n */\n scope = scope || {};\n scope.utils = {\n LCA: {\n // Determines the lowest node in the ancestor chain of a and b\n find: function(a, b) {\n if (a === b) {\n return a;\n }\n // fast case, a is a direct descendant of b or vice versa\n if (a.contains) {\n if (a.contains(b)) {\n return a;\n }\n if (b.contains(a)) {\n return b;\n }\n }\n var adepth = this.depth(a);\n var bdepth = this.depth(b);\n var d = adepth - bdepth;\n if (d > 0) {\n a = this.walk(a, d);\n } else {\n b = this.walk(b, -d);\n }\n while(a && b && a !== b) {\n a = this.walk(a, 1);\n b = this.walk(b, 1);\n }\n return a;\n },\n walk: function(n, u) {\n for (var i = 0; i < u; i++) {\n n = n.parentNode;\n }\n return n;\n },\n depth: function(n) {\n var d = 0;\n while(n) {\n d++;\n n = n.parentNode;\n }\n return d;\n }\n }\n };\n scope.findLCA = function(a, b) {\n return scope.utils.LCA.find(a, b);\n }\n window.PointerGestures = scope;\n})(window.PointerGestures);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n// This module implements an ordered list of pointer states.\n//\n// Each pointer object here has two properties:\n// - id: the id of the pointer\n// - event: the source event of the pointer, complete with positions\n//\n// The ordering of the pointers is from oldest pointer to youngest pointer,\n// which allows for multi-pointer gestures to not rely on the actual ids\n// imported from the source events.\n//\n// Any operation that needs to store state information about pointers can hang\n// objects off of the pointer in the pointermap. This information will be\n// preserved until the pointer is removed from the pointermap.\n\n(function(scope) {\n function PointerMap() {\n this.ids = [];\n this.pointers = [];\n };\n\n PointerMap.prototype = {\n set: function(inId, inEvent) {\n var i = this.ids.indexOf(inId);\n if (i > -1) {\n this.pointers[i] = inEvent;\n } else {\n this.ids.push(inId);\n this.pointers.push(inEvent);\n }\n },\n has: function(inId) {\n return this.ids.indexOf(inId) > -1;\n },\n 'delete': function(inId) {\n var i = this.ids.indexOf(inId);\n if (i > -1) {\n this.ids.splice(i, 1);\n this.pointers.splice(i, 1);\n }\n },\n get: function(inId) {\n var i = this.ids.indexOf(inId);\n return this.pointers[i];\n },\n get size() {\n return this.pointers.length;\n },\n clear: function() {\n this.ids.length = 0;\n this.pointers.length = 0;\n }\n };\n\n if (window.Map) {\n PointerMap = window.Map;\n }\n scope.PointerMap = PointerMap;\n})(window.PointerGestures);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n var CLONE_PROPS = [\n // MouseEvent\n 'bubbles',\n 'cancelable',\n 'view',\n 'detail',\n 'screenX',\n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n // DOM Level 3\n 'buttons',\n // PointerEvent\n 'pointerId',\n 'width',\n 'height',\n 'pressure',\n 'tiltX',\n 'tiltY',\n 'pointerType',\n 'hwTimestamp',\n 'isPrimary',\n // event instance\n 'type',\n 'target',\n 'currentTarget',\n 'screenX',\n 'screenY',\n 'pageX',\n 'pageY',\n 'tapPrevented'\n ];\n\n var CLONE_DEFAULTS = [\n // MouseEvent\n false,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\n false,\n false,\n false,\n 0,\n null,\n // DOM Level 3\n 0,\n // PointerEvent\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n '',\n 0,\n false,\n // event instance\n '',\n null,\n null,\n 0,\n 0,\n 0,\n 0\n ];\n\n var dispatcher = {\n handledEvents: new WeakMap(),\n targets: new WeakMap(),\n handlers: {},\n recognizers: {},\n events: {},\n // Add a new gesture recognizer to the event listeners.\n // Recognizer needs an `events` property.\n registerRecognizer: function(inName, inRecognizer) {\n var r = inRecognizer;\n this.recognizers[inName] = r;\n r.events.forEach(function(e) {\n if (r[e]) {\n this.events[e] = true;\n var f = r[e].bind(r);\n this.addHandler(e, f);\n }\n }, this);\n },\n addHandler: function(inEvent, inFn) {\n var e = inEvent;\n if (!this.handlers[e]) {\n this.handlers[e] = [];\n }\n this.handlers[e].push(inFn);\n },\n // add event listeners for inTarget\n registerTarget: function(inTarget) {\n this.listen(Object.keys(this.events), inTarget);\n },\n // remove event listeners for inTarget\n unregisterTarget: function(inTarget) {\n this.unlisten(Object.keys(this.events), inTarget);\n },\n // LISTENER LOGIC\n eventHandler: function(inEvent) {\n if (this.handledEvents.get(inEvent)) {\n return;\n }\n var type = inEvent.type, fns = this.handlers[type];\n if (fns) {\n this.makeQueue(fns, inEvent);\n }\n this.handledEvents.set(inEvent, true);\n },\n // queue event for async dispatch\n makeQueue: function(inHandlerFns, inEvent) {\n // must clone events to keep the (possibly shadowed) target correct for\n // async dispatching\n var e = this.cloneEvent(inEvent);\n setTimeout(this.runQueue.bind(this, inHandlerFns, e), 0);\n },\n // Dispatch the queued events\n runQueue: function(inHandlers, inEvent) {\n this.currentPointerId = inEvent.pointerId;\n for (var i = 0, f, l = inHandlers.length; (i < l) && (f = inHandlers[i]); i++) {\n f(inEvent);\n }\n this.currentPointerId = 0;\n },\n // set up event listeners\n listen: function(inEvents, inTarget) {\n inEvents.forEach(function(e) {\n this.addEvent(e, this.boundHandler, false, inTarget);\n }, this);\n },\n // remove event listeners\n unlisten: function(inEvents) {\n inEvents.forEach(function(e) {\n this.removeEvent(e, this.boundHandler, false, inTarget);\n }, this);\n },\n addEvent: function(inEventName, inEventHandler, inCapture, inTarget) {\n inTarget.addEventListener(inEventName, inEventHandler, inCapture);\n },\n removeEvent: function(inEventName, inEventHandler, inCapture, inTarget) {\n inTarget.removeEventListener(inEventName, inEventHandler, inCapture);\n },\n // EVENT CREATION AND TRACKING\n // Creates a new Event of type `inType`, based on the information in\n // `inEvent`.\n makeEvent: function(inType, inDict) {\n return new PointerGestureEvent(inType, inDict);\n },\n /*\n * Returns a snapshot of inEvent, with writable properties.\n *\n * @method cloneEvent\n * @param {Event} inEvent An event that contains properties to copy.\n * @return {Object} An object containing shallow copies of `inEvent`'s\n * properties.\n */\n cloneEvent: function(inEvent) {\n var eventCopy = {}, p;\n for (var i = 0; i < CLONE_PROPS.length; i++) {\n p = CLONE_PROPS[i];\n eventCopy[p] = inEvent[p] || CLONE_DEFAULTS[i];\n }\n return eventCopy;\n },\n // Dispatches the event to its target.\n dispatchEvent: function(inEvent, inTarget) {\n var t = inTarget || this.targets.get(inEvent);\n if (t) {\n t.dispatchEvent(inEvent);\n if (inEvent.tapPrevented) {\n this.preventTap(this.currentPointerId);\n }\n }\n },\n asyncDispatchEvent: function(inEvent, inTarget) {\n var fn = function() {\n this.dispatchEvent(inEvent, inTarget);\n }.bind(this);\n setTimeout(fn, 0);\n },\n preventTap: function(inPointerId) {\n var t = this.recognizers.tap;\n if (t){\n t.preventTap(inPointerId);\n }\n }\n };\n dispatcher.boundHandler = dispatcher.eventHandler.bind(dispatcher);\n scope.dispatcher = dispatcher;\n var registerQueue = [];\n var immediateRegister = false;\n /**\n * Enable gesture events for a given scope, typically\n * [ShadowRoots](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-object).\n *\n * @for PointerGestures\n * @method register\n * @param {ShadowRoot} scope A top level scope to enable gesture\n * support on.\n */\n scope.register = function(inScope) {\n if (immediateRegister) {\n var pe = window.PointerEventsPolyfill;\n if (pe) {\n pe.register(inScope);\n }\n scope.dispatcher.registerTarget(inScope);\n } else {\n registerQueue.push(inScope);\n }\n };\n // wait to register scopes until recognizers load\n document.addEventListener('DOMContentLoaded', function() {\n immediateRegister = true;\n registerQueue.push(document);\n registerQueue.forEach(scope.register);\n });\n})(window.PointerGestures);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This event is fired when a pointer is held down for 200ms.\n *\n * @module PointerGestures\n * @submodule Events\n * @class hold\n */\n/**\n * Milliseconds pointer has been held down.\n * @type Number\n * @property holdTime\n */\n/**\n * Type of pointer that made the holding event.\n * @type String\n * @property pointerType\n */\n/**\n * This event is fired every 200ms while a pointer is held down.\n *\n * @class holdpulse\n * @extends hold\n */\n/**\n * This event is fired when a held pointer is released or moved.\n *\n * @class released\n */\n/**\n * Type of pointer that made the holding event.\n * @type String\n * @property pointerType\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var hold = {\n // wait at least HOLD_DELAY ms between hold and pulse events\n HOLD_DELAY: 200,\n // pointer can move WIGGLE_THRESHOLD pixels before not counting as a hold\n WIGGLE_THRESHOLD: 16,\n events: [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel'\n ],\n heldPointer: null,\n holdJob: null,\n pulse: function() {\n var hold = Date.now() - this.heldPointer.timeStamp;\n var type = this.held ? 'holdpulse' : 'hold';\n this.fireHold(type, hold);\n this.held = true;\n },\n cancel: function() {\n clearInterval(this.holdJob);\n if (this.held) {\n this.fireHold('release');\n }\n this.held = false;\n this.heldPointer = null;\n this.target = null;\n this.holdJob = null;\n },\n pointerdown: function(inEvent) {\n if (inEvent.isPrimary && !this.heldPointer) {\n this.heldPointer = inEvent;\n this.target = inEvent.target;\n this.holdJob = setInterval(this.pulse.bind(this), this.HOLD_DELAY);\n }\n },\n pointerup: function(inEvent) {\n if (this.heldPointer && this.heldPointer.pointerId === inEvent.pointerId) {\n this.cancel();\n }\n },\n pointercancel: function(inEvent) {\n this.cancel();\n },\n pointermove: function(inEvent) {\n if (this.heldPointer && this.heldPointer.pointerId === inEvent.pointerId) {\n var x = inEvent.clientX - this.heldPointer.clientX;\n var y = inEvent.clientY - this.heldPointer.clientY;\n if ((x * x + y * y) > this.WIGGLE_THRESHOLD) {\n this.cancel();\n }\n }\n },\n fireHold: function(inType, inHoldTime) {\n var p = {\n pointerType: this.heldPointer.pointerType\n };\n if (inHoldTime) {\n p.holdTime = inHoldTime;\n }\n var e = dispatcher.makeEvent(inType, p);\n dispatcher.dispatchEvent(e, this.target);\n if (e.tapPrevented) {\n dispatcher.preventTap(this.heldPointer.pointerId);\n }\n }\n };\n dispatcher.registerRecognizer('hold', hold);\n})(window.PointerGestures);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This event denotes the beginning of a series of tracking events.\n *\n * @module PointerGestures\n * @submodule Events\n * @class trackstart\n */\n/**\n * Pixels moved in the x direction since trackstart.\n * @type Number\n * @property dx\n */\n/**\n * Pixes moved in the y direction since trackstart.\n * @type Number\n * @property dy\n */\n/**\n * Pixels moved in the x direction since the last track.\n * @type Number\n * @property ddx\n */\n/**\n * Pixles moved in the y direction since the last track.\n * @type Number\n * @property ddy\n */\n/**\n * The clientX position of the track gesture.\n * @type Number\n * @property clientX\n */\n/**\n * The clientY position of the track gesture.\n * @type Number\n * @property clientY\n */\n/**\n * The pageX position of the track gesture.\n * @type Number\n * @property pageX\n */\n/**\n * The pageY position of the track gesture.\n * @type Number\n * @property pageY\n */\n/**\n * The screenX position of the track gesture.\n * @type Number\n * @property screenX\n */\n/**\n * The screenY position of the track gesture.\n * @type Number\n * @property screenY\n */\n/**\n * The last x axis direction of the pointer.\n * @type Number\n * @property xDirection\n */\n/**\n * The last y axis direction of the pointer.\n * @type Number\n * @property yDirection\n */\n/**\n * A shared object between all tracking events.\n * @type Object\n * @property trackInfo\n */\n/**\n * The element currently under the pointer.\n * @type Element\n * @property relatedTarget\n */\n/**\n * The type of pointer that make the track gesture.\n * @type String\n * @property pointerType\n */\n/**\n *\n * This event fires for all pointer movement being tracked.\n *\n * @class track\n * @extends trackstart\n */\n/**\n * This event fires when the pointer is no longer being tracked.\n *\n * @class trackend\n * @extends trackstart\n */\n\n (function(scope) {\n var dispatcher = scope.dispatcher;\n var pointermap = new scope.PointerMap();\n var track = {\n events: [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel'\n ],\n WIGGLE_THRESHOLD: 4,\n clampDir: function(inDelta) {\n return inDelta > 0 ? 1 : -1;\n },\n calcPositionDelta: function(inA, inB) {\n var x = 0, y = 0;\n if (inA && inB) {\n x = inB.pageX - inA.pageX;\n y = inB.pageY - inA.pageY;\n }\n return {x: x, y: y};\n },\n fireTrack: function(inType, inEvent, inTrackingData) {\n var t = inTrackingData;\n var d = this.calcPositionDelta(t.downEvent, inEvent);\n var dd = this.calcPositionDelta(t.lastMoveEvent, inEvent);\n if (dd.x) {\n t.xDirection = this.clampDir(dd.x);\n }\n if (dd.y) {\n t.yDirection = this.clampDir(dd.y);\n }\n var trackData = {\n dx: d.x,\n dy: d.y,\n ddx: dd.x,\n ddy: dd.y,\n clientX: inEvent.clientX,\n clientY: inEvent.clientY,\n pageX: inEvent.pageX,\n pageY: inEvent.pageY,\n screenX: inEvent.screenX,\n screenY: inEvent.screenY,\n xDirection: t.xDirection,\n yDirection: t.yDirection,\n trackInfo: t.trackInfo,\n relatedTarget: inEvent.target,\n pointerType: inEvent.pointerType\n };\n var e = dispatcher.makeEvent(inType, trackData);\n t.lastMoveEvent = inEvent;\n dispatcher.dispatchEvent(e, t.downTarget);\n },\n pointerdown: function(inEvent) {\n if (inEvent.isPrimary && (inEvent.pointerType === 'mouse' ? inEvent.buttons === 1 : true)) {\n var p = {\n downEvent: inEvent,\n downTarget: inEvent.target,\n trackInfo: {},\n lastMoveEvent: null,\n xDirection: 0,\n yDirection: 0,\n tracking: false\n };\n pointermap.set(inEvent.pointerId, p);\n }\n },\n pointermove: function(inEvent) {\n var p = pointermap.get(inEvent.pointerId);\n if (p) {\n if (!p.tracking) {\n var d = this.calcPositionDelta(p.downEvent, inEvent);\n var move = d.x * d.x + d.y * d.y;\n // start tracking only if finger moves more than WIGGLE_THRESHOLD\n if (move > this.WIGGLE_THRESHOLD) {\n p.tracking = true;\n this.fireTrack('trackstart', p.downEvent, p);\n this.fireTrack('track', inEvent, p);\n }\n } else {\n this.fireTrack('track', inEvent, p);\n }\n }\n },\n pointerup: function(inEvent) {\n var p = pointermap.get(inEvent.pointerId);\n if (p) {\n if (p.tracking) {\n this.fireTrack('trackend', inEvent, p);\n }\n pointermap.delete(inEvent.pointerId);\n }\n },\n pointercancel: function(inEvent) {\n this.pointerup(inEvent);\n }\n };\n dispatcher.registerRecognizer('track', track);\n })(window.PointerGestures);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This event denotes a rapid down/move/up sequence from a pointer.\n *\n * The event is sent to the first element the pointer went down on.\n *\n * @module PointerGestures\n * @submodule Events\n * @class flick\n */\n/**\n * Signed velocity of the flick in the x direction.\n * @property xVelocity\n * @type Number\n */\n/**\n * Signed velocity of the flick in the y direction.\n * @type Number\n * @property yVelocity\n */\n/**\n * Unsigned total velocity of the flick.\n * @type Number\n * @property velocity\n */\n/**\n * Angle of the flick in degrees, with 0 along the\n * positive x axis.\n * @type Number\n * @property angle\n */\n/**\n * Axis with the greatest absolute velocity. Denoted\n * with 'x' or 'y'.\n * @type String\n * @property majorAxis\n */\n/**\n * Type of the pointer that made the flick.\n * @type String\n * @property pointerType\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var flick = {\n // TODO(dfreedman): value should be low enough for low speed flicks, but\n // high enough to remove accidental flicks\n MIN_VELOCITY: 0.5 /* px/ms */,\n MAX_QUEUE: 4,\n moveQueue: [],\n target: null,\n pointerId: null,\n events: [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel'\n ],\n pointerdown: function(inEvent) {\n if (inEvent.isPrimary && !this.pointerId) {\n this.pointerId = inEvent.pointerId;\n this.target = inEvent.target;\n this.addMove(inEvent);\n }\n },\n pointermove: function(inEvent) {\n if (inEvent.pointerId === this.pointerId) {\n this.addMove(inEvent);\n }\n },\n pointerup: function(inEvent) {\n if (inEvent.pointerId === this.pointerId) {\n this.fireFlick(inEvent);\n }\n this.cleanup();\n },\n pointercancel: function(inEvent) {\n this.cleanup();\n },\n cleanup: function() {\n this.moveQueue = [];\n this.target = null;\n this.pointerId = null;\n },\n addMove: function(inEvent) {\n if (this.moveQueue.length >= this.MAX_QUEUE) {\n this.moveQueue.shift();\n }\n this.moveQueue.push(inEvent);\n },\n fireFlick: function(inEvent) {\n var e = inEvent;\n var l = this.moveQueue.length;\n var dt, dx, dy, tx, ty, tv, x = 0, y = 0, v = 0;\n // flick based off the fastest segment of movement\n for (var i = 0, m; i < l && (m = this.moveQueue[i]); i++) {\n dt = e.timeStamp - m.timeStamp;\n dx = e.clientX - m.clientX, dy = e.clientY - m.clientY;\n tx = dx / dt, ty = dy / dt, tv = Math.sqrt(tx * tx + ty * ty);\n if (tv > v) {\n x = tx, y = ty, v = tv;\n }\n }\n var ma = Math.abs(x) > Math.abs(y) ? 'x' : 'y';\n var a = this.calcAngle(x, y);\n if (Math.abs(v) >= this.MIN_VELOCITY) {\n var ev = dispatcher.makeEvent('flick', {\n xVelocity: x,\n yVelocity: y,\n velocity: v,\n angle: a,\n majorAxis: ma,\n pointerType: inEvent.pointerType\n });\n dispatcher.dispatchEvent(ev, this.target);\n }\n },\n calcAngle: function(inX, inY) {\n return (Math.atan2(inY, inX) * 180 / Math.PI);\n }\n };\n dispatcher.registerRecognizer('flick', flick);\n})(window.PointerGestures);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This event is fired when a pointer quickly goes down and up, and is used to\n * denote activation.\n *\n * Any gesture event can prevent the tap event from being created by calling\n * `event.preventTap`.\n *\n * Any pointer event can prevent the tap by setting the `tapPrevented` property\n * on itself.\n *\n * @module PointerGestures\n * @submodule Events\n * @class tap\n */\n/**\n * X axis position of the tap.\n * @property x\n * @type Number\n */\n/**\n * Y axis position of the tap.\n * @property y\n * @type Number\n */\n/**\n * Type of the pointer that made the tap.\n * @property pointerType\n * @type String\n */\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var pointermap = new scope.PointerMap();\n var tap = {\n events: [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel',\n 'keyup'\n ],\n pointerdown: function(inEvent) {\n if (inEvent.isPrimary && !inEvent.tapPrevented) {\n pointermap.set(inEvent.pointerId, {\n target: inEvent.target,\n x: inEvent.clientX,\n y: inEvent.clientY\n });\n }\n },\n pointermove: function(inEvent) {\n if (inEvent.isPrimary) {\n var start = pointermap.get(inEvent.pointerId);\n if (start) {\n if (inEvent.tapPrevented) {\n pointermap.delete(inEvent.pointerId);\n }\n }\n }\n },\n pointerup: function(inEvent) {\n var start = pointermap.get(inEvent.pointerId);\n if (start && !inEvent.tapPrevented) {\n var t = scope.findLCA(start.target, inEvent.target);\n if (t) {\n var e = dispatcher.makeEvent('tap', {\n x: inEvent.clientX,\n y: inEvent.clientY,\n detail: inEvent.detail,\n pointerType: inEvent.pointerType\n });\n dispatcher.dispatchEvent(e, t);\n }\n }\n pointermap.delete(inEvent.pointerId);\n },\n pointercancel: function(inEvent) {\n pointermap.delete(inEvent.pointerId);\n },\n keyup: function(inEvent) {\n var code = inEvent.keyCode;\n // 32 == spacebar\n if (code === 32) {\n var t = inEvent.target;\n if (!(t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement)) {\n dispatcher.dispatchEvent(dispatcher.makeEvent('tap', {\n x: 0,\n y: 0,\n detail: 0,\n pointerType: 'unavailable'\n }), t);\n }\n }\n },\n preventTap: function(inPointerId) {\n pointermap.delete(inPointerId);\n }\n };\n dispatcher.registerRecognizer('tap', tap);\n})(window.PointerGestures);\n","// Copyright 2011 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n\n function getTreeScope(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n // JScript does not have __proto__. We wrap all object literals with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n // IE does not support have Document.prototype.contains.\n if (typeof document.contains != 'function') {\n Document.prototype.contains = function(node) {\n if (node === this || node.parentNode === this)\n return true;\n return this.documentElement.contains(node);\n }\n }\n\n Node.prototype.bind = function(name, model, path) {\n console.error('Unhandled binding to Node: ', this, name, model, path);\n };\n\n Node.prototype.unbind = function(name) {\n if (!this.bindings)\n this.bindings = {};\n var binding = this.bindings[name];\n if (!binding)\n return;\n if (typeof binding.close === 'function')\n binding.close();\n this.bindings[name] = undefined;\n };\n\n Node.prototype.unbindAll = function() {\n if (!this.bindings)\n return;\n var names = Object.keys(this.bindings);\n for (var i = 0; i < names.length; i++) {\n var binding = this.bindings[names[i]];\n if (binding)\n binding.close();\n }\n\n this.bindings = {};\n };\n\n var valuePath = Path.get('value');\n\n function NodeBinding(node, property, model, path) {\n this.closed = false;\n this.node = node;\n this.property = property;\n this.model = model;\n this.path = Path.get(path);\n if ((this.model instanceof PathObserver ||\n this.model instanceof CompoundPathObserver) &&\n this.path === valuePath) {\n this.observer = this.model;\n this.observer.target = this;\n this.observer.callback = this.valueChanged;\n } else {\n this.observer = new PathObserver(this.model, this.path,\n this.valueChanged,\n this);\n }\n this.valueChanged(this.value);\n }\n\n NodeBinding.prototype = {\n valueChanged: function(value) {\n this.node[this.property] = this.sanitizeBoundValue(value);\n },\n\n sanitizeBoundValue: function(value) {\n return value == undefined ? '' : String(value);\n },\n\n close: function() {\n if (this.closed)\n return;\n this.observer.close();\n this.observer = undefined;\n this.node = undefined;\n this.model = undefined;\n this.closed = true;\n },\n\n get value() {\n return this.observer.value;\n },\n\n set value(value) {\n this.observer.setValue(value);\n },\n\n reset: function() {\n this.observer.reset();\n }\n };\n\n Text.prototype.bind = function(name, model, path) {\n if (name !== 'textContent')\n return Node.prototype.bind.call(this, name, model, path);\n\n this.unbind(name);\n return this.bindings[name] = new NodeBinding(this, 'data', model, path);\n }\n\n function AttributeBinding(element, attributeName, model, path) {\n this.conditional = attributeName[attributeName.length - 1] == '?';\n if (this.conditional) {\n element.removeAttribute(attributeName);\n attributeName = attributeName.slice(0, -1);\n }\n\n NodeBinding.call(this, element, attributeName, model, path);\n }\n\n AttributeBinding.prototype = createObject({\n __proto__: NodeBinding.prototype,\n\n valueChanged: function(value) {\n if (this.conditional) {\n if (value)\n this.node.setAttribute(this.property, '');\n else\n this.node.removeAttribute(this.property);\n return;\n }\n\n this.node.setAttribute(this.property, this.sanitizeBoundValue(value));\n }\n });\n\n Element.prototype.bind = function(name, model, path) {\n this.unbind(name);\n return this.bindings[name] = new AttributeBinding(this, name, model, path);\n };\n\n var checkboxEventType;\n (function() {\n // Attempt to feature-detect which event (change or click) is fired first\n // for checkboxes.\n var div = document.createElement('div');\n var checkbox = div.appendChild(document.createElement('input'));\n checkbox.setAttribute('type', 'checkbox');\n var first;\n var count = 0;\n checkbox.addEventListener('click', function(e) {\n count++;\n first = first || 'click';\n });\n checkbox.addEventListener('change', function() {\n count++;\n first = first || 'change';\n });\n\n var event = document.createEvent('MouseEvent');\n event.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 0, 0, false,\n false, false, false, 0, null);\n checkbox.dispatchEvent(event);\n // WebKit/Blink don't fire the change event if the element is outside the\n // document, so assume 'change' for that case.\n checkboxEventType = count == 1 ? 'change' : first;\n })();\n\n function getEventForInputType(element) {\n switch (element.type) {\n case 'checkbox':\n return checkboxEventType;\n case 'radio':\n case 'select-multiple':\n case 'select-one':\n return 'change';\n default:\n return 'input';\n }\n }\n\n function InputBinding(node, property, model, path) {\n NodeBinding.call(this, node, property, model, path);\n this.eventType = getEventForInputType(this.node);\n this.boundNodeValueChanged = this.nodeValueChanged.bind(this);\n this.node.addEventListener(this.eventType, this.boundNodeValueChanged,\n true);\n }\n\n InputBinding.prototype = createObject({\n __proto__: NodeBinding.prototype,\n\n nodeValueChanged: function() {\n this.value = this.node[this.property];\n this.reset();\n this.postUpdateBinding();\n Platform.performMicrotaskCheckpoint();\n },\n\n postUpdateBinding: function() {},\n\n close: function() {\n if (this.closed)\n return;\n\n this.node.removeEventListener(this.eventType,\n this.boundNodeValueChanged,\n true);\n NodeBinding.prototype.close.call(this);\n }\n });\n\n // |element| is assumed to be an HTMLInputElement with |type| == 'radio'.\n // Returns an array containing all radio buttons other than |element| that\n // have the same |name|, either in the form that |element| belongs to or,\n // if no form, in the document tree to which |element| belongs.\n //\n // This implementation is based upon the HTML spec definition of a\n // \"radio button group\":\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#radio-button-group\n //\n function getAssociatedRadioButtons(element) {\n if (element.form) {\n return filter(element.form.elements, function(el) {\n return el != element &&\n el.tagName == 'INPUT' &&\n el.type == 'radio' &&\n el.name == element.name;\n });\n } else {\n var treeScope = getTreeScope(element);\n if (!treeScope)\n return [];\n var radios = treeScope.querySelectorAll(\n 'input[type=\"radio\"][name=\"' + element.name + '\"]');\n return filter(radios, function(el) {\n return el != element && !el.form;\n });\n }\n }\n\n function CheckedBinding(element, model, path) {\n InputBinding.call(this, element, 'checked', model, path);\n }\n\n CheckedBinding.prototype = createObject({\n __proto__: InputBinding.prototype,\n\n sanitizeBoundValue: function(value) {\n return Boolean(value);\n },\n\n postUpdateBinding: function() {\n // Only the radio button that is getting checked gets an event. We\n // therefore find all the associated radio buttons and update their\n // CheckedBinding manually.\n if (this.node.tagName === 'INPUT' &&\n this.node.type === 'radio') {\n getAssociatedRadioButtons(this.node).forEach(function(radio) {\n var checkedBinding = radio.bindings.checked;\n if (checkedBinding) {\n // Set the value directly to avoid an infinite call stack.\n checkedBinding.value = false;\n }\n });\n }\n }\n });\n\n HTMLInputElement.prototype.bind = function(name, model, path) {\n if (name !== 'value' && name !== 'checked')\n return HTMLElement.prototype.bind.call(this, name, model, path);\n\n this.unbind(name);\n this.removeAttribute(name);\n return this.bindings[name] = name === 'value' ?\n new InputBinding(this, 'value', model, path) :\n new CheckedBinding(this, model, path);\n }\n\n HTMLTextAreaElement.prototype.bind = function(name, model, path) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, model, path);\n\n this.unbind(name);\n this.removeAttribute(name);\n return this.bindings[name] = new InputBinding(this, name, model, path);\n }\n\n function OptionValueBinding(element, model, path) {\n InputBinding.call(this, element, 'value', model, path);\n }\n\n OptionValueBinding.prototype = createObject({\n __proto__: InputBinding.prototype,\n\n valueChanged: function(value) {\n var select = this.node.parentNode instanceof HTMLSelectElement ?\n this.node.parentNode : undefined;\n var selectBinding;\n var oldValue;\n if (select &&\n select.bindings &&\n select.bindings.value instanceof SelectBinding) {\n selectBinding = select.bindings.value;\n oldValue = select.value;\n }\n\n InputBinding.prototype.valueChanged.call(this, value);\n if (selectBinding && !selectBinding.closed && select.value !== oldValue)\n selectBinding.nodeValueChanged();\n }\n });\n\n HTMLOptionElement.prototype.bind = function(name, model, path) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, model, path);\n\n this.unbind(name);\n this.removeAttribute(name);\n return this.bindings[name] = new OptionValueBinding(this, model, path);\n }\n\n function SelectBinding(element, property, model, path) {\n InputBinding.call(this, element, property, model, path);\n }\n\n SelectBinding.prototype = createObject({\n __proto__: InputBinding.prototype,\n\n valueChanged: function(value) {\n this.node[this.property] = value;\n if (this.node[this.property] == value)\n return;\n\n // The binding may wish to bind to an <option> which has not yet been\n // produced by a child <template>. Delay a maximum of two times: once for\n // each of <optgroup> and <option>\n var maxRetries = 2;\n var self = this;\n function delaySetSelectedIndex() {\n self.node[self.property] = value;\n if (self.node[self.property] != value && maxRetries--)\n ensureScheduled(delaySetSelectedIndex);\n }\n ensureScheduled(delaySetSelectedIndex);\n }\n });\n\n HTMLSelectElement.prototype.bind = function(name, model, path) {\n if (name === 'selectedindex')\n name = 'selectedIndex';\n\n if (name !== 'selectedIndex' && name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, model, path);\n\n this.unbind(name);\n this.removeAttribute(name);\n return this.bindings[name] = new SelectBinding(this, name, model, path);\n }\n\n // TODO(rafaelw): We should polyfill a Microtask Promise and define it if it isn't.\n var ensureScheduled = function() {\n // We need to ping-pong between two Runners in order for the tests to\n // simulate proper end-of-microtask behavior for Object.observe. Without\n // this, we'll continue delivering to a single observer without allowing\n // other observers in the same microtask to make progress.\n\n function Runner(nextRunner) {\n this.nextRunner = nextRunner;\n this.value = false;\n this.lastValue = this.value;\n this.scheduled = [];\n this.scheduledIds = [];\n this.running = false;\n this.observer = new PathObserver(this, 'value', this.run, this);\n }\n\n Runner.prototype = {\n schedule: function(async, id) {\n if (this.scheduledIds[id])\n return;\n\n if (this.running)\n return this.nextRunner.schedule(async, id);\n\n this.scheduledIds[id] = true;\n this.scheduled.push(async);\n\n if (this.lastValue !== this.value)\n return;\n\n this.value = !this.value;\n },\n\n run: function() {\n this.running = true;\n\n for (var i = 0; i < this.scheduled.length; i++) {\n var async = this.scheduled[i];\n var id = async[idExpando];\n this.scheduledIds[id] = false;\n\n if (typeof async === 'function')\n async();\n else\n async.resolve();\n }\n\n this.scheduled = [];\n this.scheduledIds = [];\n this.lastValue = this.value;\n\n this.running = false;\n }\n }\n\n var runner = new Runner(new Runner());\n\n var nextId = 1;\n var idExpando = '__scheduledId__';\n\n function ensureScheduled(async) {\n var id = async[idExpando];\n if (!async[idExpando]) {\n id = nextId++;\n async[idExpando] = id;\n }\n\n runner.schedule(async, id);\n }\n\n return ensureScheduled;\n }();\n\n})(this);\n","// Copyright 2011 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n function assert(v) {\n if (!v)\n throw new Error('Assertion failed');\n }\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n function getTreeScope(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n var Map;\n if (global.Map && typeof global.Map.prototype.forEach === 'function') {\n Map = global.Map;\n } else {\n Map = function() {\n this.keys = [];\n this.values = [];\n };\n\n Map.prototype = {\n set: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n this.keys.push(key);\n this.values.push(value);\n } else {\n this.values[index] = value;\n }\n },\n\n get: function(key) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return;\n\n return this.values[index];\n },\n\n delete: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return false;\n\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return true;\n },\n\n forEach: function(f, opt_this) {\n for (var i = 0; i < this.keys.length; i++)\n f.call(opt_this || this, this.values[i], this.keys[i], this);\n }\n };\n }\n\n // JScript does not have __proto__. We wrap all object literals with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n // IE does not support have Document.prototype.contains.\n if (typeof document.contains != 'function') {\n Document.prototype.contains = function(node) {\n if (node === this || node.parentNode === this)\n return true;\n return this.documentElement.contains(node);\n }\n }\n\n var BIND = 'bind';\n var REPEAT = 'repeat';\n var IF = 'if';\n\n var templateAttributeDirectives = {\n 'template': true,\n 'repeat': true,\n 'bind': true,\n 'ref': true\n };\n\n var semanticTemplateElements = {\n 'THEAD': true,\n 'TBODY': true,\n 'TFOOT': true,\n 'TH': true,\n 'TR': true,\n 'TD': true,\n 'COLGROUP': true,\n 'COL': true,\n 'CAPTION': true,\n 'OPTION': true,\n 'OPTGROUP': true\n };\n\n var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';\n\n var allTemplatesSelectors = 'template, ' +\n Object.keys(semanticTemplateElements).map(function(tagName) {\n return tagName.toLowerCase() + '[template]';\n }).join(', ');\n\n function isAttributeTemplate(el) {\n return semanticTemplateElements[el.tagName] &&\n el.hasAttribute('template');\n }\n\n function isTemplate(el) {\n return el.tagName == 'TEMPLATE' || isAttributeTemplate(el);\n }\n\n function isNativeTemplate(el) {\n return hasTemplateElement && el.tagName == 'TEMPLATE';\n }\n\n var ensureScheduled = function() {\n // We need to ping-pong between two Runners in order for the tests to\n // simulate proper end-of-microtask behavior for Object.observe. Without\n // this, we'll continue delivering to a single observer without allowing\n // other observers in the same microtask to make progress.\n\n function Runner(nextRunner) {\n this.nextRunner = nextRunner;\n this.value = false;\n this.lastValue = this.value;\n this.scheduled = [];\n this.scheduledIds = [];\n this.running = false;\n this.observer = new PathObserver(this, 'value', this.run, this);\n }\n\n Runner.prototype = {\n schedule: function(async, id) {\n if (this.scheduledIds[id])\n return;\n\n if (this.running)\n return this.nextRunner.schedule(async, id);\n\n this.scheduledIds[id] = true;\n this.scheduled.push(async);\n\n if (this.lastValue !== this.value)\n return;\n\n this.value = !this.value;\n },\n\n run: function() {\n this.running = true;\n\n for (var i = 0; i < this.scheduled.length; i++) {\n var async = this.scheduled[i];\n var id = async[idExpando];\n this.scheduledIds[id] = false;\n\n if (typeof async === 'function')\n async();\n else\n async.resolve();\n }\n\n this.scheduled = [];\n this.scheduledIds = [];\n this.lastValue = this.value;\n\n this.running = false;\n }\n }\n\n var runner = new Runner(new Runner());\n\n var nextId = 1;\n var idExpando = '__scheduledId__';\n\n function ensureScheduled(async) {\n var id = async[idExpando];\n if (!async[idExpando]) {\n id = nextId++;\n async[idExpando] = id;\n }\n\n runner.schedule(async, id);\n }\n\n return ensureScheduled;\n }();\n\n // FIXME: Observe templates being added/removed from documents\n // FIXME: Expose imperative API to decorate and observe templates in\n // \"disconnected tress\" (e.g. ShadowRoot)\n document.addEventListener('DOMContentLoaded', function(e) {\n bootstrapTemplatesRecursivelyFrom(document);\n // FIXME: Is this needed? Seems like it shouldn't be.\n Platform.performMicrotaskCheckpoint();\n }, false);\n\n function forAllTemplatesFrom(node, fn) {\n var subTemplates = node.querySelectorAll(allTemplatesSelectors);\n\n if (isTemplate(node))\n fn(node)\n forEach(subTemplates, fn);\n }\n\n function bootstrapTemplatesRecursivelyFrom(node) {\n function bootstrap(template) {\n if (!HTMLTemplateElement.decorate(template))\n bootstrapTemplatesRecursivelyFrom(template.content);\n }\n\n forAllTemplatesFrom(node, bootstrap);\n }\n\n if (!hasTemplateElement) {\n /**\n * This represents a <template> element.\n * @constructor\n * @extends {HTMLElement}\n */\n global.HTMLTemplateElement = function() {\n throw TypeError('Illegal constructor');\n };\n }\n\n var hasProto = '__proto__' in {};\n\n function mixin(to, from) {\n Object.getOwnPropertyNames(from).forEach(function(name) {\n Object.defineProperty(to, name,\n Object.getOwnPropertyDescriptor(from, name));\n });\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getOrCreateTemplateContentsOwner(template) {\n var doc = template.ownerDocument\n if (!doc.defaultView)\n return doc;\n var d = doc.templateContentsOwner_;\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n doc.templateContentsOwner_ = d;\n }\n return d;\n }\n\n function getTemplateStagingDocument(template) {\n if (!template.stagingDocument_) {\n var owner = template.ownerDocument;\n if (!owner.stagingDocument_) {\n owner.stagingDocument_ = owner.implementation.createHTMLDocument('');\n owner.stagingDocument_.stagingDocument_ = owner.stagingDocument_;\n }\n\n template.stagingDocument_ = owner.stagingDocument_;\n }\n\n return template.stagingDocument_;\n }\n\n // For non-template browsers, the parser will disallow <template> in certain\n // locations, so we allow \"attribute templates\" which combine the template\n // element with the top-level container node of the content, e.g.\n //\n // <tr template repeat=\"{{ foo }}\"\" class=\"bar\"><td>Bar</td></tr>\n //\n // becomes\n //\n // <template repeat=\"{{ foo }}\">\n // + #document-fragment\n // + <tr class=\"bar\">\n // + <td>Bar</td>\n //\n function extractTemplateFromAttributeTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n if (templateAttributeDirectives[attrib.name]) {\n if (attrib.name !== 'template')\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n }\n\n return template;\n }\n\n function liftNonNativeTemplateChildrenIntoContent(template, el, useRoot) {\n var content = template.content;\n if (useRoot) {\n content.appendChild(el);\n return;\n }\n\n var child;\n while (child = el.firstChild) {\n content.appendChild(child);\n }\n }\n\n /**\n * Ensures proper API and content model for template elements.\n * @param {HTMLTemplateElement} opt_instanceRef The template element which\n * |el| template element will return as the value of its ref(), and whose\n * content will be used as source when createInstance() is invoked.\n */\n HTMLTemplateElement.decorate = function(el, opt_instanceRef) {\n if (el.templateIsDecorated_)\n return false;\n\n var templateElement = el;\n templateElement.templateIsDecorated_ = true;\n\n var isNative = isNativeTemplate(templateElement);\n var bootstrapContents = isNative;\n var liftContents = !isNative;\n var liftRoot = false;\n\n if (!isNative && isAttributeTemplate(templateElement)) {\n assert(!opt_instanceRef);\n templateElement = extractTemplateFromAttributeTemplate(el);\n templateElement.templateIsDecorated_ = true;\n\n isNative = isNativeTemplate(templateElement);\n liftRoot = true;\n }\n\n if (!isNative) {\n fixTemplateElementPrototype(templateElement);\n var doc = getOrCreateTemplateContentsOwner(templateElement);\n templateElement.content_ = doc.createDocumentFragment();\n }\n\n if (opt_instanceRef) {\n // template is contained within an instance, its direct content must be\n // empty\n templateElement.instanceRef_ = opt_instanceRef;\n } else if (liftContents) {\n liftNonNativeTemplateChildrenIntoContent(templateElement,\n el,\n liftRoot);\n } else if (bootstrapContents) {\n bootstrapTemplatesRecursivelyFrom(templateElement.content);\n }\n\n return true;\n };\n\n // TODO(rafaelw): This used to decorate recursively all templates from a given\n // node. This happens by default on 'DOMContentLoaded', but may be needed\n // in subtrees not descendent from document (e.g. ShadowRoot).\n // Review whether this is the right public API.\n HTMLTemplateElement.bootstrap = bootstrapTemplatesRecursivelyFrom;\n\n var htmlElement = global.HTMLUnknownElement || HTMLElement;\n\n var contentDescriptor = {\n get: function() {\n return this.content_;\n },\n enumerable: true,\n configurable: true\n };\n\n if (!hasTemplateElement) {\n // Gecko is more picky with the prototype than WebKit. Make sure to use the\n // same prototype as created in the constructor.\n HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);\n\n Object.defineProperty(HTMLTemplateElement.prototype, 'content',\n contentDescriptor);\n }\n\n function fixTemplateElementPrototype(el) {\n // Note: because we need to treat some semantic elements as template\n // elements (like tr or td), but don't want to reassign their proto (gecko\n // doesn't like that), we mixin the properties for those elements.\n if (el.tagName === 'TEMPLATE') {\n if (!hasTemplateElement) {\n if (hasProto)\n el.__proto__ = HTMLTemplateElement.prototype;\n else\n mixin(el, HTMLTemplateElement.prototype);\n }\n } else {\n mixin(el, HTMLTemplateElement.prototype);\n // FIXME: Won't need this when webkit methods move to the prototype.\n Object.defineProperty(el, 'content', contentDescriptor);\n }\n }\n\n function ensureSetModelScheduled(template) {\n if (!template.setModelFn_) {\n template.setModelFn_ = function() {\n addBindings(template, template.model, template.prepareBindingFn_);\n };\n }\n\n ensureScheduled(template.setModelFn_);\n }\n\n mixin(HTMLTemplateElement.prototype, {\n bind: function(name, model, path) {\n if (!this.iterator_)\n this.iterator_ = new TemplateIterator(this);\n\n this.bindings = this.bindings || {};\n if (name === 'bind') {\n this.iterator_.hasBind = true;\n this.iterator_.bindModel = model;\n this.iterator_.bindPath = path;\n if (!this.iterator_.depsChanging) {\n this.iterator_.depsChanging = true;\n ensureScheduled(this.iterator_);\n }\n\n return this.bindings.bind = this.iterator_;\n }\n\n if (name === 'repeat') {\n this.iterator_.hasRepeat = true;\n this.iterator_.repeatModel = model;\n this.iterator_.repeatPath = path;\n if (!this.iterator_.depsChanging) {\n this.iterator_.depsChanging = true;\n ensureScheduled(this.iterator_);\n }\n return this.bindings.repeat = this.iterator_;\n }\n\n if (name === 'if') {\n this.iterator_.hasIf = true;\n this.iterator_.ifModel = model;\n this.iterator_.ifPath = path;\n if (!this.iterator_.depsChanging) {\n this.iterator_.depsChanging = true;\n ensureScheduled(this.iterator_);\n }\n return this.bindings.if = this.iterator_;\n }\n\n return HTMLElement.prototype.bind.call(this, name, model, path);\n },\n\n unbind: function(name) {\n if (name === 'bind') {\n if (!this.iterator_)\n return;\n\n this.iterator_.hasBind = false;\n this.iterator_.bindModel = undefined;\n this.iterator_.bindPath = undefined;\n if (!this.iterator_.depsChanging) {\n this.iterator_.depsChanging = true;\n ensureScheduled(this.iterator_);\n }\n\n return this.bindings.bind = undefined;\n }\n\n if (name === 'repeat') {\n if (!this.iterator_)\n return;\n this.iterator_.hasRepeat = false;\n this.iterator_.repeatModel = undefined;\n this.iterator_.repeatPath = undefined;\n if (!this.iterator_.depsChanging) {\n this.iterator_.depsChanging = true;\n ensureScheduled(this.iterator_);\n }\n return this.bindings.repeat = undefined;\n }\n\n if (name === 'if') {\n if (!this.iterator_)\n return;\n this.iterator_.hasIf = false;\n this.iterator_.ifModel = undefined;\n this.iterator_.ifPath = undefined;\n if (!this.iterator_.depsChanging) {\n this.iterator_.depsChanging = true;\n ensureScheduled(this.iterator_);\n }\n return this.bindings.if = undefined;\n }\n\n return HTMLElement.prototype.unbind.call(this, name);\n },\n\n createInstance: function(model, bound) {\n var content = this.ref.content;\n var map = content.bindingMap_;\n if (!map) {\n // TODO(rafaelw): Setup a MutationObserver on content to detect\n // when the instanceMap is invalid.\n map = createInstanceBindingMap(content, this.prepareBindingFn_) || [];\n content.bindingMap_ = map;\n }\n\n var stagingDocument = getTemplateStagingDocument(this);\n var instance = deepCloneIgnoreTemplateContent(content, stagingDocument);\n\n addMapBindings(instance, map, model, this.bindingDelegate_, bound);\n // TODO(rafaelw): We can do this more lazily, but setting a sentinel\n // in the parent of the template element, and creating it when it's\n // asked for by walking back to find the iterating template.\n addTemplateInstanceRecord(instance, model);\n return instance;\n },\n\n get model() {\n return this.model_;\n },\n\n set model(model) {\n this.model_ = model;\n ensureSetModelScheduled(this);\n },\n\n get bindingDelegate() {\n return this.bindingDelegate_;\n },\n\n setBindingDelegate_: function(bindingDelegate) {\n this.bindingDelegate_ = bindingDelegate;\n\n function delegateFn(name) {\n var fn = bindingDelegate && bindingDelegate[name];\n if (typeof fn != 'function')\n return;\n\n return function() {\n return fn.apply(bindingDelegate, arguments);\n };\n }\n\n this.prepareBindingFn_ = delegateFn('prepareBinding');\n this.prepareInstanceModelFn_ = delegateFn('prepareInstanceModel');\n this.prepareInstancePositionChangedFn_ =\n delegateFn('prepareInstancePositionChanged');\n },\n\n set bindingDelegate(bindingDelegate) {\n this.setBindingDelegate_(bindingDelegate);\n ensureSetModelScheduled(this);\n },\n\n get ref() {\n var ref;\n var refId = this.getAttribute('ref');\n if (refId) {\n var treeScope = getTreeScope(this);\n if (treeScope)\n ref = treeScope.getElementById(refId);\n }\n\n if (!ref)\n ref = this.instanceRef_;\n\n if (!ref)\n return this;\n\n var nextRef = ref.ref;\n return nextRef ? nextRef : ref;\n }\n });\n\n // Returns\n // a) undefined if there are no mustaches.\n // b) [TEXT, (PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.\n function parseMustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n return;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, lastIndex = 0, endIndex = 0;\n while (lastIndex < length) {\n startIndex = s.indexOf('{{', lastIndex);\n endIndex = startIndex < 0 ? -1 : s.indexOf('}}', startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens.push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(startIndex + 2, endIndex).trim();\n tokens.push(Path.get(pathString)); // PATH\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node)\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 4;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[3] == '';\n\n tokens.combinator = function(values) {\n var newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 3) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 3];\n if (value !== undefined)\n newValue += value;\n newValue += tokens[i + 2];\n }\n\n return newValue;\n }\n\n return tokens;\n }\n\n var valuePath = Path.get('value');\n\n function processBinding(name, tokens, node, model, bound) {\n var bindingModel;\n var bindingPath;\n\n if (!tokens.hasOnePath) {\n bindingModel = new CompoundPathObserver(undefined, undefined,\n tokens.combinator);\n }\n\n if (!tokens.isSimplePath)\n bindingPath = valuePath;\n\n for (var i = 1; i < tokens.length; i += 3) {\n var type = tokens[i];\n var localModel = model;\n var localPath = tokens[i];\n var delegateFn = tokens[i + 1];\n\n var delegateValue = delegateFn && delegateFn(model, node);\n if (delegateValue !== undefined) {\n localModel = delegateValue;\n localPath = valuePath;\n }\n\n if (!tokens.hasOnePath) {\n bindingModel.addPath(localModel, localPath);\n continue;\n }\n\n if (tokens.isSimplePath) {\n bindingModel = localModel;\n bindingPath = localPath;\n } else {\n bindingModel = new PathObserver(localModel, localPath, undefined,\n undefined,\n tokens.combinator);\n }\n }\n\n if (!tokens.hasOnePath)\n bindingModel.start();\n\n var binding = node.bind(name, bindingModel, bindingPath);\n if (bound)\n bound.push(binding);\n }\n\n function processBindings(bindings, node, model, bound) {\n for (var i = 0; i < bindings.length; i += 2) {\n processBinding(bindings[i], bindings[i + 1], node, model, bound);\n }\n }\n\n function parseAttributeBindings(element, prepareBindingFn) {\n assert(element);\n\n var bindings;\n var isTemplateNode = isTemplate(element);\n var ifFound = false;\n var bindFound = false;\n\n for (var i = 0; i < element.attributes.length; i++) {\n var attr = element.attributes[i];\n var name = attr.name;\n var value = attr.value;\n\n // Allow bindings expressed in attributes to be prefixed with underbars.\n // We do this to allow correct semantics for browsers that don't implement\n // <template> where certain attributes might trigger side-effects -- and\n // for IE which sanitizes certain attributes, disallowing mustache\n // replacements in their text.\n while (name[0] === '_') {\n name = name.substring(1);\n }\n\n if (isTemplateNode) {\n if (name === IF) {\n ifFound = true;\n value = value || '{{}}'; // Accept 'naked' if.\n } else if (name === BIND || name === REPEAT) {\n bindFound = true;\n value = value || '{{}}'; // Accept 'naked' bind & repeat.\n }\n }\n\n var tokens = parseMustaches(value, name, element,\n prepareBindingFn);\n if (!tokens)\n continue;\n\n bindings = bindings || [];\n bindings.push(name, tokens);\n }\n\n // Treat <template if> as <template bind if>\n if (ifFound && !bindFound) {\n bindings = bindings || [];\n bindings.push(BIND, parseMustaches('{{}}', BIND, element,\n prepareBindingFn));\n }\n\n return bindings;\n }\n\n function getBindings(node, prepareBindingFn) {\n if (node.nodeType === Node.ELEMENT_NODE)\n return parseAttributeBindings(node, prepareBindingFn);\n\n if (node.nodeType === Node.TEXT_NODE) {\n var tokens = parseMustaches(node.data, 'textContent', node,\n prepareBindingFn);\n if (tokens)\n return ['textContent', tokens];\n }\n }\n\n function addMapBindings(node, bindings, model, delegate, bound) {\n if (!bindings)\n return;\n\n if (bindings.templateRef) {\n HTMLTemplateElement.decorate(node, bindings.templateRef);\n if (delegate) {\n node.setBindingDelegate_(delegate);\n }\n }\n\n if (bindings.length)\n processBindings(bindings, node, model, bound);\n\n if (!bindings.children)\n return;\n\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n addMapBindings(child, bindings.children[i++], model, delegate, bound);\n }\n }\n\n function addBindings(node, model, prepareBindingFn) {\n assert(node);\n\n var bindings = getBindings(node, prepareBindingFn);\n if (bindings)\n processBindings(bindings, node, model);\n\n for (var child = node.firstChild; child ; child = child.nextSibling)\n addBindings(child, model, prepareBindingFn);\n }\n\n function deepCloneIgnoreTemplateContent(node, stagingDocument) {\n var clone = stagingDocument.importNode(node, false);\n if (node.isTemplate_) {\n return clone;\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n clone.appendChild(deepCloneIgnoreTemplateContent(child, stagingDocument))\n }\n\n return clone;\n }\n\n function createInstanceBindingMap(node, prepareBindingFn) {\n var map = getBindings(node, prepareBindingFn);\n if (isTemplate(node)) {\n node.isTemplate_ = true;\n map = map || [];\n map.templateRef = node;\n }\n\n var child = node.firstChild, index = 0;\n for (; child; child = child.nextSibling, index++) {\n var childMap = createInstanceBindingMap(child, prepareBindingFn);\n if (!childMap)\n continue;\n\n map = map || [];\n map.children = map.children || {};\n map.children[index] = childMap;\n }\n\n return map;\n }\n\n function TemplateInstance(firstNode, lastNode, model) {\n // TODO(rafaelw): firstNode & lastNode should be read-synchronous\n // in cases where script has modified the template instance boundary.\n // All should be read-only.\n this.firstNode = firstNode;\n this.lastNode = lastNode;\n this.model = model;\n }\n\n function addTemplateInstanceRecord(fragment, model) {\n if (!fragment.firstChild)\n return;\n\n var instanceRecord = new TemplateInstance(fragment.firstChild,\n fragment.lastChild, model);\n var node = instanceRecord.firstNode;\n while (node) {\n node.templateInstance_ = instanceRecord;\n node = node.nextSibling;\n }\n }\n\n Object.defineProperty(Node.prototype, 'templateInstance', {\n get: function() {\n var instance = this.templateInstance_;\n return instance ? instance :\n (this.parentNode ? this.parentNode.templateInstance : undefined);\n }\n });\n\n function TemplateIterator(templateElement) {\n this.closed = false;\n this.templateElement_ = templateElement;\n\n // Flattened array of tuples:\n // <instanceTerminatorNode, [bindingsSetupByInstance]>\n this.terminators = [];\n\n this.iteratedValue = undefined;\n this.arrayObserver = undefined;\n\n this.depsChanged = false;\n this.hasRepeat = false;\n this.repeatModel = undefined;\n this.repeatPath = undefined;\n this.hasBind = false;\n this.bindModel = undefined;\n this.bindPath = undefined;\n this.hasIf = false;\n this.ifModel = undefined;\n this.ifPath = undefined;\n }\n\n TemplateIterator.prototype = {\n resolve: function() {\n this.depsChanging = false;\n if (this.valueObserver) {\n this.valueObserver.close();\n this.valueObserver = undefined;\n }\n\n if (!this.hasRepeat && !this.hasBind) {\n this.valueChanged();\n return;\n }\n\n var isRepeat = this.hasRepeat === true;\n var model = isRepeat ? this.repeatModel : this.bindModel;\n var path = isRepeat ? this.repeatPath : this.bindPath;\n\n if (!this.hasIf) {\n var valueFn = this.hasRepeat ? undefined : function(value) {\n return [value];\n };\n\n this.valueObserver = new PathObserver(model,\n path,\n this.valueChanged,\n this,\n valueFn);\n } else {\n var valueFn = function(values) {\n var modelValue = values[0];\n var ifValue = values[1]\n if (!ifValue)\n return;\n return isRepeat ? modelValue : [ modelValue ];\n };\n\n this.valueObserver = new CompoundPathObserver(this.valueChanged,\n this,\n valueFn);\n\n this.valueObserver.addPath(model, path);\n this.valueObserver.addPath(this.ifModel, this.ifPath);\n this.valueObserver.start();\n }\n\n this.valueChanged(this.valueObserver.value);\n },\n\n valueChanged: function(value) {\n if (!Array.isArray(value))\n value = undefined;\n\n var oldValue = this.iteratedValue;\n this.unobserve();\n this.iteratedValue = value;\n\n if (this.iteratedValue) {\n this.arrayObserver =\n new ArrayObserver(this.iteratedValue, this.handleSplices, this);\n }\n\n var splices = ArrayObserver.calculateSplices(this.iteratedValue || [],\n oldValue || []);\n\n if (splices.length)\n this.handleSplices(splices);\n },\n\n getTerminatorAt: function(index) {\n if (index == -1)\n return this.templateElement_;\n var terminator = this.terminators[index*2];\n if (terminator.nodeType !== Node.ELEMENT_NODE ||\n this.templateElement_ === terminator) {\n return terminator;\n }\n\n var subIterator = terminator.iterator_;\n if (!subIterator)\n return terminator;\n\n return subIterator.getTerminatorAt(subIterator.terminators.length/2 - 1);\n },\n\n // TODO(rafaelw): If we inserting sequences of instances we can probably\n // avoid lots of calls to getTerminatorAt(), or cache its result.\n insertInstanceAt: function(index, fragment, instanceNodes, bound) {\n var previousTerminator = this.getTerminatorAt(index - 1);\n var terminator = previousTerminator;\n if (fragment)\n terminator = fragment.lastChild || terminator;\n else if (instanceNodes)\n terminator = instanceNodes[instanceNodes.length - 1] || terminator;\n\n this.terminators.splice(index*2, 0, terminator, bound);\n var parent = this.templateElement_.parentNode;\n var insertBeforeNode = previousTerminator.nextSibling;\n\n if (fragment) {\n parent.insertBefore(fragment, insertBeforeNode);\n } else if (instanceNodes) {\n for (var i = 0; i < instanceNodes.length; i++)\n parent.insertBefore(instanceNodes[i], insertBeforeNode);\n }\n },\n\n extractInstanceAt: function(index) {\n var instanceNodes = [];\n var previousTerminator = this.getTerminatorAt(index - 1);\n var terminator = this.getTerminatorAt(index);\n instanceNodes.bound = this.terminators[index*2 + 1];\n this.terminators.splice(index*2, 2);\n\n var parent = this.templateElement_.parentNode;\n while (terminator !== previousTerminator) {\n var node = previousTerminator.nextSibling;\n if (node == terminator)\n terminator = previousTerminator;\n\n parent.removeChild(node);\n instanceNodes.push(node);\n }\n\n return instanceNodes;\n },\n\n getDelegateFn: function(fn) {\n fn = fn && fn(this.templateElement_);\n return typeof fn === 'function' ? fn : null;\n },\n\n handleSplices: function(splices) {\n if (this.closed)\n return;\n\n var template = this.templateElement_;\n\n if (!template.parentNode || !template.ownerDocument.defaultView) {\n this.close();\n return;\n }\n\n if (this.instanceModelFn_ === undefined) {\n this.instanceModelFn_ =\n this.getDelegateFn(template.prepareInstanceModelFn_);\n }\n\n if (this.instancePositionChangedFn_ === undefined) {\n this.instancePositionChangedFn_ =\n this.getDelegateFn(template.prepareInstancePositionChangedFn_);\n }\n\n var instanceCache = new Map;\n var removeDelta = 0;\n splices.forEach(function(splice) {\n splice.removed.forEach(function(model) {\n var instanceNodes =\n this.extractInstanceAt(splice.index + removeDelta);\n instanceCache.set(model, instanceNodes);\n }, this);\n\n removeDelta -= splice.addedCount;\n }, this);\n\n splices.forEach(function(splice) {\n var addIndex = splice.index;\n for (; addIndex < splice.index + splice.addedCount; addIndex++) {\n var model = this.iteratedValue[addIndex];\n var fragment = undefined;\n var instanceNodes = instanceCache.get(model);\n var bound;\n if (instanceNodes) {\n instanceCache.delete(model);\n bound = instanceNodes.bound;\n } else {\n bound = [];\n if (this.instanceModelFn_)\n model = this.instanceModelFn_(model);\n\n if (model !== undefined) {\n fragment = this.templateElement_.createInstance(model, bound);\n }\n }\n\n this.insertInstanceAt(addIndex, fragment, instanceNodes, bound);\n }\n }, this);\n\n instanceCache.forEach(function(instanceNodes) {\n this.closeInstanceBindings(instanceNodes.bound);\n }, this);\n\n if (this.instancePositionChangedFn_)\n this.reportInstancesMoved(splices);\n },\n\n reportInstanceMoved: function(index) {\n var previousTerminator = this.getTerminatorAt(index - 1);\n var terminator = this.getTerminatorAt(index);\n if (previousTerminator === terminator)\n return; // instance has zero nodes.\n\n // We must use the first node of the instance, because any subsequent\n // nodes may have been generated by sub-templates.\n // TODO(rafaelw): This is brittle WRT instance mutation -- e.g. if the\n // first node was removed by script.\n var templateInstance = previousTerminator.nextSibling.templateInstance;\n this.instancePositionChangedFn_(templateInstance, index);\n },\n\n reportInstancesMoved: function(splices) {\n var index = 0;\n var offset = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n if (offset != 0) {\n while (index < splice.index) {\n this.reportInstanceMoved(index);\n index++;\n }\n } else {\n index = splice.index;\n }\n\n while (index < splice.index + splice.addedCount) {\n this.reportInstanceMoved(index);\n index++;\n }\n\n offset += splice.addedCount - splice.removed.length;\n }\n\n if (offset == 0)\n return;\n\n var length = this.terminators.length / 2;\n while (index < length) {\n this.reportInstanceMoved(index);\n index++;\n }\n },\n\n closeInstanceBindings: function(bound) {\n for (var i = 0; i < bound.length; i++) {\n bound[i].close();\n }\n },\n\n unobserve: function() {\n if (!this.arrayObserver)\n return;\n\n this.arrayObserver.close();\n this.arrayObserver = undefined;\n },\n\n close: function() {\n if (this.closed)\n return;\n this.unobserve();\n for (var i = 1; i < this.terminators.length; i += 2) {\n this.closeInstanceBindings(this.terminators[i]);\n }\n\n this.terminators.length = 0;\n if (this.valueObserver)\n this.valueObserver.close();\n this.valueObserver = undefined;\n this.templateElement_.iterator_ = undefined;\n this.closed = true;\n }\n };\n\n // Polyfill-specific API.\n HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;\n})(this);\n","/*\n Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>\n Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>\n Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>\n Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>\n Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>\n Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>\n Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function (global) {\n 'use strict';\n\n var Token,\n TokenName,\n Syntax,\n Messages,\n source,\n index,\n length,\n delegate,\n lookahead,\n state;\n\n Token = {\n BooleanLiteral: 1,\n EOF: 2,\n Identifier: 3,\n Keyword: 4,\n NullLiteral: 5,\n NumericLiteral: 6,\n Punctuator: 7,\n StringLiteral: 8\n };\n\n TokenName = {};\n TokenName[Token.BooleanLiteral] = 'Boolean';\n TokenName[Token.EOF] = '<end>';\n TokenName[Token.Identifier] = 'Identifier';\n TokenName[Token.Keyword] = 'Keyword';\n TokenName[Token.NullLiteral] = 'Null';\n TokenName[Token.NumericLiteral] = 'Numeric';\n TokenName[Token.Punctuator] = 'Punctuator';\n TokenName[Token.StringLiteral] = 'String';\n\n Syntax = {\n ArrayExpression: 'ArrayExpression',\n BinaryExpression: 'BinaryExpression',\n CallExpression: 'CallExpression',\n ConditionalExpression: 'ConditionalExpression',\n EmptyStatement: 'EmptyStatement',\n ExpressionStatement: 'ExpressionStatement',\n Identifier: 'Identifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n ObjectExpression: 'ObjectExpression',\n Program: 'Program',\n Property: 'Property',\n ThisExpression: 'ThisExpression',\n UnaryExpression: 'UnaryExpression'\n };\n\n // Error messages should be identical to V8.\n Messages = {\n UnexpectedToken: 'Unexpected token %0',\n UnknownLabel: 'Undefined label \\'%0\\'',\n Redeclaration: '%0 \\'%1\\' has already been declared'\n };\n\n // Ensure the condition is true, otherwise throw an error.\n // This is only to have a better contract semantic, i.e. another safety net\n // to catch a logic error. The condition shall be fulfilled in normal case.\n // Do NOT use this to enforce a certain condition on any user input.\n\n function assert(condition, message) {\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n }\n\n function isDecimalDigit(ch) {\n return (ch >= 48 && ch <= 57); // 0..9\n }\n\n\n // 7.2 White Space\n\n function isWhiteSpace(ch) {\n return (ch === 32) || // space\n (ch === 9) || // tab\n (ch === 0xB) ||\n (ch === 0xC) ||\n (ch === 0xA0) ||\n (ch >= 0x1680 && '\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\uFEFF'.indexOf(String.fromCharCode(ch)) > 0);\n }\n\n // 7.3 Line Terminators\n\n function isLineTerminator(ch) {\n return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029);\n }\n\n // 7.6 Identifier Names and Identifiers\n\n function isIdentifierStart(ch) {\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122); // a..z\n }\n\n function isIdentifierPart(ch) {\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122) || // a..z\n (ch >= 48 && ch <= 57); // 0..9\n }\n\n // 7.6.1.1 Keywords\n\n function isKeyword(id) {\n return (id === 'this')\n }\n\n // 7.4 Comments\n\n function skipWhitespace() {\n while (index < length && isWhiteSpace(source.charCodeAt(index))) {\n ++index;\n }\n }\n\n function getIdentifier() {\n var start, ch;\n\n start = index++;\n while (index < length) {\n ch = source.charCodeAt(index);\n if (isIdentifierPart(ch)) {\n ++index;\n } else {\n break;\n }\n }\n\n return source.slice(start, index);\n }\n\n function scanIdentifier() {\n var start, id, type;\n\n start = index;\n\n id = getIdentifier();\n\n // There is no keyword or literal with only one character.\n // Thus, it must be an identifier.\n if (id.length === 1) {\n type = Token.Identifier;\n } else if (isKeyword(id)) {\n type = Token.Keyword;\n } else if (id === 'null') {\n type = Token.NullLiteral;\n } else if (id === 'true' || id === 'false') {\n type = Token.BooleanLiteral;\n } else {\n type = Token.Identifier;\n }\n\n return {\n type: type,\n value: id,\n range: [start, index]\n };\n }\n\n\n // 7.7 Punctuators\n\n function scanPunctuator() {\n var start = index,\n code = source.charCodeAt(index),\n code2,\n ch1 = source[index],\n ch2;\n\n switch (code) {\n\n // Check for most common single-character punctuators.\n case 46: // . dot\n case 40: // ( open bracket\n case 41: // ) close bracket\n case 59: // ; semicolon\n case 44: // , comma\n case 123: // { open curly brace\n case 125: // } close curly brace\n case 91: // [\n case 93: // ]\n case 58: // :\n case 63: // ?\n ++index;\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code),\n range: [start, index]\n };\n\n default:\n code2 = source.charCodeAt(index + 1);\n\n // '=' (char #61) marks an assignment or comparison operator.\n if (code2 === 61) {\n switch (code) {\n case 37: // %\n case 38: // &\n case 42: // *:\n case 43: // +\n case 45: // -\n case 47: // /\n case 60: // <\n case 62: // >\n case 124: // |\n index += 2;\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code) + String.fromCharCode(code2),\n range: [start, index]\n };\n\n case 33: // !\n case 61: // =\n index += 2;\n\n // !== and ===\n if (source.charCodeAt(index) === 61) {\n ++index;\n }\n return {\n type: Token.Punctuator,\n value: source.slice(start, index),\n range: [start, index]\n };\n default:\n break;\n }\n }\n break;\n }\n\n // Peek more characters.\n\n ch2 = source[index + 1];\n\n // Other 2-character punctuators: && ||\n\n if (ch1 === ch2 && ('&|'.indexOf(ch1) >= 0)) {\n index += 2;\n return {\n type: Token.Punctuator,\n value: ch1 + ch2,\n range: [start, index]\n };\n }\n\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n return {\n type: Token.Punctuator,\n value: ch1,\n range: [start, index]\n };\n }\n\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n // 7.8.3 Numeric Literals\n function scanNumericLiteral() {\n var number, start, ch;\n\n ch = source[index];\n assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),\n 'Numeric literal must start with a decimal digit or a decimal point');\n\n start = index;\n number = '';\n if (ch !== '.') {\n number = source[index++];\n ch = source[index];\n\n // Hex number starts with '0x'.\n // Octal number starts with '0'.\n if (number === '0') {\n // decimal number starts with '0' such as '09' is illegal.\n if (ch && isDecimalDigit(ch.charCodeAt(0))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n }\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === '.') {\n number += source[index++];\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === 'e' || ch === 'E') {\n number += source[index++];\n\n ch = source[index];\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n if (isDecimalDigit(source.charCodeAt(index))) {\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n } else {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseFloat(number),\n range: [start, index]\n };\n }\n\n // 7.8.4 String Literals\n\n function scanStringLiteral() {\n var str = '', quote, start, ch, octal = false;\n\n quote = source[index];\n assert((quote === '\\'' || quote === '\"'),\n 'String literal must starts with a quote');\n\n start = index;\n ++index;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n break;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!ch || !isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n str += '\\n';\n break;\n case 'r':\n str += '\\r';\n break;\n case 't':\n str += '\\t';\n break;\n case 'b':\n str += '\\b';\n break;\n case 'f':\n str += '\\f';\n break;\n case 'v':\n str += '\\x0B';\n break;\n\n default:\n str += ch;\n break;\n }\n } else {\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n break;\n } else {\n str += ch;\n }\n }\n\n if (quote !== '') {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.StringLiteral,\n value: str,\n octal: octal,\n range: [start, index]\n };\n }\n\n function isIdentifierName(token) {\n return token.type === Token.Identifier ||\n token.type === Token.Keyword ||\n token.type === Token.BooleanLiteral ||\n token.type === Token.NullLiteral;\n }\n\n function advance() {\n var ch;\n\n skipWhitespace();\n\n if (index >= length) {\n return {\n type: Token.EOF,\n range: [index, index]\n };\n }\n\n ch = source.charCodeAt(index);\n\n // Very common: ( and ) and ;\n if (ch === 40 || ch === 41 || ch === 58) {\n return scanPunctuator();\n }\n\n // String literal starts with single quote (#39) or double quote (#34).\n if (ch === 39 || ch === 34) {\n return scanStringLiteral();\n }\n\n if (isIdentifierStart(ch)) {\n return scanIdentifier();\n }\n\n // Dot (.) char #46 can also start a floating-point number, hence the need\n // to check the next character.\n if (ch === 46) {\n if (isDecimalDigit(source.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n return scanPunctuator();\n }\n\n if (isDecimalDigit(ch)) {\n return scanNumericLiteral();\n }\n\n return scanPunctuator();\n }\n\n function lex() {\n var token;\n\n token = lookahead;\n index = token.range[1];\n\n lookahead = advance();\n\n index = token.range[1];\n\n return token;\n }\n\n function peek() {\n var pos;\n\n pos = index;\n lookahead = advance();\n index = pos;\n }\n\n // Throw an exception\n\n function throwError(token, messageFormat) {\n var error,\n args = Array.prototype.slice.call(arguments, 2),\n msg = messageFormat.replace(\n /%(\\d)/g,\n function (whole, index) {\n assert(index < args.length, 'Message reference must be in range');\n return args[index];\n }\n );\n\n error = new Error(msg);\n error.index = index;\n error.description = msg;\n throw error;\n }\n\n // Throw an exception because of the token.\n\n function throwUnexpected(token) {\n throwError(token, Messages.UnexpectedToken, token.value);\n }\n\n // Expect the next token to match the specified punctuator.\n // If not, an exception will be thrown.\n\n function expect(value) {\n var token = lex();\n if (token.type !== Token.Punctuator || token.value !== value) {\n throwUnexpected(token);\n }\n }\n\n // Return true if the next token matches the specified punctuator.\n\n function match(value) {\n return lookahead.type === Token.Punctuator && lookahead.value === value;\n }\n\n // Return true if the next token matches the specified keyword\n\n function matchKeyword(keyword) {\n return lookahead.type === Token.Keyword && lookahead.value === keyword;\n }\n\n function consumeSemicolon() {\n // Catch the very common case first: immediately a semicolon (char #59).\n if (source.charCodeAt(index) === 59) {\n lex();\n return;\n }\n\n skipWhitespace();\n\n if (match(';')) {\n lex();\n return;\n }\n\n if (lookahead.type !== Token.EOF && !match('}')) {\n throwUnexpected(lookahead);\n }\n }\n\n // 11.1.4 Array Initialiser\n\n function parseArrayInitialiser() {\n var elements = [];\n\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n elements.push(parseExpression());\n\n if (!match(']')) {\n expect(',');\n }\n }\n }\n\n expect(']');\n\n return delegate.createArrayExpression(elements);\n }\n\n // 11.1.5 Object Initialiser\n\n function parseObjectPropertyKey() {\n var token;\n\n skipWhitespace();\n token = lex();\n\n // Note: This function is called only from parseObjectProperty(), where\n // EOF and Punctuator tokens are already filtered out.\n if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {\n return delegate.createLiteral(token);\n }\n\n return delegate.createIdentifier(token.value);\n }\n\n function parseObjectProperty() {\n var token, key;\n\n token = lookahead;\n skipWhitespace();\n\n if (token.type === Token.EOF || token.type === Token.Punctuator) {\n throwUnexpected(token);\n }\n\n key = parseObjectPropertyKey();\n expect(':');\n return delegate.createProperty('init', key, parseExpression());\n }\n\n function parseObjectInitialiser() {\n var properties = [];\n\n expect('{');\n\n while (!match('}')) {\n properties.push(parseObjectProperty());\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n\n return delegate.createObjectExpression(properties);\n }\n\n // 11.1.6 The Grouping Operator\n\n function parseGroupExpression() {\n var expr;\n\n expect('(');\n\n expr = parseExpression();\n\n expect(')');\n\n return expr;\n }\n\n\n // 11.1 Primary Expressions\n\n function parsePrimaryExpression() {\n var type, token, expr;\n\n if (match('(')) {\n return parseGroupExpression();\n }\n\n type = lookahead.type;\n\n if (type === Token.Identifier) {\n expr = delegate.createIdentifier(lex().value);\n } else if (type === Token.StringLiteral || type === Token.NumericLiteral) {\n expr = delegate.createLiteral(lex());\n } else if (type === Token.Keyword) {\n if (matchKeyword('this')) {\n lex();\n expr = delegate.createThisExpression();\n }\n } else if (type === Token.BooleanLiteral) {\n token = lex();\n token.value = (token.value === 'true');\n expr = delegate.createLiteral(token);\n } else if (type === Token.NullLiteral) {\n token = lex();\n token.value = null;\n expr = delegate.createLiteral(token);\n } else if (match('[')) {\n expr = parseArrayInitialiser();\n } else if (match('{')) {\n expr = parseObjectInitialiser();\n }\n\n if (expr) {\n return expr;\n }\n\n throwUnexpected(lex());\n }\n\n // 11.2 Left-Hand-Side Expressions\n\n function parseArguments() {\n var args = [];\n\n expect('(');\n\n if (!match(')')) {\n while (index < length) {\n args.push(parseExpression());\n if (match(')')) {\n break;\n }\n expect(',');\n }\n }\n\n expect(')');\n\n return args;\n }\n\n function parseNonComputedProperty() {\n var token;\n\n token = lex();\n\n if (!isIdentifierName(token)) {\n throwUnexpected(token);\n }\n\n return delegate.createIdentifier(token.value);\n }\n\n function parseNonComputedMember() {\n expect('.');\n\n return parseNonComputedProperty();\n }\n\n function parseComputedMember() {\n var expr;\n\n expect('[');\n\n expr = parseExpression();\n\n expect(']');\n\n return expr;\n }\n\n function parseLeftHandSideExpression() {\n var expr, property;\n\n expr = parsePrimaryExpression();\n\n while (match('.') || match('[')) {\n if (match('[')) {\n property = parseComputedMember();\n expr = delegate.createMemberExpression('[', expr, property);\n } else {\n property = parseNonComputedMember();\n expr = delegate.createMemberExpression('.', expr, property);\n }\n }\n\n return expr;\n }\n\n // 11.3 Postfix Expressions\n\n var parsePostfixExpression = parseLeftHandSideExpression;\n\n // 11.4 Unary Operators\n\n function parseUnaryExpression() {\n var token, expr;\n\n if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {\n expr = parsePostfixExpression();\n } else if (match('+') || match('-') || match('!')) {\n token = lex();\n expr = parseUnaryExpression();\n expr = delegate.createUnaryExpression(token.value, expr);\n } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {\n throwError({}, Messages.UnexpectedToken);\n } else {\n expr = parsePostfixExpression();\n }\n\n return expr;\n }\n\n function binaryPrecedence(token) {\n var prec = 0;\n\n if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {\n return 0;\n }\n\n switch (token.value) {\n case '||':\n prec = 1;\n break;\n\n case '&&':\n prec = 2;\n break;\n\n case '==':\n case '!=':\n case '===':\n case '!==':\n prec = 6;\n break;\n\n case '<':\n case '>':\n case '<=':\n case '>=':\n case 'instanceof':\n prec = 7;\n break;\n\n case 'in':\n prec = 7;\n break;\n\n case '+':\n case '-':\n prec = 9;\n break;\n\n case '*':\n case '/':\n case '%':\n prec = 11;\n break;\n\n default:\n break;\n }\n\n return prec;\n }\n\n // 11.5 Multiplicative Operators\n // 11.6 Additive Operators\n // 11.7 Bitwise Shift Operators\n // 11.8 Relational Operators\n // 11.9 Equality Operators\n // 11.10 Binary Bitwise Operators\n // 11.11 Binary Logical Operators\n\n function parseBinaryExpression() {\n var expr, token, prec, stack, right, operator, left, i;\n\n left = parseUnaryExpression();\n\n token = lookahead;\n prec = binaryPrecedence(token);\n if (prec === 0) {\n return left;\n }\n token.prec = prec;\n lex();\n\n right = parseUnaryExpression();\n\n stack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead)) > 0) {\n\n // Reduce: make a binary expression from the three topmost entries.\n while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n expr = delegate.createBinaryExpression(operator, left, right);\n stack.push(expr);\n }\n\n // Shift.\n token = lex();\n token.prec = prec;\n stack.push(token);\n expr = parseUnaryExpression();\n stack.push(expr);\n }\n\n // Final reduce to clean-up the stack.\n i = stack.length - 1;\n expr = stack[i];\n while (i > 1) {\n expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr);\n i -= 2;\n }\n\n return expr;\n }\n\n\n // 11.12 Conditional Operator\n\n function parseConditionalExpression() {\n var expr, consequent, alternate;\n\n expr = parseBinaryExpression();\n\n if (match('?')) {\n lex();\n consequent = parseConditionalExpression();\n expect(':');\n alternate = parseConditionalExpression();\n\n expr = delegate.createConditionalExpression(expr, consequent, alternate);\n }\n\n return expr;\n }\n\n // Simplification since we do not support AssignmentExpression.\n var parseExpression = parseConditionalExpression;\n\n // Polymer Syntax extensions\n\n // Filter ::\n // Identifier\n // Identifier \"(\" \")\"\n // Identifier \"(\" FilterArguments \")\"\n\n function parseFilter() {\n var identifier, args;\n\n identifier = lex();\n\n if (identifier.type !== Token.Identifier) {\n throwUnexpected(identifier);\n }\n\n args = match('(') ? parseArguments() : [];\n\n return delegate.createFilter(identifier.value, args);\n }\n\n // Filters ::\n // \"|\" Filter\n // Filters \"|\" Filter\n\n function parseFilters() {\n while (match('|')) {\n lex();\n parseFilter();\n }\n }\n\n // TopLevel ::\n // LabelledExpressions\n // AsExpression\n // InExpression\n // FilterExpression\n\n // AsExpression ::\n // FilterExpression as Identifier\n\n // InExpression ::\n // Identifier, Identifier in FilterExpression\n // Identifier in FilterExpression\n\n // FilterExpression ::\n // Expression\n // Expression Filters\n\n function parseTopLevel() {\n skipWhitespace();\n peek();\n\n var expr = parseExpression();\n if (expr) {\n if (lookahead.value === ',' || lookahead.value == 'in' &&\n expr.type === Syntax.Identifier) {\n parseInExpression(expr);\n } else {\n parseFilters();\n if (lookahead.value === 'as') {\n parseAsExpression(expr);\n } else {\n delegate.createTopLevel(expr);\n }\n }\n }\n\n if (lookahead.type !== Token.EOF) {\n throwUnexpected(lookahead);\n }\n }\n\n function parseAsExpression(expr) {\n lex(); // as\n var identifier = lex().value;\n delegate.createAsExpression(expr, identifier);\n }\n\n function parseInExpression(identifier) {\n var indexName;\n if (lookahead.value === ',') {\n lex();\n if (lookahead.type !== Token.Identifier)\n throwUnexpected(lookahead);\n indexName = lex().value;\n }\n\n lex(); // in\n var expr = parseExpression();\n parseFilters();\n delegate.createInExpression(identifier.name, indexName, expr);\n }\n\n function parse(code, inDelegate) {\n delegate = inDelegate;\n source = code;\n index = 0;\n length = source.length;\n lookahead = null;\n state = {\n labelSet: {}\n };\n\n return parseTopLevel();\n }\n\n global.esprima = {\n parse: parse\n };\n})(this);\n","// Copyright 2013 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function (global) {\n 'use strict';\n\n // JScript does not have __proto__. We wrap all object literals with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n function prepareBinding(expressionText, name, node, filterRegistry) {\n var expression;\n try {\n expression = getExpression(expressionText);\n if (expression.scopeIdent &&\n (node.nodeType !== Node.ELEMENT_NODE ||\n node.tagName !== 'TEMPLATE' ||\n (name !== 'bind' && name !== 'repeat'))) {\n throw Error('as and in can only be used within <template bind/repeat>');\n }\n } catch (ex) {\n console.error('Invalid expression syntax: ' + expressionText, ex);\n return;\n }\n\n return function(model, node) {\n var binding = expression.getBinding(model, filterRegistry);\n if (expression.scopeIdent && binding) {\n node.polymerExpressionScopeIdent_ = expression.scopeIdent;\n if (expression.indexIdent)\n node.polymerExpressionIndexIdent_ = expression.indexIdent;\n }\n\n return binding;\n }\n }\n\n // TODO(rafaelw): Implement simple LRU.\n var expressionParseCache = Object.create(null);\n\n function getExpression(expressionText) {\n var expression = expressionParseCache[expressionText];\n if (!expression) {\n var delegate = new ASTDelegate();\n esprima.parse(expressionText, delegate);\n expression = new Expression(delegate);\n expressionParseCache[expressionText] = expression;\n }\n return expression;\n }\n\n function Literal(value) {\n this.value = value;\n }\n\n Literal.prototype = {\n valueFn: function() {\n var value = this.value;\n return function() { return value; };\n }\n }\n\n function IdentPath(delegate, name, last) {\n this.delegate = delegate;\n this.name = name;\n this.last = last;\n }\n\n IdentPath.prototype = {\n getPath: function() {\n if (!this.path_) {\n if (this.last)\n this.path_ = Path.get(this.last.getPath() + '.' + this.name);\n else\n this.path_ = Path.get(this.name);\n }\n return this.path_;\n },\n\n valueFn: function() {\n if (!this.valueFn_) {\n var path = this.getPath();\n var index = this.delegate.deps[path];\n if (index === undefined) {\n index = this.delegate.deps[path] = this.delegate.depsList.length;\n this.delegate.depsList.push(path);\n }\n\n var depsList = this.delegate.depsList;\n this.valueFn_ = function(values) {\n return depsList.length === 1 ? values : values[index];\n }\n }\n\n return this.valueFn_;\n },\n\n setValue: function(model, newValue) {\n return this.getPath().setValueFrom(model, newValue);\n }\n };\n\n function MemberExpression(object, property) {\n this.object = object;\n this.property = property;\n }\n\n MemberExpression.prototype = {\n valueFn: function() {\n var object = this.object;\n var property = this.property;\n return function(values) {\n return object(values)[property(values)];\n };\n },\n\n setValue: function(object, newValue, depsValues) {\n object = this.object(depsValues);\n var property = this.property(depsValues);\n return object[property] = newValue;\n }\n };\n\n function Filter(name, args) {\n this.name = name;\n this.args = [];\n for (var i = 0; i < args.length; i++) {\n this.args[i] = getFn(args[i]);\n }\n }\n\n Filter.prototype = {\n transform: function(value, depsValues, toModelDirection, filterRegistry,\n context) {\n var fn = filterRegistry[this.name];\n if (fn) {\n context = undefined;\n } else {\n fn = context[this.name];\n if (!fn) {\n console.error('Cannot find filter: ' + this.name);\n return;\n }\n }\n\n // If toModelDirection is falsey, then the \"normal\" (dom-bound) direction\n // is used. Otherwise, it looks for a 'toModel' property function on the\n // object.\n if (toModelDirection) {\n fn = fn.toModel;\n } else if (typeof fn.toDOM == 'function') {\n fn = fn.toDOM;\n }\n\n if (typeof fn != 'function') {\n console.error('No ' + (toModelDirection ? 'toModel' : 'toDOM') +\n ' found on' + this.name);\n return;\n }\n\n var args = [value];\n for (var i = 0; i < this.args.length; i++) {\n args[i + 1] = getFn(this.args[i])(depsValues);\n }\n\n return fn.apply(context, args);\n }\n };\n\n function notImplemented() { throw Error('Not Implemented'); }\n\n var unaryOperators = {\n '+': function(v) { return +v; },\n '-': function(v) { return -v; },\n '!': function(v) { return !v; }\n };\n\n var binaryOperators = {\n '+': function(l, r) { return l+r; },\n '-': function(l, r) { return l-r; },\n '*': function(l, r) { return l*r; },\n '/': function(l, r) { return l/r; },\n '%': function(l, r) { return l%r; },\n '<': function(l, r) { return l<r; },\n '>': function(l, r) { return l>r; },\n '<=': function(l, r) { return l<=r; },\n '>=': function(l, r) { return l>=r; },\n '==': function(l, r) { return l==r; },\n '!=': function(l, r) { return l!=r; },\n '===': function(l, r) { return l===r; },\n '!==': function(l, r) { return l!==r; },\n '&&': function(l, r) { return l&&r; },\n '||': function(l, r) { return l||r; },\n };\n\n function getFn(arg) {\n return typeof arg == 'function' ? arg : arg.valueFn();\n }\n\n function ASTDelegate() {\n this.expression = null;\n this.filters = [];\n this.deps = {};\n this.depsList = [];\n this.currentPath = undefined;\n this.scopeIdent = undefined;\n this.indexIdent = undefined;\n }\n\n ASTDelegate.prototype = {\n createUnaryExpression: function(op, argument) {\n if (!unaryOperators[op])\n throw Error('Disallowed operator: ' + op);\n\n argument = getFn(argument);\n\n return function(values) {\n return unaryOperators[op](argument(values));\n };\n },\n\n createBinaryExpression: function(op, left, right) {\n if (!binaryOperators[op])\n throw Error('Disallowed operator: ' + op);\n\n left = getFn(left);\n right = getFn(right);\n\n return function(values) {\n return binaryOperators[op](left(values), right(values));\n };\n },\n\n createConditionalExpression: function(test, consequent, alternate) {\n test = getFn(test);\n consequent = getFn(consequent);\n alternate = getFn(alternate);\n\n return function(values) {\n return test(values) ? consequent(values) : alternate(values);\n }\n },\n\n createIdentifier: function(name) {\n var ident = new IdentPath(this, name);\n ident.type = 'Identifier';\n return ident;\n },\n\n createMemberExpression: function(accessor, object, property) {\n if (object instanceof IdentPath) {\n if (accessor == '.')\n return new IdentPath(this, property.name, object);\n\n if (property instanceof Literal && Path.get(property.value).valid)\n return new IdentPath(this, property.value, object);\n }\n\n return new MemberExpression(getFn(object), getFn(property));\n },\n\n createLiteral: function(token) {\n return new Literal(token.value);\n },\n\n createArrayExpression: function(elements) {\n for (var i = 0; i < elements.length; i++)\n elements[i] = getFn(elements[i]);\n\n return function(values) {\n var arr = []\n for (var i = 0; i < elements.length; i++)\n arr.push(elements[i](values));\n return arr;\n }\n },\n\n createProperty: function(kind, key, value) {\n return {\n key: key instanceof IdentPath ? key.name : key.value,\n value: value\n };\n },\n\n createObjectExpression: function(properties) {\n for (var i = 0; i < properties.length; i++)\n properties[i].value = getFn(properties[i].value);\n\n return function(values) {\n var obj = {};\n for (var i = 0; i < properties.length; i++)\n obj[properties[i].key] = properties[i].value(values);\n return obj;\n }\n },\n\n createFilter: function(name, args) {\n this.filters.push(new Filter(name, args));\n },\n\n createAsExpression: function(expression, scopeIdent) {\n this.expression = expression;\n this.scopeIdent = scopeIdent;\n },\n\n createInExpression: function(scopeIdent, indexIdent, expression) {\n this.expression = expression;\n this.scopeIdent = scopeIdent;\n this.indexIdent = indexIdent;\n },\n\n createTopLevel: function(expression) {\n this.expression = expression;\n },\n\n createThisExpression: notImplemented\n }\n\n function Expression(delegate) {\n this.scopeIdent = delegate.scopeIdent;\n this.indexIdent = delegate.indexIdent;\n\n if (!delegate.expression)\n throw Error('No expression found.');\n\n this.expression = delegate.expression;\n getFn(this.expression); // forces enumeration of path dependencies\n\n this.paths = delegate.depsList;\n this.filters = delegate.filters;\n }\n\n Expression.prototype = {\n getBinding: function(model, filterRegistry) {\n var paths = this.paths;\n if (!paths.length) {\n // only literals in expression.\n return { value: this.getValue(undefined, filterRegistry, model) };\n }\n\n var self = this;\n function valueFn(values) {\n return self.getValue(values, filterRegistry, model);\n }\n\n function setValueFn(newValue) {\n var values;\n if (self.paths.length == 1) {\n // In the singular-dep case, a PathObserver is used and the callback\n // is a scalar value.\n values = self.paths[0].getValueFrom(model);\n } else {\n // Multiple-deps uses a CompoundPathObserver whose callback is an\n // array of values.\n values = [];\n for (var i = 0; i < self.paths.length; i++) {\n values[i] = self.paths[i].getValueFrom(model);\n }\n }\n\n self.setValue(model, newValue, values, filterRegistry, model);\n }\n\n if (paths.length === 1) {\n return new PathObserver(model, paths[0], undefined, undefined, valueFn,\n setValueFn);\n }\n\n var binding = new CompoundPathObserver(undefined, undefined, valueFn,\n setValueFn);\n\n for (var i = 0; i < paths.length; i++) {\n binding.addPath(model, paths[i]);\n }\n\n binding.start();\n return binding;\n },\n\n getValue: function(depsValues, filterRegistry, context) {\n var value = getFn(this.expression)(depsValues);\n for (var i = 0; i < this.filters.length; i++) {\n value = this.filters[i].transform(value, depsValues, false,\n filterRegistry,\n context);\n }\n\n return value;\n },\n\n setValue: function(model, newValue, depsValues, filterRegistry, context) {\n var count = this.filters ? this.filters.length : 0;\n while (count-- > 0) {\n newValue = this.filters[count].transform(newValue, depsValues, true,\n filterRegistry,\n context);\n }\n\n if (this.expression.setValue)\n return this.expression.setValue(model, newValue, depsValues);\n }\n }\n\n /**\n * Converts a style property name to a css property name. For example:\n * \"WebkitUserSelect\" to \"-webkit-user-select\"\n */\n function convertStylePropertyName(name) {\n return String(name).replace(/[A-Z]/g, function(c) {\n return '-' + c.toLowerCase();\n });\n }\n\n function PolymerExpressions() {}\n\n PolymerExpressions.prototype = {\n // \"built-in\" filters\n styleObject: function(value) {\n var parts = [];\n for (var key in value) {\n parts.push(convertStylePropertyName(key) + ': ' + value[key]);\n }\n return parts.join('; ');\n },\n\n tokenList: function(value) {\n var tokens = [];\n for (var key in value) {\n if (value[key])\n tokens.push(key);\n }\n return tokens.join(' ');\n },\n\n // binding delegate API\n prepareInstancePositionChanged: function(template) {\n var indexIdent = template.polymerExpressionIndexIdent_;\n if (!indexIdent)\n return;\n\n return function(templateInstance, index) {\n templateInstance.model[indexIdent] = index;\n };\n },\n\n prepareBinding: function(pathString, name, node) {\n if (Path.get(pathString).valid)\n return; // bail out early if pathString is simple path.\n\n return prepareBinding(pathString, name, node, this);\n },\n\n prepareInstanceModel: function(template) {\n var scopeName = template.polymerExpressionScopeIdent_;\n if (!scopeName)\n return;\n\n var parentScope = template.templateInstance ?\n template.templateInstance.model :\n template.model;\n\n return function(model) {\n var scope = Object.create(parentScope);\n scope[scopeName] = model;\n return scope;\n };\n }\n };\n\n global.PolymerExpressions = PolymerExpressions;\n\n})(this);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textContent = 'template {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChild);\n\n// flush (with logging)\nvar flushing;\nfunction flush() {\n if (!flushing) {\n flushing = true;\n scope.endOfMicrotask(function() {\n flushing = false;\n logFlags.data && console.group('Platform.flush()');\n scope.performMicrotaskCheckpoint();\n logFlags.data && console.groupEnd();\n });\n }\n};\n\n// polling dirty checker\nvar FLUSH_POLL_INTERVAL = 125;\nwindow.addEventListener('WebComponentsReady', function() {\n flush();\n // flush periodically if platform does not have object observe.\n if (!Observer.hasObjectObserve) {\n scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);\n }\n});\n\n\nif (window.CustomElements && !CustomElements.useNative) {\n var originalImportNode = Document.prototype.importNode;\n Document.prototype.importNode = function(node, deep) {\n var imported = originalImportNode.call(this, node, deep);\n CustomElements.upgradeAll(imported);\n return imported;\n }\n}\n\n// exports\nscope.flush = flush;\n\n})(window.Platform);\n\n"]} \ No newline at end of file