Chromium Code Reviews

Side by Side Diff: polymer_0.5.0/bower_components/webcomponentsjs/webcomponents-lite.min.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
(Empty)
1 /**
2 * @license
3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at http://polyme r.github.io/LICENSE.txt
5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS. txt
6 * The complete set of contributors may be found at http://polymer.github.io/CON TRIBUTORS.txt
7 * Code distributed by Google as part of the polymer project is also
8 * subject to an additional IP rights grant found at http://polymer.github.io/PA TENTS.txt
9 */
10 // @version 0.5.1-1
11 window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="w ebcomponents.js",o=document.querySelector('script[src*="'+n+'"]'),t={};if(!t.noO pts){if(location.search.slice(1).split("&").forEach(function(e){e=e.split("="),e [0]&&(t[e[0]]=e[1]||!0)}),o)for(var r,i=0;r=o.attributes[i];i++)"src"!==r.name&& (t[r.name]=r.value||!0);if(t.log){var a=t.log.split(",");t.log={},a.forEach(func tion(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t .shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot ,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.Cus tomElements.flags.register=t.register),e.flags=t}(WebComponents),"undefined"==ty peof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=functio n(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:funct ion(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n] ,writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1] :void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=v oid 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.W eakMap=n}(),function(e){function t(e){_.push(e),w||(w=!0,h(o))}function n(e){ret urn window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}functi on o(){w=!1;var e=_;_=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e. forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0) }),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach (function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){fo r(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r<o.length;r++){var i=o[r],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a (e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++E}function s(e, t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previo usSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNames pace=null,this.oldValue=null}function d(e){var t=new s(e.type,e.target);return t .addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previou sSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attribu teName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}functio n c(e,t){return y=new s(e,t)}function u(e){return L?L:(L=d(y),L.oldValue=e,L)}fu nction l(){y=L=void 0}function m(e){return e===L||e===y}function f(e,t){return e ===t?e:L&&m(e)?L:null}function p(e,t,n){this.observer=e,this.target=t,this.optio ns=n,this.transientObservedNodes=[]}var h,v=new WeakMap;if(/Trident|Edge/.test(n avigator.userAgent))h=setTimeout;else if(window.setImmediate)h=window.setImmedia te;else{var g=[],b=String(Math.random());window.addEventListener("message",funct ion(e){if(e.data===b){var t=g;g=[],t.forEach(function(e){e()})}}),h=function(e){ g.push(e),window.postMessage(b,"*")}}var w=!1,_=[],E=0;a.prototype={observe:func tion(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOl dValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attribute s||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o=v.get(e );o||v.set(e,o=[]);for(var r,i=0;i<o.length;i++)if(o[i].observer===this){r=o[i], r.removeListeners(),r.options=t;break}r||(r=new p(this,e,t),o.push(r),this.nodes _.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function( e){for(var t=v.get(e),n=0;n<t.length;n++){var o=t[n];if(o.observer===this){o.rem oveListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:functi on(){var e=this.records_;return this.records_=[],e}};var y,L;p.prototype={enqueu e:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var r=n[o-1 ],i=f(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners :function(){this.addListeners_(this.target)},addListeners_:function(e){var t=thi s.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characte rData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.add EventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventLis tener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners _(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e. removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventLis tener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DO MNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNode Removed",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.add Listeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[] ),t.push(this)}},removeTransientObservers:function(){var e=this.transientObserve dNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners _(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}} ,this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case "DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target,r=new c("attributes",o);r.attributeName=t,r.attributeNamespace=n;var a=e.attrChange== =MutationEvent.ADDITION?null:e.prevValue;i(o,function(e){return!e.attributes||e. attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1 ===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):r});break;case"D OMCharacterDataModified":var o=e.target,r=c("characterData",o),a=e.prevValue;i(o ,function(e){return e.characterData?e.characterDataOldValue?u(a):r:void 0});brea k;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted" :var s,d,o=e.relatedNode,m=e.target;"DOMNodeInserted"===e.type?(s=[m],d=[]):(s=[ ],d=[m]);var f=m.previousSibling,p=m.nextSibling,r=c("childList",o);r.addedNodes =s,r.removedNodes=d,r.previousSibling=f,r.nextSibling=p,i(o,function(e){return e .childList?r:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.Mutati onObserver=a)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function( e){function t(e,t){t=t||p,o(function(){i(e,t)},t)}function n(e){return"complete" ===e.readyState||e.readyState===g}function o(e,t){if(n(t))e&&e();else{var r=func tion(){("complete"===t.readyState||t.readyState===g)&&(t.removeEventListener(b,r ),o(e,t))};t.addEventListener(b,r)}}function r(e){e.target.__loaded=!0}function i(e,t){function n(){s==d&&e&&e()}function o(e){r(e),s++,n()}var i=t.querySelecto rAll("link[rel=import]"),s=0,d=i.length;if(d)for(var c,u=0;d>u&&(c=i[u]);u++)a(c )?o.call(c,{target:c}):(c.addEventListener("load",o),c.addEventListener("error", o));else n()}function a(e){return l?e.__loaded||e.import&&"loading"!==e.import.r eadyState:e.__importParsed}function s(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]); n++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}functi on c(e){var t=e.import;t?r({target:e}):(e.addEventListener("load",r),e.addEventL istener("error",r))}var u="import",l=Boolean(u in document.createElement("link") ),m=Boolean(window.ShadowDOMPolyfill),f=function(e){return m?ShadowDOMPolyfill.w rapIfNeeded(e):e},p=f(document),h={get:function(){var e=HTMLImports.currentScrip t||document.currentScript||("complete"!==document.readyState?document.scripts[do cument.scripts.length-1]:null);return f(e)},configurable:!0};Object.defineProper ty(document,"_currentScript",h),Object.defineProperty(p,"_currentScript",h);var v=/Trident|Edge/.test(navigator.userAgent),g=v?"complete":"interactive",b="ready statechange";l&&(new MutationObserver(function(e){for(var t,n=0,o=e.length;o>n&& (t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0 }),function(){if("loading"===document.readyState)for(var e,t=document.querySelec torAll("link[rel=import]"),n=0,o=t.length;o>n&&(e=t[n]);n++)c(e)}()),t(function( ){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime(),p.dispatchEven t(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))}),e.IMPORT_LINK_TYPE=u,e.us eNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(HTMLImports),function(e){var t=[],n=function(e){t.push(e)},o=function(){t.forEach(function(t){t(e)})};e.addMo dule=n,e.initializeModules=o}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,o={resolveUrlsIn Style:function(e){var t=e.ownerDocument,n=t.createElement("a");return e.textCont ent=this.resolveUrlsInCssText(e.textContent,n),e},resolveUrlsInCssText:function( e,o){var r=this.replaceUrls(e,o,t);return r=this.replaceUrls(r,o,n)},replaceUrls :function(e,t,n){return e.replace(n,function(e,n,o,r){var i=o.replace(/["']/g,"" );return t.href=i,i=t.href,n+"'"+i+"'"+r})}};e.path=o}),HTMLImports.addModule(fu nction(e){xhr={async:!0,ok:function(e){return e.status>=200&&e.status<300||304== =e.status||0===e.status},load:function(t,n,o){var r=new XMLHttpRequest;return(e. flags.debug||e.flags.bust)&&(t+="?"+Math.random()),r.open("GET",t,xhr.async),r.a ddEventListener("readystatechange",function(){if(4===r.readyState){var e=r.getRe sponseHeader("Location"),t=null;if(e)var t="/"===e.substr(0,1)?location.origin+e :e;n.call(o,!xhr.ok(r)&&r,r.response||r.responseText,t)}}),r.send(),r},loadDocum ent:function(e,t,n){this.load(e,t,n).responseType="document"}},e.xhr=xhr}),HTMLI mports.addModule(function(e){var t=e.xhr,n=e.flags,o=function(e,t){this.cache={} ,this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};o.prototype={a ddNodes:function(e){this.inflight+=e.length;for(var t,n=0,o=e.length;o>n&&(t=e[n ]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,thi s.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeU rl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e]) return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cac he[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,o){if(n.load&& console.log("fetch",e,o),e.match(/^data:/)){var r=e.split(","),i=r[0],a=r[1];a=i .indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this. receive(e,o,null,a)}.bind(this),0)}else{var s=function(t,n,r){this.receive(e,o,t ,n,r)}.bind(this);t.load(e,s)}},receive:function(e,t,n,o,r){this.cache[e]=o;for( var i,a=this.pending[e],s=0,d=a.length;d>s&&(i=a[s]);s++)this.onload(e,i,o,n,r), this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone ()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=o}),HTMLImp orts.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new Muta tionObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&th is.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCa llback(e);for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)t.children&&t.children.leng th&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childLis t:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t( e){return"link"===e.localName&&e.rel===u}function n(e){var t=o(e);return"data:te xt/javascript;charset=utf-8,"+encodeURIComponent(t)}function o(e){return e.textC ontent+r(e)}function r(e){var t=e.ownerDocument;t.__importedScripts=t.__imported Scripts||0;var n=e.ownerDocument.baseURI,o=t.__importedScripts?"-"+t.__importedS cripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+o+".js\n"}function i (e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textCont ent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u =e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",m={documentSelectors:l,importsSelectors: [l,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javasc ript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle" },dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse (e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s ] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.ma rkParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.pu sh(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing ",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0, this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__impor tParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingEleme nt=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function (e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1) },parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__imp ortsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComple te(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:! 1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.len gth;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function (e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:fu nction(e){var t=e;e=i(e),e.__importElement=t,this.parseGeneric(e)},parseGeneric: function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElem ent:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__im portLink;return t},addElementToDocument:function(e){var t=this.rootImportForElem ent(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function( e,t){var n=this,o=function(o){t&&t(o),n.markParsingComplete(e),n.parseNext()};if (e.addEventListener("load",o),e.addEventListener("error",o),c&&"style"===e.local Name){var r=!1;if(-1==e.textContent.indexOf("@import"))r=!0;else if(e.sheet){r=! 0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(i=a[d]);d++)i.type===CSS Rule.IMPORT_RULE&&(r=r&&Boolean(i.styleSheet))}r&&e.dispatchEvent(new CustomEven t("load",{bubbles:!1}))}},parseScript:function(t){var o=document.createElement(" script");o.__importElement=t,o.src=t.src?t.src:n(t),e.currentScript=t,this.track Element(o,function(){o.parentNode.removeChild(o),e.currentScript=null}),this.add ElementToDocument(o)},nextToParse:function(){return this._mayParse=[],!this.pars ingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseIn Doc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for( var o,r=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=r.length;a>i&&(o =r[i]);i++)if(!this.isParsed(o))return this.hasResource(o)?t(o)?this.nextToParse InDoc(o.import,o):o:void 0}return n},nextToParseDynamic:function(){return this.d ynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;re turn t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){re turn e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElemen ts.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.import?!1:!0}} ;e.parser=m,e.IMPORT_SELECTOR=l}),HTMLImports.addModule(function(e){function t(e ){return n(e,i)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel" )===t}function o(e,t){var n=document.implementation.createHTMLDocument(i);n._URL =t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||Object.defi neProperty(n,"baseURI",{value:t});var r=n.createElement("meta");return r.setAttr ibute("charset","utf-8"),n.head.appendChild(r),n.head.appendChild(o),n.body.inne rHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateE lement.bootstrap(n),n}var r=e.flags,i=e.IMPORT_LINK_TYPE,a=e.IMPORT_SELECTOR,s=e .rootDocument,d=e.Loader,c=e.Observer,u=e.parser,l={documents:{},documentPreload Selectors:a,importsPreloadSelectors:[a].join(","),loadNode:function(e){m.addNode (e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNo des:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSel ectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentPre loadSelectors:this.importsPreloadSelectors},loaded:function(e,n,i,a,s){if(r.load &&console.log("loaded",e,n),n.__resource=i,n.__error=a,t(n)){var d=this.document s[e];void 0===d&&(d=a?null:o(i,s||e),d&&(d.__importLink=n,this.bootDocument(d)), this.documents[e]=d),n.import=d}u.parseNext()},bootDocument:function(e){this.loa dSubtree(e),this.observer.observe(e),u.parseNext()},loadedAll:function(){u.parse Next()}},m=new d(l.loaded.bind(l),l.loadedAll.bind(l));if(l.observer=new c,!docu ment.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document," baseURI",f),Object.defineProperty(s,"baseURI",f)}e.importer=l,e.importLoader=m}) ,HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,o={added:function (e){for(var o,r,i,a=0,s=e.length;s>a&&(i=e[a]);a++)o||(o=i.ownerDocument,r=t.isP arsed(o)),loading=this.shouldLoadNode(i),loading&&n.loadNode(i),this.shouldParse Node(i)&&r&&t.parseDynamic(i,loading)},shouldLoadNode:function(e){return 1===e.n odeType&&r.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&r.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=o .added.bind(o);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matche sSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mo zMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(r)}var n=e.initializeModules,o=e.isIE;if( !e.useNative){o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=func tion(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomE vent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent. prototype=window.Event.prototype),n();var r=e.rootDocument;"complete"===document .readyState||"interactive"===document.readyState&&!window.attachEvent?t():docume nt.addEventListener("DOMContentLoaded",t)}}(HTMLImports),window.CustomElements=w indow.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n. push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeMo dules=r,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e .hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNati ve)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){n(e,fu nction(e){return t(e)?!0:void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstEle mentChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSi bling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){a=[] ,i(e,t),a=null}function i(e,t){if(e=wrap(e),!(a.indexOf(e)>=0)){a.push(e);for(va r n,o=e.querySelectorAll("link[rel="+s+"]"),r=0,d=o.length;d>r&&(n=o[r]);r++)n.i mport&&i(n.import,t);t(e)}}var a,s=window.HTMLImports?HTMLImports.IMPORT_LINK_TY PE:"none";e.forDocumentTree=r,e.forSubtree=t}),CustomElements.addModule(function (e){function t(e){return n(e)||o(e)}function n(t){return e.upgrade(t)?!0:void s( t)}function o(e){_(e,function(e){return n(e)?!0:void 0})}function r(e){s(e),m(e) &&_(e,function(e){s(e)})}function i(e){M.push(e),L||(L=!0,setTimeout(a))}functio n a(){L=!1;for(var e,t=M,n=0,o=t.length;o>n&&(e=t[n]);n++)e();M=[]}function s(e) {y?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e .detachedCallback)&&!e.__attached&&m(e)&&(e.__attached=!0,e.attachedCallback&&e. attachedCallback())}function c(e){u(e),_(e,function(e){u(e)})}function u(e){y?i( function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.deta chedCallback)&&e.__attached&&!m(e)&&(e.__attached=!1,e.detachedCallback&&e.detac hedCallback())}function m(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t =t.parentNode||t.host}}function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){w .dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRo ot;t;)v(t),t=t.olderShadowRoot}}function p(e){if(w.dom){var n=e[0];if(n&&"childL ist"===n.type&&n.addedNodes&&n.addedNodes){for(var o=n.addedNodes[0];o&&o!==docu ment&&!o.host;)o=o.parentNode;var r=o&&(o.URL||o._URL||o.host&&o.host.localName) ||"";r=r.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s] ",e.length,r||"")}e.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,fu nction(e){e.localName&&t(e)}),T(e.removedNodes,function(e){e.localName&&c(e)}))} ),w.dom&&console.groupEnd()}function h(e){for(e=wrap(e),e||(e=wrap(document));e. parentNode;)e=e.parentNode;var t=e.__observer;t&&(p(t.takeRecords()),a())}functi on v(e){if(!e.__observer){var t=new MutationObserver(p);t.observe(e,{childList:! 0,subtree:!0}),e.__observer=t}}function g(e){e=wrap(e),w.dom&&console.group("upg radeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),w.dom&&console.groupEnd()} function b(e){E(e,g)}var w=e.flags,_=e.forSubtree,E=e.forDocumentTree,y=!window. MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyf illMutations=y;var L=!1,M=[],T=Array.prototype.forEach.call.bind(Array.prototype .forEach),N=Element.prototype.createShadowRoot;Element.prototype.createShadowRoo t=function(){var e=N.call(this);return CustomElements.watchShadow(this),e},e.wat chShadow=f,e.upgradeDocumentTree=b,e.upgradeSubtree=o,e.upgradeAll=t,e.attachedN ode=r,e.takeRecords=h}),CustomElements.addModule(function(e){function t(t){if(!t .__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),r=e.ge tRegisteredDefinition(o||t.localName);if(r){if(o&&r.tag==t.localName)return n(t, r);if(!o&&!r.extends)return n(t,r)}}}function n(t,n){return a.upgrade&&console.g roup("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded __=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t }function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t.nat ive),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTML Element.prototype;){for(var i,a=Object.getOwnPropertyNames(r),s=0;i=a[s];s++)o[i ]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Ob ject.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),Custom Elements.addModule(function(e){function t(t,o){var d=o||{};if(!t)throw new Error ("document.registerElement: first argument `name` must not be empty");if(t.index Of("-")<0)throw new Error("document.registerElement: first argument ('name') mus t contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw n ew Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(c(t))throw new Error(" DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered ");return d.prototype||(d.prototype=Object.create(HTMLElement.prototype)),d.__na me=t.toLowerCase(),d.lifecycle=d.lifecycle||{},d.ancestry=i(d.extends),a(d),s(d) ,n(d.prototype),u(d.__name,d),d.ctor=l(d),d.ctor.prototype=d.prototype,d.prototy pe.constructor=d.ctor,e.ready&&v(document),d.ctor}function n(e){if(!e.setAttribu te._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e, n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n )},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this .getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attribu teChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for (var t=0;t<E.length;t++)if(e===E[t])return!0}function i(e){var t=c(e);return t?i (t.extends).concat([t]):[]}function a(e){for(var t,n=e.extends,o=0;t=e.ancestry[ o];o++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Obje ct.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement( e.tag),o=Object.getPrototypeOf(n);o===e.prototype&&(t=o)}for(var r,i=e.prototype ;i&&i!==t;)r=Object.getPrototypeOf(i),i.__proto__=r,i=r;e.native=t}}function d(e ){return b(M(e.tag),e)}function c(e){return e?y[e.toLowerCase()]:void 0}function u(e,t){y[e]=t}function l(e){return function(){return d(e)}}function m(e,t,n){re turn e===L?f(t,n):T(e,t)}function f(e,t){var n=c(t||e);if(n){if(e==n.tag&&t==n.i s)return new n.ctor;if(!t&&!n.is)return new n.ctor}var o;return t?(o=f(e),o.setA ttribute("is",t),o):(o=M(e),e.indexOf("-")>=0&&w(o,HTMLElement),o)}function p(e) {var t=N.call(this,e);return g(t),t}var h,v=e.upgradeDocumentTree,g=e.upgrade,b= e.upgradeWithDefinition,w=e.implementPrototype,_=e.useNative,E=["annotation-xml" ,"color-profile","font-face","font-face-src","font-face-uri","font-face-format", "font-face-name","missing-glyph"],y={},L="http://www.w3.org/1999/xhtml",M=docume nt.createElement.bind(document),T=document.createElementNS.bind(document),N=Node .prototype.cloneNode;h=Object.__proto__||_?function(e,t){return e instanceof t}: function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1 },document.registerElement=t,document.createElement=f,document.createElementNS=m ,Node.prototype.cloneNode=p,e.registry=y,e.instanceof=h,e.reservedTagList=E,e.ge tRegisteredDefinition=c,document.register=document.registerElement}),function(e) {function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsin gHook=function(e){a(wrap(e.import))}),CustomElements.ready=!0,setTimeout(functio n(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elap sed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new C ustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,o=e.initializ eModules,r=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchS hadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e. takeRecords=i,e.instanceof=function(e,t){return e instanceof t}}else o();var a=e .upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=Shad owDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):windo w.wrap=window.unwrap=function(e){return e}),r&&"function"!=typeof window.CustomE vent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("Cust omEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t. detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===doc ument.readyState||e.flags.eager)t();else if("interactive"!==document.readyState| |window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window .HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.a ddEventListener(s,t)}else t()}(window.CustomElements),"undefined"==typeof HTMLTe mplateElement&&!function(){var e="template";HTMLTemplateElement=function(){},HTM LTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElem ent.decorate=function(e){if(!e.content){e.content=e.ownerDocument.createDocument Fragment();for(var t;t=e.firstChild;)e.content.appendChild(t)}},HTMLTemplateElem ent.bootstrap=function(t){for(var n,o=t.querySelectorAll(e),r=0,i=o.length;i>r&& (n=o[r]);r++)HTMLTemplateElement.decorate(n)},addEventListener("DOMContentLoaded ",function(){HTMLTemplateElement.bootstrap(document)})}(),function(){var e=docum ent.createElement("style");e.textContent="body {transition: opacity ease-in 0.2s ; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var t=document.querySelector("head");t.insertBefore(e,t.firstChi ld)}(window.WebComponents);
OLDNEW

Powered by Google App Engine