-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyoutube_prompt_before_watch_minified.js
3 lines (2 loc) · 301 KB
/
youtube_prompt_before_watch_minified.js
1
2
3
window.habitlab_content_script = true;
!function(e){function t(t){for(var n,i,r=t[0],s=t[1],a=0,c=[];a<r.length;a++)i=r[a],o[i]&&c.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);c.length;)c.shift()()}var n={},o={"interventions/youtube/prompt_before_watch/frontend":0};function i(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.e=function(e){var t=[],n=o[e];if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,i){n=o[e]=[t,i]});t.push(n[2]=r);var s,a=document.getElementsByTagName("head")[0],l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=function(e){return i.p+""+({}[e]||e)+".js"}(e),s=function(t){l.onerror=l.onload=null,clearTimeout(c);var n=o[e];if(0!==n){if(n){var i=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src,s=new Error("Loading chunk "+e+" failed.\n("+i+": "+r+")");s.type=i,s.request=r,n[1](s)}o[e]=void 0}};var c=setTimeout(function(){s({type:"timeout",target:l})},12e4);l.onerror=l.onload=s,a.appendChild(l)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],s=r.push.bind(r);r.push=t,r=r.slice();for(var a=0;a<r.length;a++)t(r[a]);var l=s;i(i.s=35)}({"./node_modules/enable-webcomponents-in-content-scripts/index.js":function(e,t,n){document.registerElement&&/\{\s*\[native code\]\s*\}/.test(document.registerElement)&&(document.registerElement=null),null==document.registerElement&&n("./node_modules/webcomponentsjs-custom-element-v0/CustomElements.js")},"./node_modules/webcomponentsjs-custom-element-v0/CustomElements.js":function(e,t){"undefined"==typeof WeakMap&&function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+t+++"__"};n.prototype={set:function(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]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),function(e){if(!e.JsMutationObserver){var t,n=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))t=setTimeout;else if(window.setImmediate)t=window.setImmediate;else{var o=[],i=String(Math.random());window.addEventListener("message",function(e){if(e.data===i){var t=o;o=[],t.forEach(function(e){e()})}}),t=function(e){o.push(e),window.postMessage(i,"*")}}var r,s,a=!1,l=[],c=0;h.prototype={observe:function(e,t){if(e=function(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o,i=n.get(e);i||n.set(e,i=[]);for(var r=0;r<i.length;r++)if(i[r].observer===this){(o=i[r]).removeListeners(),o.options=t;break}o||(o=new y(this,e,t),i.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=n.get(e),o=0;o<t.length;o++){var i=t[o];if(i.observer===this){i.removeListeners(),t.splice(o,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},y.prototype={enqueue:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var i=m(n[o-1],e);if(i)return void(n[o-1]=i)}else!function(e){l.push(e),a||(a=!0,t(p))}(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("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.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=n.get(e);t||n.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=n.get(e),o=0;o<t.length;o++)if(t[o]===this){t.splice(o,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target;(a=new f("attributes",o)).attributeName=t,a.attributeNamespace=n;var i=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;d(o,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||-1!==e.attributeFilter.indexOf(t)||-1!==e.attributeFilter.indexOf(n)))return e.attributeOldValue?_(i):a});break;case"DOMCharacterDataModified":var a=f("characterData",o=e.target);i=e.prevValue;d(o,function(e){if(e.characterData)return e.characterDataOldValue?_(i):a});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var l,c,p=e.target;"DOMNodeInserted"===e.type?(l=[p],c=[]):(l=[],c=[p]);var h=p.previousSibling,u=p.nextSibling;(a=f("childList",e.target.parentNode)).addedNodes=l,a.removedNodes=c,a.previousSibling=h,a.nextSibling=u,d(e.relatedNode,function(e){if(e.childList)return a})}r=s=void 0}},e.JsMutationObserver=h,e.MutationObserver||(e.MutationObserver=h,h._isPolyfilled=!0)}function p(){a=!1;var e=l;l=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var o=e.takeRecords();!function(e){e.nodes_.forEach(function(t){var o=n.get(t);o&&o.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}(e),o.length&&(e.callback_(o,e),t=!0)}),t&&p()}function d(e,t){for(var o=e;o;o=o.parentNode){var i=n.get(o);if(i)for(var r=0;r<i.length;r++){var s=i[r],a=s.options;if(o===e||a.subtree){var l=t(a);l&&s.enqueue(l)}}}}function h(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++c}function u(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function f(e,t){return r=new u(e,t)}function _(e){return s||((s=function(e){var t=new u(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}(r)).oldValue=e,s)}function m(e,t){return e===t?e:s&&function(e){return e===s||e===r}(e)?s:null}function y(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}}(self),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}if(window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}),!function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}()){var n=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[];e.addModule=function(e){n.push(e)},e.initializeModules=function(){n.forEach(function(t){t(e)})},e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){var t=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";function n(e,t){!function e(t,n,o){var i=t.firstElementChild;if(!i)for(i=t.firstChild;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.nextSibling;for(;i;)!0!==n(i,o)&&e(i,n,o),i=i.nextElementSibling;return null}(e,function(e){if(t(e))return!0;o(e,t)}),o(e,t)}function o(e,t){for(var o=e.shadowRoot;o;)n(o,t),o=o.olderShadowRoot}e.forDocumentTree=function(e,n){!function e(n,o,i){if(n=window.wrap(n),!(i.indexOf(n)>=0)){i.push(n);for(var r,s=n.querySelectorAll("link[rel="+t+"]"),a=0,l=s.length;a<l&&(r=s[a]);a++)r.import&&e(r.import,o,i);o(n)}}(e,n,[])},e.forSubtree=n}),window.CustomElements.addModule(function(e){var t=e.flags,n=e.forSubtree,o=e.forDocumentTree;function i(e,t){return r(e,t)||s(e,t)}function r(t,n){if(e.upgrade(t,n))return!0;n&&h(t)}function s(e,t){n(e,function(e){if(r(e,t))return!0})}var a=window.MutationObserver._isPolyfilled&&t["throttle-attached"];e.hasPolyfillMutations=a,e.hasThrottledAttached=a;var l=!1,c=[];function p(e){c.push(e),l||(l=!0,setTimeout(d))}function d(){l=!1;for(var e,t=c,n=0,o=t.length;n<o&&(e=t[n]);n++)e();c=[]}function h(e){a?p(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function f(e){a?p(function(){_(e)}):_(e)}function _(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function m(e,o){if(t.dom){var r=o[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var s=r.addedNodes[0];s&&s!==document&&!s.host;)s=s.parentNode;var a=s&&(s.URL||s._URL||s.host&&s.host.localName)||"";a=a.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",o.length,a||"")}var l=function(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}(e);o.forEach(function(e){"childList"===e.type&&(y(e.addedNodes,function(e){e.localName&&i(e,l)}),y(e.removedNodes,function(e){e.localName&&function(e){f(e),n(e,function(e){f(e)})}(e)}))}),t.dom&&console.groupEnd()}var y=Array.prototype.forEach.call.bind(Array.prototype.forEach);function b(e){if(!e.__observer){var t=new MutationObserver(m.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),t.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),i(e,e===window.wrap(document)),b(e),t.dom&&console.groupEnd()}var g=Element.prototype.createShadowRoot;g&&(Element.prototype.createShadowRoot=function(){var e=g.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=function(e){if(e.shadowRoot&&!e.shadowRoot.__watched){t.dom&&console.log("watching shadow-root for: ",e.localName);for(var n=e.shadowRoot;n;)b(n),n=n.olderShadowRoot}},e.upgradeDocumentTree=function(e){o(e,v)},e.upgradeDocument=v,e.upgradeSubtree=s,e.upgradeAll=i,e.attached=h,e.takeRecords=function(e){for((e=window.wrap(e))||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(e,t.takeRecords()),d())}}),window.CustomElements.addModule(function(e){var t=e.flags;function n(n,i,r){return t.upgrade&&console.group("upgrade:",n.localName),i.is&&n.setAttribute("is",i.is),o(n,i),n.__upgraded__=!0,function(e){e.createdCallback&&e.createdCallback()}(n),r&&e.attached(n),e.upgradeSubtree(n,r),t.upgrade&&console.groupEnd(),n}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(!function(e,t,n){var o={},i=t;for(;i!==n&&i!==HTMLElement.prototype;){for(var r,s=Object.getOwnPropertyNames(i),a=0;r=s[a];a++)o[r]||(Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r)),o[r]=1);i=Object.getPrototypeOf(i)}}(e,t.prototype,t.native),e.__proto__=t.prototype)}e.upgrade=function(t,o){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var i=t.getAttribute("is"),r=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(i);if(r&&(i&&r.tag==t.localName||!i&&!r.extends))return n(t,r,o)}},e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){e.isIE;var t=e.upgradeDocumentTree,n=e.upgradeAll,o=e.upgradeWithDefinition,i=e.implementPrototype,r=e.useNative;function s(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var i=this.getAttribute(e);this.attributeChangedCallback&&i!==o&&this.attributeChangedCallback(e,o,i)}var a=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];var l={};function c(e){if(e)return l[e.toLowerCase()]}var p="http://www.w3.org/1999/xhtml";function d(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n,o=c(t||e);if(o){if(e==o.tag&&t==o.is)return new o.ctor;if(!t&&!o.is)return new o.ctor}return t?((n=d(e)).setAttribute("is",t),n):(n=u(e),e.indexOf("-")>=0&&i(n,HTMLElement),n)}var h,u=document.createElement.bind(document),f=document.createElementNS.bind(document);function _(e,t){var o=e[t];e[t]=function(){var e=o.apply(this,arguments);return n(e),e}}h=Object.__proto__||r?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},_(Node.prototype,"cloneNode"),_(document,"importNode"),document.registerElement=function(n,i){var r=i||{};if(!n)throw new Error("document.registerElement: first argument `name` must not be empty");if(n.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(n)+"'.");if(function(e){for(var t=0;t<a.length;t++)if(e===a[t])return!0}(n))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(n)+"'. The type name is invalid.");if(!c(n))return r.prototype||(r.prototype=Object.create(HTMLElement.prototype)),r.__name=n.toLowerCase(),r.extends&&(r.extends=r.extends.toLowerCase()),r.lifecycle=r.lifecycle||{},r.ancestry=function e(t){var n=c(t);return n?e(n.extends).concat([n]):[]}(r.extends),function(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)}(r),function(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var o,i=e.prototype,r=!1;i;)i==t&&(r=!0),(o=Object.getPrototypeOf(i))&&(i.__proto__=o),i=o;r||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e.native=t}}(r),function(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){s.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){s.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}(r.prototype),function(e,t){l[e]=t}(r.__name,r),r.ctor=function(e){return function(){return function(e){return o(u(e.tag),e)}(e)}}(r),r.ctor.prototype=r.prototype,r.prototype.constructor=r.ctor,e.ready&&t(document),r.ctor},document.createElement=d,document.createElementNS=function(e,t,n){return e===p?d(t,n):f(e,t)},e.registry=l,e.instanceof=h,e.reservedTagList=a,e.getRegisteredDefinition=c,document.register=document.registerElement}),function(e){var t=e.useNative,n=e.initializeModules;e.isIE;if(t){var o=function(){};e.watchShadow=o,e.upgrade=o,e.upgradeAll=o,e.upgradeDocumentTree=o,e.upgradeSubtree=o,e.takeRecords=o,e.instanceof=function(e,t){return e instanceof t}}else n();var i=e.upgradeDocumentTree,r=e.upgradeDocument;function s(){i(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(e){setTimeout(e,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e.import&&r(wrap(e.import))}),"complete"===document.readyState||e.flags.eager)s();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var a=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(a,s)}else s()}(window.CustomElements)},"./src/bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer-0.js":function(e,t){!function(){"use strict";Polymer.IronA11yAnnouncer=Polymer({is:"habitlab-iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async(function(){this._text=e},100)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}}),Polymer.IronA11yAnnouncer.instance=null,Polymer.IronA11yAnnouncer.requestAvailability=function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=document.createElement("habitlab-iron-a11y-announcer")),document.body.appendChild(Polymer.IronA11yAnnouncer.instance)}}()},"./src/bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer.html"),"bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer.html"),n("./src/bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer-0.js")},"./src/bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> </head><body><habitlab-dom-module id=habitlab-iron-a11y-announcer> <style>:host{display:inline-block;position:fixed;clip:rect(0,0,0,0)}</style> <template> <div aria-live$=[[mode]]>[[_text]]</div> </template> <script src=habitlab-iron-a11y-announcer-0.js><\/script> </habitlab-dom-module> </body></html>"},"./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior-0.js":function(e,t){!function(){"use strict";var e={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},t={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},n={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},o=/[a-z0-9*]/,i=/U\+/,r=/^arrow/,s=/^space(bar)?/,a=/^escape$/;function l(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||s.test(i)?n="space":a.test(i)?n="esc":1==i.length?t&&!o.test(i)||(n=i):n=r.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function c(n,o){return l(n.key,o)||function(t){var n="";return t&&(t in e?n=e[t]:i.test(t)?(t=parseInt(t.replace("U+","0x"),16),n=String.fromCharCode(t).toLowerCase()):n=t.toLowerCase()),n}(n.keyIdentifier)||function(e){var n="";return Number(e)&&(n=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):t[e]),n}(n.keyCode)||l(n.detail?n.detail.key:n.detail,o)||""}function p(e,t){return c(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function d(e){return e.trim().split(" ").map(function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var o=t.split(":"),i=o[0],r=o[1];return i in n?(e[n[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=r||"keydown"),e},{combo:e.split(":").shift()})}(e)})}Polymer.IronA11yKeysBehavior={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=d(t),o=0;o<n.length;++o)if(p(n[o],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(e){return e.keyBindings});return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach(function(e){for(var t in e)this._addKeyBinding(t,e[t])},this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1})},_addKeyBinding:function(e,t){d(e).forEach(function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)},this)},_unlistenKeyEventListeners:function(){for(var e,t,n,o;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],o=e[2],t.removeEventListener(n,o)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var o=e[n][0],i=e[n][1];if(p(o,t)&&(this._triggerKeyHandler(o,i,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var o=Object.create(e);o.keyboardEvent=n;var i=new CustomEvent(e.event,{detail:o,cancelable:!0});this[t].call(this,i),i.defaultPrevented&&n.preventDefault()}}}()},"./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html"),"bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html"),n("./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior-0.js")},"./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <script src=iron-a11y-keys-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-behaviors/iron-button-state-0.js":function(e,t){Polymer.IronButtonStateImpl={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_detectKeyboardFocus(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(e){null!=e.detail&&(this.toggles?this._userActivate(!this.active):this.active=!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,n=Polymer.dom(t).localTarget;this.isLightDescendant(n)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,n=Polymer.dom(t).localTarget;this.isLightDescendant(n)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Polymer.IronButtonState=[Polymer.IronA11yKeysBehavior,Polymer.IronButtonStateImpl]},"./src/bower_components/iron-behaviors/iron-button-state.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.deps.js"),n("./src/bower_components/iron-behaviors/iron-control-state.deps.js"),o(n("./src/bower_components/iron-behaviors/iron-button-state.html"),"bower_components/iron-behaviors/iron-button-state.html"),n("./src/bower_components/iron-behaviors/iron-button-state-0.js")},"./src/bower_components/iron-behaviors/iron-button-state.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html> <link rel=import href=iron-control-state.html> <script src=iron-button-state-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-behaviors/iron-control-state-0.js":function(e,t){Polymer.IronControlState={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:Number},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){if(e.target===this)this._setFocused("focus"===e.type);else if(!this.shadowRoot){var t=Polymer.dom(e).localTarget;this.isLightDescendant(t)||this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})}},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.tabIndex,this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(this.tabIndex=this._oldTabIndex)},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}}},"./src/bower_components/iron-behaviors/iron-control-state.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-behaviors/iron-control-state.html"),"bower_components/iron-behaviors/iron-control-state.html"),n("./src/bower_components/iron-behaviors/iron-control-state-0.js")},"./src/bower_components/iron-behaviors/iron-control-state.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <script src=iron-control-state-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-checked-element-behavior/iron-checked-element-behavior-0.js":function(e,t){Polymer.IronCheckedElementBehaviorImpl={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.required&&this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},Polymer.IronCheckedElementBehavior=[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronCheckedElementBehaviorImpl]},"./src/bower_components/iron-checked-element-behavior/iron-checked-element-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-validatable-behavior/iron-validatable-behavior.deps.js"),n("./src/bower_components/iron-form-element-behavior/iron-form-element-behavior.deps.js"),o(n("./src/bower_components/iron-checked-element-behavior/iron-checked-element-behavior.html"),"bower_components/iron-checked-element-behavior/iron-checked-element-behavior.html"),n("./src/bower_components/iron-checked-element-behavior/iron-checked-element-behavior-0.js")},"./src/bower_components/iron-checked-element-behavior/iron-checked-element-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-validatable-behavior/iron-validatable-behavior.html> <link rel=import href=../iron-form-element-behavior/iron-form-element-behavior.html> <script src=iron-checked-element-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-fit-behavior/iron-fit-behavior-0.js":function(e,t){Polymer.IronFitBehavior={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var e=Polymer.dom(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},attached:function(){this._isRTL="rtl"==window.getComputedStyle(this).direction,this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):this.fit())},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==e.top?"top":"auto"!==e.bottom?"bottom":null,horizontally:"auto"!==e.left?"left":"auto"!==e.right?"right":null},sizedBy:{height:"none"!==t.maxHeight,width:"none"!==t.maxWidth,minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}},this.verticalOffset&&(this._fitInfo.margin.top=this._fitInfo.margin.bottom=this.verticalOffset,this._fitInfo.inlineStyle.marginTop=this.style.marginTop||"",this._fitInfo.inlineStyle.marginBottom=this.style.marginBottom||"",this.style.marginTop=this.style.marginBottom=this.verticalOffset+"px"),this.horizontalOffset&&(this._fitInfo.margin.left=this._fitInfo.margin.right=this.horizontalOffset,this._fitInfo.inlineStyle.marginLeft=this.style.marginLeft||"",this._fitInfo.inlineStyle.marginRight=this.style.marginRight||"",this.style.marginLeft=this.style.marginRight=this.horizontalOffset+"px")}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(this.horizontalAlign||this.verticalAlign){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),n=this.__getNormalizedRect(this.fitInto),o=this._fitInfo.margin,i={width:e.width+o.left+o.right,height:e.height+o.top+o.bottom},r=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,i,t,n),s=r.left+o.left,a=r.top+o.top,l=Math.min(n.right-o.right,s+e.width),c=Math.min(n.bottom-o.bottom,a+e.height),p=this._fitInfo.sizedBy.minWidth,d=this._fitInfo.sizedBy.minHeight;s<o.left&&l-(s=o.left)<p&&(s=l-p),a<o.top&&c-(a=o.top)<d&&(a=c-d),this.sizingTarget.style.maxWidth=l-s+"px",this.sizingTarget.style.maxHeight=c-a+"px",this.style.left=s-e.left+"px",this.style.top=a-e.top+"px"}},constrain:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,n,o,i){this.__sizeDimension(e,t,n,o,i)},__sizeDimension:function(e,t,n,o,i){var r=this._fitInfo,s=this.__getNormalizedRect(this.fitInto),a="Width"===i?s.width:s.height,l=t===o,c=l?a-e[o]:e[n],p=r.margin[l?n:o],d="offset"+i,h=this[d]-this.sizingTarget[d];this.sizingTarget.style["max"+i]=a-p-c-h+"px"},center:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!e.vertically||!e.horizontally){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),n=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var o=n.top-t.top+(n.height-t.height)/2;this.style.top=o+"px"}if(!e.horizontally){var i=n.left-t.left+(n.width-t.width)/2;this.style.left=i+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getCroppedArea:function(e,t,n){var o=Math.min(0,e.top)+Math.min(0,n.bottom-(e.top+t.height)),i=Math.min(0,e.left)+Math.min(0,n.right-(e.left+t.width));return Math.abs(o)*t.width+Math.abs(i)*t.height},__getPosition:function(e,t,n,o,i){var r,s=[{verticalAlign:"top",horizontalAlign:"left",top:o.top,left:o.left},{verticalAlign:"top",horizontalAlign:"right",top:o.top,left:o.right-n.width},{verticalAlign:"bottom",horizontalAlign:"left",top:o.bottom-n.height,left:o.left},{verticalAlign:"bottom",horizontalAlign:"right",top:o.bottom-n.height,left:o.right-n.width}];if(this.noOverlap){for(var a=0,l=s.length;a<l;a++){var c={};for(var p in s[a])c[p]=s[a][p];s.push(c)}s[0].top=s[1].top+=o.height,s[2].top=s[3].top-=o.height,s[4].left=s[6].left+=o.width,s[5].left=s[7].left-=o.width}t="auto"===t?null:t,e="auto"===e?null:e;for(a=0;a<s.length;a++){var d=s[a];if(!this.dynamicAlign&&!this.noOverlap&&d.verticalAlign===t&&d.horizontalAlign===e){r=d;break}var h=!(t&&d.verticalAlign!==t||e&&d.horizontalAlign!==e);if(this.dynamicAlign||h){r=r||d,d.croppedArea=this.__getCroppedArea(d,n,i);var u=d.croppedArea-r.croppedArea;if((u<0||0===u&&h)&&(r=d),0===r.croppedArea&&h)break}}return r}}},"./src/bower_components/iron-fit-behavior/iron-fit-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-fit-behavior/iron-fit-behavior.html"),"bower_components/iron-fit-behavior/iron-fit-behavior.html"),n("./src/bower_components/iron-fit-behavior/iron-fit-behavior-0.js")},"./src/bower_components/iron-fit-behavior/iron-fit-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <script src=iron-fit-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-flex-layout/iron-flex-layout.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-flex-layout/iron-flex-layout.html"),"bower_components/iron-flex-layout/iron-flex-layout.html")},"./src/bower_components/iron-flex-layout/iron-flex-layout.html":function(e,t){e.exports=" <link rel=import href=../polymer/polymer.html> <style>[hidden]{display:none!important}</style> <style is=habitlab-custom-style>:root{--layout:{display:-ms-flexbox;display:-webkit-flex;display:flex};--layout-inline:{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex};--layout-horizontal:{@apply(--layout);-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row};--layout-horizontal-reverse:{@apply(--layout);-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse};--layout-vertical:{@apply(--layout);-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column};--layout-vertical-reverse:{@apply(--layout);-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse};--layout-wrap:{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap};--layout-wrap-reverse:{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse};--layout-flex-auto:{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto};--layout-flex-none:{-ms-flex:none;-webkit-flex:none;flex:none};--layout-flex:{-ms-flex:1 1 0px;-webkit-flex:1;flex:1;-webkit-flex-basis:0px;flex-basis:0px};--layout-flex-2:{-ms-flex:2;-webkit-flex:2;flex:2};--layout-flex-3:{-ms-flex:3;-webkit-flex:3;flex:3};--layout-flex-4:{-ms-flex:4;-webkit-flex:4;flex:4};--layout-flex-5:{-ms-flex:5;-webkit-flex:5;flex:5};--layout-flex-6:{-ms-flex:6;-webkit-flex:6;flex:6};--layout-flex-7:{-ms-flex:7;-webkit-flex:7;flex:7};--layout-flex-8:{-ms-flex:8;-webkit-flex:8;flex:8};--layout-flex-9:{-ms-flex:9;-webkit-flex:9;flex:9};--layout-flex-10:{-ms-flex:10;-webkit-flex:10;flex:10};--layout-flex-11:{-ms-flex:11;-webkit-flex:11;flex:11};--layout-flex-12:{-ms-flex:12;-webkit-flex:12;flex:12};--layout-start:{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start};--layout-center:{-ms-flex-align:center;-webkit-align-items:center;align-items:center};--layout-end:{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end};--layout-baseline:{-ms-flex-align:baseline;-webkit-align-items:baseline;align-items:baseline};--layout-start-justified:{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start};--layout-center-justified:{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center};--layout-end-justified:{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end};--layout-around-justified:{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around};--layout-justified:{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between};--layout-center-center:{@apply(--layout-center);@apply(--layout-center-justified)};--layout-self-start:{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start};--layout-self-center:{-ms-align-self:center;-webkit-align-self:center;align-self:center};--layout-self-end:{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end};--layout-self-stretch:{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch};--layout-self-baseline:{-ms-align-self:baseline;-webkit-align-self:baseline;align-self:baseline};--layout-start-aligned:{-ms-flex-line-pack:start;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start};--layout-end-aligned:{-ms-flex-line-pack:end;-ms-align-content:flex-end;-webkit-align-content:flex-end;align-content:flex-end};--layout-center-aligned:{-ms-flex-line-pack:center;-ms-align-content:center;-webkit-align-content:center;align-content:center};--layout-between-aligned:{-ms-flex-line-pack:justify;-ms-align-content:space-between;-webkit-align-content:space-between;align-content:space-between};--layout-around-aligned:{-ms-flex-line-pack:distribute;-ms-align-content:space-around;-webkit-align-content:space-around;align-content:space-around};--layout-block:{display:block};--layout-invisible:{visibility:hidden!important};--layout-relative:{position:relative};--layout-fit:{position:absolute;top:0;right:0;bottom:0;left:0};--layout-scroll:{-webkit-overflow-scrolling:touch;overflow:auto};--layout-fullbleed:{margin:0;height:100vh};--layout-fixed-top:{position:fixed;top:0;left:0;right:0};--layout-fixed-right:{position:fixed;top:0;right:0;bottom:0};--layout-fixed-bottom:{position:fixed;right:0;bottom:0;left:0};--layout-fixed-left:{position:fixed;top:0;bottom:0;left:0};}</style> "},"./src/bower_components/iron-form-element-behavior/iron-form-element-behavior-0.js":function(e,t){Polymer.IronFormElementBehavior={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:function(){this.fire("iron-form-element-register")},detached:function(){this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}}},"./src/bower_components/iron-form-element-behavior/iron-form-element-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-form-element-behavior/iron-form-element-behavior.html"),"bower_components/iron-form-element-behavior/iron-form-element-behavior.html"),n("./src/bower_components/iron-form-element-behavior/iron-form-element-behavior-0.js")},"./src/bower_components/iron-form-element-behavior/iron-form-element-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <script src=iron-form-element-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/habitlab-iron-meta/habitlab-iron-meta-0.js":function(e,t){!function(){var e={},t={},n=null;Polymer.IronMeta=Polymer({is:"habitlab-iron-meta",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,observer:"_valueChanged"},self:{type:Boolean,observer:"_selfChanged"},list:{type:Array,notify:!0}},hostAttributes:{hidden:!0},factoryImpl:function(e){if(e)for(var t in e)switch(t){case"type":case"key":case"value":this[t]=e[t]}},created:function(){this._metaDatas=e,this._metaArrays=t},_keyChanged:function(e,t){this._resetRegistration(t)},_valueChanged:function(e){this._resetRegistration(this.key)},_selfChanged:function(e){e&&(this.value=this)},_typeChanged:function(n){this._unregisterKey(this.key),e[n]||(e[n]={}),this._metaData=e[n],t[n]||(t[n]=[]),this.list=t[n],this._registerKeyValue(this.key,this.value)},byKey:function(e){return this._metaData&&this._metaData[e]},_resetRegistration:function(e){this._unregisterKey(e),this._registerKeyValue(this.key,this.value)},_unregisterKey:function(e){this._unregister(e,this._metaData,this.list)},_registerKeyValue:function(e,t){this._register(e,t,this._metaData,this.list)},_register:function(e,t,n,o){e&&n&&void 0!==t&&(n[e]=t,o.push(t))},_unregister:function(e,t,n){if(e&&t&&e in t){var o=t[e];delete t[e],this.arrayDelete(n,o)}}}),Polymer.IronMeta.getIronMeta=function(){return null===n&&(n=new Polymer.IronMeta),n},Polymer.IronMetaQuery=Polymer({is:"habitlab-iron-meta-query",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,readOnly:!0},list:{type:Array,notify:!0}},factoryImpl:function(e){if(e)for(var t in e)switch(t){case"type":case"key":this[t]=e[t]}},created:function(){this._metaDatas=e,this._metaArrays=t},_keyChanged:function(e){this._setValue(this._metaData&&this._metaData[e])},_typeChanged:function(n){this._metaData=e[n],this.list=t[n],this.key&&this._keyChanged(this.key)},byKey:function(e){return this._metaData&&this._metaData[e]}})}()},"./src/bower_components/habitlab-iron-meta/habitlab-iron-meta.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/habitlab-iron-meta/habitlab-iron-meta.html"),"bower_components/habitlab-iron-meta/habitlab-iron-meta.html"),n("./src/bower_components/habitlab-iron-meta/habitlab-iron-meta-0.js")},"./src/bower_components/habitlab-iron-meta/habitlab-iron-meta.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <script src=habitlab-iron-meta-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop-0.js":function(e,t){!function(){"use strict";Polymer({is:"habitlab-iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Polymer.dom(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Polymer.dom(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}})}()},"./src/bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop.html"),"bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop.html"),n("./src/bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop-0.js")},"./src/bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> </head><body><habitlab-dom-module id=habitlab-iron-overlay-backdrop> <template> <style>:host{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--habitlab-iron-overlay-backdrop-background-color,#000);opacity:0;transition:opacity .2s;pointer-events:none;@apply(--habitlab-iron-overlay-backdrop)}:host(.opened){opacity:var(--habitlab-iron-overlay-backdrop-opacity,.6);pointer-events:auto;@apply(--habitlab-iron-overlay-backdrop-opened)}</style> <content></content> </template> </habitlab-dom-module> <script src=habitlab-iron-overlay-backdrop-0.js><\/script> </body></html>"},"./src/bower_components/iron-overlay-behavior/iron-overlay-behavior-0.js":function(e,t){!function(){"use strict";Polymer.IronOverlayBehaviorImpl={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},alwaysOnTop:{type:Boolean},_manager:{type:Object,value:Polymer.IronOverlayManager},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Polymer.dom(this).querySelector("[autofocus]")||this},get _focusableNodes(){var e=["a[href]","area[href]","iframe","[tabindex]","[contentEditable=true]"].join(':not([tabindex="-1"]),')+':not([tabindex="-1"]),'+["input","select","textarea","button"].join(':not([disabled]):not([tabindex="-1"]),')+':not([disabled]):not([tabindex="-1"])',t=Polymer.dom(this).querySelectorAll(e);return this.tabIndex>=0&&t.splice(0,0,this),t.sort(function(e,t){return e.tabIndex===t.tabIndex?0:0===e.tabIndex||e.tabIndex>t.tabIndex?1:-1})},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__openChangedAsync=null,this.__onIronResizeAsync=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(),this._observer=Polymer.dom(this).observeNodes(this._onNodesChange)},detached:function(){Polymer.dom(this).unobserveNodes(this._observer),this._observer=null,this.opened=!1},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){this.fire("iron-overlay-canceled",e,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(){this.opened?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this._overlaySetup&&(this.__openChangedAsync&&window.cancelAnimationFrame(this.__openChangedAsync),this.opened||this._manager.removeOverlay(this),this.isAttached&&(this.__isAnimating=!0,this.__openChangedAsync=window.requestAnimationFrame(function(){this.__openChangedAsync=null,this.opened?(this._manager.addOverlay(this),this._prepareRenderOpened(),this._renderOpened()):(this._applyFocus(),this._renderClosed())}.bind(this))))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this._preparePositioning(),this.refit(),this._finishPositioning(),this._applyFocus(),this.noAutoFocus&&document.activeElement===this._focusNode&&this._focusNode.blur()},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1;var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1],this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){this.opened?this.noAutoFocus||this._focusNode.focus():(this._focusNode.blur(),this._focusedChild=null,this._manager.focusOverlay())},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Polymer.dom(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){var t=e.shiftKey,n=t?this.__firstFocusableNode:this.__lastFocusableNode,o=t?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(n===o)i=!0;else{var r=this._manager.deepActiveElement;i=r===n||r===this}i&&(e.preventDefault(),this._focusedChild=o,this._applyFocus())}},_onIronResize:function(){this.__onIronResizeAsync&&(window.cancelAnimationFrame(this.__onIronResizeAsync),this.__onIronResizeAsync=null),this.opened&&!this.__isAnimating&&(this.__onIronResizeAsync=window.requestAnimationFrame(function(){this.__onIronResizeAsync=null,this.refit()}.bind(this)))},_onNodesChange:function(){this.opened&&!this.__isAnimating&&this.notifyResize()}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl]}()},"./src/bower_components/iron-overlay-behavior/iron-overlay-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-fit-behavior/iron-fit-behavior.deps.js"),n("./src/bower_components/iron-resizable-behavior/iron-resizable-behavior.deps.js"),n("./src/bower_components/iron-overlay-behavior/iron-overlay-manager.deps.js"),o(n("./src/bower_components/iron-overlay-behavior/iron-overlay-behavior.html"),"bower_components/iron-overlay-behavior/iron-overlay-behavior.html"),n("./src/bower_components/iron-overlay-behavior/iron-overlay-behavior-0.js")},"./src/bower_components/iron-overlay-behavior/iron-overlay-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-fit-behavior/iron-fit-behavior.html> <link rel=import href=../iron-resizable-behavior/iron-resizable-behavior.html> <link rel=import href=iron-overlay-manager.html> <script src=iron-overlay-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-overlay-behavior/iron-overlay-manager-0.js":function(e,t){Polymer.IronOverlayManagerClass=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Polymer.Gestures.add(document,"tap",null),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)},Polymer.IronOverlayManagerClass.prototype={constructor:Polymer.IronOverlayManagerClass,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("habitlab-iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){for(var e=document.activeElement||document.body;e.root&&Polymer.dom(e.root).activeElement;)e=Polymer.dom(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var n=this._overlays.length-1,o=this._overlays[n];if(o&&this._shouldBeBehindOverlay(t,o)&&n--,!(e>=n)){var i=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=i&&this._applyOverlayZ(t,i);e<n;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[n]=t}}},addOrRemoveOverlay:function(e){e.opened?this.addOverlay(e):this.removeOverlay(e)},addOverlay:function(e){var t=this._overlays.indexOf(e);if(t>=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var n=this._overlays.length,o=this._overlays[n-1],i=Math.max(this._getZ(o),this._minimumZ),r=this._getZ(e);if(o&&this._shouldBeBehindOverlay(e,o)){this._applyOverlayZ(o,i),n--;var s=this._overlays[n-1];i=Math.max(this._getZ(s),this._minimumZ)}r<=i&&this._applyOverlayZ(e,i),this._overlays.splice(n,0,e);var a=this.deepActiveElement;e.restoreFocusNode=this._overlayParent(a)?null:a,this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);if(-1!==t){this._overlays.splice(t,1);var n=e.restoreFocusOnClose?e.restoreFocusNode:null;e.restoreFocusNode=null,n&&Polymer.dom(document.body).deepContains(n)&&n.focus(),this.trackBackdrop()}},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&!e.transitioning&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e)},getBackdrops:function(){for(var e=[],t=0;t<this._overlays.length;t++)this._overlays[t].withBackdrop&&e.push(this._overlays[t]);return e},backdropZ:function(){return this._getZ(this._overlayWithBackdrop())-1},_overlayWithBackdrop:function(){for(var e=0;e<this._overlays.length;e++)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var n=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);n==n&&(t=n)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayParent:function(e){for(;e&&e!==document.body;){if(e._manager===this)return e;e=Polymer.dom(e).parentNode||e.host}},_overlayInPath:function(e){e=e||[];for(var t=0;t<e.length;t++)if(e[t]._manager===this)return e[t]},_onCaptureClick:function(e){var t=this.currentOverlay();t&&this._overlayInPath(Polymer.dom(e).path)!==t&&t._onCaptureClick(e)},_onCaptureFocus:function(e){var t=this.currentOverlay();t&&t._onCaptureFocus(e)},_onCaptureKeyDown:function(e){var t=this.currentOverlay();t&&(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"esc")?t._onCaptureEsc(e):Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"tab")&&t._onCaptureTab(e))},_shouldBeBehindOverlay:function(e,t){return!e.alwaysOnTop&&t.alwaysOnTop}},Polymer.IronOverlayManager=new Polymer.IronOverlayManagerClass},"./src/bower_components/iron-overlay-behavior/iron-overlay-manager.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.deps.js"),n("./src/bower_components/iron-overlay-behavior/habitlab-iron-overlay-backdrop.deps.js"),o(n("./src/bower_components/iron-overlay-behavior/iron-overlay-manager.html"),"bower_components/iron-overlay-behavior/iron-overlay-manager.html"),n("./src/bower_components/iron-overlay-behavior/iron-overlay-manager-0.js")},"./src/bower_components/iron-overlay-behavior/iron-overlay-manager.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html> <link rel=import href=habitlab-iron-overlay-backdrop.html> <script src=iron-overlay-manager-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-resizable-behavior/iron-resizable-behavior-0.js":function(e,t){Polymer.IronResizableBehavior={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable=e},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():Polymer.Settings.useShadow||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=e.path?e.path[0]:e.target;t!==this&&(-1===this._interestedResizables.indexOf(t)&&(this._interestedResizables.push(t),this.listen(t,"iron-resize","_onDescendantIronResize")),t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)}}},"./src/bower_components/iron-resizable-behavior/iron-resizable-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/iron-resizable-behavior/iron-resizable-behavior.html"),"bower_components/iron-resizable-behavior/iron-resizable-behavior.html"),n("./src/bower_components/iron-resizable-behavior/iron-resizable-behavior-0.js")},"./src/bower_components/iron-resizable-behavior/iron-resizable-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <script src=iron-resizable-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/iron-validatable-behavior/iron-validatable-behavior-0.js":function(e,t){Polymer.IronValidatableBehaviorMeta=null,Polymer.IronValidatableBehavior={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1},_validatorMeta:{type:Object},validatorType:{type:String,value:"validator"},_validator:{type:Object,computed:"__computeValidator(validator)"}},observers:["_invalidChanged(invalid)"],registered:function(){Polymer.IronValidatableBehaviorMeta=new Polymer.IronMeta({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},hasValidator:function(){return null!=this._validator},validate:function(e){return this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return!this.hasValidator()||this._validator.validate(e)},__computeValidator:function(){return Polymer.IronValidatableBehaviorMeta&&Polymer.IronValidatableBehaviorMeta.byKey(this.validator)}}},"./src/bower_components/iron-validatable-behavior/iron-validatable-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/habitlab-iron-meta/habitlab-iron-meta.deps.js"),o(n("./src/bower_components/iron-validatable-behavior/iron-validatable-behavior.html"),"bower_components/iron-validatable-behavior/iron-validatable-behavior.html"),n("./src/bower_components/iron-validatable-behavior/iron-validatable-behavior-0.js")},"./src/bower_components/iron-validatable-behavior/iron-validatable-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../habitlab-iron-meta/habitlab-iron-meta.html> <script src=iron-validatable-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/paper-behaviors/habitlab-paper-button-behavior-0.js":function(e,t){Polymer.PaperButtonBehaviorImpl={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},Polymer.PaperButtonBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperButtonBehaviorImpl]},"./src/bower_components/paper-behaviors/habitlab-paper-button-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-behaviors/iron-button-state.deps.js"),n("./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior.deps.js"),o(n("./src/bower_components/paper-behaviors/habitlab-paper-button-behavior.html"),"bower_components/paper-behaviors/habitlab-paper-button-behavior.html"),n("./src/bower_components/paper-behaviors/habitlab-paper-button-behavior-0.js")},"./src/bower_components/paper-behaviors/habitlab-paper-button-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-behaviors/iron-button-state.html> <link rel=import href=habitlab-paper-ripple-behavior.html> <script src=habitlab-paper-button-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/paper-behaviors/paper-checked-element-behavior-0.js":function(e,t){Polymer.PaperCheckedElementBehaviorImpl={_checkedChanged:function(){Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){Polymer.PaperRippleBehavior._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}},Polymer.PaperCheckedElementBehavior=[Polymer.PaperInkyFocusBehavior,Polymer.IronCheckedElementBehavior,Polymer.PaperCheckedElementBehaviorImpl]},"./src/bower_components/paper-behaviors/paper-checked-element-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-checked-element-behavior/iron-checked-element-behavior.deps.js"),n("./src/bower_components/paper-behaviors/paper-inky-focus-behavior.deps.js"),o(n("./src/bower_components/paper-behaviors/paper-checked-element-behavior.html"),"bower_components/paper-behaviors/paper-checked-element-behavior.html"),n("./src/bower_components/paper-behaviors/paper-checked-element-behavior-0.js")},"./src/bower_components/paper-behaviors/paper-checked-element-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-checked-element-behavior/iron-checked-element-behavior.html> <link rel=import href=paper-inky-focus-behavior.html> <script src=paper-checked-element-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/paper-behaviors/paper-inky-focus-behavior-0.js":function(e,t){Polymer.PaperInkyFocusBehaviorImpl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=Polymer.PaperRippleBehavior._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},Polymer.PaperInkyFocusBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperInkyFocusBehaviorImpl]},"./src/bower_components/paper-behaviors/paper-inky-focus-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-behaviors/iron-button-state.deps.js"),n("./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior.deps.js"),o(n("./src/bower_components/paper-behaviors/paper-inky-focus-behavior.html"),"bower_components/paper-behaviors/paper-inky-focus-behavior.html"),n("./src/bower_components/paper-behaviors/paper-inky-focus-behavior-0.js")},"./src/bower_components/paper-behaviors/paper-inky-focus-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-behaviors/iron-button-state.html> <link rel=import href=habitlab-paper-ripple-behavior.html> <script src=paper-inky-focus-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior-0.js":function(e,t){Polymer.PaperRippleBehavior={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Polymer.IronButtonStateImpl._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var t=this._rippleContainer||this.root;if(t&&Polymer.dom(t).appendChild(this._ripple),e){var n=Polymer.dom(this._rippleContainer||this),o=Polymer.dom(e).rootTarget;n.deepContains(o)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("habitlab-paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}}},"./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/habitlab-paper-ripple/habitlab-paper-ripple.deps.js"),o(n("./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior.html"),"bower_components/paper-behaviors/habitlab-paper-ripple-behavior.html"),n("./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior-0.js")},"./src/bower_components/paper-behaviors/habitlab-paper-ripple-behavior.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../habitlab-paper-ripple/habitlab-paper-ripple.html> <script src=habitlab-paper-ripple-behavior-0.js><\/script> </head><body></body></html>"},"./src/bower_components/habitlab-paper-button/habitlab-paper-button-0.js":function(e,t){Polymer({is:"habitlab-paper-button",behaviors:[Polymer.PaperButtonBehavior],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this):this._setElevation(0)}})},"./src/bower_components/habitlab-paper-button/habitlab-paper-button.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-flex-layout/iron-flex-layout.deps.js"),n("./src/bower_components/paper-behaviors/habitlab-paper-button-behavior.deps.js"),n("./src/bower_components/habitlab-paper-material/habitlab-paper-material.deps.js"),o(n("./src/bower_components/habitlab-paper-button/habitlab-paper-button.html"),"bower_components/habitlab-paper-button/habitlab-paper-button.html"),n("./src/bower_components/habitlab-paper-button/habitlab-paper-button-0.js")},"./src/bower_components/habitlab-paper-button/habitlab-paper-button.html":function(e,t){e.exports='<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-flex-layout/iron-flex-layout.html> <link rel=import href=../paper-behaviors/habitlab-paper-button-behavior.html> <link rel=import href=../habitlab-paper-material/habitlab-paper-material.html> </head><body><habitlab-dom-module id=habitlab-paper-button> <template strip-whitespace=""> <style include=habitlab-paper-material>:host{@apply(--layout-inline);@apply(--layout-center-center);position:relative;box-sizing:border-box;min-width:5.14em;margin:0 .29em;background:0 0;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;font-size:1em;font-family:Verdana,Geneva,HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-weight:400;text-transform:uppercase;outline-width:0;border-radius:3px;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;cursor:pointer;z-index:0;padding:.7em .57em;@apply(--paper-font-common-base);@apply(--habitlab-paper-button)}:host([raised].keyboard-focus){font-weight:700;@apply(--habitlab-paper-button-raised-keyboard-focus)}:host(:not([raised]).keyboard-focus){font-weight:700;@apply(--habitlab-paper-button-flat-keyboard-focus)}:host([disabled]){background:#eaeaea;color:#a8a8a8;cursor:auto;pointer-events:none;@apply(--habitlab-paper-button-disabled)}habitlab-paper-ripple{color:var(--habitlab-paper-button-ink-color)}</style> <content></content> </template> <script src=habitlab-paper-button-0.js><\/script> </habitlab-dom-module> </body></html> '},"./src/bower_components/habitlab-paper-material/habitlab-paper-material-0.js":function(e,t){Polymer({is:"habitlab-paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}})},"./src/bower_components/habitlab-paper-material/habitlab-paper-material-shared-styles.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/paper-styles/shadow.deps.js"),o(n("./src/bower_components/habitlab-paper-material/habitlab-paper-material-shared-styles.html"),"bower_components/habitlab-paper-material/habitlab-paper-material-shared-styles.html")},"./src/bower_components/habitlab-paper-material/habitlab-paper-material-shared-styles.html":function(e,t){e.exports=' <link rel=import href=../paper-styles/shadow.html> <habitlab-dom-module id=habitlab-paper-material-shared-styles> <template> <style>:host{display:block;position:relative}:host([elevation="1"]){@apply(--shadow-elevation-2dp)}:host([elevation="2"]){@apply(--shadow-elevation-4dp)}:host([elevation="3"]){@apply(--shadow-elevation-6dp)}:host([elevation="4"]){@apply(--shadow-elevation-8dp)}:host([elevation="5"]){@apply(--shadow-elevation-16dp)}</style> </template> </habitlab-dom-module> '},"./src/bower_components/habitlab-paper-material/habitlab-paper-material.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/paper-styles/shadow.deps.js"),n("./src/bower_components/habitlab-paper-material/habitlab-paper-material-shared-styles.deps.js"),o(n("./src/bower_components/habitlab-paper-material/habitlab-paper-material.html"),"bower_components/habitlab-paper-material/habitlab-paper-material.html"),n("./src/bower_components/habitlab-paper-material/habitlab-paper-material-0.js")},"./src/bower_components/habitlab-paper-material/habitlab-paper-material.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../paper-styles/shadow.html> <link rel=import href=habitlab-paper-material-shared-styles.html> </head><body><habitlab-dom-module id=habitlab-paper-material> <template> <style include=habitlab-paper-material-shared-styles></style> <style>:host([animated]){@apply(--shadow-transition)}</style> <content></content> </template> </habitlab-dom-module> <script src=habitlab-paper-material-0.js><\/script> </body></html>"},"./src/bower_components/habitlab-paper-ripple/habitlab-paper-ripple-0.js":function(e,t){!function(){var e={distance:function(e,t,n,o){var i=e-n,r=t-o;return Math.sqrt(i*i+r*r)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function t(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function n(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Polymer.dom(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(t,n){var o=e.distance(t,n,0,0),i=e.distance(t,n,this.width,0),r=e.distance(t,n,0,this.height),s=e.distance(t,n,this.width,this.height);return Math.max(o,i,r,s)}},n.MAX_RADIUS=300,n.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var t;return this.mouseDownStart?(t=e.now()-this.mouseDownStart,this.mouseUpStart&&(t-=this.mouseUpElapsed),t):0},get mouseUpElapsed(){return this.mouseUpStart?e.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,o=1.1*Math.min(Math.sqrt(e+t),n.MAX_RADIUS)+5,i=1.1-o/n.MAX_RADIUS*.2,r=this.mouseInteractionSeconds/i,s=o*(1-Math.pow(80,-r));return Math.abs(s)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=.3*this.mouseUpElapsedSeconds,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,n.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,n.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new t(this.element)},draw:function(){var e,t,n;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,n=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+n+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+n+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(t){var n=this.containerMetrics.width/2,o=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=e.now(),this.center?(this.xStart=n,this.yStart=o,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=t?t.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=t?t.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=n,this.yEnd=o,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(t){this.isMouseDown&&(this.mouseUpStart=e.now())},remove:function(){Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Polymer({is:"habitlab-paper-ripple",behaviors:[Polymer.IronA11yKeysBehavior],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){var e=Polymer.dom(this).getOwnerRoot();return 11==this.parentNode.nodeType?e.host:this.parentNode},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){this.keyEventTarget=this.target,this.listen(this.target,"up","uiUpAction"),this.listen(this.target,"down","uiDownAction")},detached:function(){this.unlisten(this.target,"up","uiUpAction"),this.unlisten(this.target,"down","uiDownAction")},get shouldKeepAnimating(){for(var e=0;e<this.ripples.length;++e)if(!this.ripples[e].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(e){this.noink||this.downAction(e)},downAction:function(e){this.holdDown&&this.ripples.length>0||(this.addRipple().downAction(e),this._animating||this.animate())},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var e=new n(this);return Polymer.dom(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){var e,t;for(this._animating=!0,e=0;e<this.ripples.length;++e)(t=this.ripples[e]).draw(),this.$.background.style.opacity=t.outerOpacity,t.isOpacityFullyDecayed&&!t.isRestingAtMaxRadius&&this.removeRipple(t);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(e,t){void 0!==t&&(e?this.downAction():this.upAction())}})}()},"./src/bower_components/habitlab-paper-ripple/habitlab-paper-ripple.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.deps.js"),o(n("./src/bower_components/habitlab-paper-ripple/habitlab-paper-ripple.html"),"bower_components/habitlab-paper-ripple/habitlab-paper-ripple.html"),n("./src/bower_components/habitlab-paper-ripple/habitlab-paper-ripple-0.js")},"./src/bower_components/habitlab-paper-ripple/habitlab-paper-ripple.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html> </head><body><habitlab-dom-module id=habitlab-paper-ripple> <template> <style>:host{display:block;position:absolute;border-radius:inherit;overflow:hidden;top:0;left:0;right:0;bottom:0;pointer-events:none}:host([animating]){-webkit-transform:translate(0,0);transform:translate3d(0,0,0)}#background,#waves,.wave,.wave-container{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%}#background,.wave{opacity:0}#waves,.wave{overflow:hidden}.wave,.wave-container{border-radius:50%}:host(.circle) #background,:host(.circle) #waves{border-radius:50%}:host(.circle) .wave-container{overflow:hidden}</style> <div id=background></div> <div id=waves></div> </template> </habitlab-dom-module> <script src=habitlab-paper-ripple-0.js><\/script> </body></html>"},"./src/bower_components/paper-styles/color.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/paper-styles/color.html"),"bower_components/paper-styles/color.html")},"./src/bower_components/paper-styles/color.html":function(e,t){e.exports=" <link rel=import href=../polymer/polymer.html> <style is=habitlab-custom-style>:root{--google-red-100:#f4c7c3;--google-red-300:#e67c73;--google-red-500:#db4437;--google-red-700:#c53929;--google-blue-100:#c6dafc;--google-blue-300:#7baaf7;--google-blue-500:#4285f4;--google-blue-700:#3367d6;--google-green-100:#b7e1cd;--google-green-300:#57bb8a;--google-green-500:#0f9d58;--google-green-700:#0b8043;--google-yellow-100:#fce8b2;--google-yellow-300:#f7cb4d;--google-yellow-500:#f4b400;--google-yellow-700:#f09300;--google-grey-100:#f5f5f5;--google-grey-300:#e0e0e0;--google-grey-500:#9e9e9e;--google-grey-700:#616161;--paper-red-50:#ffebee;--paper-red-100:#ffcdd2;--paper-red-200:#ef9a9a;--paper-red-300:#e57373;--paper-red-400:#ef5350;--paper-red-500:#f44336;--paper-red-600:#e53935;--paper-red-700:#d32f2f;--paper-red-800:#c62828;--paper-red-900:#b71c1c;--paper-red-a100:#ff8a80;--paper-red-a200:#ff5252;--paper-red-a400:#ff1744;--paper-red-a700:#d50000;--paper-pink-50:#fce4ec;--paper-pink-100:#f8bbd0;--paper-pink-200:#f48fb1;--paper-pink-300:#f06292;--paper-pink-400:#ec407a;--paper-pink-500:#e91e63;--paper-pink-600:#d81b60;--paper-pink-700:#c2185b;--paper-pink-800:#ad1457;--paper-pink-900:#880e4f;--paper-pink-a100:#ff80ab;--paper-pink-a200:#ff4081;--paper-pink-a400:#f50057;--paper-pink-a700:#c51162;--paper-purple-50:#f3e5f5;--paper-purple-100:#e1bee7;--paper-purple-200:#ce93d8;--paper-purple-300:#ba68c8;--paper-purple-400:#ab47bc;--paper-purple-500:#9c27b0;--paper-purple-600:#8e24aa;--paper-purple-700:#7b1fa2;--paper-purple-800:#6a1b9a;--paper-purple-900:#4a148c;--paper-purple-a100:#ea80fc;--paper-purple-a200:#e040fb;--paper-purple-a400:#d500f9;--paper-purple-a700:#aa00ff;--paper-deep-purple-50:#ede7f6;--paper-deep-purple-100:#d1c4e9;--paper-deep-purple-200:#b39ddb;--paper-deep-purple-300:#9575cd;--paper-deep-purple-400:#7e57c2;--paper-deep-purple-500:#673ab7;--paper-deep-purple-600:#5e35b1;--paper-deep-purple-700:#512da8;--paper-deep-purple-800:#4527a0;--paper-deep-purple-900:#311b92;--paper-deep-purple-a100:#b388ff;--paper-deep-purple-a200:#7c4dff;--paper-deep-purple-a400:#651fff;--paper-deep-purple-a700:#6200ea;--paper-indigo-50:#e8eaf6;--paper-indigo-100:#c5cae9;--paper-indigo-200:#9fa8da;--paper-indigo-300:#7986cb;--paper-indigo-400:#5c6bc0;--paper-indigo-500:#3f51b5;--paper-indigo-600:#3949ab;--paper-indigo-700:#303f9f;--paper-indigo-800:#283593;--paper-indigo-900:#1a237e;--paper-indigo-a100:#8c9eff;--paper-indigo-a200:#536dfe;--paper-indigo-a400:#3d5afe;--paper-indigo-a700:#304ffe;--paper-blue-50:#e3f2fd;--paper-blue-100:#bbdefb;--paper-blue-200:#90caf9;--paper-blue-300:#64b5f6;--paper-blue-400:#42a5f5;--paper-blue-500:#2196f3;--paper-blue-600:#1e88e5;--paper-blue-700:#1976d2;--paper-blue-800:#1565c0;--paper-blue-900:#0d47a1;--paper-blue-a100:#82b1ff;--paper-blue-a200:#448aff;--paper-blue-a400:#2979ff;--paper-blue-a700:#2962ff;--paper-light-blue-50:#e1f5fe;--paper-light-blue-100:#b3e5fc;--paper-light-blue-200:#81d4fa;--paper-light-blue-300:#4fc3f7;--paper-light-blue-400:#29b6f6;--paper-light-blue-500:#03a9f4;--paper-light-blue-600:#039be5;--paper-light-blue-700:#0288d1;--paper-light-blue-800:#0277bd;--paper-light-blue-900:#01579b;--paper-light-blue-a100:#80d8ff;--paper-light-blue-a200:#40c4ff;--paper-light-blue-a400:#00b0ff;--paper-light-blue-a700:#0091ea;--paper-cyan-50:#e0f7fa;--paper-cyan-100:#b2ebf2;--paper-cyan-200:#80deea;--paper-cyan-300:#4dd0e1;--paper-cyan-400:#26c6da;--paper-cyan-500:#00bcd4;--paper-cyan-600:#00acc1;--paper-cyan-700:#0097a7;--paper-cyan-800:#00838f;--paper-cyan-900:#006064;--paper-cyan-a100:#84ffff;--paper-cyan-a200:#18ffff;--paper-cyan-a400:#00e5ff;--paper-cyan-a700:#00b8d4;--paper-teal-50:#e0f2f1;--paper-teal-100:#b2dfdb;--paper-teal-200:#80cbc4;--paper-teal-300:#4db6ac;--paper-teal-400:#26a69a;--paper-teal-500:#009688;--paper-teal-600:#00897b;--paper-teal-700:#00796b;--paper-teal-800:#00695c;--paper-teal-900:#004d40;--paper-teal-a100:#a7ffeb;--paper-teal-a200:#64ffda;--paper-teal-a400:#1de9b6;--paper-teal-a700:#00bfa5;--paper-green-50:#e8f5e9;--paper-green-100:#c8e6c9;--paper-green-200:#a5d6a7;--paper-green-300:#81c784;--paper-green-400:#66bb6a;--paper-green-500:#4caf50;--paper-green-600:#43a047;--paper-green-700:#388e3c;--paper-green-800:#2e7d32;--paper-green-900:#1b5e20;--paper-green-a100:#b9f6ca;--paper-green-a200:#69f0ae;--paper-green-a400:#00e676;--paper-green-a700:#00c853;--paper-light-green-50:#f1f8e9;--paper-light-green-100:#dcedc8;--paper-light-green-200:#c5e1a5;--paper-light-green-300:#aed581;--paper-light-green-400:#9ccc65;--paper-light-green-500:#8bc34a;--paper-light-green-600:#7cb342;--paper-light-green-700:#689f38;--paper-light-green-800:#558b2f;--paper-light-green-900:#33691e;--paper-light-green-a100:#ccff90;--paper-light-green-a200:#b2ff59;--paper-light-green-a400:#76ff03;--paper-light-green-a700:#64dd17;--paper-lime-50:#f9fbe7;--paper-lime-100:#f0f4c3;--paper-lime-200:#e6ee9c;--paper-lime-300:#dce775;--paper-lime-400:#d4e157;--paper-lime-500:#cddc39;--paper-lime-600:#c0ca33;--paper-lime-700:#afb42b;--paper-lime-800:#9e9d24;--paper-lime-900:#827717;--paper-lime-a100:#f4ff81;--paper-lime-a200:#eeff41;--paper-lime-a400:#c6ff00;--paper-lime-a700:#aeea00;--paper-yellow-50:#fffde7;--paper-yellow-100:#fff9c4;--paper-yellow-200:#fff59d;--paper-yellow-300:#fff176;--paper-yellow-400:#ffee58;--paper-yellow-500:#ffeb3b;--paper-yellow-600:#fdd835;--paper-yellow-700:#fbc02d;--paper-yellow-800:#f9a825;--paper-yellow-900:#f57f17;--paper-yellow-a100:#ffff8d;--paper-yellow-a200:#ffff00;--paper-yellow-a400:#ffea00;--paper-yellow-a700:#ffd600;--paper-amber-50:#fff8e1;--paper-amber-100:#ffecb3;--paper-amber-200:#ffe082;--paper-amber-300:#ffd54f;--paper-amber-400:#ffca28;--paper-amber-500:#ffc107;--paper-amber-600:#ffb300;--paper-amber-700:#ffa000;--paper-amber-800:#ff8f00;--paper-amber-900:#ff6f00;--paper-amber-a100:#ffe57f;--paper-amber-a200:#ffd740;--paper-amber-a400:#ffc400;--paper-amber-a700:#ffab00;--paper-orange-50:#fff3e0;--paper-orange-100:#ffe0b2;--paper-orange-200:#ffcc80;--paper-orange-300:#ffb74d;--paper-orange-400:#ffa726;--paper-orange-500:#ff9800;--paper-orange-600:#fb8c00;--paper-orange-700:#f57c00;--paper-orange-800:#ef6c00;--paper-orange-900:#e65100;--paper-orange-a100:#ffd180;--paper-orange-a200:#ffab40;--paper-orange-a400:#ff9100;--paper-orange-a700:#ff6500;--paper-deep-orange-50:#fbe9e7;--paper-deep-orange-100:#ffccbc;--paper-deep-orange-200:#ffab91;--paper-deep-orange-300:#ff8a65;--paper-deep-orange-400:#ff7043;--paper-deep-orange-500:#ff5722;--paper-deep-orange-600:#f4511e;--paper-deep-orange-700:#e64a19;--paper-deep-orange-800:#d84315;--paper-deep-orange-900:#bf360c;--paper-deep-orange-a100:#ff9e80;--paper-deep-orange-a200:#ff6e40;--paper-deep-orange-a400:#ff3d00;--paper-deep-orange-a700:#dd2c00;--paper-brown-50:#efebe9;--paper-brown-100:#d7ccc8;--paper-brown-200:#bcaaa4;--paper-brown-300:#a1887f;--paper-brown-400:#8d6e63;--paper-brown-500:#795548;--paper-brown-600:#6d4c41;--paper-brown-700:#5d4037;--paper-brown-800:#4e342e;--paper-brown-900:#3e2723;--paper-grey-50:#fafafa;--paper-grey-100:#f5f5f5;--paper-grey-200:#eeeeee;--paper-grey-300:#e0e0e0;--paper-grey-400:#bdbdbd;--paper-grey-500:#9e9e9e;--paper-grey-600:#757575;--paper-grey-700:#616161;--paper-grey-800:#424242;--paper-grey-900:#212121;--paper-blue-grey-50:#eceff1;--paper-blue-grey-100:#cfd8dc;--paper-blue-grey-200:#b0bec5;--paper-blue-grey-300:#90a4ae;--paper-blue-grey-400:#78909c;--paper-blue-grey-500:#607d8b;--paper-blue-grey-600:#546e7a;--paper-blue-grey-700:#455a64;--paper-blue-grey-800:#37474f;--paper-blue-grey-900:#263238;--dark-divider-opacity:0.12;--dark-disabled-opacity:0.38;--dark-secondary-opacity:0.54;--dark-primary-opacity:0.87;--light-divider-opacity:0.12;--light-disabled-opacity:0.3;--light-secondary-opacity:0.7;--light-primary-opacity:1.0}</style> "},"./src/bower_components/paper-styles/default-theme.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/paper-styles/color.deps.js"),o(n("./src/bower_components/paper-styles/default-theme.html"),"bower_components/paper-styles/default-theme.html")},"./src/bower_components/paper-styles/default-theme.html":function(e,t){e.exports=" <link rel=import href=../polymer/polymer.html> <link rel=import href=color.html> <style is=habitlab-custom-style>:root{--primary-text-color:var(--light-theme-text-color);--primary-background-color:var(--light-theme-background-color);--secondary-text-color:var(--light-theme-secondary-color);--disabled-text-color:var(--light-theme-disabled-color);--divider-color:var(--light-theme-divider-color);--error-color:var(--paper-deep-orange-a700);--primary-color:var(--paper-indigo-500);--light-primary-color:var(--paper-indigo-100);--dark-primary-color:var(--paper-indigo-700);--accent-color:var(--paper-pink-a200);--light-accent-color:var(--paper-pink-a100);--dark-accent-color:var(--paper-pink-a400);--light-theme-background-color:#ffffff;--light-theme-base-color:#000000;--light-theme-text-color:var(--paper-grey-900);--light-theme-secondary-color:#737373;--light-theme-disabled-color:#9b9b9b;--light-theme-divider-color:#dbdbdb;--dark-theme-background-color:var(--paper-grey-900);--dark-theme-base-color:#ffffff;--dark-theme-text-color:#ffffff;--dark-theme-secondary-color:#bcbcbc;--dark-theme-disabled-color:#646464;--dark-theme-divider-color:#3c3c3c;--text-primary-color:var(--dark-theme-text-color);--default-primary-color:var(--primary-color)}</style> "},"./src/bower_components/paper-styles/shadow.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),o(n("./src/bower_components/paper-styles/shadow.html"),"bower_components/paper-styles/shadow.html")},"./src/bower_components/paper-styles/shadow.html":function(e,t){e.exports=" <link rel=import href=../polymer/polymer.html> <style is=habitlab-custom-style>:root{--shadow-transition:{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)};--shadow-none:{box-shadow:none};--shadow-elevation-2dp:{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)};--shadow-elevation-3dp:{box-shadow:0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12),0 3px 3px -2px rgba(0,0,0,.4)};--shadow-elevation-4dp:{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)};--shadow-elevation-6dp:{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.4)};--shadow-elevation-8dp:{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4)};--shadow-elevation-12dp:{box-shadow:0 12px 16px 1px rgba(0,0,0,.14),0 4px 22px 3px rgba(0,0,0,.12),0 6px 7px -4px rgba(0,0,0,.4)};--shadow-elevation-16dp:{box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)};}</style> "},"./src/bower_components/habitlab-paper-toast/habitlab-paper-toast-0.js":function(e,t){!function(){"use strict";var e=null;Polymer({is:"habitlab-paper-toast",behaviors:[Polymer.IronOverlayBehavior],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return Polymer.Base._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,Polymer.IronA11yAnnouncer.requestAvailability()},show:function(e){for(var t in"string"==typeof e&&(e={text:e}),e)0===t.indexOf("_")?Polymer.Base._warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:Polymer.Base._warn('The property "'+t+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(e){e&&e.target===this&&"opacity"===e.propertyName&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){null!==this._autoClose&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(e&&e!==this&&e.close(),e=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):e===this&&(e=null),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("habitlab-paper-toast-open")},_renderClosed:function(){this.classList.remove("habitlab-paper-toast-open")},_onFitIntoChanged:function(e){this.positionTarget=e}})}()},"./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer.deps.js"),n("./src/bower_components/iron-overlay-behavior/iron-overlay-behavior.deps.js"),o(n("./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.html"),"bower_components/habitlab-paper-toast/habitlab-paper-toast.html"),n("./src/bower_components/habitlab-paper-toast/habitlab-paper-toast-0.js")},"./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.html":function(e,t){e.exports="<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../habitlab-iron-a11y-announcer/habitlab-iron-a11y-announcer.html> <link rel=import href=../iron-overlay-behavior/iron-overlay-behavior.html> </head><body><habitlab-dom-module id=habitlab-paper-toast> <template> <style>:host{display:block;position:fixed;background-color:var(--habitlab-paper-toast-background-color,#323232);color:var(--habitlab-paper-toast-color,#f1f1f1);min-height:48px;min-width:288px;padding:16px 24px;box-sizing:border-box;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;margin:12px;font-size:14px;cursor:default;-webkit-transition:-webkit-transform .3s,opacity .3s;transition:transform .3s,opacity .3s;opacity:0;-webkit-transform:translateY(100px);transform:translateY(100px);@apply --paper-font-common-base}:host(.capsule){border-radius:24px}:host(.fit-bottom){width:100%;min-width:0;border-radius:0;margin:0}:host(.habitlab-paper-toast-open){opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}</style> <span id=label>{{text}}</span> <slot></slot> </template> <script src=habitlab-paper-toast-0.js><\/script> </habitlab-dom-module> </body></html>"},"./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button-0.js":function(e,t){Polymer({is:"habitlab-paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},_ontrack:function(e){var t=e.detail;"start"===t.state?this._trackStart(t):"track"===t.state?this._trackMove(t):"end"===t.state&&this._trackEnd(t)},_trackStart:function(e){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(e){var t=e.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+t:t)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(e){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var e=Polymer.PaperRippleBehavior._createRipple();return e.id="ink",e.setAttribute("recenters",""),e.classList.add("circle","toggle-ink"),e}})},"./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/iron-flex-layout/iron-flex-layout.deps.js"),n("./src/bower_components/paper-styles/color.deps.js"),n("./src/bower_components/paper-styles/default-theme.deps.js"),n("./src/bower_components/paper-behaviors/paper-checked-element-behavior.deps.js"),o(n("./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.html"),"bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.html"),n("./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button-0.js")},"./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.html":function(e,t){e.exports='<html><head><link rel=import href=../polymer/polymer.html> <link rel=import href=../iron-flex-layout/iron-flex-layout.html> <link rel=import href=../paper-styles/color.html> <link rel=import href=../paper-styles/default-theme.html> <link rel=import href=../paper-behaviors/paper-checked-element-behavior.html> </head><body><habitlab-dom-module id=habitlab-paper-toggle-button> <template strip-whitespace=""> <style>:host{display:inline-block;@apply(--layout-horizontal);@apply(--layout-center);@apply(--paper-font-common-base)}:host([disabled]){pointer-events:none}:host(:focus){outline:0}.toggle-bar{position:absolute;height:100%;width:100%;border-radius:8px;pointer-events:none;opacity:.4;transition:background-color linear .08s;background-color:var(--habitlab-paper-toggle-button-unchecked-bar-color,#000);@apply(--habitlab-paper-toggle-button-unchecked-bar)}.toggle-button{position:absolute;top:-3px;left:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 5px 0 rgba(0,0,0,.6);transition:-webkit-transform linear .08s,background-color linear .08s;transition:transform linear .08s,background-color linear .08s;will-change:transform;background-color:var(--habitlab-paper-toggle-button-unchecked-button-color,--paper-grey-50);@apply(--habitlab-paper-toggle-button-unchecked-button)}.toggle-button.dragging{-webkit-transition:none;transition:none}:host([checked]:not([disabled])) .toggle-bar{opacity:.5;background-color:var(--habitlab-paper-toggle-button-checked-bar-color,--primary-color);@apply(--habitlab-paper-toggle-button-checked-bar)}:host([disabled]) .toggle-bar{background-color:#000;opacity:.12}:host([checked]) .toggle-button{-webkit-transform:translate(16px,0);transform:translate(16px,0)}:host([checked]:not([disabled])) .toggle-button{background-color:var(--habitlab-paper-toggle-button-checked-button-color,--primary-color);@apply(--habitlab-paper-toggle-button-checked-button)}:host([disabled]) .toggle-button{background-color:#bdbdbd;opacity:1}.toggle-ink{position:absolute;top:-14px;left:-14px;right:auto;bottom:auto;width:48px;height:48px;opacity:.5;pointer-events:none;color:var(--habitlab-paper-toggle-button-unchecked-ink-color,--primary-text-color)}:host([checked]) .toggle-ink{color:var(--habitlab-paper-toggle-button-checked-ink-color,--primary-color)}.toggle-container{display:inline-block;position:relative;width:36px;height:14px;margin:4px 1px}.toggle-label{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--habitlab-paper-toggle-button-label-spacing,8px);pointer-events:none;color:var(--habitlab-paper-toggle-button-label-color,--primary-text-color)}</style> <div class=toggle-container> <div id=toggleBar class=toggle-bar></div> <div id=toggleButton class=toggle-button></div> </div> <div class=toggle-label><content></content></div> </template> <script src=habitlab-paper-toggle-button-0.js><\/script> </habitlab-dom-module> </body></html>'},"./src/bower_components/polymer-themes/ice.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");o(n("./src/bower_components/polymer-themes/ice.html"),"bower_components/polymer-themes/ice.html")},"./src/bower_components/polymer-themes/ice.html":function(e,t){e.exports='<style is=habitlab-custom-style>html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:16px}body,html{margin:0;padding:0;min-height:100%;color:#2d2d2d;background-color:#fff;font-family:Verdana,Geneva,HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-weight:400}section{padding:40px 0}section[hero]{background-color:#f3f3f3}section:after{content:if false,\'one\',\'two\'}h1,h2,h3,h4,h5,h6{font-weight:400;margin:0;padding:0;line-height:1em}h1,h3,h5{font-family:Verdana,Geneva,HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif}h1{font-size:50px;margin:30px 0}h2{color:#777;font-size:35px;margin:20px 0}h3{font-size:25px;margin:15px 0}h4{font-size:20px}a,a:active,a:focus,a:visited{color:#777;text-decoration:none}a:hover{color:#777;text-decoration:underline}:root{--default-primary-color:#446e9b;--dark-primary-color:#e7e7e7;--light-primary-color:#c5cae9;--text-primary-color:#ffffff;--accent-color:#ff4081;--primary-background-color:#ffffff;--primary-text-color:#2d2d2d;--secondary-text-color:#777777;--disabled-text-color:#313238;--divider-color:#e0e0e0;--habitlab-paper-checkbox-checked-color:#446e9b;--habitlab-paper-checkbox-checked-ink-color:#446e9b;--habitlab-paper-checkbox-unchecked-color:#777777;--habitlab-paper-checkbox-unchecked-ink-color:#777777;--habitlab-paper-checkbox-label-color:#2d2d2d;--paper-fab-background:#446e9b;--paper-fab-disabled-background:#afb1b9;--paper-fab-disabled-text:#313238;--habitlab-paper-icon-button-disabled-text:#afb1b9;--habitlab-paper-input-container-color:#7a7a7a;--habitlab-paper-input-container-focus-color:#446e9b;--habitlab-paper-input-container-invalid-color:#ff6e40;--habitlab-paper-input-container-input-color:#7a7a7a;--paper-menu-background-color:#f3f3f3;--paper-menu-color:#2d2d2d;--paper-menu-disabled-color:#afb1b9;--habitlab-paper-progress-active-color:#446e9b;--habitlab-paper-progress-secondary-color:#80cbc4;--paper-radio-button-checked-color:#446e9b;--paper-radio-button-checked-ink-color:white;--paper-radio-button-unchecked-color:#2d2d2d;--paper-radio-button-unchecked-ink-color:#2d2d2d;--paper-radio-button-label-color:#2d2d2d;--habitlab-paper-slider-knob-color:#446e9b;--habitlab-paper-slider-active-color:#446e9b;--habitlab-paper-slider-pin-color:#446e9b;--paper-spinner-layer-1-color:#446e9b;--paper-spinner-layer-2-color:#446e9b;--paper-spinner-layer-3-color:#446e9b;--paper-spinner-layer-4-color:#446e9b;--paper-tabs-selection-bar-color:#80cbc4;--paper-tab-ink:#80cbc4;--habitlab-paper-toggle-button-checked-bar-color:#446e9b;--habitlab-paper-toggle-button-checked-button-color:#446e9b;--habitlab-paper-toggle-button-checked-ink-color:#446e9b;--habitlab-paper-toggle-button-unchecked-bar-color:#777777;--habitlab-paper-toggle-button-unchecked-button-color:white;--habitlab-paper-toggle-button-unchecked-ink-color:white;--paper-toolbar-background:#e7e7e7;--paper-toolbar-color:#777777}paper-toolbar a,paper-toolbar a:active,paper-toolbar a:focus,paper-toolbar a:hover,paper-toolbar a:visited{color:#777}habitlab-paper-button.btn-primary,habitlab-paper-button.primary,habitlab-paper-button[primary]{color:#446e9b}habitlab-paper-button.btn-primary[raised],habitlab-paper-button.primary[raised],habitlab-paper-button[primary][raised]{background-color:#446e9b;color:#fff}habitlab-paper-button.btn-secondary,habitlab-paper-button.secondary,habitlab-paper-button[secondary]{color:#80cbc4}habitlab-paper-button.btn-secondary[raised],habitlab-paper-button.secondary[raised],habitlab-paper-button[secondary][raised]{background-color:#80cbc4;color:#263d3b}habitlab-paper-button.btn-success,habitlab-paper-button.success,habitlab-paper-button[success]{color:#9dc56e}habitlab-paper-button.btn-success[raised],habitlab-paper-button.success[raised],habitlab-paper-button[success][raised]{background-color:#9dc56e;color:#2f3b21}habitlab-paper-button.btn-info,habitlab-paper-button.info,habitlab-paper-button[info]{color:#ffb74d}habitlab-paper-button.btn-info[raised],habitlab-paper-button.info[raised],habitlab-paper-button[info][raised]{background-color:#ffb74d;color:#4d3717}habitlab-paper-button.btn-warning,habitlab-paper-button.warning,habitlab-paper-button[warning]{color:#fadd60}habitlab-paper-button.btn-warning[raised],habitlab-paper-button.warning[raised],habitlab-paper-button[warning][raised]{background-color:#fadd60;color:#4b421d}habitlab-paper-button.btn-error,habitlab-paper-button.error,habitlab-paper-button[error]{color:#ff6e40}habitlab-paper-button.btn-error[raised],habitlab-paper-button.error[raised],habitlab-paper-button[error][raised]{background-color:#ff6e40;color:#4d2113}habitlab-paper-button.btn-link,habitlab-paper-button.link,habitlab-paper-button[link]{text-decoration:underline}habitlab-paper-button[raised]{color:#2d2d2d}habitlab-paper-button[disabled]{color:#313238!important;background:#afb1b9!important}habitlab-paper-icon-button.btn-primary,habitlab-paper-icon-button.primary,habitlab-paper-icon-button[primary]{color:#446e9b}habitlab-paper-icon-button.btn-primary:hover,habitlab-paper-icon-button.primary:hover,habitlab-paper-icon-button[primary]:hover{background-color:#ecf1f5;background-color:rgba(68,110,155,.2);border-radius:50%}habitlab-paper-icon-button.btn-secondary,habitlab-paper-icon-button.secondary,habitlab-paper-icon-button[secondary]{color:#80cbc4}habitlab-paper-icon-button.btn-secondary:hover,habitlab-paper-icon-button.secondary:hover,habitlab-paper-icon-button[secondary]:hover{background-color:#f2faf9;background-color:rgba(128,203,196,.2);border-radius:50%}habitlab-paper-icon-button.btn-success,habitlab-paper-icon-button.success,habitlab-paper-icon-button[success]{color:#9dc56e}habitlab-paper-icon-button.btn-success:hover,habitlab-paper-icon-button.success:hover,habitlab-paper-icon-button[success]:hover{background-color:#f5f9f1;background-color:rgba(157,197,110,.2);border-radius:50%}habitlab-paper-icon-button.btn-info,habitlab-paper-icon-button.info,habitlab-paper-icon-button[info]{color:#ffb74d}habitlab-paper-icon-button.btn-info:hover,habitlab-paper-icon-button.info:hover,habitlab-paper-icon-button[info]:hover{background-color:#fff8ed;background-color:rgba(255,183,77,.2);border-radius:50%}habitlab-paper-icon-button.btn-warning,habitlab-paper-icon-button.warning,habitlab-paper-icon-button[warning]{color:#fadd60}habitlab-paper-icon-button.btn-warning:hover,habitlab-paper-icon-button.warning:hover,habitlab-paper-icon-button[warning]:hover{background-color:#fffcef;background-color:rgba(250,221,96,.2);border-radius:50%}habitlab-paper-icon-button.btn-error,habitlab-paper-icon-button.error,habitlab-paper-icon-button[error]{color:#ff6e40}habitlab-paper-icon-button.btn-error:hover,habitlab-paper-icon-button.error:hover,habitlab-paper-icon-button[error]:hover{background-color:#fff1ec;background-color:rgba(255,110,64,.2);border-radius:50%}habitlab-paper-checkbox #checkmark.habitlab-paper-checkbox,habitlab-paper-checkbox /deep/,habitlab-paper-checkbox::shadow #checkmark.habitlab-paper-checkbox{border-color:#fff!important}habitlab-paper-dialog{color:#2d2d2d;background-color:#fff;font-family:Verdana,Geneva,HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-weight:400}habitlab-paper-dialog h1,habitlab-paper-dialog h2,habitlab-paper-dialog h3,habitlab-paper-dialog h4,habitlab-paper-dialog h5,habitlab-paper-dialog h6{overflow:visible;padding:0 1em;text-align:center}paper-fab{--text-primary-color:white}paper-fab{background-color:#446e9b;color:#fff;--paper-fab-keyboard-focus-background:#1d2f42}paper-fab.btn-primary,paper-fab.primary,paper-fab[primary]{background-color:#446e9b;color:#fff;--paper-fab-keyboard-focus-background:#1d2f42}paper-fab.btn-secondary,paper-fab.secondary,paper-fab[secondary]{background-color:#80cbc4;color:#263d3b;--paper-fab-keyboard-focus-background:#3b9088}paper-fab.btn-success,paper-fab.success,paper-fab[success]{background-color:#9dc56e;color:#2f3b21;--paper-fab-keyboard-focus-background:#5d8033}paper-fab.btn-info,paper-fab.info,paper-fab[info]{background-color:#ffb74d;color:#4d3717;--paper-fab-keyboard-focus-background:#cd7a00}paper-fab.btn-warning,paper-fab.warning,paper-fab[warning]{background-color:#fadd60;color:#4b421d;--paper-fab-keyboard-focus-background:#d4ad07}paper-fab.btn-error,paper-fab.error,paper-fab[error]{background-color:#ff6e40;color:#4d2113;--paper-fab-keyboard-focus-background:#c02e00}paper-fab[disabled]{color:#313238!important;background:#afb1b9!important}section.hero paper-menu,section[hero] paper-menu{--paper-menu-background-color:#f3f3f3}paper-tabs{background-color:#fff;color:#777}</style> '},"./src/bower_components/polymer/polymer-0.js":function(e,t){window.check_if_is_habitlab_node=check_if_is_habitlab_node=function(e){for(;null!=e;){if(e.is_habitlab_element)return!0;e=null!=e.parentNode?e.parentNode:e.host}return!1},function(){Polymer.nar=[];var e=Polymer.Settings.disableUpgradeEnabled;Polymer.Annotations={parseAnnotations:function(e,t){var n=[],o=e._content||e.content;return this._parseNodeAnnotations(o,n,t||e.hasAttribute("strip-whitespace")),n},_parseNodeAnnotations:function(e,t,n){return e.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(e,t):this._parseElementAnnotations(e,t,n)},_bindingRegex:new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:(?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\"))\\s*)(?:,\\s*(?:(?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\"))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g"),_parseBindings:function(e){for(var t,n=this._bindingRegex,o=[],i=0;null!==(t=n.exec(e));){t.index>i&&o.push({literal:e.slice(i,t.index)});var r,s,a,l=t[1][0],c=Boolean(t[2]),p=t[3].trim();"{"==l&&(a=p.indexOf("::"))>0&&(s=p.substring(a+2),p=p.substring(0,a),r=!0),o.push({compoundIndex:o.length,value:p,mode:l,negate:c,event:s,customEvent:r}),i=n.lastIndex}if(i&&i<e.length){var d=e.substring(i);d&&o.push({literal:d})}if(o.length)return o},_literalFromParts:function(e){for(var t="",n=0;n<e.length;n++){t+=e[n].literal||""}return t},_parseTextNodeAnnotation:function(e,t){var n=this._parseBindings(e.textContent);if(n){e.textContent=this._literalFromParts(n)||" ";var o={bindings:[{kind:"text",name:"textContent",parts:n,isCompound:1!==n.length}]};return t.push(o),o}},_parseElementAnnotations:function(e,t,n){var o={bindings:[],events:[]};return"content"===e.localName&&(t._hasContent=!0),this._parseChildNodesAnnotations(e,o,t,n),e.attributes&&(this._parseNodeAttributeAnnotations(e,o,t),this.prepElement&&this.prepElement(e)),(o.bindings.length||o.events.length||o.id)&&t.push(o),o},_parseChildNodesAnnotations:function(e,t,n,o){if(e.firstChild)for(var i=e.firstChild,r=0;i;){var s=i.nextSibling;if("template"!==i.localName||i.hasAttribute("preserve-content")||this._parseTemplate(i,r,n,t,o),"slot"==i.localName&&(i=this._replaceSlotWithContent(i)),i.nodeType===Node.TEXT_NODE){for(var a=s;a&&a.nodeType===Node.TEXT_NODE;)i.textContent+=a.textContent,s=a.nextSibling,e.removeChild(a),a=s;o&&!i.textContent.trim()&&(e.removeChild(i),r--)}if(i.parentNode){var l=this._parseNodeAnnotations(i,n,o);l&&(l.parent=t,l.index=r)}i=s,r++}},_replaceSlotWithContent:function(e){for(var t=e.ownerDocument.createElement("content");e.firstChild;)t.appendChild(e.firstChild);for(var n=e.attributes,o=0;o<n.length;o++){var i=n[o];t.setAttribute(i.name,i.value)}var r=e.getAttribute("name");return r&&t.setAttribute("select","[slot='"+r+"']"),e.parentNode.replaceChild(t,e),t},_parseTemplate:function(e,t,n,o,i){var r=document.createDocumentFragment();r._notes=this.parseAnnotations(e,i),r.appendChild(e.content),n.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:r,parent:o,index:t})},_parseNodeAttributeAnnotations:function(e,t){for(var n,o=Array.prototype.slice.call(e.attributes),i=o.length-1;n=o[i];i--){var r,s=n.name,a=n.value;"on-"===s.slice(0,3)?(e.removeAttribute(s),t.events.push({name:s.slice(3),value:a})):(r=this._parseNodeAttributeAnnotation(e,s,a))?t.bindings.push(r):"id"===s&&(t.id=a)}},_parseNodeAttributeAnnotation:function(t,n,o){var i=this._parseBindings(o);if(i){var r=n,s="property";"$"==n[n.length-1]&&(n=n.slice(0,-1),s="attribute");var a=this._literalFromParts(i);a&&"attribute"==s&&t.setAttribute(n,a),"input"===t.localName&&"value"===r&&t.setAttribute(r,""),e&&"disable-upgrade$"===r&&t.setAttribute(n,""),t.removeAttribute(r);var l=Polymer.CaseMap.dashToCamelCase(n);return"property"===s&&(n=l),{kind:s,name:n,propertyName:l,parts:i,literal:a,isCompound:1!==i.length}}},findAnnotatedNode:function(e,t){var n=t.parent&&Polymer.Annotations.findAnnotatedNode(e,t.parent);if(!n)return e;for(var o=n.firstChild,i=0;o;o=o.nextSibling)if(t.index===i++)return o}}}(),Polymer.Path={root:function(e){var t=e.indexOf(".");return-1===t?e:e.slice(0,t)},isDeep:function(e){return-1!==e.indexOf(".")},isAncestor:function(e,t){return 0===e.indexOf(t+".")},isDescendant:function(e,t){return 0===t.indexOf(e+".")},translate:function(e,t,n){return t+n.slice(e.length)},matches:function(e,t,n){return e===n||this.isAncestor(e,n)||Boolean(t)&&this.isDescendant(e,n)}},Polymer.Base._addFeature({_prepAnnotations:function(){if(this._template){var e=this;Polymer.Annotations.prepElement=function(t){e._prepElement(t)},this._template._content&&this._template._content._notes?this._notes=this._template._content._notes:(this._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnnotations(this._notes)),Polymer.Annotations.prepElement=null}else this._notes=[]},_processAnnotations:function(e){for(var t=0;t<e.length;t++){for(var n=e[t],o=0;o<n.bindings.length;o++)for(var i=n.bindings[o],r=0;r<i.parts.length;r++){var s=i.parts[r];if(!s.literal){var a=this._parseMethod(s.value);a?s.signature=a:s.model=Polymer.Path.root(s.value)}}if(n.templateContent){this._processAnnotations(n.templateContent._notes);var l=n.templateContent._parentProps=this._discoverTemplateParentProps(n.templateContent._notes),c=[];for(var p in l){var d="_parent_"+p;c.push({index:n.index,kind:"property",name:d,propertyName:d,parts:[{mode:"{",model:p,value:p}]})}n.bindings=n.bindings.concat(c)}}},_discoverTemplateParentProps:function(e){for(var t,n={},o=0;o<e.length&&(t=e[o]);o++){for(var i,r=0,s=t.bindings;r<s.length&&(i=s[r]);r++)for(var a,l=0,c=i.parts;l<c.length&&(a=c[l]);l++)if(a.signature){for(var p=a.signature.args,d=0;d<p.length;d++){var h=p[d].model;h&&(n[h]=!0)}a.signature.dynamicFn&&(n[a.signature.method]=!0)}else a.model&&(n[a.model]=!0);if(t.templateContent){var u=t.templateContent._parentProps;Polymer.Base.mixin(n,u)}}return n},_prepElement:function(e){Polymer.ResolveUrl.resolveAttrs(e,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.findAnnotatedNode,_marshalAnnotationReferences:function(){this._template&&(this._marshalIdNodes(),this._marshalAnnotatedNodes(),this._marshalAnnotatedListeners())},_configureAnnotationReferences:function(){for(var e=this._notes,t=this._nodes,n=0;n<e.length;n++){var o=e[n],i=t[n];this._configureTemplateContent(o,i),this._configureCompoundBindings(o,i)}},_configureTemplateContent:function(e,t){e.templateContent&&(t._content=e.templateContent)},_configureCompoundBindings:function(e,t){for(var n=e.bindings,o=0;o<n.length;o++){var i=n[o];if(i.isCompound){for(var r=t.__compoundStorage__||(t.__compoundStorage__={}),s=i.parts,a=new Array(s.length),l=0;l<s.length;l++)a[l]=s[l].literal;var c=i.name;r[c]=a,i.literal&&"property"==i.kind&&(t._configValue?t._configValue(c,i.literal):t[c]=i.literal)}}},_marshalIdNodes:function(){this.$={};for(var e,t=0,n=this._notes.length;t<n&&(e=this._notes[t]);t++)e.id&&(this.$[e.id]=this._findAnnotatedNode(this.root,e))},_marshalAnnotatedNodes:function(){if(this._notes&&this._notes.length){for(var e=new Array(this._notes.length),t=0;t<this._notes.length;t++)e[t]=this._findAnnotatedNode(this.root,this._notes[t]);this._nodes=e}},_marshalAnnotatedListeners:function(){for(var e,t=0,n=this._notes.length;t<n&&(e=this._notes[t]);t++)if(e.events&&e.events.length)for(var o,i=this._findAnnotatedNode(this.root,e),r=0,s=e.events;r<s.length&&(o=s[r]);r++)this.listen(i,o.name,o.value)}}),Polymer.Base._addFeature({listeners:{},_listenListeners:function(e){var t,n,o;for(o in e)o.indexOf(".")<0?(t=this,n=o):(n=o.split("."),t=this.$[n[0]],n=n[1]),this.listen(t,n,e[o])},listen:function(e,t,n){var o=this._recallEventHandler(this,t,e,n);o||(o=this._createEventHandler(e,t,n)),o._listening||(this._listen(e,t,o),o._listening=!0)},_boundListenerKey:function(e,t){return e+":"+t},_recordEventHandler:function(e,t,n,o,i){var r=e.__boundListeners;r||(r=e.__boundListeners=new WeakMap);var s=r.get(n);s||(s={},Polymer.Settings.isIE&&n==window||r.set(n,s)),s[this._boundListenerKey(t,o)]=i},_recallEventHandler:function(e,t,n,o){var i=e.__boundListeners;if(i){var r=i.get(n);if(r)return r[this._boundListenerKey(t,o)]}},_createEventHandler:function(e,t,n){var o=this,i=function(e){o[n]?o[n](e,e.detail):o._warn(o._logf("_createEventHandler","listener method `"+n+"` not defined"))};return i._listening=!1,this._recordEventHandler(o,t,e,n,i),i},unlisten:function(e,t,n){var o=this._recallEventHandler(this,t,e,n);o&&(this._unlisten(e,t,o),o._listening=!1)},_listen:function(e,t,n){e.addEventListener(t,n)},_unlisten:function(e,t,n){e.removeEventListener(t,n)}}),function(){"use strict";var e=Polymer.DomApi.wrap,t="__habitlabPolymerGestures",n="__habitlabPolymerGesturesHandled",o="__habitlabPolymerGesturesTouchAction",i=2500,r=["mousedown","mousemove","mouseup","click"],s=[0,1,4,2],a=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}(),l=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();var c=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),p=function(e){var t=e.sourceCapabilities;if((!t||t.firesTouchEvents)&&(e[n]={skip:!0},"click"===e.type)){for(var o=Polymer.dom(e).path,i=0;i<o.length;i++)if(o[i]===u.mouse.target)return;e.preventDefault(),e.stopPropagation()}};function d(e){for(var t,n=c?["click"]:r,o=0;o<n.length;o++)t=n[o],e?document.addEventListener(t,p,!0):document.removeEventListener(t,p,!0)}function h(e){var t=e.type;if(-1===r.indexOf(t))return!1;if("mousemove"===t){var n=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!a&&(n=s[e.which]||0),Boolean(1&n)}return 0===(void 0===e.button?0:e.button)}var u={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function f(e,t,n){e.movefn=t,e.upfn=n,document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}function _(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}document.addEventListener("touchend",function(e){u.mouse.mouseIgnoreJob||d(!0),u.mouse.target=Polymer.dom(e).rootTarget,u.mouse.mouseIgnoreJob=Polymer.Debounce(u.mouse.mouseIgnoreJob,function(){d(),u.mouse.target=null,u.mouse.mouseIgnoreJob=null},i)},!!l&&{passive:!0});var m={gestures:{},recognizers:[],deepTargetFind:function(e,t){for(var n=document.elementFromPoint(e,t),o=n;o&&o.shadowRoot;)(o=o.shadowRoot.elementFromPoint(e,t))&&(n=o);return n},findOriginalTarget:function(e){return e.path?e.path[0]:e.target},handleNative:function(o){var i,r=o.type,s=e(o.currentTarget)[t];if(s){var a=s[r];if(a){if(!o[n]&&(o[n]={},"touch"===r.slice(0,5))){var l=o.changedTouches[0];if("touchstart"===r&&1===o.touches.length&&(u.touch.id=l.identifier),u.touch.id!==l.identifier)return;0}if(!(i=o[n]).skip){for(var c,p=m.recognizers,d=0;d<p.length;d++)a[(c=p[d]).name]&&!i[c.name]&&c.flow&&c.flow.start.indexOf(o.type)>-1&&c.reset&&c.reset();for(d=0;d<p.length;d++)a[(c=p[d]).name]&&!i[c.name]&&(i[c.name]=!0,c[r](o))}}}},handleTouchAction:function(e){var t=e.changedTouches[0],n=e.type;if("touchstart"===n)u.touch.x=t.clientX,u.touch.y=t.clientY,u.touch.scrollDecided=!1;else if("touchmove"===n){if(u.touch.scrollDecided)return;u.touch.scrollDecided=!0;var i=function(e){for(var t,n=Polymer.dom(e).path,i="auto",r=0;r<n.length;r++)if((t=n[r])[o]){i=t[o];break}return i}(e),r=!1,s=Math.abs(u.touch.x-t.clientX),a=Math.abs(u.touch.y-t.clientY);e.cancelable&&("none"===i?r=!0:"pan-x"===i?r=a>s:"pan-y"===i&&(r=s>a)),r?e.preventDefault():m.prevent("track")}},add:function(n,o,i){n=e(n);var s=this.gestures[o],a=s.deps,l=s.name,p=n[t];p||(n[t]=p={});for(var d,h,u=0;u<a.length;u++)d=a[u],c&&r.indexOf(d)>-1&&"click"!==d||((h=p[d])||(p[d]=h={_count:0}),0===h._count&&(window.habitlab_content_script&&!check_if_is_habitlab_node(n)&&n!=window.document||n.addEventListener(d,this.handleNative)),h[l]=(h[l]||0)+1,h._count=(h._count||0)+1);window.habitlab_content_script&&!check_if_is_habitlab_node(n)||n.addEventListener(o,i),s.touchAction&&this.setTouchAction(n,s.touchAction)},remove:function(n,o,i){n=e(n);var r=this.gestures[o],s=r.deps,a=r.name,l=n[t];if(l)for(var c,p,d=0;d<s.length;d++)(p=l[c=s[d]])&&p[a]&&(p[a]=(p[a]||1)-1,p._count=(p._count||1)-1,0===p._count&&n.removeEventListener(c,this.handleNative));n.removeEventListener(o,i)},register:function(e){this.recognizers.push(e);for(var t=0;t<e.emits.length;t++)this.gestures[e.emits[t]]=e},findRecognizerByEvent:function(e){for(var t,n=0;n<this.recognizers.length;n++){t=this.recognizers[n];for(var o=0;o<t.emits.length;o++)if(t.emits[o]===e)return t}return null},setTouchAction:function(e,t){e.style.touchAction=t,e[o]=t},fire:function(e,t,n){if(Polymer.Base.fire(t,n,{node:e,bubbles:!0,cancelable:!0}).defaultPrevented){var o=n.preventer||n.sourceEvent;o&&o.preventDefault&&o.preventDefault()}},prevent:function(e){var t=this.findRecognizerByEvent(e);t.info&&(t.info.prevent=!0)},resetMouseCanceller:function(){u.mouse.mouseIgnoreJob&&u.mouse.mouseIgnoreJob.complete()}};m.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){_(this.info)},mousedown:function(e){if(h(e)){var t=m.findOriginalTarget(e),n=this;f(this.info,function(e){h(e)||(n.fire("up",t,e),_(n.info))},function(e){h(e)&&n.fire("up",t,e),_(n.info)}),this.fire("down",t,e)}},touchstart:function(e){this.fire("down",m.findOriginalTarget(e),e.changedTouches[0],e)},touchend:function(e){this.fire("up",m.findOriginalTarget(e),e.changedTouches[0],e)},fire:function(e,t,n,o){m.fire(t,e,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:o,prevent:function(e){return m.prevent(e)}})}}),m.register({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,_(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),o=Math.abs(this.info.y-t);return n>=5||o>=5},mousedown:function(e){if(h(e)){var t=m.findOriginalTarget(e),n=this,o=function(e){var o=e.clientX,i=e.clientY;n.hasMovedEnough(o,i)&&(n.info.state=n.info.started?"mouseup"===e.type?"end":"track":"start","start"===n.info.state&&m.prevent("tap"),n.info.addMove({x:o,y:i}),h(e)||(n.info.state="end",_(n.info)),n.fire(t,e),n.info.started=!0)};f(this.info,o,function(e){n.info.started&&o(e),_(n.info)}),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){var t=m.findOriginalTarget(e),n=e.changedTouches[0],o=n.clientX,i=n.clientY;this.hasMovedEnough(o,i)&&("start"===this.info.state&&m.prevent("tap"),this.info.addMove({x:o,y:i}),this.fire(t,n),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=m.findOriginalTarget(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this.fire(t,n,e))},fire:function(e,t,n){var o,i=this.info.moves[this.info.moves.length-2],r=this.info.moves[this.info.moves.length-1],s=r.x-this.info.x,a=r.y-this.info.y,l=0;return i&&(o=r.x-i.x,l=r.y-i.y),m.fire(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:s,dy:a,ddx:o,ddy:l,sourceEvent:t,preventer:n,hover:function(){return m.deepTargetFind(t.clientX,t.clientY)}})}}),m.register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.clientX,this.info.y=e.clientY},mousedown:function(e){h(e)&&this.save(e)},click:function(e){h(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0],e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function(e,t){var n=Math.abs(e.clientX-this.info.x),o=Math.abs(e.clientY-this.info.y),i=m.findOriginalTarget(e);window.habitlab_content_script&&!check_if_is_habitlab_node(i)||(isNaN(n)||isNaN(o)||n<=25&&o<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;var t=m.findOriginalTarget(e).getBoundingClientRect(),n=e.pageX,o=e.pageY;return!(n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom)}return!1}(e))&&(this.info.prevent||m.fire(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}});var y={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_setupGestures:function(){this.__polymerGestures=null},_listen:function(e,t,n){m.gestures[t]?m.add(e,t,n):e.addEventListener(t,n)},_unlisten:function(e,t,n){m.gestures[t]?m.remove(e,t,n):e.removeEventListener(t,n)},setScrollDirection:function(e,t){t=t||this,m.setTouchAction(t,y[e]||"auto")}}),Polymer.Gestures=m}(),function(){"use strict";if(Polymer.Base._addFeature({$$:function(e){return Polymer.dom(this.root).querySelector(e)},toggleClass:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.classList.contains(e)),t?Polymer.dom(n).classList.add(e):Polymer.dom(n).classList.remove(e)},toggleAttribute:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.hasAttribute(e)),t?Polymer.dom(n).setAttribute(e,""):Polymer.dom(n).removeAttribute(e)},classFollows:function(e,t,n){n&&Polymer.dom(n).classList.remove(e),t&&Polymer.dom(t).classList.add(e)},attributeFollows:function(e,t,n){n&&Polymer.dom(n).removeAttribute(e),t&&Polymer.dom(t).setAttribute(e,"")},getEffectiveChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEffectiveChildren:function(){return Polymer.dom(this).getEffectiveChildNodes().filter(function(e){return e.nodeType===Node.ELEMENT_NODE})},getEffectiveTextContent:function(){for(var e,t=this.getEffectiveChildNodes(),n=[],o=0;e=t[o];o++)e.nodeType!==Node.COMMENT_NODE&&n.push(Polymer.dom(e).textContent);return n.join("")},queryEffectiveChildren:function(e){var t=Polymer.dom(this).queryDistributedElements(e);return t&&t[0]},queryAllEffectiveChildren:function(e){return Polymer.dom(this).queryDistributedElements(e)},getContentChildNodes:function(e){var t=Polymer.dom(this.root).querySelector(e||"content");return t?Polymer.dom(t).getDistributedNodes():[]},getContentChildren:function(e){return this.getContentChildNodes(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE})},fire:function(e,t,n){var o=(n=n||Polymer.nob).node||this;t=null===t||void 0===t?{}:t;var i=void 0===n.bubbles||n.bubbles,r=Boolean(n.cancelable),s=n._useCache,a=this._getEvent(e,i,r,s);return a.detail=t,s&&(this.__eventCache[e]=null),o.dispatchEvent(a),s&&(this.__eventCache[e]=a),a},__eventCache:{},_getEvent:function(e,t,n,o){var i=o&&this.__eventCache[e];return i&&i.bubbles==t&&i.cancelable==n||(i=new Event(e,{bubbles:Boolean(t),cancelable:n})),i},async:function(e,t){var n=this;return Polymer.Async.run(function(){e.call(n)},t)},cancelAsync:function(e){Polymer.Async.cancel(e)},arrayDelete:function(e,t){var n;if(Array.isArray(e)){if((n=e.indexOf(t))>=0)return e.splice(n,1)}else if((n=this._get(e).indexOf(t))>=0)return this.splice(e,n,1)},transform:function(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e},translate3d:function(e,t,n,o){o=o||this,this.transform("translate3d("+e+","+t+","+n+")",o)},importHref:function(e,t,n,o){var i=document.createElement("link");i.rel="import",i.href=e;var r=Polymer.Base.importHref.imported=Polymer.Base.importHref.imported||{},s=r[i.href],a=s||i,l=this,c=function(e){return e.target.__firedLoad=!0,e.target.removeEventListener("load",c),e.target.removeEventListener("error",p),t.call(l,e)},p=function(e){return e.target.__firedError=!0,e.target.removeEventListener("load",c),e.target.removeEventListener("error",p),n.call(l,e)};return t&&a.addEventListener("load",c),n&&a.addEventListener("error",p),s?(s.__firedLoad&&s.dispatchEvent(new Event("load")),s.__firedError&&s.dispatchEvent(new Event("error"))):(r[i.href]=i,(o=Boolean(o))&&i.setAttribute("async",""),document.head.appendChild(i)),a},create:function(e,t){var n=document.createElement(e);if(t)for(var o in t)n[o]=t[o];return n},isLightDescendant:function(e){return this!==e&&this.contains(e)&&Polymer.dom(this).getOwnerRoot()===Polymer.dom(e).getOwnerRoot()},isLocalDescendant:function(e){return this.root===Polymer.dom(e).getOwnerRoot()}}),!Polymer.Settings.useNativeCustomElements){var e=Polymer.Base.importHref;Polymer.Base.importHref=function(t,n,o,i){CustomElements.ready=!1;return e.call(this,t,function(e){if(CustomElements.upgradeDocumentTree(document),CustomElements.ready=!0,n)return n.call(this,e)},o,i)}}}(),Polymer.Bind={prepareModel:function(e){Polymer.Base.mixin(e,this._modelApi)},_modelApi:{_notifyChange:function(e,t,n){n=void 0===n?this[e]:n,t=t||Polymer.CaseMap.camelToDashCase(e)+"-changed",this.fire(t,{value:n},{bubbles:!1,cancelable:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_propertySetter:function(e,t,n,o){var i=this.__data__[e];return i===t||i!=i&&t!=t||(this.__data__[e]=t,"object"==typeof t&&this._clearPath(e),this._propertyChanged&&this._propertyChanged(e,t,i),n&&this._effectEffects(e,t,n,i,o)),i},__setProperty:function(e,t,n,o){var i=(o=o||this)._propertyEffects&&o._propertyEffects[e];i?o._propertySetter(e,t,i,n):o[e]!==t&&(o[e]=t)},_effectEffects:function(e,t,n,o,i){for(var r,s=0,a=n.length;s<a&&(r=n[s]);s++)r.fn.call(this,e,this[e],r.effect,o,i)},_clearPath:function(e){for(var t in this.__data__)Polymer.Path.isDescendant(e,t)&&(this.__data__[t]=void 0)}},ensurePropertyEffects:function(e,t){e._propertyEffects||(e._propertyEffects={});var n=e._propertyEffects[t];return n||(n=e._propertyEffects[t]=[]),n},addPropertyEffect:function(e,t,n,o){var i=this.ensurePropertyEffects(e,t),r={kind:n,effect:o,fn:Polymer.Bind["_"+n+"Effect"]};return i.push(r),r},createBindings:function(e){var t=e._propertyEffects;if(t)for(var n in t){var o=t[n];o.sort(this._sortPropertyEffects),this._createAccessors(e,n,o)}},_sortPropertyEffects:function(){var e={compute:0,annotation:1,annotatedComputation:2,reflect:3,notify:4,observer:5,complexObserver:6,function:7};return function(t,n){return e[t.kind]-e[n.kind]}}(),_createAccessors:function(e,t,n){var o={get:function(){return this.__data__[t]}},i=function(e){this._propertySetter(t,e,n)},r=e.getPropertyInfo&&e.getPropertyInfo(t);r&&r.readOnly?r.computed||(e["_set"+this.upper(t)]=i):o.set=i,Object.defineProperty(e,t,o)},upper:function(e){return e[0].toUpperCase()+e.substring(1)},_addAnnotatedListener:function(e,t,n,o,i,r){e._bindListeners||(e._bindListeners=[]);var s=this._notedListenerFactory(n,o,Polymer.Path.isDeep(o),r),a=i||Polymer.CaseMap.camelToDashCase(n)+"-changed";e._bindListeners.push({index:t,property:n,path:o,changedFn:s,event:a})},_isEventBogus:function(e,t){return e.path&&e.path[0]!==t},_notedListenerFactory:function(e,t,n,o){return function(i,r,s){if(s){var a=Polymer.Path.translate(e,t,s);this._notifyPath(a,r)}else r=i[e],o&&(r=!r),n?this.__data__[t]!=r&&this.set(t,r):this[t]=r}},prepareInstance:function(e){e.__data__=Object.create(null)},setupBindListeners:function(e){for(var t,n=e._bindListeners,o=0,i=n.length;o<i&&(t=n[o]);o++){var r=e._nodes[t.index];this._addNotifyListener(r,e,t.event,t.changedFn)}},_addNotifyListener:function(e,t,n,o){e.addEventListener(n,function(e){return t._notifyListener(o,e)})}},Polymer.Base.mixin(Polymer.Bind,{_shouldAddListener:function(e){return e.name&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode},_annotationEffect:function(e,t,n){e!=n.value&&(t=this._get(n.value),this.__data__[n.value]=t),this._applyEffectValue(n,t)},_reflectEffect:function(e,t,n){this.reflectPropertyToAttribute(e,n.attribute,t)},_notifyEffect:function(e,t,n,o,i){i||this._notifyChange(e,n.event,t)},_functionEffect:function(e,t,n,o,i){n.call(this,e,t,o,i)},_observerEffect:function(e,t,n,o){var i=this[n.method];i?i.call(this,t,o):this._warn(this._logf("_observerEffect","observer method `"+n.method+"` not defined"))},_complexObserverEffect:function(e,t,n){var o=this[n.method];if(o){var i=Polymer.Bind._marshalArgs(this.__data__,n,e,t);i&&o.apply(this,i)}else n.dynamicFn||this._warn(this._logf("_complexObserverEffect","observer method `"+n.method+"` not defined"))},_computeEffect:function(e,t,n){var o=this[n.method];if(o){var i=Polymer.Bind._marshalArgs(this.__data__,n,e,t);if(i){var r=o.apply(this,i);this.__setProperty(n.name,r)}}else n.dynamicFn||this._warn(this._logf("_computeEffect","compute method `"+n.method+"` not defined"))},_annotatedComputationEffect:function(e,t,n){var o=this._rootDataHost||this,i=o[n.method];if(i){var r=Polymer.Bind._marshalArgs(this.__data__,n,e,t);if(r){var s=i.apply(o,r);this._applyEffectValue(n,s)}}else n.dynamicFn||o._warn(o._logf("_annotatedComputationEffect","compute method `"+n.method+"` not defined"))},_marshalArgs:function(e,t,n,o){for(var i=[],r=t.args,s=r.length>1||t.dynamicFn,a=0,l=r.length;a<l;a++){var c,p=r[a],d=p.name;if(p.literal?c=p.value:n===d?c=o:void 0===(c=e[d])&&p.structured&&(c=Polymer.Base._get(d,e)),s&&void 0===c)return;if(p.wildcard){var h=Polymer.Path.isAncestor(n,d);i[a]={path:h?n:d,value:h?o:c,base:c}}else i[a]=c}return i}}),Polymer.Base._addFeature({_addPropertyEffect:function(e,t,n){var o=Polymer.Bind.addPropertyEffect(this,e,t,n);o.pathFn=this["_"+o.kind+"PathEffect"]},_prepEffects:function(){Polymer.Bind.prepareModel(this),this._addAnnotationEffects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_addPropertyEffects:function(e){if(e)for(var t in e){var n=e[t];if(n.observer&&this._addObserverEffect(t,n.observer),n.computed&&(n.readOnly=!0,this._addComputedEffect(t,n.computed)),n.notify&&this._addPropertyEffect(t,"notify",{event:Polymer.CaseMap.camelToDashCase(t)+"-changed"}),n.reflectToAttribute){var o=Polymer.CaseMap.camelToDashCase(t);"-"===o[0]?this._warn(this._logf("_addPropertyEffects","Property "+t+" cannot be reflected to attribute "+o+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.')):this._addPropertyEffect(t,"reflect",{attribute:o})}n.readOnly&&Polymer.Bind.ensurePropertyEffects(this,t)}},_addComputedEffect:function(e,t){for(var n,o=this._parseMethod(t),i=o.dynamicFn,r=0;r<o.args.length&&(n=o.args[r]);r++)this._addPropertyEffect(n.model,"compute",{method:o.method,args:o.args,trigger:n,name:e,dynamicFn:i});i&&this._addPropertyEffect(o.method,"compute",{method:o.method,args:o.args,trigger:null,name:e,dynamicFn:i})},_addObserverEffect:function(e,t){this._addPropertyEffect(e,"observer",{method:t,property:e})},_addComplexObserverEffects:function(e){if(e)for(var t,n=0;n<e.length&&(t=e[n]);n++)this._addComplexObserverEffect(t)},_addComplexObserverEffect:function(e){var t=this._parseMethod(e);if(!t)throw new Error("Malformed observer expression '"+e+"'");for(var n,o=t.dynamicFn,i=0;i<t.args.length&&(n=t.args[i]);i++)this._addPropertyEffect(n.model,"complexObserver",{method:t.method,args:t.args,trigger:n,dynamicFn:o});o&&this._addPropertyEffect(t.method,"complexObserver",{method:t.method,args:t.args,trigger:null,dynamicFn:o})},_addAnnotationEffects:function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++)for(var o,i=t.bindings,r=0;r<i.length&&(o=i[r]);r++)this._addAnnotationEffect(o,n)},_addAnnotationEffect:function(e,t){Polymer.Bind._shouldAddListener(e)&&Polymer.Bind._addAnnotatedListener(this,t,e.name,e.parts[0].value,e.parts[0].event,e.parts[0].negate);for(var n=0;n<e.parts.length;n++){var o=e.parts[n];o.signature?this._addAnnotatedComputationEffect(e,o,t):o.literal||("attribute"===e.kind&&"-"===e.name[0]?this._warn(this._logf("_addAnnotationEffect","Cannot set attribute "+e.name+' because "-" is not a valid attribute starting character')):this._addPropertyEffect(o.model,"annotation",{kind:e.kind,index:t,name:e.name,propertyName:e.propertyName,value:o.value,isCompound:e.isCompound,compoundIndex:o.compoundIndex,event:o.event,customEvent:o.customEvent,negate:o.negate}))}},_addAnnotatedComputationEffect:function(e,t,n){var o=t.signature;if(o.static)this.__addAnnotatedComputationEffect("__static__",n,e,t,null);else{for(var i,r=0;r<o.args.length&&(i=o.args[r]);r++)i.literal||this.__addAnnotatedComputationEffect(i.model,n,e,t,i);o.dynamicFn&&this.__addAnnotatedComputationEffect(o.method,n,e,t,null)}},__addAnnotatedComputationEffect:function(e,t,n,o,i){this._addPropertyEffect(e,"annotatedComputation",{index:t,isCompound:n.isCompound,compoundIndex:o.compoundIndex,kind:n.kind,name:n.name,negate:o.negate,method:o.signature.method,args:o.signature.args,trigger:i,dynamicFn:o.signature.dynamicFn})},_parseMethod:function(e){var t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){var n={method:t[1],static:!0};if(this.getPropertyInfo(n.method)!==Polymer.nob&&(n.static=!1,n.dynamicFn=!0),t[2].trim()){var o=t[2].replace(/\\,/g,",").split(",");return this._parseArgs(o,n)}return n.args=Polymer.nar,n}},_parseArgs:function(e,t){return t.args=e.map(function(e){var n=this._parseArg(e);return n.literal||(t.static=!1),n},this),t},_parseArg:function(e){var t=e.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),n={name:t},o=t[0];switch("-"===o&&(o=t[1]),o>="0"&&o<="9"&&(o="#"),o){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(t),n.literal=!0}return n.literal||(n.model=Polymer.Path.root(t),n.structured=Polymer.Path.isDeep(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&&(n.name=t.slice(0,-2)))),n},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_applyEffectValue:function(e,t){var n=this._nodes[e.index],o=e.name;if(t=this._computeFinalAnnotationValue(n,o,t,e),"attribute"==e.kind)this.serializeValueToAttribute(t,o,n);else{var i=n._propertyInfo&&n._propertyInfo[o];if(i&&i.readOnly)return;this.__setProperty(o,t,Polymer.Settings.suppressBindingNotifications,n)}},_computeFinalAnnotationValue:function(e,t,n,o){if(o.negate&&(n=!n),o.isCompound){var i=e.__compoundStorage__[t];i[o.compoundIndex]=n,n=i.join("")}return"attribute"!==o.kind&&("className"===t&&(n=this._scopeElementClass(e,n)),("textContent"===t||"input"==e.localName&&"value"==t)&&(n=void 0==n?"":n)),n},_executeStaticEffects:function(){this._propertyEffects&&this._propertyEffects.__static__&&this._effectEffects("__static__",null,this._propertyEffects.__static__)}}),function(){var e=Polymer.Settings.usePolyfillProto,t=Boolean(Object.getOwnPropertyDescriptor(document.documentElement,"properties"));Polymer.Base._addFeature({_setupConfigure:function(e){if(this._config={},this._handlers=[],this._aboveConfig=null,e)for(var t in e)void 0!==e[t]&&(this._config[t]=e[t])},_marshalAttributes:function(){this._takeAttributesToModel(this._config)},_attributeChangedImpl:function(e){var t=this._clientsReadied?this:this._config;this._setAttributeToProperty(t,e)},_configValue:function(e,t){var n=this._propertyInfo[e];n&&n.readOnly||(this._config[e]=t)},_beforeClientsReady:function(){this._configure()},_configure:function(){this._configureAnnotationReferences(),this._configureInstanceProperties(),this._aboveConfig=this.mixin({},this._config);for(var e={},n=0;n<this.behaviors.length;n++)this._configureProperties(this.behaviors[n].properties,e);this._configureProperties(t?this.__proto__.properties:this.properties,e),this.mixin(e,this._aboveConfig),this._config=e,this._clients&&this._clients.length&&this._distributeConfig(this._config)},_configureInstanceProperties:function(){for(var t in this._propertyEffects)!e&&this.hasOwnProperty(t)&&(this._configValue(t,this[t]),delete this[t])},_configureProperties:function(e,t){for(var n in e){var o=e[n];if(void 0!==o.value){var i=o.value;"function"==typeof i&&(i=i.call(this,this._config)),t[n]=i}}},_distributeConfig:function(e){var t=this._propertyEffects;if(t)for(var n in e){var o=t[n];if(o)for(var i,r=0,s=o.length;r<s&&(i=o[r]);r++)if("annotation"===i.kind){var a=this._nodes[i.effect.index],l=i.effect.propertyName,c="attribute"==i.effect.kind,p=a._propertyEffects&&a._propertyEffects[l];if(a._configValue&&(p||!c)){var d=n===i.effect.value?e[n]:this._get(i.effect.value,e);d=this._computeFinalAnnotationValue(a,l,d,i.effect),c&&(d=a.deserialize(this.serialize(d),a._propertyInfo[l].type)),a._configValue(l,d)}}}},_afterClientsReady:function(){this.importPath=this._importPath,this.rootPath=Polymer.rootPath,this._executeStaticEffects(),this._applyConfig(this._config,this._aboveConfig),this._flushHandlers()},_applyConfig:function(e,t){for(var n in e)void 0===this[n]&&this.__setProperty(n,e[n],n in t)},_notifyListener:function(e,t){if(!Polymer.Bind._isEventBogus(t,t.target)){var n,o;if(t.detail&&(n=t.detail.value,o=t.detail.path),this._clientsReadied)return e.call(this,t.target,n,o);this._queueHandler([e,t.target,n,o])}},_queueHandler:function(e){this._handlers.push(e)},_flushHandlers:function(){for(var e,t=this._handlers,n=0,o=t.length;n<o&&(e=t[n]);n++)e[0].call(this,e[1],e[2],e[3]);this._handlers=[]}})}(),function(){"use strict";var e=Polymer.Path;Polymer.Base._addFeature({notifyPath:function(e,t,n){var o={},i=this._get(e,this,o);1===arguments.length&&(t=i),o.path&&this._notifyPath(o.path,t,n)},_notifyPath:function(e,t,n){var o=this._propertySetter(e,t);if(o!==t&&(o==o||t==t))return this._pathEffector(e,t),n||this._notifyPathUp(e,t),!0},_getPathParts:function(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)for(var o=e[n].toString().split("."),i=0;i<o.length;i++)t.push(o[i]);return t}return e.toString().split(".")},set:function(e,t,n){var o,i=n||this,r=this._getPathParts(e),s=r[r.length-1];if(r.length>1){for(var a=0;a<r.length-1;a++){var l=r[a];if(o&&"#"==l[0]?i=Polymer.Collection.get(o).getItem(l):(i=i[l],o&&parseInt(l,10)==l&&(r[a]=Polymer.Collection.get(o).getKey(i))),!i)return;o=Array.isArray(i)?i:null}if(o){var c,p,d=Polymer.Collection.get(o);"#"==s[0]?(p=s,c=d.getItem(p),s=o.indexOf(c),d.setItem(p,t)):parseInt(s,10)==s&&(c=i[s],p=d.getKey(c),r[a]=p,d.setItem(p,t))}i[s]=t,n||this._notifyPath(r.join("."),t)}else i[e]=t},get:function(e,t){return this._get(e,t)},_get:function(e,t,n){for(var o,i=t||this,r=this._getPathParts(e),s=0;s<r.length;s++){if(!i)return;var a=r[s];o&&"#"==a[0]?i=Polymer.Collection.get(o).getItem(a):(i=i[a],n&&o&&parseInt(a,10)==a&&(r[s]=Polymer.Collection.get(o).getKey(i))),o=Array.isArray(i)?i:null}return n&&(n.path=r.join(".")),i},_pathEffector:function(t,n){var o=e.root(t),i=this._propertyEffects&&this._propertyEffects[o];if(i)for(var r,s=0;s<i.length&&(r=i[s]);s++){var a=r.pathFn;a&&a.call(this,t,n,r.effect)}this._boundPaths&&this._notifyBoundPaths(t,n)},_annotationPathEffect:function(t,n,o){if(e.matches(o.value,!1,t))Polymer.Bind._annotationEffect.call(this,t,n,o);else if(!o.negate&&e.isDescendant(o.value,t)){var i=this._nodes[o.index];if(i&&i._notifyPath){var r=e.translate(o.value,o.name,t);i._notifyPath(r,n,!0)}}},_complexObserverPathEffect:function(t,n,o){e.matches(o.trigger.name,o.trigger.wildcard,t)&&Polymer.Bind._complexObserverEffect.call(this,t,n,o)},_computePathEffect:function(t,n,o){e.matches(o.trigger.name,o.trigger.wildcard,t)&&Polymer.Bind._computeEffect.call(this,t,n,o)},_annotatedComputationPathEffect:function(t,n,o){e.matches(o.trigger.name,o.trigger.wildcard,t)&&Polymer.Bind._annotatedComputationEffect.call(this,t,n,o)},linkPaths:function(e,t){this._boundPaths=this._boundPaths||{},t?this._boundPaths[e]=t:this.unlinkPaths(e)},unlinkPaths:function(e){this._boundPaths&&delete this._boundPaths[e]},_notifyBoundPaths:function(t,n){for(var o in this._boundPaths){var i=this._boundPaths[o];e.isDescendant(o,t)?this._notifyPath(e.translate(o,i,t),n):e.isDescendant(i,t)&&this._notifyPath(e.translate(i,o,t),n)}},_notifyPathUp:function(t,n){var o=e.root(t),i=Polymer.CaseMap.camelToDashCase(o)+this._EVENT_CHANGED;this.fire(i,{path:t,value:n},{bubbles:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_EVENT_CHANGED:"-changed",notifySplices:function(e,t){var n={},o=this._get(e,this,n);this._notifySplices(o,n.path,t)},_notifySplices:function(e,t,n){var o={keySplices:Polymer.Collection.applySplices(e,n),indexSplices:n},i=t+".splices";this._notifyPath(i,o),this._notifyPath(t+".length",e.length),this.__data__[i]={keySplices:null,indexSplices:null}},_notifySplice:function(e,t,n,o,i){this._notifySplices(e,t,[{index:n,addedCount:o,removed:i,object:e,type:"splice"}])},push:function(e){var t={},n=this._get(e,this,t),o=Array.prototype.slice.call(arguments,1),i=n.length,r=n.push.apply(n,o);return o.length&&this._notifySplice(n,t.path,i,o.length,[]),r},pop:function(e){var t={},n=this._get(e,this,t),o=Boolean(n.length),i=Array.prototype.slice.call(arguments,1),r=n.pop.apply(n,i);return o&&this._notifySplice(n,t.path,n.length,0,[r]),r},splice:function(e,t){var n={},o=this._get(e,this,n);(t=t<0?o.length-Math.floor(-t):Math.floor(t))||(t=0);var i=Array.prototype.slice.call(arguments,1),r=o.splice.apply(o,i),s=Math.max(i.length-2,0);return(s||r.length)&&this._notifySplice(o,n.path,t,s,r),r},shift:function(e){var t={},n=this._get(e,this,t),o=Boolean(n.length),i=Array.prototype.slice.call(arguments,1),r=n.shift.apply(n,i);return o&&this._notifySplice(n,t.path,0,0,[r]),r},unshift:function(e){var t={},n=this._get(e,this,t),o=Array.prototype.slice.call(arguments,1),i=n.unshift.apply(n,o);return o.length&&this._notifySplice(n,t.path,0,o.length,[]),i},prepareModelNotifyPath:function(e){this.mixin(e,{fire:Polymer.Base.fire,_getEvent:Polymer.Base._getEvent,__eventCache:Polymer.Base.__eventCache,notifyPath:Polymer.Base.notifyPath,_get:Polymer.Base._get,_EVENT_CHANGED:Polymer.Base._EVENT_CHANGED,_notifyPath:Polymer.Base._notifyPath,_notifyPathUp:Polymer.Base._notifyPathUp,_pathEffector:Polymer.Base._pathEffector,_annotationPathEffect:Polymer.Base._annotationPathEffect,_complexObserverPathEffect:Polymer.Base._complexObserverPathEffect,_annotatedComputationPathEffect:Polymer.Base._annotatedComputationPathEffect,_computePathEffect:Polymer.Base._computePathEffect,_notifyBoundPaths:Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})}(),Polymer.Base._addFeature({resolveUrl:function(e){return Polymer.ResolveUrl.resolveUrl(e,this._importPath)}}),Polymer.CssParse={parse:function(e){return e=this._clean(e),this._parseCss(this._lex(e),e)},_clean:function(e){return e.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(e){for(var t={start:0,end:e.length},n=t,o=0,i=e.length;o<i;o++)switch(e[o]){case this.OPEN_BRACE:n.rules||(n.rules=[]);var r=n;n={start:o+1,parent:r,previous:r.rules[r.rules.length-1]},r.rules.push(n);break;case this.CLOSE_BRACE:n.end=o+1,n=n.parent||t}return t},_parseCss:function(e,t){var n=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=n.trim(),e.parent){var o=e.previous?e.previous.end:e.parent.start;n=t.substring(o,e.start-1),n=(n=(n=this._expandUnicodeEscapes(n)).replace(this._rx.multipleSpaces," ")).substring(n.lastIndexOf(";")+1);var i=e.parsedSelector=e.selector=n.trim();e.atRule=0===i.indexOf(this.AT_START),e.atRule?0===i.indexOf(this.MEDIA_START)?e.type=this.types.MEDIA_RULE:i.match(this._rx.keyframesRule)&&(e.type=this.types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(this._rx.multipleSpaces).pop()):0===i.indexOf(this.VAR_START)?e.type=this.types.MIXIN_RULE:e.type=this.types.STYLE_RULE}var r=e.rules;if(r)for(var s,a=0,l=r.length;a<l&&(s=r[a]);a++)this._parseCss(s,t);return e},_expandUnicodeEscapes:function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e})},stringify:function(e,t,n){n=n||"";var o="";if(e.cssText||e.rules){var i=e.rules;if(i&&!this._hasMixinRules(i))for(var r,s=0,a=i.length;s<a&&(r=i[s]);s++)o=this.stringify(r,t,o);else(o=(o=t?e.cssText:this.removeCustomProps(e.cssText)).trim())&&(o=" "+o+"\n")}return o&&(e.selector&&(n+=e.selector+" "+this.OPEN_BRACE+"\n"),n+=o,e.selector&&(n+=this.CLOSE_BRACE+"\n\n")),n},_hasMixinRules:function(e){return 0===e[0].selector.indexOf(this.VAR_START)},removeCustomProps:function(e){return e=this.removeCustomPropAssignment(e),this.removeCustomPropApply(e)},removeCustomPropAssignment:function(e){return e.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},removeCustomPropApply:function(e){return e.replace(this._rx.mixinApply,"").replace(this._rx.varApply,"")},types:{STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE:"{",CLOSE_BRACE:"}",_rx:{comments:/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START:"--",MEDIA_START:"@media",AT_START:"@"},Polymer.StyleUtil=function(){var e=Polymer.Settings;return{NATIVE_VARIABLES:Polymer.Settings.useNativeCSSProperties,MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(e,t){return"string"==typeof e&&(e=this.parser.parse(e)),t&&this.forEachRule(e,t),this.parser.stringify(e,this.NATIVE_VARIABLES)},forRulesInStyles:function(e,t,n){if(e)for(var o,i=0,r=e.length;i<r&&(o=e[i]);i++)this.forEachRuleInStyle(o,t,n)},forActiveRulesInStyles:function(e,t,n){if(e)for(var o,i=0,r=e.length;i<r&&(o=e[i]);i++)this.forEachRuleInStyle(o,t,n,!0)},rulesForStyle:function(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=this.parser.parse(e.textContent)),e.__cssRules},isKeyframesSelector:function(e){return e.parent&&e.parent.type===this.ruleTypes.KEYFRAMES_RULE},forEachRuleInStyle:function(e,t,n,o){var i,r,s=this.rulesForStyle(e);t&&(i=function(n){t(n,e)}),n&&(r=function(t){n(t,e)}),this.forEachRule(s,i,r,o)},forEachRule:function(e,t,n,o){if(e){var i=!1;if(o&&e.type===this.ruleTypes.MEDIA_RULE){var r=e.selector.match(this.rx.MEDIA_MATCH);r&&(window.matchMedia(r[1]).matches||(i=!0))}e.type===this.ruleTypes.STYLE_RULE?t(e):n&&e.type===this.ruleTypes.KEYFRAMES_RULE?n(e):e.type===this.ruleTypes.MIXIN_RULE&&(i=!0);var s=e.rules;if(s&&!i)for(var a,l=0,c=s.length;l<c&&(a=s[l]);l++)this.forEachRule(a,t,n,o)}},applyCss:function(e,t,n,o){var i=this.createScopeStyle(e,t);return this.applyStyle(i,n,o)},applyStyle:function(e,t,n){t=t||document.head;var o=n&&n.nextSibling||t.firstChild;return this.__lastHeadApplyNode=e,t.insertBefore(e,o)},createScopeStyle:function(e,t){var n=document.createElement("style");return t&&n.setAttribute("scope",t),n.textContent=e,n},__lastHeadApplyNode:null,applyStylePlaceHolder:function(e){var t=document.createComment(" Shady DOM styles for "+e+" "),n=this.__lastHeadApplyNode?this.__lastHeadApplyNode.nextSibling:null,o=document.head;return o.insertBefore(t,n||o.firstChild),this.__lastHeadApplyNode=t,t},cssFromModules:function(e,t){for(var n=e.trim().split(" "),o="",i=0;i<n.length;i++)o+=this.cssFromModule(n[i],t);return o},cssFromModule:function(e,t){var n=Polymer.DomModule.import(e);return n&&!n._cssText&&(n._cssText=this.cssFromElement(n)),!n&&t&&console.warn("Could not find style data in module named",e),n&&n._cssText||""},cssFromElement:function(e){for(var t,n="",o=e.content||e,i=Polymer.TreeApi.arrayCopy(o.querySelectorAll(this.MODULE_STYLES_SELECTOR)),r=0;r<i.length;r++)if("template"===(t=i[r]).localName)t.hasAttribute("preserve-content")||(n+=this.cssFromElement(t));else if("style"===t.localName){var s=t.getAttribute(this.INCLUDE_ATTR);s&&(n+=this.cssFromModules(s,!0)),(t=t.__appliedElement||t).parentNode.removeChild(t),n+=this.resolveCss(t.textContent,e.ownerDocument)}else t.import&&t.import.body&&(n+=this.resolveCss(t.import.body.textContent,t.import));return n},styleIncludesToTemplate:function(e){for(var t,n=e.content.querySelectorAll("style[include]"),o=0;o<n.length;o++)(t=n[o]).parentNode.insertBefore(this._includesToFragment(t.getAttribute("include")),t)},_includesToFragment:function(e){for(var t=e.trim().split(" "),n=document.createDocumentFragment(),o=0;o<t.length;o++){var i=Polymer.DomModule.import(t[o],"template");i&&this._addStylesToFragment(n,i.content)}return n},_addStylesToFragment:function(e,t){for(var n,o=t.querySelectorAll("style"),i=0;i<o.length;i++){var r=(n=o[i]).getAttribute("include");r&&e.appendChild(this._includesToFragment(r)),n.textContent&&e.appendChild(n.cloneNode(!0))}},isTargetedBuild:function(t){return e.useNativeShadow?"shadow"===t:"shady"===t},cssBuildTypeForModule:function(e){var t=Polymer.DomModule.import(e);if(t)return this.getCssBuildType(t)},getCssBuildType:function(e){return e.getAttribute("css-build")},_findMatchingParen:function(e,t){for(var n=0,o=t,i=e.length;o<i;o++)switch(e[o]){case"(":n++;break;case")":if(0==--n)return o}return-1},processVariableAndFallback:function(e,t){var n=e.indexOf("var(");if(-1===n)return t(e,"","","");var o=this._findMatchingParen(e,n+3),i=e.substring(n+4,o),r=e.substring(0,n),s=this.processVariableAndFallback(e.substring(o+1),t),a=i.indexOf(",");return-1===a?t(r,i.trim(),"",s):t(r,i.substring(0,a).trim(),i.substring(a+1).trim(),s)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSUMED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var e=Polymer.StyleUtil,t=Polymer.Settings,n={dom:function(e,t,n,o){this._transformDom(e,t||"",n,o)},_transformDom:function(e,t,n,o){e.setAttribute&&this.element(e,t,n,o);for(var i=Polymer.dom(e).childNodes,r=0;r<i.length;r++)this._transformDom(i[r],t,n,o)},element:function(e,t,n,i){if(n)i?e.removeAttribute(o):e.setAttribute(o,t);else if(t)if(e.classList)i?(e.classList.remove(o),e.classList.remove(t)):(e.classList.add(o),e.classList.add(t));else if(e.getAttribute){var r=e.getAttribute(v);i?r&&e.setAttribute(v,r.replace(o,"").replace(t,"")):e.setAttribute(v,(r?r+" ":"")+o+" "+t)}},elementStyles:function(n,o){var i,r=n._styles,s="",a=n.__cssBuild,l=t.useNativeShadow||"shady"===a;if(l){var p=this;i=function(e){e.selector=p._slottedToContent(e.selector),e.selector=e.selector.replace(c,":host > *"),o&&o(e)}}for(var d,h=0,u=r.length;h<u&&(d=r[h]);h++){var f=e.rulesForStyle(d);s+=l?e.toCssText(f,i):this.css(f,n.is,n.extends,o,n._scopeCssViaAttr)+"\n\n"}return s.trim()},css:function(t,n,o,i,r){var s=this._calcHostScope(n,o);n=this._calcElementScope(n,r);var a=this;return e.toCssText(t,function(e){e.isScoped||(a.rule(e,n,s),e.isScoped=!0),i&&i(e,n,s)})},_calcElementScope:function(e,t){return e?t?m+e+y:_+e:""},_calcHostScope:function(e,t){return t?"[is="+e+"]":e},rule:function(e,t,n){this._transformRule(e,this._transformComplexSelector,t,n)},_transformRule:function(e,t,n,o){e.selector=e.transformedSelector=this._transformRuleCss(e,t,n,o)},_transformRuleCss:function(t,n,o,i){var s=t.selector.split(r);if(!e.isKeyframesSelector(t))for(var a,l=0,c=s.length;l<c&&(a=s[l]);l++)s[l]=n.call(this,a,o,i);return s.join(r)},_transformComplexSelector:function(e,t,n){var o=!1,i=!1,a=this;return e=e.trim(),e=(e=(e=(e=this._slottedToContent(e)).replace(c,":host > *")).replace(g,l+" $1")).replace(s,function(e,r,s){if(o)s=s.replace(f," ");else{var l=a._transformCompoundSelector(s,r,t,n);o=o||l.stop,i=i||l.hostContext,r=l.combinator,s=l.value}return r+s}),i&&(e=e.replace(h,function(e,t,o,i){return t+o+" "+n+i+r+" "+t+n+o+i})),e},_transformCompoundSelector:function(e,t,n,o){var i,r=e.search(f),s=!1;return e.indexOf(d)>=0?s=!0:e.indexOf(l)>=0?e=this._transformHostSelector(e,o):0!==r&&(e=n?this._transformSimpleSelector(e,n):e),e.indexOf(u)>=0&&(t=""),r>=0&&(e=e.replace(f," "),i=!0),{value:e,combinator:t,stop:i,hostContext:s}},_transformSimpleSelector:function(e,t){var n=e.split(b);return n[0]+=t,n.join(b)},_transformHostSelector:function(e,t){var n=e.match(p),o=n&&n[2].trim()||"";return o?o[0].match(a)?e.replace(p,function(e,n,o){return t+o}):o.split(a)[0]===t?o:w:e.replace(l,t)},documentRule:function(e){e.selector=e.parsedSelector,this.normalizeRootSelector(e),t.useNativeShadow||this._transformRule(e,this._transformDocumentSelector)},normalizeRootSelector:function(e){e.selector=e.selector.replace(c,"html");var t=e.selector.split(r);t=t.filter(function(e){return!e.match(x)}),e.selector=t.join(r)},_transformDocumentSelector:function(e){return e.match(f)?this._transformComplexSelector(e,i):this._transformSimpleSelector(e.trim(),i)},_slottedToContent:function(e){return e.replace(P,u+"> $1")},SCOPE_NAME:"style-scope"},o=n.SCOPE_NAME,i=":not(["+o+"]):not(."+o+")",r=",",s=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,a=/[[.:#*]/,l=":host",c=":root",p=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,d=":host-context",h=/(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,u="::content",f=/::content|::shadow|\/deep\//,_=".",m="["+o+"~=",y="]",b=":",v="class",g=new RegExp("^("+u+")"),w="should_not_match",P=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g,x=/:host(?:\s*>\s*\*)?/;return n}(),Polymer.StyleExtends=function(){var e=Polymer.StyleUtil;return{hasExtends:function(e){return Boolean(e.match(this.rx.EXTEND))},transform:function(t){var n=e.rulesForStyle(t),o=this;return e.forEachRule(n,function(e){if(o._mapRuleOntoParent(e),e.parent)for(var t;t=o.rx.EXTEND.exec(e.cssText);){var n=t[1],i=o._findExtendor(n,e);i&&o._extendRule(e,i)}e.cssText=e.cssText.replace(o.rx.EXTEND,"")}),e.toCssText(n,function(e){e.selector.match(o.rx.STRIP)&&(e.cssText="")},!0)},_mapRuleOntoParent:function(e){if(e.parent){for(var t=e.parent.map||(e.parent.map={}),n=e.selector.split(","),o=0;o<n.length;o++)t[n[o].trim()]=e;return t}},_findExtendor:function(e,t){return t.parent&&t.parent.map&&t.parent.map[e]||this._findExtendor(e,t.parent)},_extendRule:function(e,t){e.parent!==t.parent&&this._cloneAndAddRuleToParent(t,e.parent),e.extends=e.extends||[],e.extends.push(t),t.selector=t.selector.replace(this.rx.STRIP,""),t.selector=(t.selector&&t.selector+",\n")+e.selector,t.extends&&t.extends.forEach(function(t){this._extendRule(e,t)},this)},_cloneAndAddRuleToParent:function(e,t){(e=Object.create(e)).parent=t,e.extends&&(e.extends=e.extends.slice()),t.rules.push(e)},rx:{EXTEND:/@extends\(([^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}(),Polymer.ApplyShim=function(){"use strict";var e=Polymer.StyleUtil,t=e.rx.MIXIN_MATCH,n=e.rx.VAR_ASSIGN,o=/var\(\s*(--[^,]*),\s*(--[^)]*)\)/g,i=/;\s*/m,r=/^\s*(initial)|(inherit)\s*$/,s="_-_",a={};function l(e,t){e=e.trim(),a[e]={properties:t,dependants:{}}}function c(e){return e=e.trim(),a[e]}function p(e,t){var n=r.exec(t);return n&&(t=n[1]?m._getInitialValueForProperty(e):"apply-shim-inherit"),t}function d(e){for(var t,n,o,i,r=e.split(";"),s={},a=0;a<r.length;a++)(o=r[a])&&(i=o.split(":")).length>1&&(n=p(t=i[0].trim(),i.slice(1).join(":")),s[t]=n);return s}function h(t,n,o,i){if(o&&e.processVariableAndFallback(o,function(e,t){t&&c(t)&&(i="@apply "+t+";")}),!i)return t;var r=_(i),a=t.slice(0,t.indexOf("--")),p=d(r),h=p,u=c(n),f=u&&u.properties;f?(h=Object.create(f),h=Polymer.Base.mixin(h,p)):l(n,h);var y,b,v=[],g=!1;for(y in h)void 0===(b=p[y])&&(b="initial"),!f||y in f||(g=!0),v.push(n+s+y+": "+b);return g&&function(e){var t=m.__currentElementProto,n=t&&t.is;for(var o in e.dependants)o!==n&&(e.dependants[o].__applyShimInvalid=!0)}(u),u&&(u.properties=h),o&&(a=t+";"+a),a+v.join("; ")+";"}function u(e,t,n){return"var("+t+",var("+n+"))"}function f(e,t){var n=[],o=c(e=e.replace(i,""));if(o||(l(e,{}),o=c(e)),o){var r,a,p,d=m.__currentElementProto;for(r in d&&(o.dependants[d.is]=d),o.properties)p=t&&t[r],a=[r,": var(",e,s,r],p&&a.push(",",p),a.push(")"),n.push(a.join(""))}return n.join("; ")}function _(e){for(var n;n=t.exec(e);){var o=n[0],i=n[1],r=n.index,s=r+o.indexOf("@apply"),a=r+o.length,l=e.slice(0,s),c=e.slice(a),p=f(i,d(l));e=[l,p,c].join(""),t.lastIndex=r+p.length}return e}var m={_measureElement:null,_map:a,_separator:s,transform:function(t,n){this.__currentElementProto=n,e.forRulesInStyles(t,this._boundFindDefinitions),e.forRulesInStyles(t,this._boundFindApplications),n&&(n.__applyShimInvalid=!1),this.__currentElementProto=null},_findDefinitions:function(e){var t=e.parsedCssText;t=(t=t.replace(o,u)).replace(n,h),e.cssText=t,":root"===e.selector&&(e.selector=":host > *")},_findApplications:function(e){e.cssText=_(e.cssText)},transformRule:function(e){this._findDefinitions(e),this._findApplications(e)},_getInitialValueForProperty:function(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}};return m._boundTransformRule=m.transformRule.bind(m),m._boundFindDefinitions=m._findDefinitions.bind(m),m._boundFindApplications=m._findApplications.bind(m),m}(),function(){var e=Polymer.Base._prepElement,t=Polymer.Settings.useNativeShadow,n=Polymer.StyleUtil,o=Polymer.StyleTransformer,i=Polymer.StyleExtends,r=Polymer.ApplyShim,s=Polymer.Settings;Polymer.Base._addFeature({_prepElement:function(t){this._encapsulateStyle&&"shady"!==this.__cssBuild&&o.element(t,this.is,this._scopeCssViaAttr),e.call(this,t)},_prepStyles:function(){void 0===this._encapsulateStyle&&(this._encapsulateStyle=!t),t||(this._scopeStyle=n.applyStylePlaceHolder(this.is)),this.__cssBuild=n.cssBuildTypeForModule(this.is)},_prepShimStyles:function(){if(this._template){var e=n.isTargetedBuild(this.__cssBuild);if(s.useNativeCSSProperties&&"shadow"===this.__cssBuild&&e)return void(s.preserveStyleIncludes&&n.styleIncludesToTemplate(this._template));this._styles=this._styles||this._collectStyles(),s.useNativeCSSProperties&&!this.__cssBuild&&r.transform(this._styles,this);var i=s.useNativeCSSProperties&&e?this._styles.length&&this._styles[0].textContent.trim():o.elementStyles(this);this._prepStyleProperties(),!this._needsStyleProperties()&&i&&n.applyCss(i,this.is,t?this._template.content:null,this._scopeStyle)}else this._styles=[]},_collectStyles:function(){var e=[],t="",o=this.styleModules;if(o)for(var r,s=0,a=o.length;s<a&&(r=o[s]);s++)t+=n.cssFromModule(r);t+=n.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(!this._template||l&&l.id.toLowerCase()===this.is||(t+=n.cssFromElement(this._template)),t){var c=document.createElement("style");c.textContent=t,i.hasExtends(c.textContent)&&(t=i.transform(c)),e.push(c)}return e},_elementAdd:function(e){this._encapsulateStyle&&(e.__styleScoped?e.__styleScoped=!1:o.dom(e,this.is,this._scopeCssViaAttr))},_elementRemove:function(e){this._encapsulateStyle&&o.dom(e,this.is,this._scopeCssViaAttr,!0)},scopeSubtree:function(e,n){if(!t){var o=this,i=function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.getAttribute("class");e.setAttribute("class",o._scopeElementClass(e,t));for(var n,i=e.querySelectorAll("*"),r=0;r<i.length&&(n=i[r]);r++)t=n.getAttribute("class"),n.setAttribute("class",o._scopeElementClass(n,t))}};if(i(e),n){var r=new MutationObserver(function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++)if(t.addedNodes)for(var o=0;o<t.addedNodes.length;o++)i(t.addedNodes[o])});return r.observe(e,{childList:!0,subtree:!0}),r}}}})}(),Polymer.StyleProperties=function(){"use strict";var e=Polymer.DomApi.matchesSelector,t=Polymer.StyleUtil,n=Polymer.StyleTransformer,o=navigator.userAgent.match("Trident"),i=Polymer.Settings;return{decorateStyles:function(e,o){var i=this,r={},s=[],a=0,l=n._calcHostScope(o.is,o.extends);t.forRulesInStyles(e,function(e,n){i.decorateRule(e),e.index=a++,i.whenHostOrRootRule(o,e,n,function(n){if(e.parent.type===t.ruleTypes.MEDIA_RULE&&(o.__notStyleScopeCacheable=!0),n.isHost){var i=n.selector.split(" ").some(function(e){return 0===e.indexOf(l)&&e.length!==l.length});o.__notStyleScopeCacheable=o.__notStyleScopeCacheable||i}}),i.collectPropertiesInCssText(e.propertyInfo.cssText,r)},function(e){s.push(e)}),e._keyframes=s;var c=[];for(var p in r)c.push(p);return c},decorateRule:function(e){if(e.propertyInfo)return e.propertyInfo;var t={},n={};return this.collectProperties(e,n)&&(t.properties=n,e.rules=null),t.cssText=this.collectCssText(e),e.propertyInfo=t,t},collectProperties:function(e,t){var n=e.propertyInfo;if(!n){for(var o,i,r,s=this.rx.VAR_ASSIGN,a=e.parsedCssText;o=s.exec(a);)"inherit"!==(i=(o[2]||o[3]).trim())&&(t[o[1].trim()]=i),r=!0;return r}if(n.properties)return Polymer.Base.mixin(t,n.properties),!0},collectCssText:function(e){return this.collectConsumingCssText(e.parsedCssText)},collectConsumingCssText:function(e){return e.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"")},collectPropertiesInCssText:function(e,t){for(var n;n=this.rx.VAR_CONSUMED.exec(e);){var o=n[1];":"!==n[2]&&(t[o]=!0)}},reify:function(e){for(var t,n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++)e[t=n[o]]=this.valueForProperty(e[t],e)},valueForProperty:function(e,n){if(e)if(e.indexOf(";")>=0)e=this.valueForProperties(e,n);else{var o=this;e=t.processVariableAndFallback(e,function(e,t,i,r){var s=o.valueForProperty(n[t],n);return s&&"initial"!==s?"apply-shim-inherit"===s&&(s="inherit"):s=o.valueForProperty(n[i]||i,n)||i,e+(s||"")+r})}return e&&e.trim()||""},valueForProperties:function(e,t){for(var n,o,i=e.split(";"),r=0;r<i.length;r++)if(n=i[r]){if(this.rx.MIXIN_MATCH.lastIndex=0,o=this.rx.MIXIN_MATCH.exec(n))n=this.valueForProperty(t[o[1]],t);else{var s=n.indexOf(":");if(-1!==s){var a=n.substring(s);a=a.trim(),a=this.valueForProperty(a,t)||a,n=n.substring(0,s)+a}}i[r]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return i.join(";")},applyProperties:function(e,t){var n="";e.propertyInfo||this.decorateRule(e),e.propertyInfo.cssText&&(n=this.valueForProperties(e.propertyInfo.cssText,t)),e.cssText=n},applyKeyframeTransforms:function(e,t){var n=e.cssText,o=e.cssText;if(null==e.hasAnimations&&(e.hasAnimations=this.rx.ANIMATION_MATCH.test(n)),e.hasAnimations)if(null==e.keyframeNamesToTransform)for(var i in e.keyframeNamesToTransform=[],t)n!==(o=(0,t[i])(n))&&(n=o,e.keyframeNamesToTransform.push(i));else{for(var r=0;r<e.keyframeNamesToTransform.length;++r)n=(0,t[e.keyframeNamesToTransform[r]])(n);o=n}e.cssText=o},propertyDataFromStyles:function(n,o){var i={},r=this,s=[];return t.forActiveRulesInStyles(n,function(t){t.propertyInfo||r.decorateRule(t);var n=t.transformedSelector||t.parsedSelector;o&&t.propertyInfo.properties&&n&&e.call(o,n)&&(r.collectProperties(t,i),function(e,t){var n=parseInt(e/32),o=1<<e%32;t[n]=(t[n]||0)|o}(t.index,s))}),{properties:i,key:s}},_rootSelector:/:root|:host\s*>\s*\*/,_checkRoot:function(e,t){return Boolean(t.match(this._rootSelector))||"html"===e&&t.indexOf("html")>-1},whenHostOrRootRule:function(e,t,o,r){if(t.propertyInfo||self.decorateRule(t),t.propertyInfo.properties){var s=e.is?n._calcHostScope(e.is,e.extends):"html",a=t.parsedSelector,l=this._checkRoot(s,a),c=!l&&0===a.indexOf(":host");if("shady"===(e.__cssBuild||o.__cssBuild)&&(c=!(l=a===s+" > *."+s||a.indexOf("html")>-1)&&0===a.indexOf(s)),l||c){var p=s;c&&(i.useNativeShadow&&!t.transformedSelector&&(t.transformedSelector=n._transformRuleCss(t,n._transformComplexSelector,e.is,s)),p=t.transformedSelector||t.parsedSelector),l&&"html"===s&&(p=t.transformedSelector||t.parsedSelector),r({selector:p,isHost:c,isRoot:l})}}},hostAndRootPropertiesForScope:function(n){var o={},i={},r=this;return t.forActiveRulesInStyles(n._styles,function(t,s){r.whenHostOrRootRule(n,t,s,function(s){var a=n._element||n;e.call(a,s.selector)&&(s.isHost?r.collectProperties(t,o):r.collectProperties(t,i))})}),{rootProps:i,hostProps:o}},transformStyles:function(e,t,o){var r=this,s=n._calcHostScope(e.is,e.extends),a=e.extends?"\\"+s.slice(0,-1)+"\\]":s,l=new RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX),c=this._elementKeyframeTransforms(e,o);return n.elementStyles(e,function(n){r.applyProperties(n,t),i.useNativeShadow||Polymer.StyleUtil.isKeyframesSelector(n)||!n.cssText||(r.applyKeyframeTransforms(n,c),r._scopeSelector(n,l,s,e._scopeCssViaAttr,o))})},_elementKeyframeTransforms:function(e,t){var n=e._styles._keyframes,o={};if(!i.useNativeShadow&&n)for(var r=0,s=n[r];r<n.length;s=n[++r])this._scopeKeyframes(s,t),o[s.keyframesName]=this._keyframesRuleTransformer(s);return o},_keyframesRuleTransformer:function(e){return function(t){return t.replace(e.keyframesNameRx,e.transformedKeyframesName)}},_scopeKeyframes:function(e,t){e.keyframesNameRx=new RegExp(e.keyframesName,"g"),e.transformedKeyframesName=e.keyframesName+"-"+t,e.transformedSelector=e.transformedSelector||e.selector,e.selector=e.transformedSelector.replace(e.keyframesName,e.transformedKeyframesName)},_scopeSelector:function(e,t,o,i,r){e.transformedSelector=e.transformedSelector||e.selector;for(var s,a=e.transformedSelector,l=i?"["+n.SCOPE_NAME+"~="+r+"]":"."+r,c=a.split(","),p=0,d=c.length;p<d&&(s=c[p]);p++)c[p]=s.match(t)?s.replace(o,l):l+" "+s;e.selector=c.join(",")},applyElementScopeSelector:function(e,t,o,i){var r=i?e.getAttribute(n.SCOPE_NAME):e.getAttribute("class")||"",s=o?r.replace(o,t):(r?r+" ":"")+this.XSCOPE_NAME+" "+t;r!==s&&(i?e.setAttribute(n.SCOPE_NAME,s):e.setAttribute("class",s))},applyElementStyle:function(e,n,r,s){var a=s?s.textContent||"":this.transformStyles(e,n,r),l=e._customStyle;return l&&!i.useNativeShadow&&l!==s&&(l._useCount--,l._useCount<=0&&l.parentNode&&l.parentNode.removeChild(l)),i.useNativeShadow?e._customStyle?(e._customStyle.textContent=a,s=e._customStyle):a&&(s=t.applyCss(a,r,e.root,e._scopeStyle)):s?s.parentNode||(o&&a.indexOf("@media")>-1&&(s.textContent=a),t.applyStyle(s,null,e._scopeStyle)):a&&(s=t.applyCss(a,r,null,e._scopeStyle)),s&&(s._useCount=s._useCount||0,e._customStyle!=s&&s._useCount++,e._customStyle=s),s},mixinCustomStyle:function(e,t){var n;for(var o in t)((n=t[o])||0===n)&&(e[o]=n)},updateNativeStyleProperties:function(e,t){var n=e.__customStyleProperties;if(n)for(var o=0;o<n.length;o++)e.style.removeProperty(n[o]);var i=[];for(var r in t)null!==t[r]&&(e.style.setProperty(r,t[r]),i.push(r));e.__customStyleProperties=i},rx:t.rx,XSCOPE_NAME:"x-scope"}}(),Polymer.StyleCache=function(){this.cache={}},Polymer.StyleCache.prototype={MAX:100,store:function(e,t,n,o){t.keyValues=n,t.styles=o;var i=this.cache[e]=this.cache[e]||[];i.push(t),i.length>this.MAX&&i.shift()},retrieve:function(e,t,n){var o=this.cache[e];if(o)for(var i,r=o.length-1;r>=0;r--)if(n===(i=o[r]).styles&&this._objectsEqual(t,i.keyValues))return i},clear:function(){this.cache={}},_objectsEqual:function(e,t){var n,o;for(var i in e)if(n=e[i],o=t[i],!("object"==typeof n&&n?this._objectsStrictlyEqual(n,o):n===o))return!1;return!Array.isArray(e)||e.length===t.length},_objectsStrictlyEqual:function(e,t){return this._objectsEqual(e,t)&&this._objectsEqual(t,e)}},Polymer.StyleDefaults=function(){var e=Polymer.StyleProperties,t=Polymer.StyleCache,n=Polymer.Settings.useNativeCSSProperties;return{_styles:[],_properties:null,customStyle:{},_styleCache:new t,_element:Polymer.DomApi.wrap(document.documentElement),addStyle:function(e){this._styles.push(e),this._properties=null},get _styleProperties(){return this._properties||(e.decorateStyles(this._styles,this),this._styles._scopeStyleProperties=null,this._properties=e.hostAndRootPropertiesForScope(this).rootProps,e.mixinCustomStyle(this._properties,this.customStyle),e.reify(this._properties)),this._properties},hasStyleProperties:function(){return Boolean(this._properties)},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(t){this._properties=null,t&&Polymer.Base.mixin(this.customStyle,t),this._styleCache.clear();for(var o,i=0;i<this._styles.length;i++)(o=(o=this._styles[i]).__importElement||o)._apply();n&&e.updateNativeStyleProperties(document.documentElement,this.customStyle)}}}(),function(){"use strict";var e=Polymer.Base.serializeValueToAttribute,t=Polymer.StyleProperties,n=Polymer.StyleTransformer,o=Polymer.StyleDefaults,i=Polymer.Settings.useNativeShadow,r=Polymer.Settings.useNativeCSSProperties;Polymer.Base._addFeature({_prepStyleProperties:function(){r||(this._ownStylePropertyNames=this._styles&&this._styles.length?t.decorateStyles(this._styles,this):null)},customStyle:null,getComputedStyleValue:function(e){return r||this._styleProperties||this._computeStyleProperties(),!r&&this._styleProperties&&this._styleProperties[e]||getComputedStyle(this).getPropertyValue(e)},_setupStyleProperties:function(){this.customStyle={},this._styleCache=null,this._styleProperties=null,this._scopeSelector=null,this._ownStyleProperties=null,this._customStyle=null},_needsStyleProperties:function(){return Boolean(!r&&this._ownStylePropertyNames&&this._ownStylePropertyNames.length)},_validateApplyShim:function(){if(this.__applyShimInvalid){Polymer.ApplyShim.transform(this._styles,this.__proto__);var e=n.elementStyles(this);if(i){var t=this._template.content.querySelector("style");t&&(t.textContent=e)}else{var o=this._scopeStyle&&this._scopeStyle.nextSibling;o&&(o.textContent=e)}}},_beforeAttached:function(){this._scopeSelector&&!this.__stylePropertiesInvalid||!this._needsStyleProperties()||(this.__stylePropertiesInvalid=!1,this._updateStyleProperties())},_findStyleHost:function(){for(var e,t=this;e=Polymer.dom(t).getOwnerRoot();){if(Polymer.isInstance(e.host))return e.host;t=e.host}return o},_updateStyleProperties:function(){var e,n=this._findStyleHost();n._styleProperties||n._computeStyleProperties(),n._styleCache||(n._styleCache=new Polymer.StyleCache);var o=t.propertyDataFromStyles(n._styles,this),r=!this.__notStyleScopeCacheable;r&&(o.key.customStyle=this.customStyle,e=n._styleCache.retrieve(this.is,o.key,this._styles));var a=Boolean(e);a?this._styleProperties=e._styleProperties:this._computeStyleProperties(o.properties),this._computeOwnStyleProperties(),a||(e=s.retrieve(this.is,this._ownStyleProperties,this._styles));var l=Boolean(e)&&!a,c=this._applyStyleProperties(e);a||(e={style:c=c&&i?c.cloneNode(!0):c,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},r&&(o.key.customStyle={},this.mixin(o.key.customStyle,this.customStyle),n._styleCache.store(this.is,e,o.key,this._styles)),l||s.store(this.is,Object.create(e),this._ownStyleProperties,this._styles))},_computeStyleProperties:function(e){var n=this._findStyleHost();n._styleProperties||n._computeStyleProperties();var o=Object.create(n._styleProperties),i=t.hostAndRootPropertiesForScope(this);this.mixin(o,i.hostProps),e=e||t.propertyDataFromStyles(n._styles,this).properties,this.mixin(o,e),this.mixin(o,i.rootProps),t.mixinCustomStyle(o,this.customStyle),t.reify(o),this._styleProperties=o},_computeOwnStyleProperties:function(){for(var e,t={},n=0;n<this._ownStylePropertyNames.length;n++)t[e=this._ownStylePropertyNames[n]]=this._styleProperties[e];this._ownStyleProperties=t},_scopeCount:0,_applyStyleProperties:function(e){var n=this._scopeSelector;this._scopeSelector=e?e._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var o=t.applyElementStyle(this,this._styleProperties,this._scopeSelector,e&&e.style);return i||t.applyElementScopeSelector(this,this._scopeSelector,n,this._scopeCssViaAttr),o},serializeValueToAttribute:function(t,n,o){if(o=o||this,"class"===n&&!i){var r=o===this?this.domHost||this.dataHost:this;r&&(t=r._scopeElementClass(o,t))}o=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(o):o,e.call(this,t,n,o)},_scopeElementClass:function(e,t){return i||this._scopeCssViaAttr||(t=(t?t+" ":"")+a+" "+this.is+(e._scopeSelector?" "+l+" "+e._scopeSelector:"")),t},updateStyles:function(e){e&&this.mixin(this.customStyle,e),r?t.updateNativeStyleProperties(this,this.customStyle):(this.isAttached?this._needsStyleProperties()?this._updateStyleProperties():this._styleProperties=null:this.__stylePropertiesInvalid=!0,this._styleCache&&this._styleCache.clear(),this._updateRootStyles())},_updateRootStyles:function(e){e=e||this.root;for(var t,n=Polymer.dom(e)._query(function(e){return e.shadyRoot||e.shadowRoot}),o=0,i=n.length;o<i&&(t=n[o]);o++)t.updateStyles&&t.updateStyles()}}),Polymer.updateStyles=function(e){o.updateStyles(e),Polymer.Base._updateRootStyles(document)};var s=new Polymer.StyleCache;Polymer.customStyleCache=s;var a=n.SCOPE_NAME,l=t.XSCOPE_NAME}(),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this.factoryImpl&&this._prepConstructor(),this._prepStyles()},_finishRegisterFeatures:function(){this._prepTemplate(),this._prepShimStyles(),this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepPropertyInfo(),this._prepBindings(),this._prepShady()},_prepBehavior:function(e){this._addPropertyEffects(e.properties),this._addComplexObserverEffects(e.observers),this._addHostAttributes(e.hostAttributes)},_initFeatures:function(){this._setupGestures(),this._setupConfigure(this.__data__),this._setupStyleProperties(),this._setupDebouncers(),this._setupShady(),this._registerHost(),this._template&&(this._validateApplyShim(),this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting(),this._marshalAnnotationReferences()),this._marshalInstanceEffects(),this._marshalBehaviors(),this._marshalHostAttributes(),this._marshalAttributes(),this._tryReady()},_marshalBehavior:function(e){e.listeners&&this._listenListeners(e.listeners)}}),function(){var e,t=Polymer.StyleProperties,n=Polymer.StyleUtil,o=Polymer.CssParse,i=Polymer.StyleDefaults,r=Polymer.StyleTransformer,s=Polymer.ApplyShim,a=Polymer.Debounce,l=Polymer.Settings;Polymer({is:"habitlab-custom-style",extends:"style",_template:null,properties:{include:String},ready:function(){this.__appliedElement=this.__appliedElement||this,this.__cssBuild=n.getCssBuildType(this),this.__appliedElement!==this&&(this.__appliedElement.__cssBuild=this.__cssBuild),this._tryApply()},attached:function(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument&&this.parentNode&&"habitlab-dom-module"!==this.parentNode.localName){this._appliesToDocument=!0;var e=this.__appliedElement;if(l.useNativeCSSProperties||(this.__needsUpdateStyles=i.hasStyleProperties(),i.addStyle(e)),e.textContent||this.include)this._apply(!0);else{var t=this,n=new MutationObserver(function(){n.disconnect(),t._apply(!0)});n.observe(e,{childList:!0})}}},_updateStyles:function(){Polymer.updateStyles()},_apply:function(e){var t=this.__appliedElement;if(this.include&&(t.textContent=n.cssFromModules(this.include,!0)+t.textContent),t.textContent){var o=this.__cssBuild,i=n.isTargetedBuild(o);if(!l.useNativeCSSProperties||!i){var a=n.rulesForStyle(t);if(i||(n.forEachRule(a,function(e){r.documentRule(e)}),l.useNativeCSSProperties&&!o&&s.transform([t])),l.useNativeCSSProperties)t.textContent=n.toCssText(a);else{var c=this,p=function(){c._flushCustomProperties()};e?Polymer.RenderStatus.whenReady(p):p()}}}},_flushCustomProperties:function(){this.__needsUpdateStyles?(this.__needsUpdateStyles=!1,e=a(e,this._updateStyles)):this._applyCustomProperties()},_applyCustomProperties:function(){var e=this.__appliedElement;this._computeStyleProperties();var i=this._styleProperties,r=n.rulesForStyle(e);r&&(e.textContent=n.toCssText(r,function(e){var n=e.cssText=e.parsedCssText;e.propertyInfo&&e.propertyInfo.cssText&&(n=o.removeCustomPropAssignment(n),e.cssText=t.valueForProperties(n,i))}))}})}(),Polymer.Templatizer={properties:{__hideTemplateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_parentPropPrefix:"_parent_",templatize:function(e){if(this._templatized=e,e._content||(e._content=e.content),e._content._ctor)return this.ctor=e._content._ctor,void this._prepParentProperties(this.ctor.prototype,e);var t=Object.create(Polymer.Base);this._customPrepAnnotations(t,e),this._prepParentProperties(t,e),t._prepEffects(),this._customPrepEffects(t),t._prepBehaviors(),t._prepPropertyInfo(),t._prepBindings(),t._notifyPathUp=this._notifyPathUpImpl,t._scopeElementClass=this._scopeElementClassImpl,t.listen=this._listenImpl,t._showHideChildren=this._showHideChildrenImpl,t.__setPropertyOrig=this.__setProperty,t.__setProperty=this.__setPropertyImpl;var n=this._constructorImpl,o=function(e,t){n.call(this,e,t)};o.prototype=t,t.constructor=o,e._content._ctor=o,this.ctor=o},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(e){for(var t=this._children,n=0;n<t.length;n++){var o=t[n];Boolean(e)!=Boolean(o.__hideTemplateChildren__)&&(o.nodeType===Node.TEXT_NODE?e?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__:o.style&&(e?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__)),o.__hideTemplateChildren__=e}},__setPropertyImpl:function(e,t,n,o){o&&o.__hideTemplateChildren__&&"textContent"==e&&(e="__polymerTextContent__"),this.__setPropertyOrig(e,t,n,o)},_debounceTemplate:function(e){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",e))},_flushTemplates:function(){Polymer.dom.flush()},_customPrepEffects:function(e){var t=e._parentProps;for(var n in t)e._addPropertyEffect(n,"function",this._createHostPropEffector(n));for(n in this._instanceProps)e._addPropertyEffect(n,"function",this._createInstancePropEffector(n))},_customPrepAnnotations:function(e,t){e._template=t;var n=t._content;if(!n._notes){var o=e._rootDataHost;o&&(Polymer.Annotations.prepElement=function(){o._prepElement()}),n._notes=Polymer.Annotations.parseAnnotations(t),Polymer.Annotations.prepElement=null,this._processAnnotations(n._notes)}e._notes=n._notes,e._parentProps=n._parentProps},_prepParentProperties:function(e,t){var n=this._parentProps=e._parentProps;if(this._forwardParentProp&&n){var o,i=e._parentPropProto;if(!i){for(o in this._instanceProps)delete n[o];for(o in i=e._parentPropProto=Object.create(null),t!=this&&(Polymer.Bind.prepareModel(i),Polymer.Base.prepareModelNotifyPath(i)),n){var r=this._parentPropPrefix+o,s=[{kind:"function",effect:this._createForwardPropEffector(o),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(r)+"-changed"}}];i._propertyEffects=i._propertyEffects||{},i._propertyEffects[r]=s,Polymer.Bind._createAccessors(i,r,s)}}var a=this;t!=this&&(Polymer.Bind.prepareInstance(t),t._forwardParentProp=function(e,t){a._forwardParentProp(e,t)}),this._extendTemplate(t,i),t._pathEffector=function(e,t,n){return a._pathEffectorImpl(e,t,n)}}},_createForwardPropEffector:function(e){return function(t,n){this._forwardParentProp(e,n)}},_createHostPropEffector:function(e){var t=this._parentPropPrefix;return function(n,o){this.dataHost._templatized[t+e]=o}},_createInstancePropEffector:function(e){return function(t,n,o,i){i||this.dataHost._forwardInstanceProp(this,e,n)}},_extendTemplate:function(e,t){var n=Object.getOwnPropertyNames(t);t._propertySetter&&(e._propertySetter=t._propertySetter);for(var o,i=0;i<n.length&&(o=n[i]);i++){var r=e[o];if(r&&"_propertyEffects"==o){var s=Polymer.Base.mixin({},r);e._propertyEffects=Polymer.Base.mixin(s,t._propertyEffects)}else{var a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,a),void 0!==r&&e._propertySetter(o,r)}}},_showHideChildren:function(e){},_forwardInstancePath:function(e,t,n){},_forwardInstanceProp:function(e,t,n){},_notifyPathUpImpl:function(e,t){var n=this.dataHost,o=Polymer.Path.root(e);n._forwardInstancePath.call(n,this,e,t),o in n._parentProps&&n._templatized._notifyPath(n._parentPropPrefix+e,t)},_pathEffectorImpl:function(e,t,n){if(this._forwardParentPath&&0===e.indexOf(this._parentPropPrefix)){var o=e.substring(this._parentPropPrefix.length);Polymer.Path.root(o)in this._parentProps&&this._forwardParentPath(o,t)}Polymer.Base._pathEffector.call(this._templatized,e,t,n)},_constructorImpl:function(e,t){this._rootDataHost=t._getRootDataHost(),this._setupConfigure(e),this._registerHost(t),this._beginHosting(),this.root=this.instanceTemplate(this._template),this.root.__noContent=!this._notes._hasContent,this.root.__styleScoped=!0,this._endHosting(),this._marshalAnnotatedNodes(),this._marshalInstanceEffects(),this._marshalAnnotatedListeners();for(var n=[],o=this.root.firstChild;o;o=o.nextSibling)n.push(o),o._templateInstance=this;this._children=n,t.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()},_listenImpl:function(e,t,n){var o=this,i=this._rootDataHost,r=i._createEventHandler(e,t,n);i._listen(e,t,function(e){e.model=o,r(e)})},_scopeElementClassImpl:function(e,t){var n=this._rootDataHost;return n?n._scopeElementClass(e,t):t},stamp:function(e){if(e=e||{},this._parentProps){var t=this._templatized;for(var n in this._parentProps)void 0===e[n]&&(e[n]=t[this._parentPropPrefix+n])}return new this.ctor(e,this)},modelForElement:function(e){for(var t;e;)if(t=e._templateInstance){if(t.dataHost==this)return t;e=t.dataHost}else e=e.parentNode}},Polymer({is:"habitlab-dom-template",extends:"template",_template:null,behaviors:[Polymer.Templatizer],ready:function(){this.templatize(this)}}),Polymer._collections=new WeakMap,Polymer.Collection=function(e){Polymer._collections.set(e,this),this.userArray=e,this.store=e.slice(),this.initMap()},Polymer.Collection.prototype={constructor:Polymer.Collection,initMap:function(){for(var e=this.omap=new WeakMap,t=this.pmap={},n=this.store,o=0;o<n.length;o++){var i=n[o];i&&"object"==typeof i?e.set(i,o):t[i]=o}},add:function(e){var t=this.store.push(e)-1;return e&&"object"==typeof e?this.omap.set(e,t):this.pmap[e]=t,"#"+t},removeKey:function(e){(e=this._parseKey(e))&&(this._removeFromMap(this.store[e]),delete this.store[e])},_removeFromMap:function(e){e&&"object"==typeof e?this.omap.delete(e):delete this.pmap[e]},remove:function(e){var t=this.getKey(e);return this.removeKey(t),t},getKey:function(e){var t;if(void 0!=(t=e&&"object"==typeof e?this.omap.get(e):this.pmap[e]))return"#"+t},getKeys:function(){return Object.keys(this.store).map(function(e){return"#"+e})},_parseKey:function(e){if(e&&"#"==e[0])return e.slice(1)},setItem:function(e,t){if(e=this._parseKey(e)){var n=this.store[e];n&&this._removeFromMap(n),t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,this.store[e]=t}},getItem:function(e){if(e=this._parseKey(e))return this.store[e]},getItems:function(){var e=[],t=this.store;for(var n in t)e.push(t[n]);return e},_applySplices:function(e){for(var t,n,o={},i=0;i<e.length&&(n=e[i]);i++){n.addedKeys=[];for(var r=0;r<n.removed.length;r++)o[t=this.getKey(n.removed[r])]=o[t]?null:-1;for(r=0;r<n.addedCount;r++){var s=this.userArray[n.index+r];o[t=void 0===(t=this.getKey(s))?this.add(s):t]=o[t]?null:1,n.addedKeys.push(t)}}var a=[],l=[];for(t in o)o[t]<0&&(this.removeKey(t),a.push(t)),o[t]>0&&l.push(t);return[{removed:a,added:l}]}},Polymer.Collection.get=function(e){return Polymer._collections.get(e)||new Polymer.Collection(e)},Polymer.Collection.applySplices=function(e,t){var n=Polymer._collections.get(e);return n?n._applySplices(t):null},Polymer({is:"habitlab-dom-repeat",extends:"template",_template:null,properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},sort:{type:Function,observer:"_sortChanged"},filter:{type:Function,observer:"_filterChanged"},observe:{type:String,observer:"_observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Polymer.Settings.suppressTemplateNotifications,readOnly:!0},initialCount:{type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:20},notifyDomChange:{type:Boolean},_targetFrameTime:{type:Number,computed:"_computeFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_itemsChanged(items.*)"],created:function(){this._instances=[],this._pool=[],this._limit=1/0;var e=this;this._boundRenderChunk=function(){e._renderChunk()}},detached:function(){this.__isDetached=!0;for(var e=0;e<this._instances.length;e++)this._detachInstance(e)},attached:function(){if(this.__isDetached){var e;this.__isDetached=!1;var t=Polymer.dom(this).parentNode;t.localName==this.is?(e=t,t=Polymer.dom(t).parentNode):e=this;for(var n=Polymer.dom(t),o=0;o<this._instances.length;o++)this._attachInstance(o,n,e)}},ready:function(){this._instanceProps={__key__:!0},this._instanceProps[this.as]=!0,this._instanceProps[this.indexAs]=!0,this.ctor||this.templatize(this)},_sortChanged:function(e){var t=this._getRootDataHost();this._sortFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_filterChanged:function(e){var t=this._getRootDataHost();this._filterFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_computeFrameTime:function(e){return Math.ceil(1e3/e)},_initializeChunking:function(){this.initialCount&&(this._limit=this.initialCount,this._chunkCount=this.initialCount,this._lastChunkTime=performance.now())},_tryRenderChunk:function(){this.items&&this._limit<this.items.length&&this.debounce("renderChunk",this._requestRenderChunk)},_requestRenderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChunk:function(){var e=performance.now(),t=this._targetFrameTime/(e-this._lastChunkTime);this._chunkCount=Math.round(this._chunkCount*t)||1,this._limit+=this._chunkCount,this._lastChunkTime=e,this._debounceTemplate(this._render)},_observeChanged:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").split(" ")},_itemsChanged:function(e){if("items"==e.path)Array.isArray(this.items)?this.collection=Polymer.Collection.get(this.items):this.items?this._error(this._logf("habitlab-dom-repeat","expected array for `items`, found",this.items)):this.collection=null,this._keySplices=[],this._indexSplices=[],this._needFullRefresh=!0,this._initializeChunking(),this._debounceTemplate(this._render);else if("items.splices"==e.path)this._keySplices=this._keySplices.concat(e.value.keySplices),this._indexSplices=this._indexSplices.concat(e.value.indexSplices),this._debounceTemplate(this._render);else{var t=e.path.slice(6);this._forwardItemPath(t,e.value),this._checkObservedPaths(t)}},_checkObservedPaths:function(e){if(this._observePaths){e=e.substring(e.indexOf(".")+1);for(var t=this._observePaths,n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return this._needFullRefresh=!0,void(this.delay?this.debounce("render",this._render,this.delay):this._debounceTemplate(this._render))}},render:function(){this._needFullRefresh=!0,this._debounceTemplate(this._render),this._flushTemplates()},_render:function(){this._needFullRefresh?(this._applyFullRefresh(),this._needFullRefresh=!1):this._keySplices.length&&(this._sortFn?this._applySplicesUserSort(this._keySplices):this._filterFn?this._applyFullRefresh():this._applySplicesArrayOrder(this._indexSplices)),this._keySplices=[],this._indexSplices=[];for(var e=this._keyToInstIdx={},t=this._instances.length-1;t>=0;t--){var n=this._instances[t];n.isPlaceholder&&t<this._limit?n=this._insertInstance(t,n.__key__):!n.isPlaceholder&&t>=this._limit&&(n=this._downgradeInstance(t,n.__key__)),e[n.__key__]=t,n.isPlaceholder||n.__setProperty(this.indexAs,t,!0)}this._pool.length=0,this._setRenderedItemCount(this._instances.length),Polymer.Settings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change"),this._tryRenderChunk()},_applyFullRefresh:function(){var e,t=this.collection;if(this._sortFn)e=t?t.getKeys():[];else{e=[];var n=this.items;if(n)for(var o=0;o<n.length;o++)e.push(t.getKey(n[o]))}var i=this;for(this._filterFn&&(e=e.filter(function(e){return i._filterFn(t.getItem(e))})),this._sortFn&&e.sort(function(e,n){return i._sortFn(t.getItem(e),t.getItem(n))}),o=0;o<e.length;o++){var r=e[o],s=this._instances[o];s?(s.__key__=r,!s.isPlaceholder&&o<this._limit&&s.__setProperty(this.as,t.getItem(r),!0)):o<this._limit?this._insertInstance(o,r):this._insertPlaceholder(o,r)}for(var a=this._instances.length-1;a>=o;a--)this._detachAndRemoveInstance(a)},_numericSort:function(e,t){return e-t},_applySplicesUserSort:function(e){for(var t,n,o=this.collection,i={},r=0;r<e.length&&(n=e[r]);r++){for(var s=0;s<n.removed.length;s++)i[t=n.removed[s]]=i[t]?null:-1;for(s=0;s<n.added.length;s++)i[t=n.added[s]]=i[t]?null:1}var a=[],l=[];for(t in i)-1===i[t]&&a.push(this._keyToInstIdx[t]),1===i[t]&&l.push(t);if(a.length)for(a.sort(this._numericSort),r=a.length-1;r>=0;r--){var c=a[r];void 0!==c&&this._detachAndRemoveInstance(c)}var p=this;if(l.length){this._filterFn&&(l=l.filter(function(e){return p._filterFn(o.getItem(e))})),l.sort(function(e,t){return p._sortFn(o.getItem(e),o.getItem(t))});var d=0;for(r=0;r<l.length;r++)d=this._insertRowUserSort(d,l[r])}},_insertRowUserSort:function(e,t){for(var n=this.collection,o=n.getItem(t),i=this._instances.length-1,r=-1;e<=i;){var s=e+i>>1,a=this._instances[s].__key__,l=this._sortFn(n.getItem(a),o);if(l<0)e=s+1;else{if(!(l>0)){r=s;break}i=s-1}}return r<0&&(r=i+1),this._insertPlaceholder(r,t),r},_applySplicesArrayOrder:function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++){for(var o=0;o<t.removed.length;o++)this._detachAndRemoveInstance(t.index);for(o=0;o<t.addedKeys.length;o++)this._insertPlaceholder(t.index+o,t.addedKeys[o])}},_detachInstance:function(e){var t=this._instances[e];if(!t.isPlaceholder){for(var n=0;n<t._children.length;n++){var o=t._children[n];Polymer.dom(t.root).appendChild(o)}return t}},_attachInstance:function(e,t,n){var o=this._instances[e];o.isPlaceholder||t.insertBefore(o.root,n)},_detachAndRemoveInstance:function(e){var t=this._detachInstance(e);t&&this._pool.push(t),this._instances.splice(e,1)},_insertPlaceholder:function(e,t){this._instances.splice(e,0,{isPlaceholder:!0,__key__:t})},_stampInstance:function(e,t){var n={__key__:t};return n[this.as]=this.collection.getItem(t),n[this.indexAs]=e,this.stamp(n)},_insertInstance:function(e,t){var n=this._pool.pop();n?(n.__setProperty(this.as,this.collection.getItem(t),!0),n.__setProperty("__key__",t,!0)):n=this._stampInstance(e,t);var o=this._instances[e+1],i=o&&!o.isPlaceholder?o._children[0]:this,r=Polymer.dom(this).parentNode;return r.localName==this.is&&(i==this&&(i=r),r=Polymer.dom(r).parentNode),Polymer.dom(r).insertBefore(n.root,i),this._instances[e]=n,n},_downgradeInstance:function(e,t){var n=this._detachInstance(e);return n&&this._pool.push(n),n={isPlaceholder:!0,__key__:t},this._instances[e]=n,n},_showHideChildren:function(e){for(var t=0;t<this._instances.length;t++)this._instances[t].isPlaceholder||this._instances[t]._showHideChildren(e)},_forwardInstanceProp:function(e,t,n){var o;t==this.as&&(o=this._sortFn||this._filterFn?this.items.indexOf(this.collection.getItem(e.__key__)):e[this.indexAs],this.set("items."+o,n))},_forwardInstancePath:function(e,t,n){0===t.indexOf(this.as+".")&&this._notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),n)},_forwardParentProp:function(e,t){for(var n,o=this._instances,i=0;i<o.length&&(n=o[i]);i++)n.isPlaceholder||n.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){for(var n,o=this._instances,i=0;i<o.length&&(n=o[i]);i++)n.isPlaceholder||n._notifyPath(e,t,!0)},_forwardItemPath:function(e,t){if(this._keyToInstIdx){var n=e.indexOf("."),o=e.substring(0,n<0?e.length:n),i=this._keyToInstIdx[o],r=this._instances[i];r&&!r.isPlaceholder&&(n>=0?(e=this.as+"."+e.substring(n+1),r._notifyPath(e,t,!0)):r.__setProperty(this.as,t,!0))}},itemForElement:function(e){var t=this.modelForElement(e);return t&&t[this.as]},keyForElement:function(e){var t=this.modelForElement(e);return t&&t.__key__},indexForElement:function(e){var t=this.modelForElement(e);return t&&t[this.indexAs]}}),Polymer({is:"habitlab-array-selector",_template:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type:Boolean,value:!1,observer:"clearSelection"},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}},clearSelection:function(){if(Array.isArray(this.selected))for(var e=0;e<this.selected.length;e++)this.unlinkPaths("selected."+e);else this.unlinkPaths("selected"),this.unlinkPaths("selectedItem");this.multi?this.selected&&!this.selected.length||(this.selected=[],this._selectedColl=Polymer.Collection.get(this.selected)):(this.selected=null,this._selectedColl=null),this.selectedItem=null},isSelected:function(e){return this.multi?void 0!==this._selectedColl.getKey(e):this.selected==e},deselect:function(e){if(this.multi){if(this.isSelected(e)){var t=this._selectedColl.getKey(e);this.arrayDelete("selected",e),this.unlinkPaths("selected."+t)}}else this.selected=null,this.selectedItem=null,this.unlinkPaths("selected"),this.unlinkPaths("selectedItem")},select:function(e){var t=Polymer.Collection.get(this.items).getKey(e);if(this.multi)if(this.isSelected(e))this.toggle&&this.deselect(e);else{this.push("selected",e);var n=this._selectedColl.getKey(e);this.linkPaths("selected."+n,"items."+t)}else this.toggle&&e==this.selected?this.deselect():(this.selected=e,this.selectedItem=e,this.linkPaths("selected","items."+t),this.linkPaths("selectedItem","items."+t))}}),Polymer({is:"habitlab-dom-if",extends:"template",_template:null,properties:{if:{type:Boolean,value:!1,observer:"_queueRender"},restamp:{type:Boolean,value:!1,observer:"_queueRender"},notifyDomChange:{type:Boolean}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTemplate(this._render)},detached:function(){var e=this.parentNode;e&&e.localName==this.is&&(e=Polymer.dom(e).parentNode),e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||Polymer.Settings.hasShadow&&e instanceof ShadowRoot)||this._teardownInstance()},attached:function(){this.if&&this.ctor&&this.async(this._ensureInstance)},render:function(){this._flushTemplates()},_render:function(){this.if?(this.ctor||this.templatize(this),this._ensureInstance(),this._showHideChildren()):this.restamp&&this._teardownInstance(),!this.restamp&&this._instance&&this._showHideChildren(),this.if!=this._lastIf&&(Polymer.Settings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change"),this._lastIf=this.if)},_ensureInstance:function(){var e,t=Polymer.dom(this).parentNode;if(t&&t.localName==this.is?(e=t,t=Polymer.dom(t).parentNode):e=this,t)if(this._instance){var n=this._instance._children;if(n&&n.length)if(Polymer.dom(e).previousSibling!==n[n.length-1])for(var o,i=0;i<n.length&&(o=n[i]);i++)Polymer.dom(t).insertBefore(o,e)}else{this._instance=this.stamp();var r=this._instance.root;Polymer.dom(t).insertBefore(r,e)}},_teardownInstance:function(){if(this._instance){var e=this._instance._children;if(e&&e.length)for(var t,n=Polymer.dom(Polymer.dom(e[0]).parentNode),o=0;o<e.length&&(t=e[o]);o++)n.removeChild(t);this._instance=null}},_showHideChildren:function(){var e=this.__hideTemplateChildren__||!this.if;this._instance&&this._instance._showHideChildren(e)},_forwardParentProp:function(e,t){this._instance&&this._instance.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){this._instance&&this._instance._notifyPath(e,t,!0)}}),Polymer({is:"habitlab-dom-bind",properties:{notifyDomChange:{type:Boolean}},extends:"template",_template:null,created:function(){var e=this;Polymer.RenderStatus.whenReady(function(){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",function(){e._markImportsReady()}):e._markImportsReady()})},_ensureReady:function(){this._readied||this._readySelf()},_markImportsReady:function(){this._importsReady=!0,this._ensureReady()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:function(){var e,t=Polymer.dom(this).parentNode;t.localName==this.is?(e=t,t=Polymer.dom(t).parentNode):e=this,Polymer.dom(t).insertBefore(this.root,e)},_removeChildren:function(){if(this._children)for(var e=0;e<this._children.length;e++)this.root.appendChild(this._children[e])},_initFeatures:function(){},_scopeElementClass:function(e,t){return this.dataHost?this.dataHost._scopeElementClass(e,t):t},_configureInstanceProperties:function(){},_prepConfigure:function(){var e={};for(var t in this._propertyEffects)e[t]=this[t];var n=this._setupConfigure;this._setupConfigure=function(){n.call(this,e)}},attached:function(){this._importsReady&&this.render()},detached:function(){this._removeChildren()},render:function(){this._ensureReady(),this._children||(this._template=this,this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepConfigure(),this._prepBindings(),this._prepPropertyInfo(),Polymer.Base._initFeatures.call(this),this._children=Polymer.TreeApi.arrayCopyChildNodes(this.root)),this._insertChildren(),Polymer.Settings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change")}})},"./src/bower_components/polymer/polymer-micro-0.js":function(e,t){!function(){function e(){document.body.removeAttribute("unresolved")}window.WebComponents?addEventListener("WebComponentsReady",e):"interactive"===document.readyState||"complete"===document.readyState?e():addEventListener("DOMContentLoaded",e)}(),window.Polymer={Settings:function(){var e=window.Polymer||{};if(!e.noUrlSettings)for(var t,n=location.search.slice(1).split("&"),o=0;o<n.length&&(t=n[o]);o++)(t=t.split("="))[0]&&(e[t[0]]=t[1]||!0);return e.wantShadow="shadow"===e.dom,e.hasShadow=Boolean(Element.prototype.createShadowRoot),e.nativeShadow=e.hasShadow&&!window.ShadowDOMPolyfill,e.useShadow=e.wantShadow&&e.hasShadow,e.hasNativeImports=Boolean("import"in document.createElement("link")),e.useNativeImports=e.hasNativeImports,e.useNativeCustomElements=!window.CustomElements||window.CustomElements.useNative,e.useNativeShadow=e.useShadow&&e.nativeShadow,e.usePolyfillProto=!e.useNativeCustomElements&&!Object.__proto__,e.hasNativeCSSProperties=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"),e.useNativeCSSProperties=e.hasNativeCSSProperties&&e.lazyRegister&&e.useNativeCSSProperties,e.isIE=navigator.userAgent.match("Trident"),e}()},function(){var e=window.Polymer;window.Polymer=function(e){"function"==typeof e&&(e=e.prototype),e||(e={});var n=(e=t(e))===e.constructor.prototype?e.constructor:null,o={prototype:e};e.extends&&(o.extends=e.extends),Polymer.telemetry._registrate(e);var i=document.registerElement(e.is,o);return n||i};var t=function(e){var t=Polymer.Base;return e.extends&&(t=Polymer.Base._getExtendedPrototype(e.extends)),(e=Polymer.Base.chainObject(e,t)).registerCallback(),e};if(e)for(var n in e)Polymer[n]=e[n];Polymer.Class=function(e){return e.factoryImpl||(e.factoryImpl=function(){}),t(e).constructor}}(),Polymer.telemetry={registrations:[],_regLog:function(e){console.log("["+e.is+"]: registered")},_registrate:function(e){this.registrations.push(e),Polymer.log&&this._regLog(e)},dumpRegistrations:function(){this.registrations.forEach(this._regLog)}},Object.defineProperty(window,"currentImport",{enumerable:!0,configurable:!0,get:function(){return(document._currentScript||document.currentScript||{}).ownerDocument}}),Polymer.RenderStatus={_ready:!1,_callbacks:[],whenReady:function(e){this._ready?e():this._callbacks.push(e)},_makeReady:function(){this._ready=!0;for(var e=0;e<this._callbacks.length;e++)this._callbacks[e]();this._callbacks=[]},_catchFirstRender:function(){requestAnimationFrame(function(){Polymer.RenderStatus._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:!1,afterNextRender:function(e,t,n){this._watchNextRender(),this._afterNextRenderQueue.push([e,t,n])},hasRendered:function(){return this._ready},_watchNextRender:function(){if(!this._waitingNextRender){this._waitingNextRender=!0;var e=function(){Polymer.RenderStatus._flushNextRender()};this._ready?requestAnimationFrame(e):this.whenReady(e)}},_flushNextRender:function(){var e=this;setTimeout(function(){e._flushRenderCallbacks(e._afterNextRenderQueue),e._afterNextRenderQueue=[],e._waitingNextRender=!1})},_flushRenderCallbacks:function(e){for(var t,n=0;n<e.length;n++)(t=e[n])[1].apply(t[0],t[2]||Polymer.nar)}},window.HTMLImports?HTMLImports.whenReady(function(){Polymer.RenderStatus._catchFirstRender()}):Polymer.RenderStatus._catchFirstRender(),Polymer.ImportStatus=Polymer.RenderStatus,Polymer.ImportStatus.whenLoaded=Polymer.ImportStatus.whenReady,function(){"use strict";var e,t=Polymer.Settings;if(Polymer.Base={__isPolymerInstance__:!0,_addFeature:function(e){this.mixin(this,e)},registerCallback:function(){if("max"===t.lazyRegister)this.beforeRegister&&this.beforeRegister();else{this._desugarBehaviors();for(var e,n=0;n<this.behaviors.length;n++)(e=this.behaviors[n]).beforeRegister&&e.beforeRegister.call(this);this.beforeRegister&&this.beforeRegister()}this._registerFeatures(),t.lazyRegister||this.ensureRegisterFinished()},createdCallback:function(){if(this.is_habitlab_element=!0,t.disableUpgradeEnabled){if(this.hasAttribute("disable-upgrade"))return this._propertySetter=e,this._configValue=null,void(this.__data__={});this.__hasInitialized=!0}this.__initialize()},__initialize:function(){this.__hasRegisterFinished||this._ensureRegisterFinished(this.__proto__),Polymer.telemetry.instanceCount++,this.root=this;for(var e,t=0;t<this.behaviors.length;t++)(e=this.behaviors[t]).created&&e.created.call(this);this.created&&this.created(),this._initFeatures()},ensureRegisterFinished:function(){this._ensureRegisterFinished(this)},_ensureRegisterFinished:function(e){if(e.__hasRegisterFinished!==e.is||!e.is){if("max"===t.lazyRegister){e._desugarBehaviors();for(var n,o=0;o<e.behaviors.length;o++)(n=e.behaviors[o]).beforeRegister&&n.beforeRegister.call(e)}e.__hasRegisterFinished=e.is,e._finishRegisterFeatures&&e._finishRegisterFeatures();for(var i,r=0;r<e.behaviors.length;r++)(i=e.behaviors[r]).registered&&i.registered.call(e);e.registered&&e.registered(),t.usePolyfillProto&&e!==this&&e.extend(this,e)}},attachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0;for(var t,n=0;n<e.behaviors.length;n++)(t=e.behaviors[n]).attached&&t.attached.call(e);e.attached&&e.attached()})},detachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!1;for(var t,n=0;n<e.behaviors.length;n++)(t=e.behaviors[n]).detached&&t.detached.call(e);e.detached&&e.detached()})},attributeChangedCallback:function(e,t,n){this._attributeChangedImpl(e);for(var o,i=0;i<this.behaviors.length;i++)(o=this.behaviors[i]).attributeChanged&&o.attributeChanged.call(this,e,t,n);this.attributeChanged&&this.attributeChanged(e,t,n)},_attributeChangedImpl:function(e){this._setAttributeToProperty(this,e)},extend:function(e,t){if(e&&t)for(var n,o=Object.getOwnPropertyNames(t),i=0;i<o.length&&(n=o[i]);i++)this.copyOwnProperty(n,t,e);return e||t},mixin:function(e,t){for(var n in t)e[n]=t[n];return e},copyOwnProperty:function(e,t,n){var o=Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(n,e,o)},_logger:function(e,t){switch(1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e].apply(console,t)}},_log:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("log",e)},_warn:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("warn",e)},_error:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("error",e)},_logf:function(){return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=window.chrome&&!/edge/i.test(navigator.userAgent)||/firefox/i.test(navigator.userAgent)?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"],Polymer.Base.chainObject=function(e,t){return e&&t&&e!==t&&(Object.__proto__||(e=Polymer.Base.extend(Object.create(t),e)),e.__proto__=t),e},Polymer.Base=Polymer.Base.chainObject(Polymer.Base,HTMLElement.prototype),Polymer.BaseDescriptors={},t.disableUpgradeEnabled){e=function(e,t){this.__data__[e]=t};var n=Polymer.Base.attributeChangedCallback;Polymer.Base.attributeChangedCallback=function(e,t,o){this.__hasInitialized||"disable-upgrade"!==e||(this.__hasInitialized=!0,this._propertySetter=Polymer.Bind._modelApi._propertySetter,this._configValue=Polymer.Base._configValue,this.__initialize()),n.call(this,e,t,o)}}window.CustomElements?Polymer.instanceof=CustomElements.instanceof:Polymer.instanceof=function(e,t){return e instanceof t},Polymer.isInstance=function(e){return Boolean(e&&e.__isPolymerInstance__)},Polymer.telemetry.instanceCount=0}(),function(){var e={},t={},n=function(n){return e[n]||t[n.toLowerCase()]},o=function(){return document.createElement("habitlab-dom-module")};o.prototype=Object.create(HTMLElement.prototype),Polymer.Base.mixin(o.prototype,{createdCallback:function(){this.register()},register:function(n){(n=n||this.id||this.getAttribute("name")||this.getAttribute("is"))&&(this.id=n,e[n]=this,t[n.toLowerCase()]=this)},import:function(e,t){if(e){var o=n(e);return o||(!function(){if(i)for(var e,t=document._currentScript||document.currentScript,n=t&&t.ownerDocument||document,o=n.querySelectorAll("habitlab-dom-module"),r=o.length-1;r>=0&&(e=o[r]);r--){if(e.__upgraded__)return;CustomElements.upgrade(e)}}(),o=n(e)),o&&t&&(o=o.querySelector(t)),o}}}),Object.defineProperty(o.prototype,"constructor",{value:o,configurable:!0,writable:!0});var i=window.CustomElements&&!CustomElements.useNative;document.registerElement("habitlab-dom-module",o)}(),Polymer.Base._addFeature({_prepIs:function(){if(!this.is){var e=(document._currentScript||document.currentScript).parentNode;if("habitlab-dom-module"===e.localName){var t=e.id||e.getAttribute("name")||e.getAttribute("is");this.is=t}}this.is&&(this.is=this.is.toLowerCase())}}),Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){this.behaviors.length&&(this.behaviors=this._desugarSomeBehaviors(this.behaviors))},_desugarSomeBehaviors:function(e){for(var t=[],n=(e=this._flattenBehaviorsList(e)).length-1;n>=0;n--){var o=e[n];-1===t.indexOf(o)&&(this._mixinBehavior(o),t.unshift(o))}return t},_flattenBehaviorsList:function(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];o instanceof Array?t=t.concat(this._flattenBehaviorsList(o)):o?t.push(o):this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}return t},_mixinBehavior:function(e){for(var t,n=Object.getOwnPropertyNames(e),o=e._noAccessors,i=0;i<n.length&&(t=n[i]);i++)Polymer.Base._behaviorProperties[t]||this.hasOwnProperty(t)||(o?this[t]=e[t]:this.copyOwnProperty(t,e,this))},_prepBehaviors:function(){this._prepFlattenedBehaviors(this.behaviors)},_prepFlattenedBehaviors:function(e){for(var t=0,n=e.length;t<n;t++)this._prepBehavior(e[t]);this._prepBehavior(this)},_marshalBehaviors:function(){for(var e=0;e<this.behaviors.length;e++)this._marshalBehavior(this.behaviors[e]);this._marshalBehavior(this)}}),Polymer.Base._behaviorProperties={hostAttributes:!0,beforeRegister:!0,registered:!0,properties:!0,observers:!0,listeners:!0,created:!0,attached:!0,detached:!0,attributeChanged:!0,ready:!0,_noAccessors:!0},Polymer.Base._addFeature({_getExtendedPrototype:function(e){return this._getExtendedNativePrototype(e)},_nativePrototypes:{},_getExtendedNativePrototype:function(e){var t=this._nativePrototypes[e];if(!t){t=Object.create(this.getNativePrototype(e));for(var n,o=Object.getOwnPropertyNames(Polymer.Base),i=0;i<o.length&&(n=o[i]);i++)Polymer.BaseDescriptors[n]||(t[n]=Polymer.Base[n]);Object.defineProperties(t,Polymer.BaseDescriptors),this._nativePrototypes[e]=t}return t},getNativePrototype:function(e){return Object.getPrototypeOf(document.createElement(e))}}),Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs=this.extends?[this.extends,this.is]:[this.is];var e=function(){return this._factory(arguments)};this.hasOwnProperty("extends")&&(e.extends=this.extends),Object.defineProperty(this,"constructor",{value:e,writable:!0,configurable:!0}),e.prototype=this},_factory:function(e){var t=document.createElement.apply(document,this._factoryArgs);return this.factoryImpl&&this.factoryImpl.apply(t,e),t}}),Polymer.nob=Object.create(null),Polymer.Base._addFeature({getPropertyInfo:function(e){var t=this._getPropertyInfo(e,this.properties);if(!t)for(var n=0;n<this.behaviors.length;n++)if(t=this._getPropertyInfo(e,this.behaviors[n].properties))return t;return t||Polymer.nob},_getPropertyInfo:function(e,t){var n=t&&t[e];return"function"==typeof n&&(n=t[e]={type:n}),n&&(n.defined=!0),n},_prepPropertyInfo:function(){this._propertyInfo={};for(var e=0;e<this.behaviors.length;e++)this._addPropertyInfo(this._propertyInfo,this.behaviors[e].properties);this._addPropertyInfo(this._propertyInfo,this.properties),this._addPropertyInfo(this._propertyInfo,this._propertyEffects)},_addPropertyInfo:function(e,t){var n,o;if(t)for(var i in t)n=e[i],o=t[i],("_"!==i[0]||o.readOnly)&&(e[i]?(n.type||(n.type=o.type),n.readOnly||(n.readOnly=o.readOnly)):e[i]={type:"function"==typeof o?o:o.type,readOnly:o.readOnly,attribute:Polymer.CaseMap.camelToDashCase(i)})}}),function(){var e={configurable:!0,writable:!0,enumerable:!0,value:{}};Polymer.BaseDescriptors.properties=e,Object.defineProperty(Polymer.Base,"properties",e)}(),Polymer.CaseMap={_caseMap:{},_rx:{dashToCamel:/-[a-z]/g,camelToDash:/([A-Z])/g},dashToCamelCase:function(e){return this._caseMap[e]||(this._caseMap[e]=e.indexOf("-")<0?e:e.replace(this._rx.dashToCamel,function(e){return e[1].toUpperCase()}))},camelToDashCase:function(e){return this._caseMap[e]||(this._caseMap[e]=e.replace(this._rx.camelToDash,"-$1").toLowerCase())}},Polymer.Base._addFeature({_addHostAttributes:function(e){this._aggregatedAttributes||(this._aggregatedAttributes={}),e&&this.mixin(this._aggregatedAttributes,e)},_marshalHostAttributes:function(){this._aggregatedAttributes&&this._applyAttributes(this,this._aggregatedAttributes)},_applyAttributes:function(e,t){for(var n in t)if(!this.hasAttribute(n)&&"class"!==n){var o=t[n];this.serializeValueToAttribute(o,n,this)}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(e){if(this.hasAttributes())for(var t in this._propertyInfo){var n=this._propertyInfo[t];this.hasAttribute(n.attribute)&&this._setAttributeToProperty(e,n.attribute,t,n)}},_setAttributeToProperty:function(e,t,n,o){if(!this._serializing&&(n=n||Polymer.CaseMap.dashToCamelCase(t),(o=o||this._propertyInfo&&this._propertyInfo[n])&&!o.readOnly)){var i=this.getAttribute(t);e[n]=this.deserialize(i,o.type)}},_serializing:!1,reflectPropertyToAttribute:function(e,t,n){this._serializing=!0,n=void 0===n?this[e]:n,this.serializeValueToAttribute(n,t||Polymer.CaseMap.camelToDashCase(e)),this._serializing=!1},serializeValueToAttribute:function(e,t,n){var o=this.serialize(e);n=n||this,void 0===o?n.removeAttribute(t):n.setAttribute(t,o)},deserialize:function(e,t){switch(t){case Number:e=Number(e);break;case Boolean:e=null!=e;break;case Object:try{e=JSON.parse(e)}catch(e){}break;case Array:try{e=JSON.parse(e)}catch(t){e=null,console.warn("Polymer::Attributes: couldn`t decode Array as JSON")}break;case Date:e=new Date(e);break;case String:}return e},serialize:function(e){switch(typeof e){case"boolean":return e?"":void 0;case"object":if(e instanceof Date)return e.toString();if(e)try{return JSON.stringify(e)}catch(e){return""}default:return null!=e?e:void 0}}}),Polymer.version="1.9.3",Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_marshalBehavior:function(e){},_initFeatures:function(){this._marshalHostAttributes(),this._marshalBehaviors()}})},"./src/bower_components/polymer/polymer-micro.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");o(n("./src/bower_components/polymer/polymer-micro.html"),"bower_components/polymer/polymer-micro.html"),n("./src/bower_components/polymer/polymer-micro-0.js")},"./src/bower_components/polymer/polymer-micro.html":function(e,t){e.exports="<html><head><script src=polymer-micro-0.js><\/script> </head><body></body></html>"},"./src/bower_components/polymer/polymer-mini-0.js":function(e,t){!function(){function e(e,n){return e.replace(r,function(e,o,i,r){return o+"'"+t(i.replace(/["']/g,""),n)+"'"+r})}function t(e,t){if(e&&a.test(e))return e;var n=function(e){return e.body.__urlResolver||(e.body.__urlResolver=e.createElement("a"))}(t);return n.href=e,n.href||e}var n,o;function i(e){return e.substring(0,e.lastIndexOf("/")+1)}var r=/(url\()([^)]*)(\))/g,s={"*":["href","src","style","url"],form:["action"]},a=/(^\/)|(^#)|(^[\w-\d]*:)/,l=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:e,resolveAttrs:function(n,o){for(var i in s)for(var r,a,c,p=s[i],d=0,h=p.length;d<h&&(r=p[d]);d++)"*"!==i&&n.localName!==i||(c=(a=n.attributes[r])&&a.value)&&c.search(l)<0&&(a.value="style"===r?e(c,o):t(c,o))},resolveUrl:function(e,i){return n||(n=document.implementation.createHTMLDocument("temp"),o=n.createElement("base"),n.head.appendChild(o)),o.href=i,t(e,n)},pathFromUrl:i},Polymer.rootPath=Polymer.Settings.rootPath||i(document.baseURI||window.location.href)}(),Polymer.Base._addFeature({_prepTemplate:function(){var e;if(void 0===this._template&&(e=Polymer.DomModule.import(this.is),this._template=e&&e.querySelector("template")),e){var t=e.getAttribute("assetpath")||"",n=Polymer.ResolveUrl.resolveUrl(t,e.ownerDocument.baseURI);this._importPath=Polymer.ResolveUrl.pathFromUrl(n)}else this._importPath="";this._template&&this._template.hasAttribute("is")&&this._warn(this._logf("_prepTemplate","top-level Polymer template must not be a type-extension, found",this._template,"Move inside simple <template>.")),this._template&&!this._template.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(this._template)},_stampTemplate:function(){this._template&&(this.root=this.instanceTemplate(this._template))},instanceTemplate:function(e){return document.importNode(e._content||e.content,!0)}}),function(){var e=Polymer.Base.attachedCallback,t=Polymer.Base.detachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_registerHost:function(e){this.dataHost=e=e||Polymer.Base._hostStack[Polymer.Base._hostStack.length-1],e&&e._clients&&e._clients.push(this),this._clients=null,this._clientsReadied=!1},_beginHosting:function(){Polymer.Base._hostStack.push(this),this._clients||(this._clients=[])},_endHosting:function(){Polymer.Base._hostStack.pop()},_tryReady:function(){this._readied=!1,this._canReady()&&this._ready()},_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_ready:function(){this._beforeClientsReady(),this._template&&(this._setupRoot(),this._readyClients()),this._clientsReadied=!0,this._clients=null,this._afterClientsReady(),this._readySelf()},_readyClients:function(){this._beginDistribute();var e=this._clients;if(e)for(var t,n=0,o=e.length;n<o&&(t=e[n]);n++)t._ready();this._finishDistribute()},_readySelf:function(){for(var e,t=0;t<this.behaviors.length;t++)(e=this.behaviors[t]).ready&&e.ready.call(this);this.ready&&this.ready(),this._readied=!0,this._attachedPending&&(this._attachedPending=!1,this.attachedCallback())},_beforeClientsReady:function(){},_afterClientsReady:function(){},_beforeAttached:function(){},attachedCallback:function(){this._readied?(this._beforeAttached(),e.call(this)):this._attachedPending=!0},detachedCallback:function(){this._readied?t.call(this):this._attachedPending=!1}})}(),Polymer.ArraySplice=function(){function e(e,t,n){return{index:e,removed:t,addedCount:n}}function t(){}return t.prototype={calcEditDistances:function(e,t,n,o,i,r){for(var s=r-i+1,a=n-t+1,l=new Array(s),c=0;c<s;c++)l[c]=new Array(a),l[c][0]=c;for(var p=0;p<a;p++)l[0][p]=p;for(c=1;c<s;c++)for(p=1;p<a;p++)if(this.equals(e[t+p-1],o[i+c-1]))l[c][p]=l[c-1][p-1];else{var d=l[c-1][p]+1,h=l[c][p-1]+1;l[c][p]=d<h?d:h}return l},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,o=e[t][n],i=[];t>0||n>0;)if(0!=t)if(0!=n){var r,s=e[t-1][n-1],a=e[t-1][n],l=e[t][n-1];(r=a<l?a<s?a:s:l<s?l:s)==s?(s==o?i.push(0):(i.push(1),o=s),t--,n--):r==a?(i.push(3),t--,o=a):(i.push(2),n--,o=l)}else i.push(3),t--;else i.push(2),n--;return i.reverse(),i},calcSplices:function(t,n,o,i,r,s){var a=0,l=0,c=Math.min(o-n,s-r);if(0==n&&0==r&&(a=this.sharedPrefix(t,i,c)),o==t.length&&s==i.length&&(l=this.sharedSuffix(t,i,c-a)),r+=a,s-=l,(o-=l)-(n+=a)==0&&s-r==0)return[];if(n==o){for(var p=e(n,[],0);r<s;)p.removed.push(i[r++]);return[p]}if(r==s)return[e(n,[],o-n)];var d=this.spliceOperationsFromEditDistances(this.calcEditDistances(t,n,o,i,r,s));p=void 0;for(var h=[],u=n,f=r,_=0;_<d.length;_++)switch(d[_]){case 0:p&&(h.push(p),p=void 0),u++,f++;break;case 1:p||(p=e(u,[],0)),p.addedCount++,u++,p.removed.push(i[f]),f++;break;case 2:p||(p=e(u,[],0)),p.addedCount++,u++;break;case 3:p||(p=e(u,[],0)),p.removed.push(i[f]),f++}return p&&h.push(p),h},sharedPrefix:function(e,t,n){for(var o=0;o<n;o++)if(!this.equals(e[o],t[o]))return o;return n},sharedSuffix:function(e,t,n){for(var o=e.length,i=t.length,r=0;r<n&&this.equals(e[--o],t[--i]);)r++;return r},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},new t}(),Polymer.domInnerHTML=function(){var e=/[&\u00A0"]/g,t=/[&\u00A0<>]/g;function n(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function o(t){return t.replace(e,n)}function i(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var r=i(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),s=i(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function a(e,i,a){switch(e.nodeType){case Node.ELEMENT_NODE:for(var c,p=e.localName,d="<"+p,h=e.attributes,u=0;c=h[u];u++)d+=" "+c.name+'="'+o(c.value)+'"';return d+=">",r[p]?d:d+l(e,a)+"</"+p+">";case Node.TEXT_NODE:var f=e.data;return i&&s[i.localName]?f:function(e){return e.replace(t,n)}(f);case Node.COMMENT_NODE:return"\x3c!--"+e.data+"--\x3e";default:throw console.error(e),new Error("not implemented")}}function l(e,t){e instanceof HTMLTemplateElement&&(e=e.content);for(var n,o="",i=Polymer.dom(e).childNodes,r=0,s=i.length;r<s&&(n=i[r]);r++)o+=a(n,e,t);return o}return{getInnerHTML:l}}(),function(){"use strict";var e=Element.prototype.insertBefore,t=Element.prototype.appendChild,n=Element.prototype.removeChild;Polymer.TreeApi={arrayCopyChildNodes:function(e){for(var t=[],n=0,o=e.firstChild;o;o=o.nextSibling)t[n++]=o;return t},arrayCopyChildren:function(e){for(var t=[],n=0,o=e.firstElementChild;o;o=o.nextElementSibling)t[n++]=o;return t},arrayCopy:function(e){for(var t=e.length,n=new Array(t),o=0;o<t;o++)n[o]=e[o];return n}},Polymer.TreeApi.Logical={hasParentNode:function(e){return Boolean(e.__dom&&e.__dom.parentNode)},hasChildNodes:function(e){return Boolean(e.__dom&&void 0!==e.__dom.childNodes)},getChildNodes:function(e){return this.hasChildNodes(e)?this._getChildNodes(e):e.childNodes},_getChildNodes:function(e){if(!e.__dom.childNodes){e.__dom.childNodes=[];for(var t=e.__dom.firstChild;t;t=t.__dom.nextSibling)e.__dom.childNodes.push(t)}return e.__dom.childNodes},getParentNode:function(e){return e.__dom&&void 0!==e.__dom.parentNode?e.__dom.parentNode:e.parentNode},getFirstChild:function(e){return e.__dom&&void 0!==e.__dom.firstChild?e.__dom.firstChild:e.firstChild},getLastChild:function(e){return e.__dom&&void 0!==e.__dom.lastChild?e.__dom.lastChild:e.lastChild},getNextSibling:function(e){return e.__dom&&void 0!==e.__dom.nextSibling?e.__dom.nextSibling:e.nextSibling},getPreviousSibling:function(e){return e.__dom&&void 0!==e.__dom.previousSibling?e.__dom.previousSibling:e.previousSibling},getFirstElementChild:function(e){return e.__dom&&void 0!==e.__dom.firstChild?this._getFirstElementChild(e):e.firstElementChild},_getFirstElementChild:function(e){for(var t=e.__dom.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.nextSibling;return t},getLastElementChild:function(e){return e.__dom&&void 0!==e.__dom.lastChild?this._getLastElementChild(e):e.lastElementChild},_getLastElementChild:function(e){for(var t=e.__dom.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.previousSibling;return t},getNextElementSibling:function(e){return e.__dom&&void 0!==e.__dom.nextSibling?this._getNextElementSibling(e):e.nextElementSibling},_getNextElementSibling:function(e){for(var t=e.__dom.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.nextSibling;return t},getPreviousElementSibling:function(e){return e.__dom&&void 0!==e.__dom.previousSibling?this._getPreviousElementSibling(e):e.previousElementSibling},_getPreviousElementSibling:function(e){for(var t=e.__dom.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.previousSibling;return t},saveChildNodes:function(e){if(!this.hasChildNodes(e)){e.__dom=e.__dom||{},e.__dom.firstChild=e.firstChild,e.__dom.lastChild=e.lastChild,e.__dom.childNodes=[];for(var t=e.firstChild;t;t=t.nextSibling)t.__dom=t.__dom||{},t.__dom.parentNode=e,e.__dom.childNodes.push(t),t.__dom.nextSibling=t.nextSibling,t.__dom.previousSibling=t.previousSibling}},recordInsertBefore:function(e,t,n){if(t.__dom.childNodes=null,e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var o=e.firstChild;o;o=o.nextSibling)this._linkNode(o,t,n);else this._linkNode(e,t,n)},_linkNode:function(e,t,n){e.__dom=e.__dom||{},t.__dom=t.__dom||{},n&&(n.__dom=n.__dom||{}),e.__dom.previousSibling=n?n.__dom.previousSibling:t.__dom.lastChild,e.__dom.previousSibling&&(e.__dom.previousSibling.__dom.nextSibling=e),e.__dom.nextSibling=n||null,e.__dom.nextSibling&&(e.__dom.nextSibling.__dom.previousSibling=e),e.__dom.parentNode=t,n?n===t.__dom.firstChild&&(t.__dom.firstChild=e):(t.__dom.lastChild=e,t.__dom.firstChild||(t.__dom.firstChild=e)),t.__dom.childNodes=null},recordRemoveChild:function(e,t){e.__dom=e.__dom||{},t.__dom=t.__dom||{},e===t.__dom.firstChild&&(t.__dom.firstChild=e.__dom.nextSibling),e===t.__dom.lastChild&&(t.__dom.lastChild=e.__dom.previousSibling);var n=e.__dom.previousSibling,o=e.__dom.nextSibling;n&&(n.__dom.nextSibling=o),o&&(o.__dom.previousSibling=n),e.__dom.parentNode=e.__dom.previousSibling=e.__dom.nextSibling=void 0,t.__dom.childNodes=null}},Polymer.TreeApi.Composed={getChildNodes:function(e){return Polymer.TreeApi.arrayCopyChildNodes(e)},getParentNode:function(e){return e.parentNode},clearChildNodes:function(e){e.textContent=""},insertBefore:function(t,n,o){return e.call(t,n,o||null)},appendChild:function(e,n){return t.call(e,n)},removeChild:function(e,t){return n.call(e,t)}}}(),Polymer.DomApi=function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,n=function(e){this.node=o?n.wrap(e):e},o=e.hasShadow&&!e.nativeShadow;n.wrap=window.wrap?window.wrap:function(e){return e},n.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(e){if(this.node.contains(e))return!0;for(var t=e,n=e.ownerDocument;t&&t!==n&&t!==this.node;)t=Polymer.dom(t).parentNode||t.host;return t===this.node},queryDistributedElements:function(e){for(var t,o=this.getEffectiveChildNodes(),i=[],r=0,s=o.length;r<s&&(t=o[r]);r++)t.nodeType===Node.ELEMENT_NODE&&n.matchesSelector.call(t,e)&&i.push(t);return i},getEffectiveChildNodes:function(){for(var e,t=[],n=this.childNodes,o=0,s=n.length;o<s&&(e=n[o]);o++)if(e.localName===i)for(var a=r(e).getDistributedNodes(),l=0;l<a.length;l++)t.push(a[l]);else t.push(e);return t},observeNodes:function(e){if(e)return this.observer||(this.observer=this.node.localName===i?new n.DistributedNodesObserver(this):new n.EffectiveNodesObserver(this)),this.observer.addListener(e)},unobserveNodes:function(e){this.observer&&this.observer.removeListener(e)},notifyObserver:function(){this.observer&&this.observer.notify()},_query:function(e,n,o){n=n||this.node;var i=[];return this._queryElements(t.Logical.getChildNodes(n),e,o,i),i},_queryElements:function(e,t,n,o){for(var i,r=0,s=e.length;r<s&&(i=e[r]);r++)if(i.nodeType===Node.ELEMENT_NODE&&this._queryElement(i,t,n,o))return!0},_queryElement:function(e,n,o,i){var r=n(e);if(r&&i.push(e),o&&o(r))return r;this._queryElements(t.Logical.getChildNodes(e),n,o,i)}};var i=n.CONTENT="content",r=n.factory=function(e){return(e=e||document).__domApi||(e.__domApi=new n.ctor(e)),e.__domApi};n.hasApi=function(e){return Boolean(e.__domApi)},n.ctor=n,Polymer.dom=function(e,t){return e instanceof Event?Polymer.EventApi.factory(e):n.factory(e,t)};var s=Element.prototype;return n.matchesSelector=s.matches||s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector,n}(),function(){"use strict";var e=Polymer.Settings,t=Polymer.DomApi,n=t.factory,o=Polymer.TreeApi,i=Polymer.domInnerHTML.getInnerHTML,r=t.CONTENT;if(!e.useShadow){var s=Element.prototype.cloneNode,a=Document.prototype.importNode;Polymer.Base.mixin(t.prototype,{_lazyDistribute:function(e){e.shadyRoot&&e.shadyRoot._distributionClean&&(e.shadyRoot._distributionClean=!1,Polymer.dom.addDebouncer(e.debounce("_distribute",e._distributeContent)))},appendChild:function(e){return this.insertBefore(e)},insertBefore:function(e,i){if(i&&o.Logical.getParentNode(i)!==this.node)throw Error("The ref_node to be inserted before is not a child of this node");if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var s=o.Logical.getParentNode(e);s?(t.hasApi(s)&&n(s).notifyObserver(),this._removeNode(e)):this._removeOwnerShadyRoot(e)}if(!this._addNode(e,i)){i&&(i=i.localName===r?this._firstComposedNode(i):i);var a=this.node._isShadyRoot?this.node.host:this.node;i?o.Composed.insertBefore(a,e,i):o.Composed.appendChild(a,e)}return this.notifyObserver(),e},_addNode:function(e,t){var n=this.getOwnerRoot();if(n){var i=this._maybeAddInsertionPoint(e,this.node);n._invalidInsertionPoints||(n._invalidInsertionPoints=i),this._addNodeToHost(n.host,e)}o.Logical.hasChildNodes(this.node)&&o.Logical.recordInsertBefore(e,this.node,t);var r=this._maybeDistribute(e)||this.node.shadyRoot;if(r)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(;e.firstChild;)o.Composed.removeChild(e,e.firstChild);else{var s=o.Composed.getParentNode(e);s&&o.Composed.removeChild(s,e)}return r},removeChild:function(e){if(o.Logical.getParentNode(e)!==this.node)throw Error("The node to be removed is not a child of this node: "+e);if(!this._removeNode(e)){var t=this.node._isShadyRoot?this.node.host:this.node;t===o.Composed.getParentNode(e)&&o.Composed.removeChild(t,e)}return this.notifyObserver(),e},_removeNode:function(e){var t,i=o.Logical.hasParentNode(e)&&o.Logical.getParentNode(e),r=this._ownerShadyRootForNode(e);return i&&(t=n(e)._maybeDistributeParent(),o.Logical.recordRemoveChild(e,i),r&&this._removeDistributedChildren(r,e)&&(r._invalidInsertionPoints=!0,this._lazyDistribute(r.host))),this._removeOwnerShadyRoot(e),r&&this._removeNodeFromHost(r.host,e),t},replaceChild:function(e,t){return this.insertBefore(e,t),this.removeChild(t),e},_hasCachedOwnerRoot:function(e){return Boolean(void 0!==e._ownerShadyRoot)},getOwnerRoot:function(){return this._ownerShadyRootForNode(this.node)},_ownerShadyRootForNode:function(e){if(e){var t=e._ownerShadyRoot;if(void 0===t){if(e._isShadyRoot)t=e;else{var n=o.Logical.getParentNode(e);t=n?n._isShadyRoot?n:this._ownerShadyRootForNode(n):null}(t||document.documentElement.contains(e))&&(e._ownerShadyRoot=t)}return t}},_maybeDistribute:function(e){var t=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noContent&&n(e).querySelector(r),i=t&&o.Logical.getParentNode(t).nodeType!==Node.DOCUMENT_FRAGMENT_NODE,s=t||e.localName===r;if(s){var a=this.getOwnerRoot();a&&this._lazyDistribute(a.host)}var l=this._nodeNeedsDistribution(this.node);return l&&this._lazyDistribute(this.node),l||s&&!i},_maybeAddInsertionPoint:function(e,t){var i;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noContent)e.localName===r&&(o.Logical.saveChildNodes(t),o.Logical.saveChildNodes(e),i=!0);else for(var s,a,l,c=n(e).querySelectorAll(r),p=0;p<c.length&&(s=c[p]);p++)(a=o.Logical.getParentNode(s))===e&&(a=t),l=this._maybeAddInsertionPoint(s,a),i=i||l;return i},_updateInsertionPoints:function(e){for(var t,i=e.shadyRoot._insertionPoints=n(e.shadyRoot).querySelectorAll(r),s=0;s<i.length;s++)t=i[s],o.Logical.saveChildNodes(t),o.Logical.saveChildNodes(o.Logical.getParentNode(t))},_nodeNeedsDistribution:function(e){return e&&e.shadyRoot&&t.hasInsertionPoint(e.shadyRoot)},_addNodeToHost:function(e,t){e._elementAdd&&e._elementAdd(t)},_removeNodeFromHost:function(e,t){e._elementRemove&&e._elementRemove(t)},_removeDistributedChildren:function(e,t){for(var i,r=e._insertionPoints,s=0;s<r.length;s++){var a=r[s];if(this._contains(t,a))for(var l=n(a).getDistributedNodes(),c=0;c<l.length;c++){i=!0;var p=l[c],d=o.Composed.getParentNode(p);d&&o.Composed.removeChild(d,p)}}return i},_contains:function(e,t){for(;t;){if(t==e)return!0;t=o.Logical.getParentNode(t)}},_removeOwnerShadyRoot:function(e){if(this._hasCachedOwnerRoot(e))for(var t,n=o.Logical.getChildNodes(e),i=0,r=n.length;i<r&&(t=n[i]);i++)this._removeOwnerShadyRoot(t);e._ownerShadyRoot=void 0},_firstComposedNode:function(e){for(var t,o,i=n(e).getDistributedNodes(),r=0,s=i.length;r<s&&(t=i[r]);r++)if((o=n(t).getDestinationInsertionPoints())[o.length-1]===e)return t},querySelector:function(e){return this._query(function(n){return t.matchesSelector.call(n,e)},this.node,function(e){return Boolean(e)})[0]||null},querySelectorAll:function(e){return this._query(function(n){return t.matchesSelector.call(n,e)},this.node)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},_clear:function(){for(;this.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function(e,t){this.node.setAttribute(e,t),this._maybeDistributeParent()},removeAttribute:function(e){this.node.removeAttribute(e),this._maybeDistributeParent()},_maybeDistributeParent:function(){if(this._nodeNeedsDistribution(this.parentNode))return this._lazyDistribute(this.parentNode),!0},cloneNode:function(e){var t=s.call(this.node,!1);if(e)for(var o,i=this.childNodes,r=n(t),a=0;a<i.length;a++)o=n(i[a]).cloneNode(!0),r.appendChild(o);return t},importNode:function(e,t){var i=this.node instanceof Document?this.node:this.node.ownerDocument,r=a.call(i,e,!1);if(t)for(var s,l=o.Logical.getChildNodes(e),c=n(r),p=0;p<l.length;p++)s=n(i).importNode(l[p],!0),c.appendChild(s);return r},_getComposedInnerHTML:function(){return i(this.node,!0)}}),Object.defineProperties(t.prototype,{activeElement:{get:function(){var e=document.activeElement;if(!e)return null;var t=!!this.node._isShadyRoot;if(this.node!==document){if(!t)return null;if(this.node.host===e||!this.node.host.contains(e))return null}for(var o=n(e).getOwnerRoot();o&&o!==this.node;)e=o.host,o=n(e).getOwnerRoot();return this.node===document?o?null:e:o===this.node?e:null},configurable:!0},childNodes:{get:function(){var e=o.Logical.getChildNodes(this.node);return Array.isArray(e)?e:o.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return o.Logical.hasChildNodes(this.node)?Array.prototype.filter.call(this.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE}):o.arrayCopyChildren(this.node)},configurable:!0},parentNode:{get:function(){return o.Logical.getParentNode(this.node)},configurable:!0},firstChild:{get:function(){return o.Logical.getFirstChild(this.node)},configurable:!0},lastChild:{get:function(){return o.Logical.getLastChild(this.node)},configurable:!0},nextSibling:{get:function(){return o.Logical.getNextSibling(this.node)},configurable:!0},previousSibling:{get:function(){return o.Logical.getPreviousSibling(this.node)},configurable:!0},firstElementChild:{get:function(){return o.Logical.getFirstElementChild(this.node)},configurable:!0},lastElementChild:{get:function(){return o.Logical.getLastElementChild(this.node)},configurable:!0},nextElementSibling:{get:function(){return o.Logical.getNextElementSibling(this.node)},configurable:!0},previousElementSibling:{get:function(){return o.Logical.getPreviousElementSibling(this.node)},configurable:!0},textContent:{get:function(){var e=this.node.nodeType;if(e===Node.TEXT_NODE||e===Node.COMMENT_NODE)return this.node.textContent;for(var t,n=[],o=0,i=this.childNodes;t=i[o];o++)t.nodeType!==Node.COMMENT_NODE&&n.push(t.textContent);return n.join("")},set:function(e){var t=this.node.nodeType;t===Node.TEXT_NODE||t===Node.COMMENT_NODE?this.node.textContent=e:(this._clear(),e&&this.appendChild(document.createTextNode(e)))},configurable:!0},innerHTML:{get:function(){var e=this.node.nodeType;return e===Node.TEXT_NODE||e===Node.COMMENT_NODE?null:i(this.node)},set:function(e){var t=this.node.nodeType;if(t!==Node.TEXT_NODE||t!==Node.COMMENT_NODE){this._clear();var n=document.createElement("div");n.innerHTML=e;for(var i=o.arrayCopyChildNodes(n),r=0;r<i.length;r++)this.appendChild(i[r])}},configurable:!0}}),t.hasInsertionPoint=function(e){return Boolean(e&&e._insertionPoints.length)}}}(),function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,n=Polymer.DomApi;if(e.useShadow){Polymer.Base.mixin(n.prototype,{querySelectorAll:function(e){return t.arrayCopy(this.node.querySelectorAll(e))},getOwnerRoot:function(){for(var e=this.node;e;){if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host)return e;e=e.parentNode}},importNode:function(e,t){return(this.node instanceof Document?this.node:this.node.ownerDocument).importNode(e,t)},getDestinationInsertionPoints:function(){var e=this.node.getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return e?t.arrayCopy(e):[]},getDistributedNodes:function(){var e=this.node.getDistributedNodes&&this.node.getDistributedNodes();return e?t.arrayCopy(e):[]}}),Object.defineProperties(n.prototype,{activeElement:{get:function(){var e=n.wrap(this.node),t=e.activeElement;return e.contains(t)?t:null},configurable:!0},childNodes:{get:function(){return t.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return t.arrayCopyChildren(this.node)},configurable:!0},textContent:{get:function(){return this.node.textContent},set:function(e){return this.node.textContent=e},configurable:!0},innerHTML:{get:function(){return this.node.innerHTML},set:function(e){return this.node.innerHTML=e},configurable:!0}});var o=function(e){n.prototype[e]=function(){return this.node[e].apply(this.node,arguments)}};!function(e){for(var t=0;t<e.length;t++)o(e[t])}(["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector"]);var i=function(e){Object.defineProperty(n.prototype,e,{get:function(){return this.node[e]},configurable:!0})};!function(e){for(var t=0;t<e.length;t++)i(e[t])}(["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"])}}(),Polymer.Base.mixin(Polymer.dom,{_flushGuard:0,_FLUSH_MAX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[],_staticFlushList:[],_finishDebouncer:null,flush:function(){for(this._flushGuard=0,this._prepareFlush();this._debouncers.length&&this._flushGuard<this._FLUSH_MAX;){for(;this._debouncers.length;)this._debouncers.shift().complete();this._finishDebouncer&&this._finishDebouncer.complete(),this._prepareFlush(),this._flushGuard++}this._flushGuard>=this._FLUSH_MAX&&console.warn("Polymer.dom.flush aborted. Flush may not be complete.")},_prepareFlush:function(){this._needsTakeRecords&&CustomElements.takeRecords();for(var e=0;e<this._staticFlushList.length;e++)this._staticFlushList[e]()},addStaticFlush:function(e){this._staticFlushList.push(e)},removeStaticFlush:function(e){var t=this._staticFlushList.indexOf(e);t>=0&&this._staticFlushList.splice(t,1)},addDebouncer:function(e){this._debouncers.push(e),this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlush)},_finishFlush:function(){Polymer.dom._debouncers=[]}}),Polymer.EventApi=function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.Event=function(e){this.event=e},t.useShadow?e.Event.prototype={get rootTarget(){return this.event.path[0]},get localTarget(){return this.event.target},get path(){var e=this.event.path;return Array.isArray(e)||(e=Array.prototype.slice.call(e)),e}}:e.Event.prototype={get rootTarget(){return this.event.target},get localTarget(){for(var e=this.event.currentTarget,t=e&&Polymer.dom(e).getOwnerRoot(),n=this.path,o=0;o<n.length;o++)if(Polymer.dom(n[o]).getOwnerRoot()===t)return n[o]},get path(){if(!this.event._path){for(var e=[],t=this.rootTarget;t;){e.push(t);var n=Polymer.dom(t).getDestinationInsertionPoints();if(n.length){for(var o=0;o<n.length-1;o++)e.push(n[o]);t=n[n.length-1]}else t=Polymer.dom(t).parentNode||t.host}e.push(window),this.event._path=e}return this.event._path}};return{factory:function(t){return t.__eventApi||(t.__eventApi=new e.Event(t)),t.__eventApi}}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings.useShadow;Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList||(this._classList=new e.ClassList(this)),this._classList},configurable:!0}),e.ClassList=function(e){this.domApi=e,this.node=e.node},e.ClassList.prototype={add:function(){this.node.classList.add.apply(this.node.classList,arguments),this._distributeParent()},remove:function(){this.node.classList.remove.apply(this.node.classList,arguments),this._distributeParent()},toggle:function(){this.node.classList.toggle.apply(this.node.classList,arguments),this._distributeParent()},_distributeParent:function(){t||this.domApi._maybeDistributeParent()},contains:function(){return this.node.classList.contains.apply(this.node.classList,arguments)}}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;if(e.EffectiveNodesObserver=function(e){this.domApi=e,this.node=this.domApi.node,this._listeners=[]},e.EffectiveNodesObserver.prototype={addListener:function(e){this._isSetup||(this._setup(),this._isSetup=!0);var t={fn:e,_nodes:[]};return this._listeners.push(t),this._scheduleNotify(),t},removeListener:function(e){var t=this._listeners.indexOf(e);t>=0&&(this._listeners.splice(t,1),e._nodes=[]),this._hasListeners()||(this._cleanup(),this._isSetup=!1)},_setup:function(){this._observeContentElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentElements(this.domApi.childNodes)},_hasListeners:function(){return Boolean(this._listeners.length)},_scheduleNotify:function(){this._debouncer&&this._debouncer.stop(),this._debouncer=Polymer.Debounce(this._debouncer,this._notify),this._debouncer.context=this,Polymer.dom.addDebouncer(this._debouncer)},notify:function(){this._hasListeners()&&this._scheduleNotify()},_notify:function(){this._beforeCallListeners(),this._callListeners()},_beforeCallListeners:function(){this._updateContentElements()},_updateContentElements:function(){this._observeContentElements(this.domApi.childNodes)},_observeContentElements:function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++)this._isContent(t)&&(t.__observeNodesMap=t.__observeNodesMap||new WeakMap,t.__observeNodesMap.has(this)||t.__observeNodesMap.set(this,this._observeContent(t)))},_observeContent:function(e){var t=this,n=Polymer.dom(e).observeNodes(function(){t._scheduleNotify()});return n._avoidChangeCalculation=!0,n},_unobserveContentElements:function(e){for(var t,n,o=0;o<e.length&&(t=e[o]);o++)this._isContent(t)&&(n=t.__observeNodesMap.get(this))&&(Polymer.dom(t).unobserveNodes(n),t.__observeNodesMap.delete(this))},_isContent:function(e){return"content"===e.localName},_callListeners:function(){for(var e,t=this._listeners,n=this._getEffectiveNodes(),o=0;o<t.length&&(e=t[o]);o++){var i=this._generateListenerInfo(e,n);(i||e._alwaysNotify)&&this._callListener(e,i)}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(e,t){if(e._avoidChangeCalculation)return!0;for(var n,o=e._nodes,i={target:this.node,addedNodes:[],removedNodes:[]},r=Polymer.ArraySplice.calculateSplices(t,o),s=0;s<r.length&&(n=r[s]);s++)for(var a,l=0;l<n.removed.length&&(a=n.removed[l]);l++)i.removedNodes.push(a);for(s=0;s<r.length&&(n=r[s]);s++)for(l=n.index;l<n.index+n.addedCount;l++)i.addedNodes.push(t[l]);return e._nodes=t,i.addedNodes.length||i.removedNodes.length?i:void 0},_callListener:function(e,t){return e.fn.call(this.node,t)},enableShadowAttributeTracking:function(){}},t.useShadow){var n=e.EffectiveNodesObserver.prototype._setup,o=e.EffectiveNodesObserver.prototype._cleanup;Polymer.Base.mixin(e.EffectiveNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this;this._mutationHandler=function(t){t&&t.length&&e._scheduleNotify()},this._observer=new MutationObserver(this._mutationHandler),this._boundFlush=function(){e._flush()},Polymer.dom.addStaticFlush(this._boundFlush),this._observer.observe(this.node,{childList:!0})}n.call(this)},_cleanup:function(){this._observer.disconnect(),this._observer=null,this._mutationHandler=null,Polymer.dom.removeStaticFlush(this._boundFlush),o.call(this)},_flush:function(){this._observer&&this._mutationHandler(this._observer.takeRecords())},enableShadowAttributeTracking:function(){if(this._observer){this._makeContentListenersAlwaysNotify(),this._observer.disconnect(),this._observer.observe(this.node,{childList:!0,attributes:!0,subtree:!0});var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).observer&&Polymer.dom(t).observer.enableShadowAttributeTracking()}},_makeContentListenersAlwaysNotify:function(){for(var e,t=0;t<this._listeners.length;t++)(e=this._listeners[t])._alwaysNotify=e._isContentListener}})}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.DistributedNodesObserver=function(t){e.EffectiveNodesObserver.call(this,t)},e.DistributedNodesObserver.prototype=Object.create(e.EffectiveNodesObserver.prototype),Polymer.Base.mixin(e.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup:function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){return this.domApi.getDistributedNodes()}}),t.useShadow&&Polymer.Base.mixin(e.DistributedNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this.domApi.getOwnerRoot(),t=e&&e.host;if(t){var n=this;this._observer=Polymer.dom(t).observeNodes(function(){n._scheduleNotify()}),this._observer._isContentListener=!0,this._hasAttrSelect()&&Polymer.dom(t).observer.enableShadowAttributeTracking()}}},_hasAttrSelect:function(){var e=this.node.getAttribute("select");return e&&e.match(/[[.]+/)},_cleanup:function(){var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).unobserveNodes(this._observer),this._observer=null}})}(),function(){var e=Polymer.DomApi,t=Polymer.TreeApi;Polymer.Base._addFeature({_prepShady:function(){this._useContent=this._useContent||Boolean(this._template)},_setupShady:function(){this.shadyRoot=null,this.__domApi||(this.__domApi=null),this.__dom||(this.__dom=null),this._ownerShadyRoot||(this._ownerShadyRoot=void 0)},_poolContent:function(){this._useContent&&t.Logical.saveChildNodes(this)},_setupRoot:function(){this._useContent&&(this._createLocalRoot(),this.dataHost||function(e){if(c&&e)for(var t=0;t<e.length;t++)CustomElements.upgrade(e[t])}(t.Logical.getChildNodes(this)))},_createLocalRoot:function(){this.shadyRoot=this.root,this.shadyRoot._distributionClean=!1,this.shadyRoot._hasDistributed=!1,this.shadyRoot._isShadyRoot=!0,this.shadyRoot._dirtyRoots=[];var e=this.shadyRoot._insertionPoints=!this._notes||this._notes._hasContent?this.shadyRoot.querySelectorAll("content"):[];t.Logical.saveChildNodes(this.shadyRoot);for(var n,o=0;o<e.length;o++)n=e[o],t.Logical.saveChildNodes(n),t.Logical.saveChildNodes(n.parentNode);this.shadyRoot.host=this},distributeContent:function(e){if(this.shadyRoot){this.shadyRoot._invalidInsertionPoints=this.shadyRoot._invalidInsertionPoints||e;var t=function(e){for(;e&&l(e);)e=e.domHost;return e}(this);Polymer.dom(this)._lazyDistribute(t)}},_distributeContent:function(){this._useContent&&!this.shadyRoot._distributionClean&&(this.shadyRoot._invalidInsertionPoints&&(Polymer.dom(this)._updateInsertionPoints(this),this.shadyRoot._invalidInsertionPoints=!1),this._beginDistribute(),this._distributeDirtyRoots(),this._finishDistribute())},_beginDistribute:function(){this._useContent&&e.hasInsertionPoint(this.shadyRoot)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collectPool()))},_distributeDirtyRoots:function(){for(var e,t=this.shadyRoot._dirtyRoots,n=0,o=t.length;n<o&&(e=t[n]);n++)e._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,e.hasInsertionPoint(this.shadyRoot))this._composeTree(),function(t){for(var n,o=0;o<t._insertionPoints.length;o++)n=t._insertionPoints[o],e.hasApi(n)&&Polymer.dom(n).notifyObserver()}(this.shadyRoot);else if(this.shadyRoot._hasDistributed){var n=this._composeNode(this);this._updateChildNodes(this,n)}else t.Composed.clearChildNodes(this),this.appendChild(this.shadyRoot);this.shadyRoot._hasDistributed||function(t){e.hasApi(t)&&Polymer.dom(t).notifyObserver()}(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(t,n){return n=n||this,e.matchesSelector.call(n,t)},_resetDistribution:function(){for(var e=t.Logical.getChildNodes(this),n=0;n<e.length;n++){var o=e[n];o._destinationInsertionPoints&&(o._destinationInsertionPoints=void 0),a(o)&&i(o)}for(var r=this.shadyRoot._insertionPoints,s=0;s<r.length;s++)r[s]._distributedNodes=[]},_collectPool:function(){for(var e=[],n=t.Logical.getChildNodes(this),o=0;o<n.length;o++){var i=n[o];a(i)?e.push.apply(e,i._distributedNodes):e.push(i)}return e},_distributePool:function(e,t){for(var n,o=e._insertionPoints,i=0,s=o.length;i<s&&(n=o[i]);i++)this._distributeInsertionPoint(n,t),r(n,this)},_distributeInsertionPoint:function(e,n){for(var i,r=!1,s=0,a=n.length;s<a;s++)(i=n[s])&&this._matchesContentSelect(i,e)&&(o(i,e),n[s]=void 0,r=!0);if(!r)for(var l=t.Logical.getChildNodes(e),c=0;c<l.length;c++)o(l[c],e)},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));for(var e,n,o=this.shadyRoot._insertionPoints,i=0,r=o.length;i<r&&(e=o[i]);i++)(n=t.Logical.getParentNode(e))._useContent||n===this||n===this.shadyRoot||this._updateChildNodes(n,this._composeNode(n))},_composeNode:function(e){for(var n=[],o=t.Logical.getChildNodes(e.shadyRoot||e),i=0;i<o.length;i++){var r=o[i];if(a(r))for(var l=r._distributedNodes,c=0;c<l.length;c++){var p=l[c];s(r,p)&&n.push(p)}else n.push(r)}return n},_updateChildNodes:function(e,n){for(var o=t.Composed.getChildNodes(e),i=Polymer.ArraySplice.calculateSplices(n,o),r=0,s=0;r<i.length&&(c=i[r]);r++){for(var a,l=0;l<c.removed.length&&(a=c.removed[l]);l++)t.Composed.getParentNode(a)===e&&t.Composed.removeChild(e,a),o.splice(c.index+s,1);s-=c.addedCount}var c,p;for(r=0;r<i.length&&(c=i[r]);r++)for(p=o[c.index],l=c.index;l<c.index+c.addedCount;l++)a=n[l],t.Composed.insertBefore(e,a,p),o.splice(l,0,a)},_matchesContentSelect:function(e,t){var n=t.getAttribute("select");if(!n)return!0;if(!(n=n.trim()))return!0;if(!(e instanceof Element))return!1;return!!/^(:not\()?[*.#[a-zA-Z_|]/.test(n)&&this.elementMatches(n,e)},_elementAdd:function(){},_elementRemove:function(){}});var n={get:function(){var e=Polymer.dom(this).getOwnerRoot();return e&&e.host},configurable:!0};function o(e,t){t._distributedNodes.push(e);var n=e._destinationInsertionPoints;n?n.push(t):e._destinationInsertionPoints=[t]}function i(e){var t=e._distributedNodes;if(t)for(var n=0;n<t.length;n++){var o=t[n]._destinationInsertionPoints;o&&o.splice(o.indexOf(e)+1,o.length)}}function r(n,o){var i=t.Logical.getParentNode(n);i&&i.shadyRoot&&e.hasInsertionPoint(i.shadyRoot)&&i.shadyRoot._distributionClean&&(i.shadyRoot._distributionClean=!1,o.shadyRoot._dirtyRoots.push(i))}function s(e,t){var n=t._destinationInsertionPoints;return n&&n[n.length-1]===e}function a(e){return"content"==e.localName}function l(e){for(var n,o=t.Logical.getChildNodes(e),i=0;i<o.length;i++)if((n=o[i]).localName&&"content"===n.localName)return e.domHost}Object.defineProperty(Polymer.Base,"domHost",n),Polymer.BaseDescriptors.domHost=n;var c=window.CustomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Base._addFeature({_poolContent:function(){},_beginDistribute:function(){},distributeContent:function(){},_distributeContent:function(){},_finishDistribute:function(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.appendChild(this.root),this.root=this.shadowRoot}}),Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(e,t){return t>0?~setTimeout(e,t):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(e),this._currVal++)},cancel:function(e){if(e<0)clearTimeout(~e);else{var t=e-this._lastVal;if(t>=0){if(!this._callbacks[t])throw"invalid async handle: "+e;this._callbacks[t]=null}}},_atEndOfMicrotask:function(){for(var e=this._callbacks.length,t=0;t<e;t++){var n=this._callbacks[t];if(n)try{n()}catch(e){throw t++,this._callbacks.splice(0,t),this._lastVal+=t,this._twiddle.textContent=this._twiddleContent++,e}}this._callbacks.splice(0,e),this._lastVal+=e}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function(){var e=Polymer.Async,t=function(e){this.context=e;var t=this;this.boundComplete=function(){t.complete()}};return t.prototype={go:function(t,n){var o;this.finish=function(){e.cancel(o)},o=e.run(this.boundComplete,n),this.callback=t},stop:function(){this.finish&&(this.finish(),this.finish=null,this.callback=null)},complete:function(){if(this.finish){var e=this.callback;this.stop(),e.call(this.context)}}},function(e,n,o){return e?e.stop():e=new t(this),e.go(n,o),e}}(),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(e,t,n){return this._debouncers[e]=Polymer.Debounce.call(this,this._debouncers[e],t,n)},isDebouncerActive:function(e){var t=this._debouncers[e];return!(!t||!t.finish)},flushDebouncer:function(e){var t=this._debouncers[e];t&&t.complete()},cancelDebouncer:function(e){var t=this._debouncers[e];t&&t.stop()}}),Polymer.DomModule=document.createElement("habitlab-dom-module"),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepTemplate(),this._prepShady(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_initFeatures:function(){this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting()),this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors(),this._tryReady()},_marshalBehavior:function(e){}})},"./src/bower_components/polymer/polymer-mini.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer-micro.deps.js"),o(n("./src/bower_components/polymer/polymer-mini.html"),"bower_components/polymer/polymer-mini.html"),n("./src/bower_components/polymer/polymer-mini-0.js")},"./src/bower_components/polymer/polymer-mini.html":function(e,t){e.exports="<html><head><link rel=import href=polymer-micro.html><script src=polymer-mini-0.js><\/script> </head><body></body></html>"},"./src/bower_components/polymer/polymer.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer-mini.deps.js"),o(n("./src/bower_components/polymer/polymer.html"),"bower_components/polymer/polymer.html"),n("./src/bower_components/polymer/polymer-0.js")},"./src/bower_components/polymer/polymer.html":function(e,t){e.exports="<html><head><link rel=import href=polymer-mini.html><script src=polymer-0.js><\/script> </head><body></body></html>"},"./src/components/habitlab-habitlab-intervention-first-seen-info.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/polymer-themes/ice.deps.js"),n("./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.deps.js"),n("./src/bower_components/habitlab-paper-button/habitlab-paper-button.deps.js"),o(n("./src/components/habitlab-habitlab-intervention-first-seen-info.html"),"components/habitlab-habitlab-intervention-first-seen-info.html"),n("./src/components/habitlab-habitlab-intervention-first-seen-info.js")},"./src/components/habitlab-habitlab-intervention-first-seen-info.html":function(e,t){e.exports='<link rel=import href=../bower_components/polymer/polymer.html> <link rel=import href=../bower_components/polymer-themes/ice.html> <link rel=import href=../bower_components/habitlab-paper-toast/habitlab-paper-toast.html> <link rel=import href=../bower_components/habitlab-paper-button/habitlab-paper-button.html> <habitlab-dom-module id=habitlab-habitlab-intervention-first-seen-info> <template> <style>:host{z-index:9007199254740991}#intervention_name_display{margin-top:10px}.intervention-icon{align:center;height:50px;width:50px;margin-right:10px;border-radius:5px;box-shadow:2px 2px 2px #888}#sample_toast{width:350px;height:230px;z-index:9007199254740991;background-color:#f0f8ff;color:#000}#ok_button{height:38px;width:100%;text-transform:none;background-color:#415D67;color:#fff;margin:0 auto;box-shadow:2px 2px 2px #888}</style> <habitlab-paper-toast id=sample_toast text="" duration=0 vertical-align=top horizontal-align=right> <div>HabitLab rotates between different nudges each time you visit {{sitename}}. This is the first time you\'re seeing:</div> <div style=margin-top:10px;background-color:#383838;border-radius:5px;padding:5px;color:#fff> <div style=display:flex;align-items:center;align-content:center;justify-content:center> <img class=intervention-icon src={{get_intervention_icon_url()}} /> <h2 style=margin-right:25px;font-size:24px;color:#fff>{{intervention_name}}</h2> </div> <div style=display:flex;align-items:center;align-content:center;justify-content:center;padding-bottom:5px> <div style=text-align:center;font-size:11px;color:#fff>{{intervention_description}}</div> </div> </div> <div style=padding-top:10px></div> <habitlab-paper-button id=ok_button class=yellow-button on-click=ok_button_clicked>OK</habitlab-paper-button> </habitlab-paper-toast> </template> <script src=habitlab-habitlab-intervention-first-seen-info.js><\/script> </habitlab-dom-module>'},"./src/components/habitlab-habitlab-intervention-first-seen-info.js":function(e,t,n){const o=n("./src/libs_common/intervention_info.ls").get_intervention();Polymer({is:"habitlab-habitlab-intervention-first-seen-info",properties:{intervention_name:{type:String,value:null!=o?o.displayname:""},intervention_description:{type:String,value:null!=o?o.description:""},sitename:{type:String,value:null!=o?o.sitename_printable:""}},ready:function(){this.$$("#sample_toast").show()},ok_button_clicked:function(){this.$$("#sample_toast").hide()},get_intervention_icon_url:function(){let e;return e=null!=o.generic_intervention?"interventions/"+o.generic_intervention+"/icon.svg":1==o.custom?"icons/custom_intervention_icon.svg":"interventions/"+o.name+"/icon.svg",chrome.extension.getURL(e).toString()}})},"./src/components/habitlab-habitlab-intervention-first-seen-power.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/polymer-themes/ice.deps.js"),n("./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.deps.js"),n("./src/bower_components/habitlab-paper-button/habitlab-paper-button.deps.js"),n("./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.deps.js"),o(n("./src/components/habitlab-habitlab-intervention-first-seen-power.html"),"components/habitlab-habitlab-intervention-first-seen-power.html"),n("./src/components/habitlab-habitlab-intervention-first-seen-power.js")},"./src/components/habitlab-habitlab-intervention-first-seen-power.html":function(e,t){e.exports='<link rel=import href=../bower_components/polymer/polymer.html> <link rel=import href=../bower_components/polymer-themes/ice.html> <link rel=import href=../bower_components/habitlab-paper-toast/habitlab-paper-toast.html> <link rel=import href=../bower_components/habitlab-paper-button/habitlab-paper-button.html> <link rel=import href=../bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.html> <habitlab-dom-module id=habitlab-habitlab-intervention-first-seen-power> <template> <style>:host{z-index:9007199254740991}.intervention-icon{align:center;height:50px;width:50px;margin-right:10px;border-radius:5px;box-shadow:2px 2px 2px #888}#sample_toast{width:350px;height:270px;z-index:9007199254740991;background-color:#f0f8ff;color:#000}#ok_button{height:38px;width:100%;text-transform:none;background-color:#415D67;color:#fff;margin:0 auto;box-shadow:2px 2px 2px #888}</style> <habitlab-paper-toast id=sample_toast text="" duration=0 vertical-align=top horizontal-align=right> <div>HabitLab rotates between different nudges each time you visit {{sitename}}. This is the first time you\'re seeing:</div> <div style=margin-top:10px;background-color:#383838;border-radius:5px;padding:5px;color:#fff> <div style=display:flex;align-items:center;align-content:center;justify-content:center> <img class=intervention-icon src={{get_intervention_icon_url()}} /> <h2 style=margin-right:25px;font-size:24px;color:#fff>{{intervention_name}}</h2> </div> <div style=display:flex;align-items:center;align-content:center;justify-content:center;padding-bottom:5px> <div style=text-align:center;font-size:11px;color:#fff>{{intervention_description}}</div> </div> </div> <div style=padding-top:10px></div> <div style=display:flex;align-items:center;align-content:center;justify-content:center> <habitlab-paper-toggle-button id=future_visits_checkbox checked={{is_intervention_enabled}}>Show {{intervention_name}} on future visits</habitlab-paper-toggle-button> </div> <br> <habitlab-paper-button id=ok_button class=yellow-button on-click=ok_button_clicked>OK</habitlab-paper-button> </habitlab-paper-toast> </template> <script src=habitlab-habitlab-intervention-first-seen-power.js><\/script> </habitlab-dom-module>'},"./src/components/habitlab-habitlab-intervention-first-seen-power.js":function(e,t,n){const{intervention_first_seen_power_enabledisable:o,get_enabled_interventions:i}=n("./src/generated_libs/libs_frontend/intervention_utils.js"),r=n("./src/libs_common/intervention_info.ls").get_intervention();Polymer({is:"habitlab-habitlab-intervention-first-seen-power",properties:{intervention_name:{type:String,value:null!=r?r.displayname:""},intervention_description:{type:String,value:null!=r?r.description:""},sitename:{type:String,value:null!=r?r.sitename_printable:""},is_intervention_enabled:{type:Boolean,value:!0,observer:"is_intervention_enabled_changed"}},ready:async function(){this.$$("#sample_toast").show();let e=await i();null!=e&&null!=e[r.name]&&0==e[r.name]&&(this.is_intervention_enabled=!1),console.log("finished ready")},is_intervention_enabled_changed:async function(e,t){console.log("is_intervention_enabled_changed"),null!=t&&e!=t&&null!=r&&await o(r,e,window.location.href)},ok_button_clicked:function(){this.$$("#sample_toast").hide()},get_intervention_icon_url:function(){let e;return e=null!=r.generic_intervention?"interventions/"+r.generic_intervention+"/icon.svg":1==r.custom?"icons/custom_intervention_icon.svg":"interventions/"+r.name+"/icon.svg",chrome.extension.getURL(e).toString()}})},"./src/components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/polymer-themes/ice.deps.js"),n("./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.deps.js"),n("./src/bower_components/habitlab-paper-button/habitlab-paper-button.deps.js"),n("./src/bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.deps.js"),o(n("./src/components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.html"),"components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.html"),n("./src/components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.js")},"./src/components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.html":function(e,t){e.exports="<link rel=import href=../bower_components/polymer/polymer.html> <link rel=import href=../bower_components/polymer-themes/ice.html> <link rel=import href=../bower_components/habitlab-paper-toast/habitlab-paper-toast.html> <link rel=import href=../bower_components/habitlab-paper-button/habitlab-paper-button.html> <link rel=import href=../bower_components/habitlab-paper-toggle-button/habitlab-paper-toggle-button.html> <habitlab-dom-module id=habitlab-habitlab-intervention-suggestion-thisvisit-optout> <template> <style>:host{z-index:9007199254740991}#intervention_name_display{margin-top:10px}.intervention-icon{align:center;height:50px;width:50px;margin-right:10px;border-radius:5px;box-shadow:2px 2px 2px #888}#sample_toast{width:350px;height:280px;z-index:9007199254740991;background-color:#f0f8ff;color:#000}#ok_button{height:38px;width:100%;text-transform:none;background-color:#415D67;color:#fff;margin:0 auto;box-shadow:2px 2px 2px #888;margin-bottom:10px}</style> <habitlab-paper-toast id=sample_toast text=\"\" duration=0 vertical-align=top horizontal-align=right> <div>HabitLab rotates between different nudges each time you visit {{sitename}}. This is the first time you're seeing:</div> <div style=margin-top:10px;background-color:#383838;border-radius:5px;padding:5px;color:#fff> <div style=display:flex;align-items:center;align-content:center;justify-content:center> <img class=intervention-icon src={{get_intervention_icon_url()}} /> <h2 style=margin-right:25px;font-size:24px;color:#fff>{{intervention_name}}</h2> </div> <div style=display:flex;align-items:center;align-content:center;justify-content:center;padding-bottom:5px> <div style=text-align:center;font-size:11px;color:#fff>{{intervention_description}}</div> </div> <div style=display:flex;align-items:center;align-content:center;justify-content:center;padding-bottom:5px> <div style=text-align:center;font-size:11px;color:#fff>Difficulty: {{intervention_difficulty_printable}}</div> </div> </div> <div style=padding-top:10px></div> <habitlab-paper-button id=ok_button class=yellow-button on-click=no_button_clicked>No, I don't want this nudge</habitlab-paper-button> <br> <habitlab-paper-button id=ok_button class=yellow-button on-click=ok_button_clicked>OK</habitlab-paper-button> </habitlab-paper-toast> </template> <script src=habitlab-habitlab-intervention-suggestion-thisvisit-optout.js><\/script> </habitlab-dom-module>"},"./src/components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.js":function(e,t,n){const o=n("./src/libs_common/intervention_info.ls").get_intervention(),{log_intervention_suggestion_action:i,log_impression:r}=n("./src/libs_frontend/intervention_log_utils.ls"),{set_intervention_enabled:s,set_intervention_disabled:a}=n("./src/generated_libs/libs_frontend/intervention_utils.js");Polymer({is:"habitlab-habitlab-intervention-suggestion-thisvisit-optout",properties:{intervention_name:{type:String,value:null!=o?o.displayname:""},intervention_description:{type:String,value:null!=o?o.description:""},intervention_difficulty:{type:String,value:null!=o?o.difficulty:"medium"},intervention_difficulty_printable:{type:String,computed:"compute_intervention_difficulty_printable(intervention_difficulty)"},sitename:{type:String,value:null!=o?o.sitename_printable:""},isdemo:{type:Boolean,observer:"isdemo_changed"}},isdemo_changed:function(){this.isdemo&&this.show()},compute_intervention_difficulty_printable:function(e){let t="Medium";switch(e){case"easy":t="Easy";break;case"medium":t="Medium";break;case"hard":t="Hard"}return t},show:async function(){this.$$("#sample_toast").show(),await s(o.name),await r({suggestion:"true",optout:"true"})},ok_button_clicked:async function(){this.$$("#sample_toast").hide(),await r({suggestion:"true",suggestion_optout:"true",ok_clicked:"true"})},no_button_clicked:async function(){this.$$("#sample_toast").hide(),this.fire("disable_intervention"),await a(o.name),await i({action:"rejected",accepted:"false",optout:"false"})},get_intervention_icon_url:function(){let e;return e=null!=o.generic_intervention?"interventions/"+o.generic_intervention+"/icon.svg":1==o.custom?"icons/custom_intervention_icon.svg":"interventions/"+o.name+"/icon.svg",chrome.extension.getURL(e).toString()}})},"./src/components/habitlab-habitlab-intervention-suggestion-thisvisit.deps.js":function(e,t,n){const{import_dom_modules:o}=n("./src/libs_frontend/dom_utils.ls");n("./src/bower_components/polymer/polymer.deps.js"),n("./src/bower_components/polymer-themes/ice.deps.js"),n("./src/bower_components/habitlab-paper-toast/habitlab-paper-toast.deps.js"),n("./src/bower_components/habitlab-paper-button/habitlab-paper-button.deps.js"),o(n("./src/components/habitlab-habitlab-intervention-suggestion-thisvisit.html"),"components/habitlab-habitlab-intervention-suggestion-thisvisit.html"),n("./src/components/habitlab-habitlab-intervention-suggestion-thisvisit.js")},"./src/components/habitlab-habitlab-intervention-suggestion-thisvisit.html":function(e,t){e.exports="<link rel=import href=../bower_components/polymer/polymer.html> <link rel=import href=../bower_components/polymer-themes/ice.html> <link rel=import href=../bower_components/habitlab-paper-toast/habitlab-paper-toast.html> <link rel=import href=../bower_components/habitlab-paper-button/habitlab-paper-button.html> <habitlab-dom-module id=habitlab-habitlab-intervention-suggestion-thisvisit> <template> <style>:host{z-index:9007199254740991}#intervention_name_display{margin-top:10px}.intervention-icon{align:center;height:50px;width:50px;margin-right:10px;border-radius:5px;box-shadow:2px 2px 2px #888}#sample_toast{width:350px;height:280px;z-index:9007199254740991;background-color:#f0f8ff;color:#000}#ok_button{height:38px;width:100%;text-transform:none;background-color:#415D67;color:#fff;margin:0 auto;box-shadow:2px 2px 2px #888;margin-bottom:10px}#no_button{height:38px;width:100%;text-transform:none;background-color:#415D67;color:#fff;margin:0 auto;box-shadow:2px 2px 2px #888}</style> <habitlab-paper-toast id=sample_toast text=\"\" duration=0 vertical-align=top horizontal-align=right> <div>Here's a nudge you haven't yet tried. Would you like to try it this visit?</div> <div style=margin-top:10px;background-color:#383838;border-radius:5px;padding:5px;color:#fff> <div style=display:flex;align-items:center;align-content:center;justify-content:center> <img class=intervention-icon src={{get_intervention_icon_url()}} /> <h2 style=margin-right:25px;font-size:24px;color:#fff>{{intervention_name}}</h2> </div> <div style=display:flex;align-items:center;align-content:center;justify-content:center;padding-bottom:5px> <div style=text-align:center;font-size:11px;color:#fff>{{intervention_description}}</div> </div> <div style=display:flex;align-items:center;align-content:center;justify-content:center;padding-bottom:5px> <div style=text-align:center;font-size:11px;color:#fff>Difficulty: {{intervention_difficulty_printable}}</div> </div> </div> <div style=padding-top:10px></div> <div> <habitlab-paper-button id=ok_button class=yellow-button on-click=ok_button_clicked>Yes, try this nudge right now</habitlab-paper-button> <habitlab-paper-button id=no_button class=yellow-button on-click=no_button_clicked>No, I don't want this nudge</habitlab-paper-button> </div> </habitlab-paper-toast> </template> <script src=habitlab-habitlab-intervention-suggestion-thisvisit.js><\/script> </habitlab-dom-module>"},"./src/components/habitlab-habitlab-intervention-suggestion-thisvisit.js":function(e,t,n){const o=n("./src/libs_common/intervention_info.ls").get_intervention(),{log_intervention_suggestion_action:i,log_impression:r}=n("./src/libs_frontend/intervention_log_utils.ls"),{set_intervention_enabled:s}=n("./src/generated_libs/libs_frontend/intervention_utils.js");Polymer({is:"habitlab-habitlab-intervention-suggestion-thisvisit",properties:{intervention_name:{type:String,value:null!=o?o.displayname:""},intervention_description:{type:String,value:null!=o?o.description:""},intervention_difficulty:{type:String,value:null!=o?o.difficulty:"medium"},intervention_difficulty_printable:{type:String,computed:"compute_intervention_difficulty_printable(intervention_difficulty)"},sitename:{type:String,value:null!=o?o.sitename_printable:""},isdemo:{type:Boolean,observer:"isdemo_changed"}},isdemo_changed:function(){this.isdemo&&this.show()},compute_intervention_difficulty_printable:function(e){let t="Medium";switch(e){case"easy":t="Easy";break;case"medium":t="Medium";break;case"hard":t="Hard"}return t},ready:function(){},show:function(){this.$$("#sample_toast").show()},ok_button_clicked:async function(){this.$$("#sample_toast").hide(),this.fire("intervention_suggestion_accepted",{}),await i({action:"accepted",accepted:"true"}),await r({suggestion:"true"}),await s(o.name)},no_button_clicked:async function(){this.$$("#sample_toast").hide(),this.fire("intervention_suggestion_rejected",{}),await i({action:"rejected",accepted:"false"})},get_intervention_icon_url:function(){let e;return e=null!=o.generic_intervention?"interventions/"+o.generic_intervention+"/icon.svg":1==o.custom?"icons/custom_intervention_icon.svg":"interventions/"+o.name+"/icon.svg",chrome.extension.getURL(e).toString()}})},"./src/generated_libs/libs_frontend/intervention_first_impression_utils_backend.js":function(e,t,n){const{import_lib:o}=n("./src/libs_frontend/import_lib.ls");e.exports=o("intervention_first_impression_utils_backend")},"./src/generated_libs/libs_frontend/intervention_utils.js":function(e,t,n){const{import_lib:o}=n("./src/libs_frontend/import_lib.ls");e.exports=o("intervention_utils")},"./src/generated_libs/libs_frontend/log_utils.js":function(e,t,n){const{import_lib:o}=n("./src/libs_frontend/import_lib.ls");e.exports=o("log_utils")},"./src/interventions/youtube/prompt_before_watch/frontend.js":function(module,exports,__webpack_require__){async function habitlab_intervention_main_function(){Promise.all([__webpack_require__.e(0),__webpack_require__.e(2),__webpack_require__.e(3),__webpack_require__.e(4),__webpack_require__.e(1),__webpack_require__.e(5),__webpack_require__.e(36)]).then(async function(e){__webpack_require__("./src/libs_frontend/polymer_utils.ls").polymer_ext;Promise.resolve().then(async function(e){const t=__webpack_require__("./node_modules/jquery/dist/jquery.js"),{close_selected_tab:n}=__webpack_require__("./src/generated_libs/libs_frontend/tab_utils.js"),{once_available:o,on_url_change:i,wrap_in_shadow:r}=__webpack_require__("./src/libs_frontend/frontend_libs.ls"),{run_only_one_at_a_time:s}=__webpack_require__("./src/libs_common/common_libs.ls"),{get_seconds_spent_on_domain_today:a}=__webpack_require__("./src/libs_common/time_spent_utils.ls"),{log_action:l}=__webpack_require__("./src/libs_frontend/intervention_log_utils.ls");__webpack_require__("./src/components/habitlab-logo-v2.deps.js"),__webpack_require__("./src/components/call-to-action-button.deps.js"),__webpack_require__("./src/components/habitlab-positive-goal-site-button.deps.js"),__webpack_require__("./src/bower_components/habitlab-paper-button/habitlab-paper-button.deps.js");let c=null,p=!1,d=null;function h(){const e=document.querySelector("video:not(#rewardvideo)");e.paused||e.pause()}function u(){var e=t("#habitlab_video_overlay");return 0==e.length?t():t(e[0].shadow_div)}function f(...e){for(var n of e){var o=t(n);if(o.length>0)return o}return t()}function _(){var e=u();if(0==e.length)return!1;var t=f(".html5-video-player","video:not(#rewardvideo)","#player-api"),n=t.height(),o=t.width();if(0==n||0==o)return!1;e.width(o),e.height(n),e.css({"background-color":"white"}),e.css("z-index",100);const i=e[0];return i.style.left=t.offset().left+"px",i.style.top=t.offset().top+"px",!0}var m=null;function y(){var e=u();if(0==e.length)return!1;if(window.location.href.match(/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/)[1]!=function(){if(t("ytd-watch").length>0&&null!=t("ytd-watch").attr("video-id"))return t("ytd-watch").attr("video-id");if(t("ytd-watch-flexy").length>0&&null!=t("ytd-watch-flexy").attr("video-id"))return t("ytd-watch-flexy").attr("video-id");var e=t("#page");if(0==e.length)return"";var n=e[0].className.split(" ").filter(e=>e.startsWith("video-"));return 0==n.length?"":n[0].substr("video-".length)}())return!1;if(1==e.data("duration_set"))return clearInterval(m),m=null,!0;var n=t("video:not(#rewardvideo)");if(0==n.length)return;const o=Math.round(n[0].duration);if(!isNaN(o)){const t=Math.floor(o/60),n=o%60;return e.find("#message_text").html("This video is "+t+" minutes and "+n+" seconds long.<br>Are you sure you want to play it?"),clearInterval(m),m=null,e.data("duration_set",!0),!0}return!1}function b(e){if(window.intervention_disabled)return;var n=t("video:not(#rewardvideo)");if(0==n.length)return;if(0==n.width()||0==n.height())return;if(-1==window.location.href.indexOf("watch"))return;if(u().data("location")==window.location.href)return;var o=f(".html5-video-player","video:not(#rewardvideo)","#player-api");if(0==o.width()||0==o.height())return;t("#habitlab_video_overlay").remove();const i=t("<div>");t(document.body).append(t(r(i)).attr("id","habitlab_video_overlay")),i.css({position:"absolute",display:"table"}),i.data("location",window.location.href).data("duration_set",!1);const s=t("<div>").addClass("contentContainer").css({"text-align":"center",display:"table-cell","vertical-align":"middle"});s.append("<habitlab-logo-v2>"),s.append("<br><br>");const c=t("<h2>").attr("id","message_text").css("font-weight","normal");if(s.append(c),s.append(t("<br>")),Math.random()<1){const e=t('<call-to-action-button text="Close Youtube">');s.append(e)}else{const e=t("<habitlab-positive-goal-site-button>");s.append(e)}const p=t("<habitlab-paper-button>");p.text("Watch Video"),p.css({cursor:"pointer","background-color":"#415D67",color:"white","-webkit-font-smoothing":"antialiased","box-shadow":"2px 2px 2px #888888",height:"38px","margin-left":"10px"}),p.click(()=>{l({negative:"remainedOnYoutube"}),v(),p.hide()}),s.append(p),i.append(s),"begin"===e?function(){var e=u();e.data("duration_set")||e.find("#message_text").html('<span style="visibility: hidden">This video is XX minutes and XX seconds long.<br>Are you sure you want to play it?</span>'),m||(m=setInterval(y,100)),y()}():a("www.youtube.com").then(function(e){const n=Math.floor(e/60),o=e%60;(function(e){var n=t("#habitlab_video_overlay");return 0==n.length?t():t(n[0].shadow_div).find(e)})("#message_text").html("You've spent "+n+" minutes and "+o+" seconds on Youtube today. <br>Are you sure you want to continue watching videos?")})}function v(){p=!0,t("#habitlab_video_overlay").remove(),document.querySelector("video:not(#rewardvideo)").play()}function g(){t("#habitlab_video_overlay").remove()}var w=null;function P(){window.intervention_disabled||window.location.href!=w&&(w=window.location.href,null==d&&(p=!1,d=setInterval(()=>{if(p)return clearInterval(d),void(d=null);_(),h()},100)),g(),function(e){o("video:not(#rewardvideo)").then(function(){b(e)})}("begin"),null===c&&(c=setInterval(()=>{!function(){if(window.intervention_disabled)return;const e=document.querySelector("video:not(#rewardvideo)");e.currentTime>e.duration-.15&&!e.paused&&(clearInterval(c),c=null,h(),g(),b("end"),_())}()},100)))}function x(){null!=d&&(clearInterval(d),d=null),null!=c&&(clearInterval(c),c=null),"/watch"===location.pathname?P():g()}(document.body||document.documentElement).addEventListener("transitionend",e=>{"width"===e.propertyName&&"progress"===e.target.id&&x()},!0),o("video:not(#rewardvideo)",()=>{x()}),i(()=>{x()}),window.addEventListener("popstate",function(e){x()}),window.addEventListener("resize",function(e){_()}),window.on_intervention_disabled=(()=>{v()})}.bind(null,__webpack_require__)).catch(__webpack_require__.oe)}.bind(null,__webpack_require__)).catch(__webpack_require__.oe),window.debugeval=(x=>eval(x)),__webpack_require__("./src/libs_frontend/intervention_first_impression_utils.js").show_first_impression_notice_if_needed()}window.Polymer=window.Polymer||{},window.Polymer.dom="shadow","function"!=typeof window.wrap&&(window.wrap=null),__webpack_require__("./node_modules/enable-webcomponents-in-content-scripts/index.js"),async function(){let{get_is_suggestion_mode:e,get_is_suggestion_mode_optout:t,get_is_new_session:n}=__webpack_require__("./src/libs_common/intervention_info.ls");if(e()){if(t()){if(n()){__webpack_require__("./src/components/habitlab-habitlab-intervention-suggestion-thisvisit-optout.deps.js");let{append_to_body_shadow:e,once_body_available:t}=__webpack_require__("./src/libs_frontend/frontend_libs.ls");await t();let n=document.createElement("habitlab-habitlab-intervention-suggestion-thisvisit-optout");e(n,{zIndex:9007199254740991});setTimeout(function(){n.show()},5e3),habitlab_intervention_main_function()}}else if(n()){__webpack_require__("./src/components/habitlab-habitlab-intervention-suggestion-thisvisit.deps.js");let{append_to_body_shadow:e,once_body_available:t}=__webpack_require__("./src/libs_frontend/frontend_libs.ls");await t();let n=document.createElement("habitlab-habitlab-intervention-suggestion-thisvisit");e(n);n.show(),n.addEventListener("intervention_suggestion_accepted",function(){habitlab_intervention_main_function()})}}else habitlab_intervention_main_function()}()},"./src/libs_common/function_signatures.ls":function(e,t){var n,o,i,r,s,a,l=void 0!==t&&t||this;for(i in o={},n={log_utils:{addtolog:["name","data"],getlog:"name",clearlog:"name",add_log_habitlab_disabled:["data"],add_log_interventions:["data"],log_impression_internal:["name","data"],log_intervention_suggested_internal:["name","data"],log_intervention_suggestion_action_internal:["name","data"],log_disable_internal:["name","data"],log_action_internal:["name","data"],log_upvote_internal:["name","data"],log_downvote_internal:["name","data"],log_feedback_internal:["name","data"]},db_utils:{addtolist:["name","data"],getlist:"name",clearlist:"name",getvar:"key",setvar:["key","val"],addtovar:["key","val"],getkey_dictdict:["name","key","key2"],getdict_for_key_dictdict:["name","key"],getdict_for_key2_dictdict:["name","key2"]},intervention_first_impression_utils_backend:{show_firstimpression_message_for_intervention:"intervention_name"},intervention_utils:{set_intervention_enabled:"name",set_intervention_disabled:"name",set_intervention_disabled_permanently:"name",get_intervention_info:"intervention_name",intervention_first_seen_power_enabledisable:["intervention","is_enabled","url"],get_enabled_interventions:[],record_intensity_level_for_intervention:["intervention_name","generic_name","intensity"]},tab_utils:{close_selected_tab:[],open_url_in_new_tab:"url",get_selected_tab_id:[],close_tab_with_id:"tab_id"},history_utils:{get_pages_visited_today:[],get_pages_visited_all_time:[],get_work_pages_visited_today:[],get_productivity_classifications:[]},goal_utils:{get_goals:[],get_goal_target:["goal_name"],set_goal_target:["goal_name","target_value"],get_all_goal_targets:[],list_goal_info_for_enabled_goals:[],get_random_positive_goal:[],get_random_uncompleted_positive_goal:[],get_positive_enabled_goals:[],get_positive_enabled_uncompleted_goals:[],get_goal_info:["goal_name"],get_goal_statement:["goal_info"],accept_domain_as_goal_and_record:["domain"],reject_domain_as_goal_and_record:["domain"]},goal_progress:{get_progress_on_enabled_goals_this_week:[],get_whether_goal_achieved_today:[]},gamification_utils:{get_num_times_intervention_used:["intervention_name"],get_intervention_level:["intervention_name"],get_time_saved_total:[],get_time_saved_total_with_intervention:["intervention_name"],baseline_time_per_session_for_domain:["domain"],record_seconds_saved_and_get_rewards:["seconds","intervention_name","domain"]},disable_habitlab_utils:{disable_habitlab:[],enable_habitlab:[],is_habitlab_enabled:[]},session_utils:{is_on_same_domain_and_same_tab:"tab_id",is_on_same_domain:"tab_id"},screenshot_utils:{get_screenshot_as_base64:[],get_data_for_feedback:[]},fetch_page_utils:{fetch_page_text:"url"},ajax_utils:{post_json:["url","data"]},cacheget_utils:{localget:"url",localget_json:"url",localget_base64:"url",remoteget:"url",remoteget_json:"url",remoteget_base64:"url",systemjsget:"url"},favicon_utils:{get_favicon_data_for_domain:"domain"},debug_console_utils:{open_debug_page_for_tab_id:"tab_id"},notification_utils_backend:{make_notification_backend:["info","tab_id"],close_notification_backend:"notification_id"},persistent_storage_utils:{set_var:["key","val"],get_var:"key"},localization_utils_backend:{record_unlocalized_string:"text",record_localized_string:"text"},duolingo_utils:{get_duolingo_username:[],get_duolingo_info:[],get_duolingo_info_for_user:"username",get_duolingo_is_logged_in:[],wait_until_user_is_logged_in:"timeout"},streak_utils:{get_streak:"goal_info"},intervention_vars_backend:{getvar_intervention_synced_backend:["intervention_name","key"],setvar_intervention_synced_backend:["intervention_name","key","val"],getvar_intervention_unsynced_backend:["intervention_name","key"],setvar_intervention_unsynced_backend:["intervention_name","key","val"]},goal_vars_backend:{getvar_goal_synced_backend:["goal_name","key"],setvar_goal_synced_backend:["goal_name","key","val"],getvar_goal_unsynced_backend:["goal_name","key"],setvar_goal_unsynced_backend:["goal_name","key","val"]},intervention_feedback_utils:{upvote_intervention:"intervention_name",downvote_intervention:"intervention_name",add_feedback_for_intervention:["intervention_name","feedback_data"],get_num_upvotes_for_intervention:"intervention_name",get_num_downvotes_for_intervention:"intervention_name",get_feedback_for_intervention:"intervention_name"},intervention_session_vars_backend:{get_intervention_session_var_backend:["intervention_name","session_id","key"],set_intervention_session_var_backend:["intervention_name","session_id","key","val"]}})for(s in r=n[i])a=r[s],o[s]=a;l.list_functions_in_lib=function(e){return Object.keys(n[e])},l.list_libs=function(){return Object.keys(n)},l.get_function_signature=function(e){return o[e]}},"./src/libs_common/gexport.ls":function(e,t){var n=void 0!==t&&t||this;n.gexport=function(e){var t,n;if(null!=window.global_exports)for(t in e)n=e[t],window.global_exports[t]=n;else console.log("calling gexport but global_exports is not defined")},n.gexport_module=function(e,t){if(null!=window.global_exports)return window.global_exports["eval_"+e]=t,null==window.global_exports.gexport_eval_funcs&&(window.global_exports.gexport_eval_funcs={}),window.global_exports.gexport_eval_funcs[e]=t}},"./src/libs_common/intervention_info.ls":function(e,t){var n,o,i,r,s,a,l,c,p,d,h=void 0!==t&&t||this;n=null,h.set_intervention=function(e){return n=e},h.get_goal_name=function(){return o().goals[0]},h.get_intervention=o=function(){return null!=n?n:"undefined"!=typeof intervention&&null!==intervention?intervention:void 0},i=null,h.set_goal_info=function(e){return i=e},h.get_goal_info=function(){return null!=i?i:"undefined"!=typeof goal_info&&null!==goal_info?goal_info:void 0},r=null,h.set_tab_id=function(e){return r=e},h.get_tab_id=function(){return null!=r?r:"undefined"!=typeof tab_id&&null!==tab_id?tab_id:void 0},s=null,h.set_is_new_session=function(e){return s=e},h.get_is_new_session=function(){return null!=s?s:"undefined"!=typeof is_new_session&&null!==is_new_session&&is_new_session},a=null,h.set_is_preview_mode=function(e){return a=e},h.get_is_preview_mode=function(){return null!=a?a:"undefined"!=typeof is_preview_mode&&null!==is_preview_mode&&is_preview_mode},l=null,h.set_is_suggestion_mode=function(e){return l=e},h.get_is_suggestion_mode=function(){return null!=l?l:"undefined"!=typeof is_suggestion_mode&&null!==is_suggestion_mode&&is_suggestion_mode},c=null,h.set_is_suggestion_mode_optout=function(e){return c=e},h.get_is_suggestion_mode_optout=function(){return null!=c?c:"undefined"!=typeof is_suggestion_mode_optout&&null!==is_suggestion_mode_optout&&is_suggestion_mode_optout},p=null,h.set_is_previously_seen=function(e){return p=e},h.get_is_previously_seen=function(){return null!=p?p:"undefined"!=typeof is_previously_seen&&null!==is_previously_seen&&is_previously_seen},d=null,h.set_session_id=function(e){return d=e},h.get_session_id=function(){return null!=d?d:"undefined"!=typeof session_id&&null!==session_id?session_id:void 0}},"./src/libs_frontend/dom_utils.ls":function(module,exports){var import_dom_modules,recreateIronIconset,recreateDomModule,recreateStyle,recreateCustomStyle,recreateFileLocalStyle,recreateGlobalStyle,parseHTML,__get__,__set__,out$=void 0!==exports&&exports||this;null==window.file_local_styles&&(window.file_local_styles=[]),null==window.all_imported_custom_styles&&(window.all_imported_custom_styles=[]),null==window.all_imported_html_files&&(window.all_imported_html_files={}),out$.import_dom_modules=import_dom_modules=function(e,t){var n,o,i,r,s,a,l,c;if(n=null,"string"==typeof t&&(n=t,t={filename:t}),null==n||!window.all_imported_html_files[n])for(null==t&&(t={}),null!=n&&(window.all_imported_html_files[n]=!0),window.file_local_styles=[],i=0,r=(o=parseHTML(e)).length;i<r;++i)null!=(s=o[i])&&("habitlab-dom-module"===(a=s.nodeName.toLowerCase())?recreateDomModule(s,t):"habitlab-custom-style"===a&&"style"===(null!=(l=s.firstChild)&&null!=(c=l.nodeName)&&"function"==typeof c.toLowerCase?c.toLowerCase():void 0)?recreateCustomStyle(s.firstChild):"style"===a?recreateStyle(s):"habitlab-iron-iconset-svg"===a&&recreateIronIconset(s))},recreateIronIconset=function(e){var t,n,o,i,r,s,a;for((t=document.createElement(e.nodeName.toLowerCase())).innerHTML=e.innerHTML,n=0,i=(o=e.attributes).length;n<i;++n)s=(r=o[n]).name,a=r.value,t.setAttribute(s,a);"function"==typeof t.createdCallback&&t.createdCallback()},recreateDomModule=function(e,t){var n,o,i,r,s,a,l,c,p;for(n=document.createElement("habitlab-dom-module"),o=null,i=0,s=(r=e.children).length;i<s;++i)"template"===(a=r[i]).nodeName.toLowerCase()&&(o=a);for(l=[],i=0,s=(r=window.all_imported_custom_styles.concat(window.file_local_styles)).length;i<s;++i)c=r[i],l.push(c.innerHTML);l.length>0&&((p=document.createElement("style")).innerHTML=l.join("\n\n"),null!=o?o.content.insertBefore(p,o.content.firstChild):e.appendChild(p)),n.innerHTML=e.innerHTML,null!=t.tagname?n.id=t.tagname:n.id=e.id,"function"==typeof n.createdCallback&&n.createdCallback()},recreateStyle=function(e){"habitlab-custom-style"===e.getAttribute("is")?recreateCustomStyle(e):recreateFileLocalStyle(e)},recreateCustomStyle=function(e){window.all_imported_custom_styles.push(e)},recreateFileLocalStyle=function(e){window.file_local_styles.push(e)},recreateGlobalStyle=function(e){},parseHTML=function(e){var t;return(t=document.implementation.createHTMLDocument()).body.innerHTML=e,t.body.children},out$.__get__=__get__=function(name){return eval(name)},out$.__set__=__set__=function(name,val){return eval(name+" = val")}},"./src/libs_frontend/frontend_libs.ls":function(module,exports,__webpack_require__){var ref$,gexport,gexport_module,getUrlParameters,sleep,once_available,once_available_fast,once_available_multiselect,once_body_available,on_url_change,on_url_change_not_from_history,to_camelcase_string,to_camelcase_dict,create_shadow_div,wrap_in_shadow,create_shadow_div_on_body,append_to_body_shadow,out$=void 0!==exports&&exports||this;function import$(e,t){var n={}.hasOwnProperty;for(var o in t)n.call(t,o)&&(e[o]=t[o]);return e}ref$=__webpack_require__("./src/libs_common/gexport.ls"),gexport=ref$.gexport,gexport_module=ref$.gexport_module,out$.getUrlParameters=getUrlParameters=function(){var e,t,n;return-1!==(t=(e=window.location.href).lastIndexOf("#"))&&(e=e.slice(0,t)),n={},e.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(e,t,o){return n[t]=decodeURIComponent(o).split("+").join(" ")}),n},out$.sleep=sleep=async function(e){return new Promise(function(t){return setTimeout(t,e)})},out$.once_available=once_available=async function(e,t){var n;for(n=document.querySelector(e);null==n;)n=document.querySelector(e),await sleep(100);return null!=t&&t(n),n},out$.once_available_fast=once_available_fast=async function(e,t){var n;for(n=document.querySelector(e);null==n;)n=document.querySelector(e),await sleep(30);return null!=t&&t(n),n},out$.once_available_multiselect=once_available_multiselect=async function(e,t){var n;for(n=document.querySelectorAll(e);!(n.length>0);)n=document.querySelectorAll(e),await sleep(100);return null!=t&&t(n),n},out$.once_body_available=once_body_available=async function(e){for(;null==document.body;)await sleep(30);null!=e&&e()},out$.on_url_change=on_url_change=function(e){var t;return t=window.location.href,chrome.runtime.onMessage.addListener(function(n,o,i){var r,s;if(r=n.type,s=n.data,"navigation_occurred"===r&&s.url!==t)return t=s.url,e()})},out$.on_url_change_not_from_history=on_url_change_not_from_history=function(e){var t;return t=window.location.href,chrome.runtime.onMessage.addListener(function(n,o,i){var r,s;if(r=n.type,s=n.data,"navigation_occurred"===r){if(s.is_from_history)return;if(s.url!==t)return console.log("data.url is: "+s.url),console.log("prev_url in loc 2 is: "+t),t=s.url,e()}})},to_camelcase_string=function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},to_camelcase_dict=function(e){var t,n,o;for(n in t={},e)o=e[n],t[to_camelcase_string(n)]=o;return t},out$.create_shadow_div=create_shadow_div=function(e){var t,n,o,i,r,s,a;for(o in null==e&&(e={}),null!=e.shadow_div?(t=e.shadow_div,delete e.shadow_div):t=document.createElement("div"),e=to_camelcase_dict(e),n={fontFamily:'Verdana, Geneva, Tahoma, "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif',position:"static",zIndex:2147483646,fontSize:"14px",lineHeight:1,padding:"0px",margin:"0px",opacity:1,boxSizing:"content-box"})i=n[o],e[o]=null!=(r=e[o])?r:i;for(o in a=(s=document.createElement("div")).createShadowRoot(),e)i=e[o],t.style[o]=i;return a.appendChild(t),t.shadow_root=a,t.shadow_host=s,s.shadow_root=a,s.shadow_div=t,t},out$.wrap_in_shadow=wrap_in_shadow=function(e,t){return null!=e.length&&e.length>0&&(e=e[0]),(t=import$({},t)).shadow_div=e,create_shadow_div(t),e.shadow_host},out$.create_shadow_div_on_body=create_shadow_div_on_body=function(e){var t,n;return null==e&&(e={}),e.position=null!=(t=e.position)?t:"fixed",n=create_shadow_div(e),document.body.appendChild(n.shadow_host),n},out$.append_to_body_shadow=append_to_body_shadow=function(e,t){var n,o;return null==t&&(t={}),t.position=null!=(n=t.position)?n:"fixed",o=create_shadow_div_on_body(t),null!=e.length&&e.length>0&&(e=e[0]),o.appendChild(e),o},gexport_module("frontend_libs",function(it){return eval(it)})},"./src/libs_frontend/import_lib.ls":function(e,t,n){var o,i,r,s,a,l=void 0!==t&&t||this;o=n("./src/libs_common/function_signatures.ls"),i=o.list_functions_in_lib,r=o.get_function_signature,l.import_lib=function(e){var t,n,o,r,s;for(t={},n=0,r=(o=i(e)).length;n<r;++n)t[s=o[n]]=a(s);return t},s=function(e,t){return new Promise(function(n){return chrome.runtime.sendMessage({type:e,data:t},n),!0})},l.import_func=a=function(e){var t;if(null==(t=r(e)))throw new Error("need to add function signature for function "+e+" to libs_common/function_signatures.ls");if("string"!=typeof t&&!Array.isArray(t))throw new Error("invalid signature "+JSON.stringify(t)+" for function "+e+" in libs_common/function_signatures.ls");if(Array.isArray(t))return async function(){var n,o,i,r,a,l,c,p;for(o=[],i=0,r=arguments.length;i<r;++i)o.push(arguments[i]);for(n=o,a={},i=0,c=(l=t).length;i<c;++i)p=i,a[l[i]]=n[p];return await s(e,a)};if("string"==typeof t)return async function(t){return await s(e,t)};throw new Error("import_func failed for function "+e+" with signature "+JSON.stringify(t))}},"./src/libs_frontend/intervention_first_impression_utils.js":function(e,t,n){async function o(){n("./src/components/habitlab-habitlab-intervention-first-seen-power.deps.js"),n("./src/libs_frontend/frontend_libs.ls").append_to_body_shadow(document.createElement("habitlab-habitlab-intervention-first-seen-power"),{zIndex:2147483647})}async function i(){n("./src/components/habitlab-habitlab-intervention-first-seen-info.deps.js"),n("./src/libs_frontend/frontend_libs.ls").append_to_body_shadow(document.createElement("habitlab-habitlab-intervention-first-seen-info"),{zIndex:2147483647})}e.exports={show_first_impression_notice_if_needed:async function(){const{get_intervention:e,get_is_preview_mode:t,get_is_suggestion_mode:r,get_is_previously_seen:s,get_is_new_session:a}=n("./src/libs_common/intervention_info.ls"),l=e();if(r())return;if(t())return;if(s())return;if(!a())return;let c=l.name;null!=l.generic_intervention&&(c=l.generic_intervention);const{show_firstimpression_message_for_intervention:p}=n("./src/generated_libs/libs_frontend/intervention_first_impression_utils_backend.js");let d=await p(c);"generic/toast_notifications"==c?setTimeout(function(){"power"==d?o():"info"==d&&i()},5e3):setTimeout(function(){"power"==d?o():"info"==d&&i()},500)}}},"./src/libs_frontend/intervention_log_utils.ls":function(e,t,n){var o,i,r,s,a,l,c,p,d,h,u=void 0!==t&&t||this;o=n("./src/libs_common/intervention_info.ls"),i=o.get_intervention,r=o.get_tab_id,s=o.get_session_id,a=o.get_is_new_session,l=o.get_is_preview_mode,c=o.get_is_suggestion_mode,p=o.get_is_previously_seen,d=n("./src/generated_libs/libs_frontend/log_utils.js"),h=function(e){return null==e&&(e={}),e.url=window.location.href,e.tab_id=r(),e.session_id=s(),e.is_new_session=a(),e.is_preview_mode=l(),e.is_suggestion_mode=c(),e.is_previously_seen=p(),e},u.log_impression=async function(e){return e=h(e),await d.log_impression_internal(i().name,e)},u.log_intervention_suggested=async function(e){return e=h(e),await d.log_intervention_suggested_internal(i().name,e)},u.log_intervention_suggestion_action=async function(e){return e=h(e),await d.log_intervention_suggestion_action_internal(i().name,e)},u.log_disable=async function(e){return e=h(e),await d.log_disable_internal(i().name,e)},u.log_action=async function(e){return e=h(e),await d.log_action_internal(i().name,e)},u.log_upvote=async function(e){return e=h(e),await d.log_upvote_internal(i().name,e)},u.log_downvote=async function(e){return e=h(e),await d.log_downvote_internal(i().name,e)},u.log_feedback=async function(e){return e=h(e),await d.log_feedback_internal(i().name,e)}},35:function(e,t,n){e.exports=n("./src/interventions/youtube/prompt_before_watch/frontend.js")}});