-
Notifications
You must be signed in to change notification settings - Fork 25
/
polymer-ts.min.js
2 lines (2 loc) · 3.97 KB
/
polymer-ts.min.js
1
2
function component(e,t){return function(r){r.prototype.is=e,void 0!==t&&(r.prototype.extends=t)}}function extend(e){return function(t){t.prototype.extends=e}}function template(e){return function(t){t.prototype.template=e}}function style(e){return function(t){t.prototype.style=e}}function hostAttributes(e){return function(t){t.prototype.hostAttributes=e}}function property(e){return function(t,r){if(t.properties=t.properties||{},"function"==typeof t[r]){var o=e.computed,s="get_computed_"+r;e.computed=s+"("+o+")",t.properties[r]=e,t[s]=t[r]}else{var n=t.properties[r];t.properties[r]=e||{},n&&n.observer&&(t.properties[r].observer=n.observer)}}}function computed(e){return function(t,r){t.properties=t.properties||{};var o=e||{},s="get_computed_"+r,n=t[r].toString(),i=n.indexOf("("),p=n.indexOf(")"),a=n.substring(i+1,p);o.computed=s+"("+a+")",t.properties[r]=o,t[s]=t[r]}}function listen(e){return function(t,r){t.listeners=t.listeners||{},t.listeners[e]=r}}function behavior(e){if(e)return function(t){if("function"==typeof t){t.prototype.behaviors=t.prototype.behaviors||[];var r=void 0===e.prototype?e:e.prototype;t.prototype.behaviors.push(r)}else{t.behaviors=t.behaviors||[];var r=void 0===e.prototype?e:e.prototype;t.behaviors.push(r)}};throw new Error("@behavior not found; value is "+e)}function observe(e){if(e)return e.indexOf(",")>0||e.indexOf(".")>0?function(t,r){t.observers=t.observers||[],t.observers.push(r+"("+e+")")}:function(t,r){t.properties=t.properties||{};var o=t.properties[e];o&&o.observer&&console.warn("PolymerTS: simple observer '"+o.observer+"' already registered for property '"+e+"'; overwriting with new observer '"+r+"'"),t.properties[e]=t.properties[e]||{},t.properties[e].observer=r};throw new Error("@observe properties not found; value is "+e)}var polymer;!function(e){function t(){var t=function(){};window.polymer.Base=t,t.create=function(){throw"element not yet registered in Polymer"},t.register=function(t){!0===t?e.createClass(this):e.createElement(this)}}function r(e){function t(e,r){void 0!==r&&null!==r&&(Object.keys(r).map(function(t){e.hasOwnProperty(t)||(e[t]=r[t])}),t(e,r.__proto__))}if(void 0===e.prototype.is){var r=e.prototype,o=new e;if(!o.is)throw new Error("no name for "+e);r.is=o.is,o.extends&&(r.extends=o.extends),o.properties&&(r.properties=o.properties),o.listeners&&(r.listeners=o.listeners),o.observers&&(r.observers=o.observers),o.behaviors&&(r.behaviors=o.behaviors),o.hostAttributes&&(r.hostAttributes=o.hostAttributes),o.style&&(r.style=o.style),o.template&&(r.template=o.template)}var s=e.prototype;if(s.$custom_cons=function(){var t=this.$custom_cons_args;e.apply(this,t)},s.$custom_cons_args=[],void 0!==s.factoryImpl)throw"do not use factoryImpl() use constructor() instead";s.factoryImpl=function(){this.$custom_cons_args=arguments};var n=s.attached;return s.attached=function(){this.$custom_cons(),void 0!==n&&n.apply(this)},t(s,e.prototype.__proto__),delete s.style,s}function o(e){var t=document.createElement("dom-module"),r=e.prototype;t.id=r.is;var o="",s="";void 0!==r.style&&(s="<style>"+r.style+"</style>"),void 0!==r.template&&(o="<template>"+s+r.template+"</template>"),t.innerHTML=o,t.createdCallback()}function s(t){if(e.isRegistered(t))throw"element already registered in Polymer";void 0===t.prototype.template&&void 0===t.prototype.style||e.createDomModule(t);var r=Polymer(e.prepareForRegistration(t));return t.create=function(){var e=Object.create(r.prototype);return r.apply(e,arguments)},r}function n(t){if(e.isRegistered(t))throw"element already registered in Polymer";void 0===t.prototype.template&&void 0===t.prototype.style||e.createDomModule(t);var r=Polymer.Class(e.prepareForRegistration(t));return t.create=function(){var e=Object.create(r.prototype);return r.apply(e,arguments)},r}function i(e){return void 0!==e.prototype.$custom_cons}e.createEs6PolymerBase=t,e.prepareForRegistration=r,e.createDomModule=o,e.createElement=s,e.createClass=n,e.isRegistered=i}(polymer||(polymer={})),polymer.createEs6PolymerBase();
//# sourceMappingURL=polymer-ts.min.js.map