| 1 {"version":3,"file":"build/polymer.js","sources":["src/polymer.js","src/boot.js"
,"src/lib/lang.js","src/lib/job.js","src/lib/dom.js","src/lib/super.js","src/lib
/deserialize.js","src/api.js","src/instance/utils.js","src/instance/events.js","
src/instance/attributes.js","src/instance/properties.js","src/instance/mdv.js","
src/instance/base.js","src/instance/styles.js","src/declaration/path.js","src/de
claration/styles.js","src/declaration/events.js","src/declaration/properties.js"
,"src/declaration/attributes.js","src/declaration/prototype.js","src/declaration
/polymer-element.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,WC
KA,kBAAA,QAAA,UACA,YCNA,SAAA,GAGA,QAAA,GAAA,EAAA,GAiBA,MAhBA,IAAA,GAEA,OAAA,oBAA
A,GAAA,QAAA,SAAA,GAEA,GAAA,GAAA,OAAA,yBAAA,EAAA,EACA,KAEA,OAAA,eAAA,EAAA,EAAA,GA
EA,kBAAA,GAAA,QAEA,EAAA,MAAA,IAAA,MAKA,EAKA,EAAA,OAAA,GAEA,SC1BA,SAAA,GAiCA,QAAA
,GAAA,EAAA,EAAA,GAOA,MANA,GACA,EAAA,OAEA,EAAA,GAAA,GAAA,MAEA,EAAA,GAAA,EAAA,GACA
,EA7BA,GAAA,GAAA,SAAA,GACA,KAAA,QAAA,EAEA,GAAA,WACA,GAAA,SAAA,EAAA,GACA,KAAA,SAA
A,EACA,KAAA,OAAA,WAAA,KAAA,SAAA,KAAA,MAAA,IAEA,KAAA,WACA,KAAA,SACA,aAAA,KAAA,QAC
A,KAAA,OAAA,OAGA,SAAA,WACA,KAAA,SACA,KAAA,OACA,KAAA,SAAA,KAAA,KAAA,YAiBA,EAAA,IA
AA,GAEA,SChDA,WAEA,GAAA,KAEA,aAAA,SAAA,SAAA,EAAA,GACA,EAAA,GAAA,GAIA,YAAA,mBAAA,
SAAA,GACA,GAAA,GAAA,EAAA,EAAA,GAAA,YAAA,SAEA,OAAA,IAAA,OAAA,eAAA,SAAA,cAAA,IAIA,
IAAA,GA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A,mBAAA,KAUA,SAAA,SAAA,MACA
,EAAA,WACA,KAAA,UAAA,IACA,KAAA,OAEA,KAAA,UAAA,MAGA,UAAA,SAAA,GAEA,KAAA,SAAA,KAAA
,KAAA,GAGA,EAAA,KAAA,OAEA,oBAAA,SAAA,GACA,IAAA,EAAA,GAAA,CAIA,GAFA,EAAA,GAAA,KAE
A,KAAA,aAAA,YAOA,GAAA,OAAA,iBAAA,eAAA,UACA,EAAA,OACA,CACA,GAAA,GAAA,SAAA,cAAA,SA
CA,GAAA,YAAA,YAAA,EAAA,MACA,KAAA,YAAA,GAGA,OAAA,IAGA,mBAAA,SAAA,GAEA,MAAA,IAAA,E
AAA,QAAA,MAAA,IAEA,EAAA,KACA,EAAA,GAAA,EAAA,QAAA,KAAA,OACA,GAJA,SAaA,QAAA,KAAA,G
AAA,QAAA,SAAA,GACA,EAAA,EAAA,EAAA,KAMA,IAAA,MAOA,KAUA,KAeA,IAgBA,GAAA,uBAAA,EAOA
,EAAA,EAAA,GAEA,OAAA,QAAA,EAGA,SAAA,SAAA,mBAAA,UAAA,KACA","sourcesContent":["/*\
n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this sou
rce code is governed by a BSD-style\n * license that can be found in the LICENSE
file.\n */\nPolymer = {};\n","/*\n * Copyright 2013 The Polymer Authors. All ri
ghts reserved.\n * Use of this source code is governed by a BSD-style\n * licens
e that can be found in the LICENSE file.\n */\n\n\n// TODO(sorvell): this ensure
s Polymer is an object and not a function\n// Platform is currently defining it
as a function to allow for async loading\n// of polymer; once we refine the load
ing process this likely goes away.\nif (typeof window.Polymer === 'function') {\
n Polymer = {};\n}","/*\n * Copyright 2013 The Polymer Authors. All rights rese
rved.\n * Use of this source code is governed by a BSD-style\n * license that ca
n be found in the LICENSE file.\n */\n(function(scope) {\n\n // copy own proper
ties from 'api' to 'prototype, with name hinting for 'super'\n function extend(
prototype, api) {\n if (prototype && api) {\n // use only own properties
of 'api'\n Object.getOwnPropertyNames(api).forEach(function(n) {\n
// acquire property descriptor\n var pd = Object.getOwnPropertyDescriptor
(api, n);\n if (pd) {\n // clone property via descriptor\n
Object.defineProperty(prototype, n, pd);\n // cache name-of-method
for 'super' engine\n if (typeof pd.value == 'function') {\n
// hint the 'super' engine\n pd.value.nom = n;\n }\n
}\n });\n }\n return prototype;\n }\n \n // exports\n\n scope.ext
end = extend;\n\n})(Polymer);\n","/* \n * Copyright 2013 The Polymer Authors. Al
l rights reserved.\n * Use of this source code is governed by a BSD-style\n * li
cense that can be found in the LICENSE file.\n */\n\n(function(scope) {\n \n /
/ usage\n \n // invoke cb.call(this) in 100ms, unless the job is re-registered
,\n // which resets the timer\n // \n // this.myJob = this.job(this.myJob, cb
, 100)\n //\n // returns a job handle which can be used to re-register a job\n
\n var Job = function(inContext) {\n this.context = inContext;\n };\n Job.
prototype = {\n go: function(callback, wait) {\n this.callback = callbac
k;\n this.handle = setTimeout(this.complete.bind(this), wait);\n },\n
stop: function() {\n if (this.handle) {\n clearTimeout(this.handle)
;\n this.handle = null;\n }\n },\n complete: function() {\n
if (this.handle) {\n this.stop();\n this.callback.call(this.con
text);\n }\n }\n };\n \n function job(job, callback, wait) {\n if
(job) {\n job.stop();\n } else {\n job = new Job(this);\n }\n
job.go(callback, wait);\n return job;\n }\n \n // exports \n\n scope.job
= job;\n \n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rig
hts 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 var regist
ry = {};\n\n HTMLElement.register = function(tag, prototype) {\n registry[ta
g] = prototype;\n }\n\n // get prototype mapped to node <tag>\n HTMLElement.g
etPrototypeForTag = function(tag) {\n var prototype = !tag ? HTMLElement.prot
otype : registry[tag];\n // TODO(sjmiles): creating <tag> is likely to have w
asteful side-effects\n return prototype || Object.getPrototypeOf(document.cre
ateElement(tag));\n };\n\n // we have to flag propagation stoppage for the eve
nt dispatcher\n var originalStopPropagation = Event.prototype.stopPropagation;\
n Event.prototype.stopPropagation = function() {\n this.cancelBubble = true;
\n originalStopPropagation.apply(this, arguments);\n };\n \n HTMLImports.i
mporter.preloadSelectors += \n ', polymer-element link[rel=stylesheet]';\n\
n})(Polymer);\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 // super\n\n // `a
rrayOfArgs` is an optional array of args like one might pass\n // to `Functio
n.apply`\n\n // TODO(sjmiles):\n // $super must be installed on an inst
ance or prototype chain\n // as `super`, and invoked via `this`, e.g.\n
// `this.super();`\n \n // will not work if function objects are
not unique, for example,\n // when using mixins.\n // The memoizati
on strategy assumes each function exists on only one \n // prototype chain
i.e. we use the function object for memoizing)\n // perhaps we can bookke
ep on the prototype itself instead\n function $super(arrayOfArgs) {\n //
since we are thunking a method call, performance is important here: \n //
memoize all lookups, once memoized the fast path calls no other \n // funct
ions\n //\n // find the caller (cannot be `strict` because of 'caller'
)\n var caller = $super.caller;\n // memoized 'name of method' \n
var nom = caller.nom;\n // memoized next implementation prototype\n v
ar _super = caller._super;\n if (!_super) {\n if (!nom) {\n
nom = caller.nom = nameInThis.call(this, caller);\n }\n if (!nom)
{\n console.warn('called super() on a method not installed declarative
ly (has no .nom property)');\n }\n // super prototype is either ca
ched or we have to find it\n // by searching __proto__ (at the 'top')\n
_super = memoizeSuper(caller, nom, getPrototypeOf(this));\n }\n
if (!_super) {\n // if _super is falsey, there is no super implementation
\n //console.warn('called $super(' + nom + ') where there is no super imp
lementation');\n } else {\n // our super function\n var fn =
_super[nom];\n // memoize information so 'fn' can call 'super'\n i
f (!fn._super) {\n memoizeSuper(fn, nom, _super);\n }\n /
/ invoke the inherited method\n // if 'fn' is not function valued, this w
ill throw\n return fn.apply(this, arrayOfArgs || []);\n }\n }\n\n
function nextSuper(proto, name, caller) {\n // look for an inherited pr
ototype that implements name\n while (proto) {\n if ((proto[name] !=
= caller) && proto[name]) {\n return proto;\n }\n proto =
getPrototypeOf(proto);\n }\n }\n\n function memoizeSuper(method, nam
e, proto) {\n // find and cache next prototype containing `name`\n //
we need the prototype so we can do another lookup\n // from here\n met
hod._super = nextSuper(proto, name, method);\n if (method._super) {\n
// _super is a prototype, the actual method is _super[name]\n // tag su
per method with it's name for further lookups\n method._super[name].nom =
name;\n }\n return method._super;\n }\n\n function nameInThis(v
alue) {\n var p = this.__proto__;\n while (p && p !== HTMLElement.prot
otype) {\n // TODO(sjmiles): getOwnPropertyNames is absurdly expensive\n
var n$ = Object.getOwnPropertyNames(p);\n for (var i=0, l=n$.lengt
h, n; i<l && (n=n$[i]); i++) {\n var d = Object.getOwnPropertyDescripto
r(p, n);\n if (typeof d.value === 'function' && d.value === value) {\n
return n;\n }\n }\n p = p.__proto__;\n }\
n }\n\n // NOTE: In some platforms (IE10) the prototype chain is faked via
\n // __proto__. Therefore, always get prototype via __proto__ instead of\n
// the more standard Object.getPrototypeOf.\n function getPrototypeOf(prot
otype) {\n return prototype.__proto__;\n }\n\n // utility function to
precompute name tags for functions\n // in a (unchained) prototype\n func
tion hintSuper(prototype) {\n // tag functions with their prototype name to
optimize\n // super call invocations\n for (var n in prototype) {\n
var pd = Object.getOwnPropertyDescriptor(prototype, n);\n if (pd &&
typeof pd.value === 'function') {\n pd.value.nom = n;\n }\n
}\n }\n\n // exports\n\n scope.super = $super;\n\n})(Polymer);\n","/*
\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this s
ource code is governed by a BSD-style\n * license that can be found in the LICEN
SE file.\n */\n\n(function(scope) {\n\n var typeHandlers = {\n string: funct
ion(value) {\n return value;\n },\n date: function(value) {\n re
turn new Date(Date.parse(value) || Date.now());\n },\n boolean: function(v
alue) {\n if (value === '') {\n return true;\n }\n return
value === 'false' ? false : !!value;\n },\n number: function(value) {\n
var floatVal = parseFloat(value);\n return (String(floatVal) === value)
? floatVal : value;\n },\n object: function(value, currentValue) {\n
if (currentValue === null) {\n return value;\n }\n try {\n
// If the string is an object, we can parse is with the JSON library.\n
// include convenience replace for single-quotes. If the author omits\n
// quotes altogether, parse will fail.\n return JSON.parse(value.replace
(/'/g, '\"'));\n } catch(e) {\n // The object isn't valid JSON, retu
rn the raw value\n return value;\n }\n },\n // avoid deseriali
zation of functions\n 'function': function(value, currentValue) {\n retu
rn currentValue;\n }\n };\n\n function deserializeValue(value, currentValue
) {\n // attempt to infer type from default value\n var inferredType = typ
eof currentValue;\n // invent 'date' type value for Date\n if (currentValu
e instanceof Date) {\n inferredType = 'date';\n }\n // delegate deser
ialization via type string\n return typeHandlers[inferredType](value, current
Value);\n }\n\n // exports\n\n scope.deserializeValue = deserializeValue;\n\n
})(Polymer);\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 var api = {};\n\n api.
declaration = {};\n api.instance = {};\n\n // exports\n\n scope.api = api;\n\
n})(Polymer);\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 var utils = {\n /**
\n * Invokes a function asynchronously. The context of the callback\n
* function is bound to 'this' automatically.\n * @method async\n * @pa
ram {Function|String} method\n * @param {any|Array} args\n * @param {n
umber} timeout\n */\n async: function(method, args, timeout) {\n //
when polyfilling Object.observe, ensure changes \n // propagate before exe
cuting the async method\n Platform.flush();\n // second argument to `a
pply` must be an array\n args = (args && args.length) ? args : [args];\n
// function to invoke\n var fn = function() {\n (this[method] ||
method).apply(this, args);\n }.bind(this);\n // execute `fn` sooner or
later\n return timeout ? setTimeout(fn, timeout) : requestAnimationFrame(f
n);\n }, \n /**\n * Fire an event.\n * @method fire\n *
@param {string} type An event name.\n * @param detail\n * @param {Node
} toNode Target node.\n */\n fire: function(type, detail, toNode, bubble
s) {\n var node = toNode || this;\n //log.events && console.log('[%s]:
sending [%s]', node.localName, inType);\n node.dispatchEvent(\n new
CustomEvent(type, {\n bubbles: (bubbles !== undefined ? bubbles : true
), \n detail: detail\n }));\n return detail;\n },\n /
**\n * Fire an event asynchronously.\n * @method asyncFire\n * @p
aram {string} type An event name.\n * @param detail\n * @param {Node}
toNode Target node.\n */\n asyncFire: function(/*inType, inDetail*/) {\n
this.async(\"fire\", arguments);\n },\n /**\n * Remove class fr
om old, add class to anew, if they exist\n * @param classFollows\n * @
param anew A node.\n * @param old A node\n * @param className\n *
/\n classFollows: function(anew, old, className) {\n if (old) {\n
old.classList.remove(className);\n }\n if (anew) {\n anew.clas
sList.add(className);\n }\n }\n };\n\n // deprecated\n\n utils.asyncM
ethod = utils.async;\n\n // exports\n\n scope.api.instance.utils = utils;\n\n}
)(Polymer);\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 f
ound in the LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n\n var lo
g = window.logFlags || {};\n\n // magic words\n\n var EVENT_PREFIX = 'on-';\n
var HANDLED_LIST = '__eventHandledList__';\n\n // instance events api\n\n var
events = {\n // read-only\n EVENT_PREFIX: EVENT_PREFIX,\n // event nam
e utilities\n hasEventPrefix: function (n) {\n return n && (n[0] === 'o'
) && (n[1] === 'n') && (n[2] === '-');\n },\n removeEventPrefix: function(
n) {\n return n.slice(prefixLength);\n },\n // event listeners on hos
t\n addHostListeners: function() {\n var events = this.eventDelegates;\n
log.events && (Object.keys(events).length > 0) && console.log('[%s] addHos
tListeners:', this.localName, events);\n this.addNodeListeners(this, events
, this.hostEventListener);\n },\n addNodeListeners: function(node, events,
listener) {\n // note: conditional inside loop as optimization\n // f
or empty 'events' object\n var fn;\n for (var n in events) {\n
if (!fn) {\n fn = listener.bind(this);\n }\n this.addNode
Listener(node, n, fn);\n }\n },\n addNodeListener: function(node, eve
nt, listener) {\n node.addEventListener(event, listener);\n },\n host
EventListener: function(event) {\n if (!event.cancelBubble) {\n log.
events && console.group(\"[%s]: hostEventListener(%s)\", this.localName, event.t
ype);\n var h = this.findEventDelegate(event);\n if (h) {\n
log.events && console.log('[%s] found host handler name [%s]', this.localName
, h);\n this.dispatchMethod(this, h, [event, event.detail, this]);\n
}\n log.events && console.groupEnd();\n }\n }, \n // fin
d the method name in delegates mapped to event.type\n findEventDelegate: func
tion(event) {\n return this.eventDelegates[event.type];\n },\n // cal
l 'method' or function method on 'obj' with 'args', if the method exists\n di
spatchMethod: function(obj, method, args) {\n if (obj) {\n log.event
s && console.group('[%s] dispatch [%s]', obj.localName, method);\n var fn
= typeof method === 'function' ? method : obj[method];\n if (fn) {\n
fn[args ? 'apply' : 'call'](obj, args);\n }\n log.events &&
console.groupEnd();\n Platform.flush();\n }\n },\n /*\n B
ind events via attributes of the form on-eventName.\n This method hooks int
o the model syntax and does adds event listeners as\n needed. By default, b
inding paths are always method names on the root\n model, the custom elemen
t in which the node exists. Adding a '@' in the\n path directs the event bi
nding to use the model path as the event listener.\n In both cases, the act
ual listener is attached to a generic method which\n evaluates the bound pa
th at event execution time. \n */\n prepareBinding: function(path, name, n
ode) {\n // if lhs an event prefix,\n if (events.hasEventPrefix(name))
{\n // provide an event-binding callback\n return function(model,
node) {\n log.events && console.log('event: [%s].%s => [%s].%s()\"', n
ode.localName, model.localName, path);\n var listener = function(event)
{\n var ctrlr = findController(node);\n if (ctrlr && ctrl
r.dispatchMethod) {\n var obj = ctrlr, method = path;\n
if (path[0] == '@') {\n obj = model;\n method =
Path.get(path.slice(1)).getValueFrom(model);\n }\n ctr
lr.dispatchMethod(obj, method, [event, event.detail, node]);\n }\n
};\n var eventName = events.removeEventPrefix(name);\n
node.addEventListener(eventName, listener, false);\n return {\n
close: function() {\n log.events && console.log('event.remove:
[%s].%s => [%s].%s()\"', node.localName, name, model.localName, path);\n
node.removeEventListener(eventName, listener, false);\n }\n
}\n };\n }\n }\n };\n\n var prefixLength = EVENT_PREFIX.l
ength;\n\n function findController(node) {\n while (node.parentNode) {\n
node = node.parentNode;\n }\n return node.host;\n };\n\n // exports\n\
n scope.api.instance.events = events;\n\n})(Polymer);\n","/*\r\n * Copyright 20
13 The Polymer Authors. All rights reserved.\r\n * Use of this source code is go
verned by a BSD-style\r\n * license that can be found in the LICENSE file.\r\n *
/\r\n(function(scope) {\r\n\r\n // instance api for attributes\r\n\r\n var att
ributes = {\r\n copyInstanceAttributes: function () {\r\n var a$ = this.
_instanceAttributes;\r\n for (var k in a$) {\r\n if (!this.hasAttrib
ute(k)) {\r\n this.setAttribute(k, a$[k]);\r\n }\r\n }\r\n
},\r\n // for each attribute on this, deserialize value to property as nee
ded\r\n takeAttributes: function() {\r\n // if we have no publish lookup
table, we have no attributes to take\r\n // TODO(sjmiles): ad hoc\r\n
if (this._publishLC) {\r\n for (var i=0, a$=this.attributes, l=a$.length
, a; (a=a$[i]) && i<l; i++) {\r\n this.attributeToProperty(a.name, a.va
lue);\r\n }\r\n }\r\n },\r\n // if attribute 'name' is mapped
to a property, deserialize\r\n // 'value' into that property\r\n attribute
ToProperty: function(name, value) {\r\n // try to match this attribute to a
property (attributes are\r\n // all lower-case, so this is case-insensitiv
e search)\r\n var name = this.propertyForAttribute(name);\r\n if (name
) {\r\n // filter out 'mustached' values, these are to be\r\n // r
eplaced with bound-data and are not yet values\r\n // themselves\r\n
if (value && value.search(scope.bindPattern) >= 0) {\r\n return;\r\n
}\r\n // get original value\r\n var currentValue = this[na
me];\r\n // deserialize Boolean or Number values from attribute\r\n
var value = this.deserializeValue(value, currentValue);\r\n // only act
if the value has changed\r\n if (value !== currentValue) {\r\n
// install new value (has side-effects)\r\n this[name] = value;\r\n
}\r\n }\r\n },\r\n // return the published property matching name
, or undefined\r\n propertyForAttribute: function(name) {\r\n var match
= this._publishLC && this._publishLC[name];\r\n //console.log('propertyForA
ttribute:', name, 'matches', match);\r\n return match;\r\n },\r\n //
convert representation of 'stringValue' based on type of 'currentValue'\r\n d
eserializeValue: function(stringValue, currentValue) {\r\n return scope.des
erializeValue(stringValue, currentValue);\r\n },\r\n serializeValue: funct
ion(value, inferredType) {\r\n if (inferredType === 'boolean') {\r\n
return value ? '' : undefined;\r\n } else if (inferredType !== 'object' &&
inferredType !== 'function'\r\n && value !== undefined) {\r\n r
eturn value;\r\n }\r\n },\r\n reflectPropertyToAttribute: function(na
me) {\r\n var inferredType = typeof this[name];\r\n // try to intellig
ently serialize property value\r\n var serializedValue = this.serializeValu
e(this[name], inferredType);\r\n // boolean properties must reflect as bool
ean attributes\r\n if (serializedValue !== undefined) {\r\n this.set
Attribute(name, serializedValue);\r\n // TODO(sorvell): we should remove
attr for all properties\r\n // that have undefined serialization; however
, we will need to\r\n // refine the attr reflection system to achieve thi
s; pica, for example,\r\n // relies on having inferredType object propert
ies not removed as\r\n // attrs.\r\n } else if (inferredType === 'bo
olean') {\r\n this.removeAttribute(name);\r\n }\r\n }\r\n };\r\n
\r\n // exports\r\n\r\n scope.api.instance.attributes = attributes;\r\n\r\n})(
Polymer);\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 f
ound in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var log
= window.logFlags || {};\n\n // magic words\n\n var OBSERVE_SUFFIX = 'Changed'
;\n\n // element api\n\n var empty = [];\n\n var properties = {\n observeP
roperties: function() {\n var n$ = this._observeNames, pn$ = this._publishN
ames;\n if ((n$ && n$.length) || (pn$ && pn$.length)) {\n var self =
this;\n var o = this._propertyObserver = generateCompoundPathObserver(th
is);\n for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {\n
o.addPath(this, n);\n // observer array properties\n var pd
= Object.getOwnPropertyDescriptor(this.__proto__, n);\n if (pd && pd.va
lue) {\n this.observeArrayValue(n, pd.value, null);\n }\n
}\n for (var i=0, l=pn$.length, n; (i<l) && (n=pn$[i]); i++) {\n
if (!this.observe || (this.observe[n] === undefined)) {\n o.add
Path(this, n);\n }\n }\n o.start();\n }\n },\n
notifyPropertyChanges: function(newValues, oldValues, changedBits, paths) {\n
var called = {};\n for (var i=0, l=changedBits.length, name, method; i<
l; i++) {\n if (changedBits[i]) {\n // note: paths is of form [o
bject, path, object, path]\n name = paths[2 * i + 1];\n if (th
is.publish[name] !== undefined) {\n this.reflectPropertyToAttribute(n
ame);\n }\n method = this.observe[name];\n if (method
) {\n this.observeArrayValue(name, newValues[i], oldValues[i]);\n
if (!called[method]) {\n called[method] = true;\n
// observes the value if it is an array\n this.invokeMethod(met
hod, [oldValues[i], newValues[i], arguments]);\n }\n }\n
}\n }\n },\n observeArrayValue: function(name, value, old) {\n
// we only care if there are registered side-effects\n var callbackName
= this.observe[name];\n if (callbackName) {\n // if we are observing
the previous value, stop\n if (Array.isArray(old)) {\n log.obse
rve && console.log('[%s] observeArrayValue: unregister observer [%s]', this.loca
lName, name);\n this.unregisterObserver(name + '__array');\n }\n
// if the new value is an array, being observing it\n if (Array.i
sArray(value)) {\n log.observe && console.log('[%s] observeArrayValue:
register observer [%s]', this.localName, name, value);\n var self = thi
s;\n var observer = new ArrayObserver(value, function(value, old) {\n
self.invokeMethod(callbackName, [old]);\n });\n this
.registerObserver(name + '__array', observer);\n }\n }\n },\n
bindProperty: function(property, model, path) {\n // apply Polymer two-way
reference binding\n return bindProperties(this, property, model, path);\n
},\n unbindAllProperties: function() {\n if (this._propertyObserver) {
\n this._propertyObserver.close();\n }\n this.unregisterObserve
rs();\n },\n unbindProperty: function(name) {\n return this.unregiste
rObserver(name);\n },\n invokeMethod: function(method, args) {\n var
fn = this[method] || method;\n if (typeof fn === 'function') {\n fn.
apply(this, args);\n }\n },\n // bookkeeping observers for memory man
agement\n registerObserver: function(name, observer) {\n var o$ = this._
observers || (this._observers = {});\n o$[name] = observer;\n },\n un
registerObserver: function(name) {\n var o$ = this._observers;\n if (o
$ && o$[name]) {\n o$[name].close();\n o$[name] = null;\n r
eturn true;\n }\n },\n unregisterObservers: function() {\n if (t
his._observers) {\n var keys=Object.keys(this._observers);\n for (
var i=0, l=keys.length, k, o; (i < l) && (k=keys[i]); i++) {\n o = this
._observers[k];\n o.close();\n }\n this._observers = {};\
n }\n }\n };\n\n // compound path observer\n function generateCompoun
dPathObserver(element) {\n return new CompoundPathObserver(element.notifyProp
ertyChanges, element);\n }\n\n // property binding\n // bind a property in A
to a path in B by converting A[property] to a\n // getter/setter pair that acce
sses B[...path...]\n function bindProperties(inA, inProperty, inB, inPath) {\n
log.bind && console.log(LOG_BIND_PROPS, inB.localName || 'object', inPath, in
A.localName, inProperty);\n // capture A's value if B's value is null or unde
fined,\n // otherwise use B's value\n var path = Path.get(inPath);\n va
r v = path.getValueFrom(inB);\n if (v === null || v === undefined) {\n p
ath.setValueFrom(inB, inA[inProperty]);\n }\n return PathObserver.definePr
operty(inA, inProperty, inB, inPath);\n }\n\n // logging\n var LOG_OBSERVE =
'[%s] watching [%s]';\n var LOG_OBSERVED = '[%s#%s] watch: [%s] now [%s] was [%
s]';\n var LOG_CHANGED = '[%s#%s] propertyChanged: [%s] now [%s] was [%s]';\n
var LOG_BIND_PROPS = \"[%s]: bindProperties: [%s] to [%s].[%s]\";\n\n // export
s\n\n scope.api.instance.properties = properties;\n\n})(Polymer);\n","/*\n * Co
pyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source co
de is governed by a BSD-style\n * license that can be found in the LICENSE file.
\n */\n(function(scope) {\n\n // imports\n\n var log = window.logFlags || 0;\n
var events = scope.api.instance.events;\n\n // expressionista\n\n // TODO(so
rvell): we're patching the syntax while evaluating\n // event bindings. we'll m
ove this to a better spot when that's done.\n var _prepareBinding = PolymerExpr
essions.prototype.prepareBinding;\n // <[node] [name] = {{path}}>\n PolymerExp
ressions.prototype.prepareBinding = function(path, name, node) {\n // if not
an event, delegate to the standard syntax\n return events.prepareBinding(path
, name, node)\n || _prepareBinding.call(this, path, name, node);\n };\n\
n var syntax = new PolymerExpressions();\n\n // element api supporting mdv\n\n
var mdv = {\n syntax: syntax,\n instanceTemplate: function(template) {\n
template.bindingDelegate = this.syntax;\n return template.createInsta
nce(this);\n },\n bind: function(name, model, path) {\n // note: bind
ing is a prepare signal. This allows us to be sure that any\n // property c
hanges that occur as a result of binding will be observed.\n if (!this._ele
mentPrepared) {\n this.prepareElement();\n }\n var property = t
his.propertyForAttribute(name);\n if (!property) {\n return this.sup
er(arguments);\n } else {\n // clean out the closets\n this.u
nbind(name);\n // use n-way Polymer binding\n var observer = this.
bindProperty(property, model, path);\n // stick path on observer so it's
available via this.bindings\n observer.path = path;\n // reflect b
ound property to attribute when binding\n // to ensure binding is not lef
t on attribute if property\n // does not update due to not changing.\n
this.reflectPropertyToAttribute(property);\n return this.bindings[na
me] = observer;\n }\n },\n asyncUnbindAll: function() {\n if (!t
his._unbound) {\n log.unbind && console.log('[%s] asyncUnbindAll', this.l
ocalName);\n this._unbindAllJob = this.job(this._unbindAllJob, this.unbin
dAll, 0);\n }\n },\n unbindAll: function() {\n if (!this._unboun
d) {\n this.unbindAllProperties();\n this.super();\n // unb
ind shadowRoot\n var root = this.shadowRoot;\n while (root) {\n
unbindNodeTree(root);\n root = root.olderShadowRoot;\n }\
n this._unbound = true;\n }\n },\n cancelUnbindAll: function(p
reventCascade) {\n if (this._unbound) {\n log.unbind && console.warn
('[%s] already unbound, cannot cancel unbindAll', this.localName);\n retu
rn;\n }\n log.unbind && console.log('[%s] cancelUnbindAll', this.local
Name);\n if (this._unbindAllJob) {\n this._unbindAllJob = this._unbi
ndAllJob.stop();\n }\n // cancel unbinding our shadow tree iff we're n
ot in the process of\n // cascading our tree (as we do, for example, when t
he element is inserted).\n if (!preventCascade) {\n forNodeTree(this
.shadowRoot, function(n) {\n if (n.cancelUnbindAll) {\n n.ca
ncelUnbindAll();\n }\n });\n }\n }\n };\n\n function u
nbindNodeTree(node) {\n forNodeTree(node, _nodeUnbindAll);\n }\n\n function
_nodeUnbindAll(node) {\n node.unbindAll();\n }\n\n function forNodeTree(no
de, callback) {\n if (node) {\n callback(node);\n for (var child =
node.firstChild; child; child = child.nextSibling) {\n forNodeTree(child,
callback);\n }\n }\n }\n\n var mustachePattern = /\\{\\{([^{}]*)}}/;\
n\n // exports\n\n scope.bindPattern = mustachePattern;\n scope.api.instance.
mdv = mdv;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All ri
ghts reserved.\n * Use of this source code is governed by a BSD-style\n * licens
e that can be found in the LICENSE file.\n */\n(function(scope) {\n var prepari
ngElements = 0;\n\n var base = {\n PolymerBase: true,\n job: Polymer.job,
\n super: Polymer.super,\n // user entry point for element has had its cre
atedCallback called\n created: function() {\n },\n // user entry point
for element has shadowRoot and is ready for\n // api interaction\n ready:
function() {\n },\n createdCallback: function() {\n this.created();\n
if (this.ownerDocument.defaultView || this.alwaysPrepare ||\n pre
paringElements > 0) {\n this.prepareElement();\n }\n },\n // s
ystem entry point, do not override\n prepareElement: function() {\n this
._elementPrepared = true;\n // install property observers\n this.obser
veProperties();\n // install boilerplate attributes\n this.copyInstanc
eAttributes();\n // process input attributes\n this.takeAttributes();\
n // add event listeners\n this.addHostListeners();\n // guarante
es that while preparing, any\n // sub-elements are also prepared\n pre
paringElements++;\n // process declarative resources\n this.parseDecla
rations(this.__proto__);\n // decrement semaphore\n preparingElements-
-;\n // user entry point\n this.ready();\n },\n enteredViewCallb
ack: function() {\n if (!this._elementPrepared) {\n this.prepareElem
ent();\n }\n this.cancelUnbindAll(true);\n // invoke user action\
n if (this.enteredView) {\n this.enteredView();\n }\n },\n
leftViewCallback: function() {\n if (!this.preventDispose) {\n thi
s.asyncUnbindAll();\n }\n // invoke user action\n if (this.leftVi
ew) {\n this.leftView();\n }\n },\n // TODO(sorvell): bc\n
enteredDocumentCallback: function() {\n this.enteredViewCallback();\n },
\n // TODO(sorvell): bc\n leftDocumentCallback: function() {\n this.l
eftViewCallback();\n },\n // recursive ancestral <element> initialization,
oldest first\n parseDeclarations: function(p) {\n if (p && p.element) {
\n this.parseDeclarations(p.__proto__);\n p.parseDeclaration.call(
this, p.element);\n }\n },\n // parse input <element> as needed, over
ride for custom behavior\n parseDeclaration: function(elementElement) {\n
var template = this.fetchTemplate(elementElement);\n if (template) {\n
if (this.element.hasAttribute('lightdom')) {\n this.lightFromTempl
ate(template);\n } else {\n this.shadowFromTemplate(template);\n
}\n }\n },\n // return a shadow-root template (if desired), o
verride for custom behavior\n fetchTemplate: function(elementElement) {\n
return elementElement.querySelector('template');\n },\n // utility funct
ion that creates a shadow root from a <template>\n shadowFromTemplate: functi
on(template) {\n if (template) {\n // cache elder shadow root (if an
y)\n var elderRoot = this.shadowRoot;\n // make a shadow root\n
var root = this.createShadowRoot();\n // migrate flag(s)\n ro
ot.applyAuthorStyles = this.applyAuthorStyles;\n root.resetStyleInheritan
ce = this.resetStyleInheritance;\n // stamp template\n // which in
cludes parsing and applying MDV bindings before being \n // inserted (to
avoid {{}} in attribute values)\n // e.g. to prevent <img src=\"images/{{
icon}}\"> from generating a 404.\n var dom = this.instanceTemplate(templa
te);\n // append to shadow dom\n root.appendChild(dom);\n /
/ perform post-construction initialization tasks on shadow root\n this.sh
adowRootReady(root, template);\n // return the created shadow root\n
return root;\n }\n },\n // utility function that stamps a <templat
e> into light-dom\n lightFromTemplate: function(template) {\n if (templa
te) {\n // stamp template\n // which includes parsing and applying
MDV bindings before being \n // inserted (to avoid {{}} in attribute val
ues)\n // e.g. to prevent <img src=\"images/{{icon}}\"> from generating a
404.\n var dom = this.instanceTemplate(template);\n // append to
shadow dom\n this.appendChild(dom);\n // perform post-construction
initialization tasks on ahem, light root\n this.shadowRootReady(this, te
mplate);\n // return the created shadow root\n return dom;\n
}\n },\n shadowRootReady: function(root, template) {\n // locate node
s with id and store references to them in this.$ hash\n this.marshalNodeRef
erences(root);\n // set up pointer gestures\n PointerGestures.register
(root);\n },\n // locate nodes with id and store references to them in thi
s.$ hash\n marshalNodeReferences: function(root) {\n // establish $ inst
ance variable\n var $ = this.$ = this.$ || {};\n // populate $ from no
des with ID from the LOCAL tree\n if (root) {\n var n$ = root.queryS
electorAll(\"[id]\");\n for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]);
i++) {\n $[n.id] = n;\n };\n }\n },\n attributeChang
edCallback: function(name, oldValue) {\n // TODO(sjmiles): adhoc filter\n
if (name !== 'class' && name !== 'style') {\n this.attributeToPropert
y(name, this.getAttribute(name));\n }\n if (this.attributeChanged) {\n
this.attributeChanged.apply(this, arguments);\n }\n },\n onMu
tation: function(node, listener) {\n var observer = new MutationObserver(fu
nction(mutations) {\n listener.call(this, observer, mutations);\n
observer.disconnect();\n }.bind(this));\n observer.observe(node, {chil
dList: true, subtree: true});\n }\n };\n\n // true if object has own Polyme
rBase api\n function isBase(object) {\n return object.hasOwnProperty('Polyme
rBase') \n }\n\n // name a base constructor for dev tools\n\n function Polyme
rBase() {};\n PolymerBase.prototype = base;\n base.constructor = PolymerBase;\
n \n // exports\n\n scope.Base = PolymerBase;\n scope.isBase = isBase;\n sc
ope.api.instance.base = base;\n \n})(Polymer);\n","/*\n * Copyright 2013 The Po
lymer 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(sc
ope) {\n\n // imports\n\n var log = window.logFlags || {};\n \n // magic wor
ds\n \n var STYLE_SCOPE_ATTRIBUTE = 'element';\n var STYLE_CONTROLLER_SCOPE =
'controller';\n \n var styles = {\n STYLE_SCOPE_ATTRIBUTE: STYLE_SCOPE_ATT
RIBUTE,\n /**\n * Installs external stylesheets and <style> elements with
the attribute \n * polymer-scope='controller' into the scope of element. Th
is is intended\n * to be a called during custom element construction. Note,
this incurs a \n * per instance cost and should be used sparingly.\n *\n
* The need for this type of styling should go away when the shadowDOM spec\
n * addresses these issues:\n * \n * https://www.w3.org/Bugs/Public/
show_bug.cgi?id=21391\n * https://www.w3.org/Bugs/Public/show_bug.cgi?id=213
90\n * https://www.w3.org/Bugs/Public/show_bug.cgi?id=21389\n * \n *
@param element The custom element instance into whose controller (parent)\n
* scope styles will be installed.\n * @param elementElement The <element> c
ontaining controller styles.\n */\n // TODO(sorvell): remove when spec iss
ues are addressed\n installControllerStyles: function() {\n // apply con
troller styles, but only if they are not yet applied\n var scope = this.fin
dStyleController();\n if (scope && !this.scopeHasElementStyle(scope, STYLE_
CONTROLLER_SCOPE)) {\n // allow inherited controller styles\n var
proto = getPrototypeOf(this), cssText = '';\n while (proto && proto.eleme
nt) {\n cssText += proto.element.cssTextForScope(STYLE_CONTROLLER_SCOPE
);\n proto = getPrototypeOf(proto);\n }\n if (cssText) {\
n var style = this.element.cssTextToScopeStyle(cssText,\n
STYLE_CONTROLLER_SCOPE);\n // TODO(sorvell): for now these styles are n
ot shimmed\n // but we may need to shim them\n Polymer.applySt
yleToScope(style, scope);\n }\n }\n },\n findStyleController:
function() {\n if (window.ShadowDOMPolyfill) {\n return wrap(documen
t.head);\n } else {\n // find the shadow root that contains this ele
ment\n var n = this;\n while (n.parentNode) {\n n = n.par
entNode;\n }\n return n === document ? document.head : n;\n }
\n },\n scopeHasElementStyle: function(scope, descriptor) {\n var rul
e = STYLE_SCOPE_ATTRIBUTE + '=' + this.localName + '-' + descriptor;\n retu
rn scope.querySelector('style[' + rule + ']');\n }\n };\n \n // NOTE: use
raw prototype traversal so that we ensure correct traversal\n // on platforms w
here the protoype chain is simulated via __proto__ (IE10)\n function getPrototy
peOf(prototype) {\n return prototype.__proto__;\n }\n\n // exports\n\n sco
pe.api.instance.styles = styles;\n \n})(Polymer);\n","/* \n * Copyright 2013 Th
e 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(funct
ion(scope) {\n\n var path = {\n addResolvePathApi: function() {\n var r
oot = this.elementPath();\n // let assetpath attribute modify the resolve p
ath\n var assetPath = this.getAttribute('assetpath') || '';\n var relP
ath = this.relPath;\n this.prototype.resolvePath = function(inPath) {\n
var to = inPath;\n if (assetPath) {\n // assetPath is always
a folder, drop the trailing '/'\n var from = assetPath.slice(0, -1);\n
to = relPath(from, to);\n }\n\n return root + assetPath
+ to;\n };\n },\n elementPath: function() {\n return this.urlToP
ath(HTMLImports.getDocumentUrl(this.ownerDocument));\n },\n relPath: funct
ion(from, to) {\n var fromParts = from.split('/');\n var toParts = to.
split('/');\n\n // chop to common length\n var common = false;\n
while(fromParts.length && toParts.length && fromParts[0] === toParts[0]) {\n
fromParts.shift();\n toParts.shift();\n common = true;\n
}\n\n // if there were some commonalities, add '../' for differences\n
if (common) {\n for (var i = 0; i < fromParts.length; i++) {\n
toParts.unshift('..');\n }\n }\n return toParts.join('/');\n
},\n urlToPath: function(url) {\n if (!url) {\n return '';\n
} else {\n var parts = url.split('/');\n parts.pop();\n p
arts.push('');\n return parts.join('/');\n }\n }\n };\n\n // ex
ports\n scope.api.declaration.path = path;\n\n})(Polymer);\n","/*\n * Copyright
2013 The Polymer Authors. All rights reserved.\n * Use of this source code is g
overned by a BSD-style\n * license that can be found in the LICENSE file.\n */\n
(function(scope) {\n\n // imports\n\n var log = window.logFlags || {};\n var
api = scope.api.instance.styles;\n var STYLE_SCOPE_ATTRIBUTE = api.STYLE_SCOPE_
ATTRIBUTE;\n\n // magic words\n\n var STYLE_SELECTOR = 'style';\n var SHEET_S
ELECTOR = '[rel=stylesheet]';\n var STYLE_GLOBAL_SCOPE = 'global';\n var SCOPE
_ATTR = 'polymer-scope';\n\n var styles = {\n /**\n * Install external s
tylesheets loaded in <element> elements into the \n * element's template.\n
* @param elementElement The <element> element to style.\n */\n instal
lSheets: function() {\n this.cacheSheets();\n this.cacheStyles();\n
this.installLocalSheets();\n this.installGlobalStyles();\n },\n /*
*\n * Remove all sheets from element and store for later use.\n */\n
cacheSheets: function() {\n this.sheets = this.findNodes(SHEET_SELECTOR);\n
this.sheets.forEach(function(s) {\n if (s.parentNode) {\n
s.parentNode.removeChild(s);\n }\n });\n },\n cacheStyles: fun
ction() {\n this.styles = this.findNodes(STYLE_SELECTOR + '[' + SCOPE_ATTR
+ ']');\n this.styles.forEach(function(s) {\n if (s.parentNode) {\n
s.parentNode.removeChild(s);\n }\n });\n },\n /**\n
* Takes external stylesheets loaded in an <element> element and moves\n *
their content into a <style> element inside the <element>'s template.\n * T
he sheet is then removed from the <element>. This is done only so \n * that
if the element is loaded in the main document, the sheet does\n * not become
active.\n * Note, ignores sheets with the attribute 'polymer-scope'.\n
* @param elementElement The <element> element to style.\n */\n installLoc
alSheets: function () {\n var sheets = this.sheets.filter(function(s) {\n
return !s.hasAttribute(SCOPE_ATTR);\n });\n var content = this.t
emplateContent();\n if (content) {\n var cssText = '';\n shee
ts.forEach(function(sheet) {\n cssText += cssTextFromSheet(sheet) + '\\
n';\n });\n if (cssText) {\n content.insertBefore(createS
tyleElement(cssText), content.firstChild);\n }\n }\n },\n find
Nodes: function(selector, matcher) {\n var nodes = this.querySelectorAll(se
lector).array();\n var content = this.templateContent();\n if (content
) {\n var templateNodes = content.querySelectorAll(selector).array();\n
nodes = nodes.concat(templateNodes);\n }\n return matcher ? node
s.filter(matcher) : nodes;\n },\n templateContent: function() {\n var
template = this.querySelector('template');\n return template && templateCo
ntent(template);\n },\n /**\n * Promotes external stylesheets and <sty
le> elements with the attribute \n * polymer-scope='global' into global scop
e.\n * This is particularly useful for defining @keyframe rules which \n
* currently do not function in scoped or shadow style elements.\n * (See wk
b.ug/72462)\n * @param elementElement The <element> element to style.\n *
/\n // TODO(sorvell): remove when wkb.ug/72462 is addressed.\n installGlob
alStyles: function() {\n var style = this.styleForScope(STYLE_GLOBAL_SCOPE)
;\n applyStyleToScope(style, document.head);\n },\n cssTextForScope:
function(scopeDescriptor) {\n var cssText = '';\n // handle stylesheet
s\n var selector = '[' + SCOPE_ATTR + '=' + scopeDescriptor + ']';\n v
ar matcher = function(s) {\n return matchesSelector(s, selector);\n
};\n var sheets = this.sheets.filter(matcher);\n sheets.forEach(functi
on(sheet) {\n cssText += cssTextFromSheet(sheet) + '\\n\\n';\n });\n
// handle cached style elements\n var styles = this.styles.filter(mat
cher);\n styles.forEach(function(style) {\n cssText += style.textCon
tent + '\\n\\n';\n });\n return cssText;\n },\n styleForScope: f
unction(scopeDescriptor) {\n var cssText = this.cssTextForScope(scopeDescri
ptor);\n return this.cssTextToScopeStyle(cssText, scopeDescriptor);\n },
\n cssTextToScopeStyle: function(cssText, scopeDescriptor) {\n if (cssTe
xt) {\n var style = createStyleElement(cssText);\n style.setAttrib
ute(STYLE_SCOPE_ATTRIBUTE, this.getAttribute('name') +\n '-' + scopeD
escriptor);\n return style;\n }\n }\n };\n\n function applyStyl
eToScope(style, scope) {\n if (style) {\n // TODO(sorvell): necessary fo
r IE\n // see https://connect.microsoft.com/IE/feedback/details/790212/\n
// cloning-a-style-element-and-adding-to-document-produces\n // -unexpe
cted-result#details\n // var clone = style.cloneNode(true);\n var clon
e = createStyleElement(style.textContent);\n var attr = style.getAttribute(
STYLE_SCOPE_ATTRIBUTE);\n if (attr) {\n clone.setAttribute(STYLE_SCO
PE_ATTRIBUTE, attr);\n }\n scope.appendChild(clone);\n }\n }\n\n
function createStyleElement(cssText) {\n var style = document.createElement('
style');\n style.textContent = cssText;\n return style;\n }\n\n function
cssTextFromSheet(sheet) {\n return (sheet && sheet.__resource) || '';\n }\n
\n function matchesSelector(node, inSelector) {\n if (matches) {\n retu
rn matches.call(node, inSelector);\n }\n }\n var p = HTMLElement.prototype;
\n var matches = p.matches || p.matchesSelector || p.webkitMatchesSelector \n
|| p.mozMatchesSelector;\n \n // exports\n\n scope.api.declaration.styles
= styles;\n scope.applyStyleToScope = applyStyleToScope;\n \n})(Polymer);\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 LIC
ENSE file.\n */\n\n(function(scope) {\n\n // imports\n\n var api = scope.api.i
nstance.events;\n var log = window.logFlags || {};\n\n // polymer-element decl
arative api: events feature\n\n var events = { \n parseHostEvents: function(
) {\n // our delegates map\n var delegates = this.prototype.eventDeleg
ates;\n // extract data from attributes into delegates\n this.addAttri
buteDelegates(delegates);\n },\n addAttributeDelegates: function(delegates
) {\n // for each attribute\n for (var i=0, a; a=this.attributes[i]; i
++) {\n // does it have magic marker identifying it as an event delegate?
\n if (api.hasEventPrefix(a.name)) {\n // if so, add the info to
delegates\n delegates[api.removeEventPrefix(a.name)] = a.value.replace
('{{', '')\n .replace('}}', '').trim();\n }\n }\n },
\n event_translations: {\n webkitanimationstart: 'webkitAnimationStart',
\n webkitanimationend: 'webkitAnimationEnd',\n webkittransitionend: 'w
ebkitTransitionEnd',\n domfocusout: 'DOMFocusOut',\n domfocusin: 'DOMF
ocusIn'\n }\n };\n\n // exports\n\n scope.api.declaration.events = events;
\n\n})(Polymer);","/*\n * Copyright 2013 The Polymer Authors. All rights reserve
d.\n * Use of this source code is governed by a BSD-style\n * license that can b
e found in the LICENSE file.\n */\n(function(scope) {\n\n // element api\n\n v
ar properties = {\n inferObservers: function(prototype) {\n var observe
= prototype.observe, property;\n for (var n in prototype) {\n if (n.
slice(-7) === 'Changed') {\n if (!observe) {\n observe = (p
rototype.observe = {});\n }\n property = n.slice(0, -7)\n
observe[property] = observe[property] || n;\n }\n }\n },\n
optimizePropertyMaps: function(prototype) {\n if (prototype.observe) {\n
// construct name list\n var a = prototype._observeNames = [];\n
for (var n in prototype.observe) {\n a.push(n);\n }\n
}\n if (prototype.publish) {\n // construct name list\n var
a = prototype._publishNames = [];\n for (var n in prototype.publish) {\n
a.push(n);\n }\n }\n },\n publishProperties: function
(prototype, base) {\n // if we have any properties to publish\n var pu
blish = prototype.publish;\n if (publish) {\n // transcribe `publish
` entries onto own prototype\n this.requireProperties(publish, prototype,
base);\n // construct map of lower-cased property names\n prototy
pe._publishLC = this.lowerCaseMap(publish);\n }\n },\n requirePropert
ies: function(properties, prototype, base) {\n // ensure a prototype value
for each property\n for (var n in properties) {\n if (prototype[n] =
== undefined && base[n] === undefined) {\n prototype[n] = properties[n]
;\n }\n }\n },\n lowerCaseMap: function(properties) {\n v
ar map = {};\n for (var n in properties) {\n map[n.toLowerCase()] =
n;\n }\n return map;\n }\n };\n\n // exports\n\n scope.api.decla
ration.properties = properties;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Po
lymer 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(sc
ope) {\n\n // magic words\n\n var ATTRIBUTES_ATTRIBUTE = 'attributes';\n\n //
attributes api\n\n var attributes = {\n inheritAttributesObjects: function(
prototype) {\n // chain our lower-cased publish map to the inherited versio
n\n this.inheritObject(prototype, 'publishLC');\n // chain our instanc
e attributes map to the inherited version\n this.inheritObject(prototype, '
_instanceAttributes');\n },\n publishAttributes: function(prototype, base)
{\n // merge names from 'attributes' attribute\n var attributes = thi
s.getAttribute(ATTRIBUTES_ATTRIBUTE);\n if (attributes) {\n // get p
roperties to publish\n var publish = prototype.publish || (prototype.publ
ish = {});\n // names='a b c' or names='a,b,c'\n var names = attri
butes.split(attributes.indexOf(',') >= 0 ? ',' : ' ');\n // record each n
ame for publishing\n for (var i=0, l=names.length, n; i<l; i++) {\n
// remove excess ws\n n = names[i].trim();\n // do not ove
rride explicit entries\n if (n && publish[n] === undefined && base[n] =
== undefined) {\n publish[n] = null;\n }\n }\n }
\n },\n // record clonable attributes from <element>\n accumulateInstan
ceAttributes: function() {\n // inherit instance attributes\n var clon
able = this.prototype._instanceAttributes;\n // merge attributes from eleme
nt\n var a$ = this.attributes;\n for (var i=0, l=a$.length, a; (i<l) &
& (a=a$[i]); i++) { \n if (this.isInstanceAttribute(a.name)) {\n
clonable[a.name] = a.value;\n }\n }\n },\n isInstanceAttribu
te: function(name) {\n return !this.blackList[name] && name.slice(0,3) !==
'on-';\n },\n // do not clone these attributes onto instances\n blackLi
st: {name: 1, 'extends': 1, constructor: 1, noscript: 1}\n };\n\n // add ATTRI
BUTES_ATTRIBUTE to the blacklist\n attributes.blackList[ATTRIBUTES_ATTRIBUTE] =
1;\n\n // exports\n\n scope.api.declaration.attributes = attributes;\n\n})(Po
lymer);\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 // imports\n \n var api =
scope.api;\n var isBase = scope.isBase;\n var extend = scope.extend;\n\n // p
rototype api\n\n var prototype = {\n register: function(name, extendee) {\n
// build prototype combining extendee, Polymer base, and named api\n t
his.prototype = this.buildPrototype(name, extendee);\n // back reference de
claration element\n // TODO(sjmiles): replace `element` with `elementElemen
t` or `declaration`\n this.prototype.element = this;\n // more declara
tive features\n this.desugar(name, extendee);\n // register our custom
element with the platform\n this.registerPrototype(name, extendee);\n
// reference constructor in a global named by 'constructor' attribute\n th
is.publishConstructor();\n },\n buildPrototype: function(name, extendee) {
\n // get our custom prototype (before chaining)\n var prototype = sco
pe.getRegisteredPrototype(name);\n // get basal prototype\n var base =
this.generateBasePrototype(extendee);\n // transcribe `attributes` declara
tions onto own prototype's `publish`\n this.publishAttributes(prototype, ba
se);\n // `publish` properties to the prototype and to attribute watch\n
this.publishProperties(prototype, base);\n // infer observers for `obser
ve` list based on method names\n this.inferObservers(prototype);\n //
chain various meta-data objects to inherited versions\n this.inheritMetaDat
a(prototype, base);\n // chain custom api to inherited\n prototype = t
his.chainObject(prototype, base);\n // build side-chained lists to optimize
iterations\n this.optimizePropertyMaps(prototype);\n // x-platform fi
xup\n ensurePrototypeTraversal(prototype);\n return prototype;\n },
\n inheritMetaData: function(prototype, base) {\n // chain observe objec
t to inherited\n this.inheritObject('observe', prototype, base);\n //
chain publish object to inherited\n this.inheritObject('publish', prototype
, base);\n // chain our lower-cased publish map to the inherited version\n
this.inheritObject('_publishLC', prototype, base);\n // chain our inst
ance attributes map to the inherited version\n this.inheritObject('_instanc
eAttributes', prototype, base);\n // chain our event delegates map to the i
nherited version\n this.inheritObject('eventDelegates', prototype, base);\n
},\n // implement various declarative features\n desugar: function(nam
e, extendee) {\n // compile list of attributes to copy to instances\n
this.accumulateInstanceAttributes();\n // parse on-* delegates declared on
`this` element\n this.parseHostEvents();\n // install external stylesh
eets as if they are inline\n this.installSheets();\n //\n this.ad
justShadowElement();\n //\n // TODO(sorvell): install a helper method
this.resolvePath to aid in \n // setting resource paths. e.g.\n // thi
s.$.image.src = this.resolvePath('images/foo.png')\n // Potentially remove
when spec bug is addressed.\n // https://www.w3.org/Bugs/Public/show_bug.cg
i?id=21407\n this.addResolvePathApi();\n // under ShadowDOMPolyfill, t
ransforms to approximate missing CSS features\n if (window.ShadowDOMPolyfil
l) {\n Platform.ShadowCSS.shimStyling(this.templateContent(), name, exten
dee);\n }\n // allow custom element access to the declarative context\
n if (this.prototype.registerCallback) {\n this.prototype.registerCa
llback(this);\n }\n },\n // TODO(sorvell): remove when spec addressed
:\n // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22460\n // make <sha
dow></shadow> be <shadow><content></content></shadow>\n adjustShadowElement:
function() {\n // TODO(sorvell): avoid under SD polyfill until this bug is
addressed:\n // https://github.com/Polymer/ShadowDOM/issues/297\n if (
!window.ShadowDOMPolyfill) {\n var content = this.templateContent();\n
if (content) {\n var s$ = content.querySelectorAll('shadow');\n
for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {\n if
(!s.children.length) {\n s.appendChild(document.createElement('cont
ent'));\n }\n }\n }\n }\n },\n // if a nam
ed constructor is requested in element, map a reference\n // to the construct
or to the given symbol\n publishConstructor: function() {\n var symbol =
this.getAttribute('constructor');\n if (symbol) {\n window[symbol]
= this.ctor;\n }\n },\n // build prototype combining extendee, Polyme
r base, and named api\n generateBasePrototype: function(extnds) {\n var
prototype = this.findBasePrototype(extnds);\n if (!prototype) {\n //
create a prototype based on tag-name extension\n var prototype = HTMLEle
ment.getPrototypeForTag(extnds);\n // insert base api in inheritance chai
n (if needed)\n prototype = this.ensureBaseApi(prototype);\n // me
moize this base\n memoizedBases[extnds] = prototype;\n }\n retu
rn prototype;\n },\n findBasePrototype: function(name) {\n return mem
oizedBases[name];\n },\n // install Polymer instance api into prototype ch
ain, as needed \n ensureBaseApi: function(prototype) {\n if (!prototype.
PolymerBase) {\n prototype = Object.create(prototype);\n // we need
a unique copy of base api for each base prototype\n // therefore we 'exten
d' here instead of simply chaining\n // we could memoize instead, especial
ly for the common cases,\n // in particular, for base === HTMLElement.prot
otype\n for (var n in api.instance) {\n extend(prototype, api.inst
ance[n]);\n }\n }\n // return buffed-up prototype\n return
prototype;\n },\n // ensure prototype[name] inherits from a prototype.prot
otype[name]\n inheritObject: function(name, prototype, base) {\n // requ
ire an object\n var source = prototype[name] || {};\n // chain inherit
ed properties onto a new object\n prototype[name] = this.chainObject(source
, base[name]);\n },\n // register 'prototype' to custom element 'name', st
ore constructor \n registerPrototype: function(name, extendee) { \n var
info = {\n prototype: this.prototype\n }\n // native element mu
st be specified in extends\n var typeExtension = this.findTypeExtension(ext
endee);\n if (typeExtension) {\n info.extends = typeExtension;\n
}\n // register the custom type\n this.ctor = document.register(name
, info);\n // constructor shenanigans\n this.prototype.constructor = t
his.ctor;\n // register the prototype with HTMLElement for name lookup\n
HTMLElement.register(name, this.prototype);\n }, \n findTypeExtension:
function(name) {\n if (name && name.indexOf('-') < 0) {\n return nam
e;\n } else {\n var p = this.findBasePrototype(name);\n if (p
.element) {\n return this.findTypeExtension(p.element.extends);\n
}\n }\n }\n };\n\n if (Object.__proto__) {\n prototype.chainObjec
t = function(object, inherited) {\n if (object && inherited && object !== i
nherited) {\n object.__proto__ = inherited;\n }\n return object
;\n }\n } else {\n prototype.chainObject = function(object, inherited) {\
n if (object && inherited && object !== inherited) {\n var chained =
Object.create(inherited);\n object = extend(chained, object);\n }\n
return object;\n }\n }\n\n // memoize base prototypes\n memoizedBase
s = {};\n\n // On platforms that do not support __proto__ (version of IE), the
prototype\n // chain of a custom element is simulated via installation of __pro
to__.\n // Although custom elements manages this, we install it here so it's\n
// available during desugaring.\n function ensurePrototypeTraversal(prototype)
{\n if (!Object.__proto__) {\n var ancestor = Object.getPrototypeOf(pro
totype);\n prototype.__proto__ = ancestor;\n if (isBase(ancestor)) {\n
ancestor.__proto__ = Object.getPrototypeOf(ancestor);\n }\n }\n
}\n\n // exports\n\n api.declaration.prototype = prototype;\n\n})(Polymer);\n
","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of th
is source code is governed by a BSD-style\n * license that can be found in the L
ICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.ex
tend;\n var apis = scope.api.declaration;\n\n // imperative implementation: Po
lymer()\n\n // specify an 'own' prototype for tag `name`\n function element(na
me, prototype) {\n //console.log('registering [' + name + ']');\n // cache
the prototype\n prototypesByName[name] = prototype || {};\n // notify the
registrar waiting for 'name', if any\n notifyPrototype(name);\n }\n\n // d
eclarative implementation: <polymer-element>\n\n var prototype = extend(Object.
create(HTMLElement.prototype), {\n createdCallback: function() {\n // fe
tch the element name\n this.name = this.getAttribute('name');\n // fet
ch our extendee name\n this.extends = this.getAttribute('extends');\n
// install element definition, if ready\n this.registerWhenReady();\n },
\n registerWhenReady: function() {\n // if we have no prototype, wait\n
if (this.waitingForPrototype(this.name)) {\n return;\n }\n
var extendee = this.extends;\n if (this.waitingForExtendee(extendee)) {\n
//console.warn(this.name + ': waitingForExtendee:' + extendee);\n
return;\n }\n // TODO(sjmiles): HTMLImports polyfill awareness:\n
// elements in the main document are likely to parse\n // in advance of el
ements in imports because the\n // polyfill parser is simulated\n // t
herefore, wait for imports loaded before\n // finalizing elements in the ma
in document\n if (document.contains(this)) {\n whenImportsLoaded(fun
ction() {\n this._register(extendee);\n }.bind(this));\n }
else {\n this._register(extendee);\n }\n },\n _register: funct
ion(extendee) {\n //console.group('registering', this.name);\n this.re
gister(this.name, extendee);\n //console.groupEnd();\n // subclasses m
ay now register themselves\n notifySuper(this.name);\n },\n waitingFo
rPrototype: function(name) {\n if (!getRegisteredPrototype(name)) {\n
// then wait for a prototype\n waitPrototype[name] = this;\n //
if explicitly marked as 'noscript'\n if (this.hasAttribute('noscript')) {
\n // TODO(sorvell): CustomElements polyfill awareness:\n // n
oscript elements should upgrade in logical order\n // script injection
ensures this under native custom elements;\n // under imports + ce poly
fills, scripts run before upgrades.\n // dependencies should be ready a
t upgrade time so register\n // prototype at this time.\n if (
window.CustomElements && !CustomElements.useNative) {\n element(name)
;\n } else {\n var script = document.createElement('script')
;\n script.textContent = 'Polymer(\\'' + name + '\\');';\n
this.appendChild(script);\n }\n }\n return true;\n
}\n },\n waitingForExtendee: function(extendee) {\n // if extending a
custom element...\n if (extendee && extendee.indexOf('-') >= 0) {\n
// wait for the extendee to be registered first\n if (!isRegistered(exte
ndee)) {\n (waitSuper[extendee] = (waitSuper[extendee] || [])).push(thi
s);\n return true;\n }\n }\n }\n });\n\n // semi-plugg
able APIs \n // TODO(sjmiles): should be fully pluggable (aka decoupled, curren
tly\n // the various plugins are allowed to depend on each other directly)\n O
bject.keys(apis).forEach(function(n) {\n extend(prototype, apis[n]);\n });\n
\n // utility and bookkeeping\n \n // maps tag names to prototypes\n var pro
totypesByName = {};\n\n function getRegisteredPrototype(name) {\n return pro
totypesByName[name];\n }\n\n // elements waiting for prototype, by name\n var
waitPrototype = {};\n\n function notifyPrototype(name) {\n if (waitPrototyp
e[name]) {\n waitPrototype[name].registerWhenReady();\n delete waitPro
totype[name];\n }\n }\n\n // elements waiting for super, by name\n var wai
tSuper = {};\n\n function notifySuper(name) {\n registered[name] = true;\n
var waiting = waitSuper[name];\n if (waiting) {\n waiting.forEach(func
tion(w) {\n w.registerWhenReady();\n });\n delete waitSuper[nam
e];\n }\n }\n\n // track document.register'ed tag names\n\n var registered
= {};\n\n function isRegistered(name) {\n return registered[name];\n }\n\n
function whenImportsLoaded(doThis) {\n if (window.HTMLImports && !HTMLImpor
ts.readyTime) {\n addEventListener('HTMLImportsLoaded', doThis);\n } els
e {\n doThis();\n }\n }\n\n // exports\n \n scope.getRegisteredProto
type = getRegisteredPrototype;\n \n // namespace shenanigans so we can expose
our scope on the registration \n // function\n\n // TODO(sjmiles): find a way
to do this that is less terrible\n // copy window.Polymer properties onto `elem
ent()`\n extend(element, scope);\n // make window.Polymer reference `element()
`\n window.Polymer = element;\n\n // register polymer-element with document\n
document.register('polymer-element', {prototype: prototype});\n})(Polymer);\n"]
} |