text: //
  //     custom-elements-builder 0.2.2 http://tmorin.github.io/custom-elements-builder
  //     Custom Elements Builder (ceb) is ... a builder for Custom Elements.
  //     Buil date: 2015-02-06
  //     Copyright 2015-2015 Thibault Morin
  //     Available under MIT license
  //
  
  !function(a,b){"use strict";"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define("ceb",[],b):a.ceb=b()}(this,function(){"use strict";function a(){return function(){}}function b(a){return Object.keys(a).map(function(b){return a[b]})}function c(a){return a.split(/(?=[A-Z])/).map(function(a){return a.charAt(0).toLowerCase()+a.slice(1)}).join("-")}function d(a,b){return a.level-b.level}function e(a,b,c,d){d?c&&!a.hasAttribute(b)?a.setAttribute(b,""):!c&&a.hasAttribute(b)&&a.removeAttribute(b):null!==c&&void 0!==c||!a.hasAttribute(b)?null!==c&&void 0!==c&&a.getAttribute(b)!==c&&a.setAttribute(b,c):a.removeAttribute(b)}function f(a,b,c){var e=a.sort(d);return function(){var a=this;return e.reduce(function(b,d){return d.bind(a,b,a,c)},b.bind(a,a,c)).apply(a,arguments)}}function g(a,b,c){return function(d,f,g){var h=g;b&&(h=b.call(d,d,f,g)),e(d,a,h,c)}}function h(a,b,c){return function(d,e){var f=c?d.hasAttribute(a):d.getAttribute(a);return b&&(f=b.call(d,d,e,f)),f}}function i(a,b){var c=a.sort(d);return function(){var a=this;return c.reduce(function(b,c){return c.bind(a,function(c){return b.apply(a,Array.prototype.slice.call(c).slice(2,c.length))},a)},b.bind(a,a)).apply(a,arguments)}}function j(b){return b.prototype=b.prototype||Object.create(HTMLElement.prototype),b.features=b.features||[],b.interceptors=b.interceptors||[],b.wrappers=b.wrappers||[],b.listeners=b.listeners||[],b.properties=b.properties||{},b.methods=Object.assign({createdCallback:a(),attachedCallback:a(),detachedCallback:a(),attributeChangedCallback:a()},b.methods),b}function k(a){var b=u(a.tagName,{struct:a,registered:!0});a.features.sort(d).forEach(function(c){c.fn&&c.fn.setup&&c.fn.setup(a,b,c.options)})}function l(a){return b(a.properties).filter(function(a){return a.attName}).reduce(function(a,b){return a[b.attName]=b,a},{})}function m(a){return b(a.properties).map(function(b){var c={configurable:!1,enumerable:!0};if(b.attribute?(b.set=g(b.attName,b.setter,!!b.attribute["boolean"]),b.get=h(b.attName,b.getter,!!b.attribute["boolean"])):b.hasOwnProperty("value")&&b.hasOwnProperty("writable")&&!b.writable?(c.value=b.value,c.writable=!1,b.hasOwnProperty("enumerable")&&(c.enumerable=b.enumerable)):b.set||b.get||(c.writable=!0),!c.hasOwnProperty("writable")){var d=a.interceptors[b.propName]||{};if(b.set){var e=d.set||[];c.set=f(e,b.set,b.propName)}if(b.get){var i=d.get||[];c.get=f(i,b.get,b.propName)}}return Object.assign(b,{definedProperty:c})}).reduce(function(a,b){return a[b.propName]=b.definedProperty,a},{})}function n(a){return Object.keys(a.methods).map(function(b){var c=a.wrappers[b]||[],d=a.methods[b];return{methName:b,fn:i(c,d)}}).reduce(function(a,b){return a[b.methName]=b.fn,a},{})}function o(a){j(a),k(a),a.attributes=l(a);var b=m(a);Object.defineProperties(a.prototype,b);var c=n(a);return Object.assign(a.prototype,c),document.registerElement(a.tagName,a)}function p(a,b,c,d,f){b(f);var g=c.querySelector(a.delegate.target);if(g){var h=a.delegate.property,i=a.delegate.attribute;h||i||(h=a.propName,i=a.attName);var j=a.attribute&&!!a.attribute["boolean"];a.delegate.hasOwnProperty("boolean")&&(j=a.delegate["boolean"]),i?e(g,i,f,j):g[h]=f}}function q(a,b,c,d,e){var f=b(e),g=c.querySelector(a.delegate.target);if(g){var h=a.delegate.property,i=a.delegate.attribute;h||i||(h=a.propName,i=a.attName);var j=a.attribute&&!!a.attribute["boolean"];a.delegate.hasOwnProperty("boolean")&&(j=a.delegate["boolean"]),f=i?j?g.hasAttribute(i):g.getAttribute(i):g[h]}return f}function r(a,b,c){b(a,c)}function s(){return{properties:{},methods:{},wrappers:[],interceptors:[],listeners:[],features:[{fn:w}]}}function t(a){return a.attribute&&(a.attName=c(a.attribute.name||a.propName)),a.writable=a.hasOwnProperty("writable")?a.writable:!0,a}function u(a,b){var c=b&&b.struct?j(b.struct):s();c.tagName=a;var d=b&&b.hasOwnProperty("registered")?b.registered:!1,e={};return e.wrap=function(a,b,d){return c.wrappers[a]||(c.wrappers[a]=[]),b.level=isNaN(d)?0:d,c.wrappers[a].push(b),e},e.intercept=function(a,b,d,f){return c.interceptors[a]||(c.interceptors[a]={set:[],get:[]}),b&&(b.level=isNaN(f)?0:f,c.interceptors[a].set.push(b)),d&&(d.level=isNaN(f)?0:f,c.interceptors[a].get.push(d)),e},e["extends"]=function(a){return c["extends"]=a,e},e.prototype=function(a){return c.prototype=a,e},e.properties=function(a){var b=Object.keys(a).map(function(b){return Object.assign(a[b],{propName:b})}).map(t).reduce(function(a,b){return a[b.propName]=b,a},{});return Object.assign(c.properties,b),e},e.methods=function(a){return Object.assign(c.methods,a),e},e.listen=function(a,b){return a.trim().split(",").map(function(a){var c=a.trim().split(" ");return{event:c[0].trim(),target:(c[1]||"").trim(),fn:b}}).forEach(function(a){c.listeners.push(a)}),e},e.feature=function(a,b,d){return c.features.push({fn:a,options:b||{},level:isNaN(d)?0:d}),e},e.register=function(){return d?void 0:(d=!0,o(c))},e.get=function(){return c},e}function v(a){var b={};return b.name=function(b){return u(b,a)},b}"assign"in Object||Object.defineProperty(Object,"assign",{configurable:!0,enumerable:!1,writable:!0,value:function(){return Array.prototype.reduce.call(arguments,function(a,b){return Object.keys(Object(b)).reduce(function(a,c){return a[c]=b[c],a},a)})}});var w=a();return w.setup=function(c,d){b(c.properties).filter(function(a){return a.delegate}).forEach(function(b){b.attName||(b.set=b.set||a(),b.get=b.get||a()),d.intercept(b.propName,p.bind(this,b),q.bind(this,b))}),d.wrap("createdCallback",function(a,d){a(arguments),b(c.properties).filter(function(a){return!d.hasAttribute(a.attName)}).forEach(function(a){a.hasOwnProperty("value")&&a.writable?d[a.propName]=a.value:a.valueFactory&&(d[a.propName]=a.valueFactory(d))})}),d.wrap("createdCallback",function(a,d){a(arguments),b(c.properties).filter(function(a){return d.hasAttribute(a.attName)}).forEach(function(a){d[a.propName]=a.attribute["boolean"]?!0:d.getAttribute(a.attName)})},Number.MAX_VALUE),d.wrap("attachedCallback",function(a,b){a(arguments),b.__eventHandlers=c.listeners.map(function(a){var c=a.target?b.querySelector(a.target):b,d=r.bind(b,b,a.fn);return c.addEventListener(a.event,d,!0),{event:a.event,target:c,callback:d}})}),d.wrap("detachedCallback",function(a,b){(b.__eventHandlers||[]).forEach(function(a){a.target.removeEventListener(a.event,a.callback,!0)}),b.__eventHandlers=null,a(arguments)}),d.wrap("attributeChangedCallback",function(a,b,d,e,f){var g=c.attributes[d];if(g){var h=f;g.attribute["boolean"]&&(h="string"==typeof f?!0:!1),b[g.propName]!==h&&(b[g.propName]=h)}a(arguments)})},v});
  //# sourceMappingURL=ceb.min.js.map