Comparing version 0.6.0 to 0.6.1
@@ -1,3 +0,3 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.hybrids=t():e.hybrids=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=39)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=t.error=void 0;var r=n(8),o=new r.Debug("[@hybrids/engine]"),i=o.error,u=o.warning;t.error=i,t.warning=u},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return function(){s||(0,f.error)(ReferenceError,"proxy: Illegal invocation of '%fn'",{fn:e.name});for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(void 0,[s].concat(n))}}function i(e,t){var n=s;s=e;var r=t();return s=n,r}function u(e){s||(0,f.error)(ReferenceError,"proxy: Illegal invocation of '%fn'",{fn:e.name});var t=s;return function(){return i(t,e)}}function a(e,t){l.set(e,t)}function c(e){for(var t=e.prototype;t;)p.has(t)||(p.add(t),Object.getOwnPropertyNames(t).forEach(function(e){if("constructor"!==e){var n=Object.getOwnPropertyDescriptor(t,e);n.value&&"function"==typeof n.value?!function(){var o=n.value,u=r({},e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(l.get(this),o.bind.apply(o,[this].concat(t)))});n.value=u[e],Object.defineProperty(t,e,n)}():n.get&&!function(){var r=n.get,o=n.set;n.get=function(){var e=this;return i(l.get(this),function(){return r.call(e)})},n.set&&(n.set=function(e){var t=this;return i(l.get(this),function(){return o.call(t,e)})}),Object.defineProperty(t,e,n)}()}})),t=Object.getPrototypeOf(t),t===Object.prototype&&(t=null)}Object.defineProperty(t,"__esModule",{value:!0}),t.injectable=o,t.callWithContext=i,t.resolve=u,t.mapInstance=a,t.proxy=c;var f=n(2),s=null,l=new WeakMap,p=new WeakSet},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=t.error=void 0;var r=n(8),o=new r.Debug("[@hybrids/core]"),i=o.error,u=o.warning;t.error=i,t.warning=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CONTROLLER=Symbol("controller"),t.PLUGINS=Symbol("plugins"),t.OPTIONS=Symbol("options")},function(e,t,n){"use strict";function r(e,t,n){var r=Object.assign({bubbles:!0,cancelable:!1},n),o=void 0;document.createEvent?(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,r.bubbles,r.cancelable,r.detail)):o=new CustomEvent(t,r),e.dispatchEvent(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=r;var o=n(1);t.default=(0,o.injectable)(r)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=[],n=e.split("").reduce(function(e,n){switch(n){case".":return t.push({property:e,proto:{}}),"";case"[":return t.push({property:e,proto:[]}),"";case"]":return e;default:return e+n}},"");return t.push({property:n}),t}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),c=function(){function e(t){r(this,e),t||(0,a.error)(TypeError,"path: Path cannot be empty"),"object"===("undefined"==typeof t?"undefined":i(t))?Object.assign(this,t):(this.evaluate=t,"()"===t.substr(-2)?(t=t.substr(0,t.length-2),this.isComputed=!0):this.isComputed=!1,this.path=o(t))}return u(e,[{key:"get",value:function(e){var t=this,n=e;return this.path.every(function(e){var r=e.property,o=e.proto;return n=n[r],!n||!o||n instanceof Object||(0,a.error)(TypeError,"path: "+(t.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be an object: %type",{evaluate:t.evaluate,property:r,type:"undefined"==typeof n?"undefined":i(n)}),n}),n}},{key:"set",value:function(e,t){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.path.reduce(function(e,t){var r=t.property,o=t.proto;return o?(e.context[r]?e.context[r]instanceof Object||(0,a.error)(TypeError,"path: "+(n.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be an object: %type",{evaluate:n.evaluate,property:r,type:i(e.context[r])}):e.context[r]=o.constructor(),e.context=e.context[r]):e.property=r,e},{context:e});return(r||void 0===o.context[o.property])&&(o.context[o.property]=t),o.context[o.property]}},{key:"call",value:function(e){var t,n=this,r=this.path.reduce(function(e,t){var r=t.property,o=t.proto;return o?(e.context=e.context[r],e.context instanceof Object||(0,a.error)(TypeError,"path: "+(n.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be an object: %type",{evaluate:n.evaluate,property:r,type:i(e.context)})):e.property=r,e},{context:e}),o=i(r.context[r.property]);"function"!==o&&(0,a.error)(TypeError,"path: "+(this.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be a function: %type",{evaluate:this.evaluate,property:r.property,type:o});for(var u=arguments.length,c=Array(u>1?u-1:0),f=1;f<u;f++)c[f-1]=arguments[f];return(t=r.context)[r.property].apply(t,c)}},{key:"delete",value:function(e){var t={context:e,property:this.path[0].property};this.path.some(function(n){var r=n.property;return!{}.hasOwnProperty.call(e,r)||(Object.keys(e).length>1&&(t={context:e,property:r}),e=e[r],!1)}),delete t.context[t.property]}},{key:"rootProperty",get:function(){return this.path[0].property}},{key:"isNestedProperty",get:function(){return this.path.length>1}}]),e}();t.default=c},function(e,t,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}function i(e,t){switch(t){case"string":return String(e);case"number":return Number(e);case"boolean":return Boolean(e);case"object":var n="undefined"==typeof e?"undefined":c(e);switch(n){case"object":return null!==e?Object(e):null;case"string":try{var r=JSON.parse(e);if("object"===("undefined"==typeof r?"undefined":c(r)))return r;throw new TypeError}catch(e){return(0,f.error)(e,"reflect property: Invalid type coercion: '%valueType' to '%type'",{valueType:n,type:t})}default:return(0,f.error)(TypeError,"reflect property: Invalid type coercion: '%valueType' to '%type'",{valueType:n,type:t})}case"undefined":return e;default:var o="undefined"==typeof e?"undefined":c(e);return o===t?e:(0,f.error)(TypeError,"reflect property: Invalid type coercion: '%valueType' to '%type'",{valueType:o,type:t})}}function u(e){var t="undefined"==typeof e?"undefined":c(e);switch(t){case"string":return{property:e,attr:r(e)};case"object":var n=Object.assign({attr:!0},e);return n.attr&&(n.attr=n.attr!==!0?n.attr:r(n.property)),n;default:return(0,f.error)(TypeError,"normalize property: Property description must be an object or string: %type",{type:t})}}function a(e){s||(s=[],Promise.resolve().then(function(){for(;s[0];){var e=s.shift();e()}s=null})),s.unshift(e)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.camelToDash=r,t.dashToCamel=o,t.reflectValue=i,t.normalizeProperty=u,t.queue=a;var f=n(2),s=void 0},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(23);Object.defineProperty(t,"Debug",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=y.get(e);return n&&n.has(t)?o({},""+p+t,n.get(t)):e.parentElement?i(e.parentElement,t):{}}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=y.get(e);return n&&n.forEach(function(e,n){({}).hasOwnProperty.call(t,n)||(t[n]=e)}),e.parentElement?u(e.parentElement,t):t}function a(e,t){var n=y.get(e);n||(n=new Map,y.set(e,n)),Object.keys(t).forEach(function(e){n.set(e,t[e])})}function c(e){var t=y.get(e);if(t){var n=function(){var e={};return t.forEach(function(t,n){return e[n]=t}),{v:e}}();if("object"===("undefined"==typeof n?"undefined":s(n)))return n.v}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.LOCALS_PREFIX=void 0;var f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.defineLocals=a,t.getOwnLocals=c;var l=n(0),p=t.LOCALS_PREFIX="$",y=new WeakMap,d=function(){function e(t,n,o){var u=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];r(this,e),this.node=t,this.path=o,this.filters=a,this.path.rootProperty[0]===p?!function(){var e=u.path.rootProperty.substr(1);Object.defineProperty(u,"context",{get:function(){return i(u.node,e)}}),u.path.isNestedProperty||(u.set=function(){(0,l.error)(TypeError,"expression: Local variable '%local' is readonly",{local:e})})}():this.context=n}return f(e,[{key:"applyFilters",value:function(e){return this.filters.reduce(function(e,t){return t(e)},e)}},{key:"get",value:function(e){if(this.isComputed){var t=u(this.node,e);return this.applyFilters(this.path.call(this.context,t))}return this.applyFilters(this.path.get(this.context))}},{key:"set",value:function(e,t){this.path.set(this.context,this.applyFilters(e),t)}},{key:"evaluate",get:function(){return this.path.evaluate}},{key:"isComputed",get:function(){return this.path.isComputed}}]),e}();t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(9),u=new WeakMap,a=function(){function e(t,n,o){r(this,e),this.items=t?Array.from(t.childNodes):[],this.target=n,o&&u.set(n,this)}return o(e,[{key:"getFirstItem",value:function(){return this.items[0]}},{key:"getLastItem",value:function(){return this.items[this.items.length-1]}},{key:"getValue",value:function(){return this.value}},{key:"isAfter",value:function(e){return e&&e.getLastItem().nextSibling===this.getFirstItem()}},{key:"remove",value:function(){this.items.forEach(function(t){if(t instanceof e)t.remove();else{var n=u.get(t);n&&n.remove(),t.parentNode.removeChild(t)}})}},{key:"insertAfter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target;return this.items.length?(t instanceof e?t=t.getLastItem():t!==this.target&&u.get(t)&&(t=u.get(t).getLastItem()||t),this.items.forEach(function(n){n instanceof e?t=n.insertAfter(t):(t.parentNode.insertBefore(n,t.nextSibling),t=u.get(n)?u.get(n).insertAfter(n):n)}),t):t}},{key:"setLocals",value:function(e,t){this.value=t,this.items.forEach(function(t){return(0,i.defineLocals)(t,e)})}}]),e}();t.default=a},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return Array.isArray(e)?e:Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){for(e=e.firstChild;e;)(e.nodeType===Node.ELEMENT_NODE&&"style"!==e.tagName.toLowerCase()||e.nodeType===Node.COMMENT_NODE)&&(t(e),a(e,t)),e=e.nextSibling}function c(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function f(e){switch("undefined"==typeof e?"undefined":v(e)){case"object":return Number(e.textContent.split(":")[1]);default:return e}}function s(e,t,n){return""}function l(e){return Array.from(e.childNodes).forEach(function(t){switch(t.nodeType){case Node.TEXT_NODE:if(e.nodeType===Node.ELEMENT_NODE&&1===e.childNodes.length&&t.textContent.trim().match(/^{{(([^}]|\n)+)}}$/g)){var n=t.textContent.trim();n=n.substr(2,n.length-4).trim(),e.removeChild(t),e.setAttribute(j+"text-content",n)}else{var r=t.textContent.replace(/{{(([^}]|\n)+)}}/g,function(e,t){return"<span "+j+'text-content="'+t.trim()+'"></span>'});r!==t.textContent&&(Array.from(c(r).childNodes).forEach(function(n){e.insertBefore(n,t)}),e.removeChild(t))}break;case Node.ELEMENT_NODE:var o=function(){var n=[];return Array.from(t.attributes).forEach(function(e){var r=e.name,o=e.value;r.substr(0,1)===k&&(t.removeAttribute(r),n.push({name:r.substr(1),value:o}))}),n.reduce(function(t,n){var r=n.name,o=n.value,i=c("<template "+E+r+'="'+o+'"></template>').childNodes[0];return e.insertBefore(i,t),i.content.appendChild(t),t=i},t),l(t),"break"}();if("break"===o)break}}),e}function p(e,t){return e.split("|").map(function(e,n){var r=e.split(":").slice(0,2).map(function(e){return e.trim()});if(0===n){var o=r.pop();r.unshift(o)}return r[1]&&r.splice.apply(r,[1,1].concat(u(r[1].split(",").map(function(e){return e.trim()})))),t[r[0]]||(t[r[0]]=new g.default(r[0])),r})}function y(e,t,n){var r=0;e.nodeType===Node.ELEMENT_NODE&&Array.from(e.attributes).filter(function(e){var t=e.name;return t.length>1}).forEach(function(t){try{if(t.name.substr(0,2)===E)!function(){var e=t.name.substr(2);r=r||[],t.value.split(";").forEach(function(o){r.push({a:t.name,m:e,p:p(o,n)})})}();else{var o=t.name.substr(0,1);switch(o){case j:var i=t.name.substr(1).replace(/-([a-z])/g,function(e){return e[1].toUpperCase()});r=r||[],r.push({a:t.name,m:"prop",p:p(i+":"+(t.value||i),n)});break;case P:var u=t.name.substr(1);r=r||[],r.push({a:t.name,m:"on",p:p(u+":"+(t.value||u),n)})}}}catch(n){(0,b.error)(n,"template: Parsing failed %node",{node:s(e,t.name)})}e.removeAttribute(t.name)}),t.push(r)}function d(e,t){var n={e:e,m:[]},r=t.t.length,o=[];return t.t.push(n),r&&(e.parentNode.insertBefore(document.createComment("template:"+r),e),e.parentNode.removeChild(e)),a(l(e.content),function(e){y(e,n.m,t.p),"TEMPLATE"===e.nodeName&&o.push(e)}),o.forEach(function(e){return d(e,t)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.TEMPLATE_PREFIX=t.EVENT_PREFIX=t.PROPERTY_PREFIX=t.MARKER_PREFIX=void 0;var h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.stringifyMarker=s;var b=n(0),m=n(5),g=r(m),O=n(9),w=r(O),E=t.MARKER_PREFIX="--",j=t.PROPERTY_PREFIX=":",P=t.EVENT_PREFIX="@",k=t.TEMPLATE_PREFIX="*",_=new WeakMap,S=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.markers,u=void 0===o?{}:o,a=r.filters,c=void 0===a?{}:a,f=r.name,s=r.styles;if(i(this,t),this.markers=u,this.filters=c,"object"===("undefined"==typeof n?"undefined":v(n))){if("TEMPLATE"!==n.nodeName)return void(this.container={p:Object.keys(n.p).reduce(function(e,t){return e[t]=new g.default(n.p[t]),e},{}),t:n.t.map(function(e,t){!t&&s&&[].concat(s).forEach(function(t){e.e="<style>"+t+"</style>"+e.e});var n=document.createElement("template");return n.innerHTML=e.e,e.e=n,e}).reduceRight(function(t,n){return e.ShadyCSS&&f&&e.ShadyCSS.prepareTemplate(n.e,f),t.unshift(n),t},[])});n=n.innerHTML}s&&[].concat(s).forEach(function(e){n="<style>"+e+"</style>"+n});var l=document.createElement("template");l.innerHTML=n,e.ShadyCSS&&f&&e.ShadyCSS.prepareTemplate(l,f),this.container=d(l,{t:[],p:{}})}return h(t,[{key:"compile",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=f(n),c=this.container.t[i];c||(0,b.error)(ReferenceError,"template not found: %s",i);var l=document.importNode(c.e.content,!0);"object"===("undefined"==typeof n?"undefined":v(n))&&(r=Object.assign((0,O.getOwnLocals)(n),r)),r&&Array.from(l.childNodes).filter(function(e){return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.COMMENT_NODE}).forEach(function(e){return(0,O.defineLocals)(e,r)});var p=0;return a(l,function(n){var r=c.m[p];r&&r.forEach(function(r){var i=r.a,a=r.m,c=r.p;try{var f=t.markers[a],l=o(c[0]),p=l[0],y=l.slice(1),d=c.slice(1).map(function(e){var n=o(e),r=n[0],i=n.slice(1);return function(e){var n;return(n=t.container.p[r]).call.apply(n,[t.filters,e].concat(u(i)))}}),h=t.container.p[p],v=new w.default(n,e,h,d),m=f.apply(void 0,[{attr:i,node:n,expr:v}].concat(u(y)));if(m){var g=_.get(n);g||(g=[],_.set(n,g)),g.push({fn:m,expr:v,attr:i})}}catch(e){(0,b.error)(e,"template: Compilation failed %node",{node:s(n,i,t.container.t)})}}),p+=1}),l}},{key:"run",value:function(e,t){var n=this;a(e,function(e){var r=_.get(e);r&&r.forEach(function(r){try{t(r)}catch(t){(0,b.error)(t,"template: Execution failed %node",{node:s(e,r.attr,n.container.t)})}})})}},{key:"export",value:function(){return JSON.parse(JSON.stringify(this.container,function(e,t){return"object"===("undefined"==typeof t?"undefined":v(t))&&"TEMPLATE"===t.nodeName?t.innerHTML:t}))}},{key:"getRootPathProperties",value:function(){var e=this.container.p;return new Set(Object.keys(e).filter(function(t){return!(e[t].isComputed&&!e[t].isNestedProperty)}).map(function(t){return e[t].rootProperty}).filter(function(e){return e[0]!==O.LOCALS_PREFIX}))}}]),t}();t.default=S}).call(t,n(6))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(38),c=r(a),f=new WeakMap,s=function(){function e(t,n){var r=this;i(this,e);var o=e.singleton(t,n,this);return o!==this?o:(this.proxy=new c.default(t,n,function(e){return r.getters.forEach(function(t){return t(e)})},function(e){return r.setters.forEach(function(t){return t(e)})}),this.getters=new Set,this.setters=new Set,this)}return u(e,null,[{key:"singleton",value:function(e,t,n){var r=f.get(e);if(r){if(r[t])return r[t];r[t]=n}else f.set(e,o({},t,n));return n}}]),u(e,[{key:"observe",value:function(e,t){var n=this;return this.getters.size||this.proxy.on(),this.getters.add(e),this.setters.add(t||e),function(){n.unobserve(e,t)}}},{key:"unobserve",value:function(e,t){this.getters.delete(e),this.setters.delete(t||e),this.getters.size||this.setters.size||this.proxy.off()}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(36),c=r(a),f="__papillon_state_map__";if({}.hasOwnProperty.call(window,f)){if(!(window[f]instanceof WeakMap))throw new ReferenceError("window."+f+" already defined")}else Object.defineProperty(window,f,{value:new WeakMap});var s=window[f],l=0,p=!1,y=function(){function e(t){if(o(this,e),!e.isObject(t))throw new TypeError("Invalid arguments");var n=s.get(t);if(n)return n;s.set(t,this);var r=new c.default;return this.cache=Object.keys(t).reduce(function(n,o){var i=n[o]=t[o];return e.isObject(i)&&new e(i),r.set(i,o),n},{}),this.keyMap=r,this.target=t,this.lastCheck=e.now(),this.lastChange=0,this}return u(e,null,[{key:"now",value:function(){return p||(l+=1,p=window.requestAnimationFrame(function(){p=void 0})),l}},{key:"isObject",value:function(e){return"object"===("undefined"==typeof e?"undefined":i(e))&&null!==e}},{key:"is",value:function(e,t){return 0===e&&0===t?1/e===1/t:e!==e?t!==t:e===t}}]),u(e,[{key:"isChanged",value:function(){var t=this,n=e.now();return n>this.lastCheck&&!function(){var r=!1;t.lastCheck=n,t.changelog={},Object.keys(t.cache).forEach(function(e){if(!{}.hasOwnProperty.call(t.target,e)){var n=t.cache[e];t.changelog[e]={type:"delete",oldValue:n},r=!0}});var o=new c.default,i={};t.cache=Object.keys(t.target).reduce(function(n,u){var a=t.target[u];if({}.hasOwnProperty.call(t.cache,u)?e.is(a,t.cache[u])||(t.changelog[u]=t.changelog[u]||{type:"set"},t.changelog[u].oldValue=t.cache[u],r=!0):(t.changelog[u]={type:"set"},r=!0),e.isObject(a)){var c=new e(a);c.isChanged()&&(r=!0,t.changelog[u]||(t.changelog[u]={type:"modify"},t.changelog[u].changelog=c.changelog))}if(t.changelog[u]){var f=t.keyMap.shift(a,u);f&&f!==u&&t.target[f]!==a&&(t.changelog[u].oldKey=f,t.changelog[f]?t.changelog[f].newKey=u:i[f]=u),i[u]&&(t.changelog[u].newKey=i[u])}return n[u]=a,o.set(a,u),n},{}),t.keyMap=o,r?t.lastChange=t.lastCheck:t.changelog=void 0}(),this.lastChange===n}}]),e}();t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(13);Object.defineProperty(t,"State",{enumerable:!0,get:function(){return r(o).default}});var i=n(37);Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return r(i).default}});var u=n(12);Object.defineProperty(t,"PropertyObserver",{enumerable:!0,get:function(){return r(u).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.children=t.parent=t.host=t.listenTo=t.dispatchEvent=t.resolve=t.injectable=t.define=void 0;var o=n(18);Object.defineProperty(t,"define",{enumerable:!0,get:function(){return r(o).default}});var i=n(1);Object.defineProperty(t,"injectable",{enumerable:!0,get:function(){return i.injectable}}),Object.defineProperty(t,"resolve",{enumerable:!0,get:function(){return i.resolve}});var u=n(4);Object.defineProperty(t,"dispatchEvent",{enumerable:!0,get:function(){return r(u).default}});var a=n(21);Object.defineProperty(t,"listenTo",{enumerable:!0,get:function(){return r(a).default}});var c=n(19);Object.defineProperty(t,"host",{enumerable:!0,get:function(){return r(c).default}});var f=n(22);Object.defineProperty(t,"parent",{enumerable:!0,get:function(){return r(f).default}});var s=n(17);Object.defineProperty(t,"children",{enumerable:!0,get:function(){return r(s).default}});var l=n(3);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}),n(2)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.engine=void 0;var o=n(24);Object.defineProperty(t,"engine",{enumerable:!0,get:function(){return r(o).default}}),n(0)},function(e,t,n){"use strict";function r(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Array.from(e.children).forEach(function(e){e.constructor[u.CONTROLLER]===t?(o.push(e[u.CONTROLLER]),n.deep&&n.nested&&r(e,t,n,o)):n.deep&&r(e,t,n,o)}),o}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],i=function(){var i=r(e,t,n);Object.assign(o,i),o.length=i.length,(0,a.dispatchEvent)(e,"hybrid-update",{bubbles:!1})};return new MutationObserver(i).observe(e,{childList:!0,subtree:!!n.deep}),e.addEventListener("hybrid-connect",i),o}Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.children=o;var i=(n(2),n(1)),u=n(3),a=n(4);t.default=(0,i.injectable)(o)},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(t,n){if(e.customElements.get(t)){var r=e.customElements.get(t);if(r[v.CONTROLLER]===n)return r;(0,l.error)(TypeError,"define: Element '%name' already defined",{name:t})}(0,d.proxy)(n);var a=n.options||{};if(a.define)try{c(a.define)}catch(e){(0,l.error)(e,"define: Invalid 'define' option")}var f=[],p=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,null,[{key:"observedAttributes",get:function(){return f}},{key:v.CONTROLLER,get:function(){return n}},{key:v.OPTIONS,get:function(){return a}}]),t}(y.default);a.properties=(a.properties||[]).map(h.normalizeProperty).filter(function(e){var t=e.property,r=e.attr;if(Reflect.has(n.prototype,t)){for(var o=void 0,i=n.prototype;!o;)o=Object.getOwnPropertyDescriptor(i,t),i=Object.getPrototypeOf(i);if(!o.get&&"function"==typeof o.value)return Object.defineProperty(p.prototype,t,{value:function(){var e;return(e=this[v.CONTROLLER])[t].apply(e,arguments)}}),!1}return r&&f.push(r),!0});var b=Object.assign({},a,{name:t});return Object.defineProperty(p,v.PLUGINS,{value:(a.plugins||[]).map(function(e){return e(b,n)}).filter(function(e){return e})}),e.customElements.define(t,p),p}function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];switch(t.length||(0,l.error)(TypeError,"define: Invalid arguments"),f(t[0])){case"object":return Object.keys(t[0]).reduce(function(e,n){return e[n]=a((0,h.camelToDash)(n),t[0][n]),e},{});case"string":return 1===t.length?function(e){return a(t[0],e),e}:a.apply(void 0,t);default:return(0,l.error)(TypeError,"define: Invalid arguments")}}Object.defineProperty(t,"__esModule",{value:!0});var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=c;var l=n(2),p=n(20),y=r(p),d=n(1),h=n(7),v=n(3)}).call(t,n(6))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=(0,r.injectable)(function(e){return e})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Reflect.construct(HTMLElement,t,this.constructor)}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),s=n(7),l=n(4),p=n(3);Object.setPrototypeOf(u.prototype,HTMLElement.prototype);var y=function(e){function t(){r(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return(0,f.callWithContext)(e,function(){Object.defineProperty(e,p.CONTROLLER,{value:new e.constructor[p.CONTROLLER]})}),(0,f.mapInstance)(e[p.CONTROLLER],e),e.constructor[p.OPTIONS].properties.forEach(function(t){var n=t.property,r=t.attr,o=e[p.CONTROLLER][n],i="undefined"==typeof o?"undefined":a(o);"boolean"===i&&Object.defineProperty(e[p.CONTROLLER],n,{get:function(){return o},set:function(t){o=t,"boolean"==typeof t&&Promise.resolve().then(function(){o?e.hasAttribute(r)||e.setAttribute(r,""):e.hasAttribute(r)&&e.removeAttribute(r)})},enumerable:!0});var u=void 0;({}).hasOwnProperty.call(e,n)&&(u=e[n]),Object.defineProperty(e,n,{get:function(){return this[p.CONTROLLER][n]},set:function(e){this[p.CONTROLLER][n]=(0,s.reflectValue)(e,i)}}),void 0!==u&&(e[n]=u)}),e.constructor[p.PLUGINS].map(function(t){return t(e,e[p.CONTROLLER])}),e}return i(t,e),c(t,[{key:"connectedCallback",value:function(){this[p.CONTROLLER].connect&&this[p.CONTROLLER].connect(),(0,l.dispatchEvent)(this,"hybrid-connect",{bubbles:!1})}},{key:"disconnectedCallback",value:function(){this[p.CONTROLLER].disconnect&&this[p.CONTROLLER].disconnect(),(0,l.dispatchEvent)(this,"hybrid-disconnect",{bubbles:!1})}},{key:"attributeChangedCallback",value:function(e,t,n){var r=this,o=(0,s.dashToCamel)(e);n=null!==n&&n;var i=""===n||n;i!==this[o]&&(0,s.queue)(function(){return r[o]=i})}},{key:Symbol.toStringTag,get:function(){return"HTMLHybridElement"}}]),t}(u);t.default=y},function(e,t,n){"use strict";function r(e,t,n,r){var o=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o]; | ||
return n.apply(e[i.CONTROLLER],r)};return e.addEventListener(t,o,r),function(){return e.removeEventListener(t,o,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.listenTo=r;var o=n(1),i=n(3);t.default=(0,o.injectable)(r)},function(e,t,n){"use strict";function r(e,t){for(var n=e.parentElement;n;){if(n.constructor[i.CONTROLLER]===t)return n[i.CONTROLLER];n=n.parentElement}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.parent=r;var o=(n(2),n(1)),i=n(3);t.default=(0,o.injectable)(r)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return e.replace(/%[a-z]+/gi,function(e){return t[e.substr(1)]})}function i(e){return e.replace(/ +/gi," ").replace(/(^\n+|\n+$)/,"")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=!1,c=!!a&&new a,f=function(){function e(t){r(this,e),this.prefix=t||"[@hybrids/debug]",this.messages=new Map,this.error=this.error.bind(this),this.warning=this.warning.bind(this)}return u(e,[{key:"docs",value:function(e){var t=this;Object.keys(e).forEach(function(n){return t.messages.set(n,i(e[n]))})}},{key:"resolve",value:function(e,t,n){var r=o(t,n);if("function"==typeof e)e=new e("\n"+this.prefix+" "+r);else try{"\n"!==e.message[0]&&(e.message="\n"+this.prefix+" "+e.message),e.message=e.message+"\n"+this.prefix+" "+r}catch(t){throw e}return e}},{key:"warning",value:function(){var e=this.resolve.apply(this,arguments);c.warn(e)}},{key:"error",value:function(){throw this.resolve.apply(this,arguments)}}]),e}();t.default=f},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(t){return v?b.add(t):(b=(new Set).add(t),v=e.requestAnimationFrame(function(){b.forEach(function(e){return e()}),v=b=void 0})),t}function u(t,n,r){n.run(t.shadowRoot,function(e){var t=e.expr.get(),n=void 0;if(f.State.isObject(t)){var o=new f.State(t);o.isChanged()?n={type:"modify",changelog:o.changelog}:f.State.is(t,e.cache)||(n={type:"set"})}else({}).hasOwnProperty.call(e,"cache")&&f.State.is(t,e.cache)||(n={type:"set",oldValue:e.cache});n&&e.fn(t,n,r),e.cache=t}),e.ShadyCSS&&e.ShadyCSS.applyStyle(t)}function a(e){var t=new l.default(e.template,{markers:Object.assign({},y.default,e.markers),filters:Object.assign({},h.default,e.filters),styles:e.styles,name:e.name}),n=t.getRootPathProperties();return e.properties.forEach(function(e){var t=e.property;return n.add(t)}),function(e,r){var a=new Set([].concat(o(n),[Object.keys(r)])),s=function(e,n){return t.compile(r,e,n)},l=i.bind(null,function(){u(e,t,s)});i(function(){var t=e.attachShadow({mode:"open"});t.appendChild(s()),l()}),a.forEach(function(e){new f.PropertyObserver(r,e).observe(function(e){return e&&"object"===("undefined"==typeof e?"undefined":c(e))?l():null},l)}),e.addEventListener("hybrid-update",l)}}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=a;var f=n(14),s=(n(0),n(11)),l=r(s),p=n(26),y=r(p),d=n(25),h=r(d),v=void 0,b=void 0}).call(t,n(6))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={string:String,boolean:Boolean,number:Number,not:function(e){return!e}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),i=r(o),u=n(31),a=r(u),c=n(28),f=r(c),s=n(29),l=r(s),p=n(30),y=r(p),d=n(32),h=r(d),v=n(33),b=r(v),m=n(34),g=r(m),O=n(35),w=r(O);t.default={attr:i.default,model:a.default,class:f.default,for:l.default,if:y.default,on:h.default,prop:b.default,ref:g.default,style:w.default}},function(e,t,n){"use strict";function r(e){var t=e.node,n=e.expr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.evaluate;return function(e){e===!1||void 0===e||null===e?t.removeAttribute(r):t.setAttribute(r,e===!0?"":e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=e.node;e.expr;return n.length?function(e){n.forEach(function(t){e?i.classList.add(t):i.classList.remove(t)})}:function(e,t){var n=t.type,r=t.oldValue,u=t.changelog;switch(n){case"modify":var a=function(){var t=Array.isArray(e);return Object.keys(u).forEach(function(n){switch(u[n].type){case"delete":i.classList.remove(t?u[n].oldValue:n);break;default:t?(u[n].oldValue&&i.classList.remove(u[n].oldValue),i.classList.add(e[n])):e[n]?i.classList.add(n):i.classList.remove(n)}}),"break"}();if("break"===a)break;default:e?!function(){var t=Array.isArray(e);Object.keys(e).forEach(function(n){t?i.classList.add(e[n]):e[n]?i.classList.add(n):i.classList.remove(n)})}():"object"===("undefined"==typeof r?"undefined":o(r))&&null!==r&&!function(){var e=Array.isArray(r);Object.keys(r).forEach(function(t){e?i.classList.remove(r[t]):i.classList.remove(t)})}()}}}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;n(0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=e.index,n=e.length;return Object.assign({number:t+1,first:0===t,last:t===n-1,odd:t%2===0,even:t%2===1},e)}Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e){var t=e.node,n=(e.expr,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"item"),r=new a.default(null,t,!0).items;return function(e,u,c){var f=u.type,s=u.changelog,l=Object.keys(e),p=Reflect.has(e,"length")?e.length:l.length;switch(f){case"modify":var y=function(){var u=[];return Object.assign(r,Object.keys(s).reduce(function(f,y){var d=s[y],h=d.type,v=d.oldKey,b=d.newKey;if("delete"===h)r[y]&&u.push(r[y]);else if("modify"!==h){var m,g=l.indexOf(y),O=l[g-1],w=f[O]||r[O],E=void 0;v||b?(E=r[v]||new a.default(c(t),t),v&&(delete r[v],r[y]&&!b&&u.push(r[y])),E.isAfter(w)||E.insertAfter(w)):r[y]?E=r[y]:(E=new a.default(c(t),t),E.insertAfter(w)),E.setLocals(i((m={},o(m,n,e[y]),o(m,"length",p),o(m,"index",g),o(m,"key",y),m)),e[y]),f[y]=E}return f},{})),u.forEach(function(e){return e.remove()}),Array.isArray(e)&&(r.length=e.length),"break"}();if("break"===y)break;default:!function(){var u=Object.keys(r),f=u.filter(function(t){return!{}.hasOwnProperty.call(e,t)}),s=new Set(f.map(function(e){return r[e]})),y=void 0;Object.assign(r,l.reduce(function(f,l,d){var h,v=void 0,b=u.find(function(t){return r[t]&&r[t].getValue()===e[l]})||{}.hasOwnProperty.call(r,l)&&l;return b?(v=r[b],delete r[b],s.delete(v),b!==l&&(r[l]&&s.add(r[l]),v.isAfter(y)||v.insertAfter(y))):(v=new a.default(c(t),t),v.insertAfter(y)),v.setLocals(i((h={},o(h,n,e[l]),o(h,"index",d),o(h,"length",p),o(h,"key",l),h)),e[l]),y=v,f[l]=v,f},{})),s.forEach(function(e){return e.remove()}),f.forEach(function(e){return r[e]&&delete r[e]}),Array.isArray(e)&&(r.length=e.length)}()}}};var u=(n(0),n(10)),a=r(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.node,n=void 0;return function(e,r,o){e?(n=new u.default(o(t),t),n.insertAfter()):(n&&n.remove(),n=null)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=(n(0),n(10)),u=r(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return{up:function(){t.set(n.get(e))},down:function(){e.checked=t.get()===n.get(e)}}}function i(e,t,n){return{up:function(){var r=t.get(),o=n.get(e);if(e.hasAttribute("value"))if(r&&Array.isArray(r)||(r=[],t.set(r)),e.checked)r.indexOf(o)===-1&&r.push(o);else{var i=r.indexOf(o);i>-1&&r.splice(i,1)}else t.set(e.checked)},down:function(t){e.hasAttribute("value")?t?e.checked=t.indexOf(n.get(e))>-1:e.checked=!1:e.checked=!!t}}}function u(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{up:function(){var o=t.get(),i=Array.from(e.options).filter(function(e){return e.selected}).map(function(e){return n.get(e)});r?(Array.isArray(o)||(o=[],t.set(o)),Object.assign(o,i),o.length=i.length):t.set(i[0])},down:function(t){r?void 0===t&&(t=[]):t=[t],Array.from(e.options).forEach(function(e){var r=n.get(e);e.selected=t.indexOf(r)>-1})}}}function a(e,t,n){return{up:function(){t.set(n.get(e))},down:function(t){void 0!==t&&n.set(e,t)}}}function c(e){var t=e.node,n=e.expr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",c=arguments[2],s=new l.default(r),p=void 0,y=!1;switch(t.type){case"radio":p=o(t,n,s);break;case"checkbox":p=i(t,n,s);break;case"select-one":p=u(t,n,s);break;case"select-multiple":p=u(t,n,s,!0);break;default:"INPUT"===t.nodeName&&(c=c||"input"),p=a(t,n,s)}return t.addEventListener(c||"change",function(){y=!0,f.Observer.requestAnimationFrame(p.up),f.Observer.requestAnimationFrame(function(){return y=!1})}),function(e){y||p.down(e)}}Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=c;var f=n(14),s=(n(0),n(5)),l=r(s)},function(e,t,n){"use strict";function r(e,t,n){var r=e.node,u=e.expr,a=e.attr;r.addEventListener(t,function(e){try{u.get({event:e})}catch(e){(0,i.error)(e,"on: Execution failed %node",{node:(0,o.stringifyMarker)(r,a)})}},"capture"===n)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(11),i=n(0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){for(var t=e.node,n=e.expr,r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var a=(o.length?o:[n.evaluate]).map(function(e){return new u.default(e)});return function(e){a.forEach(function(n){return n.set(t,e)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(5),u=r(i)},function(e,t,n){"use strict";function r(e){var t=e.node,n=e.expr;n.set(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var u=e.node;e.expr;return n.length?function(e){n.map(r).forEach(function(t){e||0===e?u.style.setProperty(t,e):u.style.removeProperty(t)})}:function(e,t){var n=t.type,o=t.oldValue,a=t.changelog;switch(n){case"modify":Object.keys(a).forEach(function(t){switch(a[t].type){case"delete":u.style.removeProperty(r(t));break;default:u.style.setProperty(r(t),e[t])}});break;default:e?Object.keys(e).forEach(function(t){return u.style.setProperty(r(t),e[t])}):"object"===("undefined"==typeof o?"undefined":i(o))&&null!==o&&Object.keys(o).forEach(function(e){return u.style.removeProperty(r(e))})}}}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=o;n(0)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e),this.map=new Map}return o(e,[{key:"set",value:function(e,t){var n=this.map.get(e);return n||(n=new Set,this.map.set(e,n)),t&&n.add(t),n}},{key:"shift",value:function(e,t){var n=this.map.get(e);if(n&&n.size){if(n.has(t))return n.delete(t),t;var r=!0,o=!1,i=void 0;try{for(var u,a=n[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value;return n.delete(c),c}}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}}return!1}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(13),a=r(u),c=n(12),f=r(c),s=void 0,l=void 0,p=function(){function e(t,n,r){var i=this;if(o(this,e),!t||!n||!r)throw new TypeError("Invalid arguments");this.revert=[],this.state=new a.default([].concat(n).reduce(function(e,n){var r=new f.default(t,n);return e[n]=t[n],i.revert.push(r.observe(function(t){a.default.is(e[n],t)?a.default.isObject(t)&&i.check():(e[n]=t,i.check())})),e},{})),this.callback=function(){i.state.isChanged()&&r(i.state.changelog)}}return i(e,null,[{key:"requestAnimationFrame",value:function(e){return s?l.add(e):(l=(new Set).add(e),s=window.requestAnimationFrame(function(){l.forEach(function(e){return e()}),s=l=void 0})),e}},{key:"cancelAnimationFrame",value:function(e){l&&l.delete(e)}}]),i(e,[{key:"check",value:function(){e.requestAnimationFrame(this.callback)}},{key:"destroy",value:function(){e.cancelAnimationFrame(this.callback),this.revert.forEach(function(e){return e()})}}]),e}();t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n,o,i){r(this,e),this.host=t,this.key=n,this.getter=o,this.setter=i||o}return o(e,[{key:"getOwnDescriptor",value:function(){var e=Object.getOwnPropertyDescriptor(this.host,this.key);if(e){if(!e.configurable)throw new TypeError("Cannot create proxy for not configurable property '"+this.key+"'");if(!e.get&&!e.set&&!e.writable)throw new TypeError("Cannot create proxy for readonly property '"+this.key+"'")}return e}},{key:"getProtoDescriptor",value:function(){for(var e=this,t=Object.getPrototypeOf(this.host),n=void 0;t&&!(n=Object.getOwnPropertyDescriptor(t,this.key));)t=Object.getPrototypeOf(t);return n&&(n.get||n.set||(n.get=function(){delete e.host[e.key];var t=e.host[e.key];return e.on(),t},n.set=function(t){delete e.host[e.key],e.host[e.key]=t,e.on()})),n}},{key:"on",value:function(){var e=this.getOwnDescriptor();e?this.ownProperty=!0:(this.ownProperty=!1,e=this.getProtoDescriptor()),e||(this.ownProperty=!0,this.notDefined=!0,e={enumerable:!0,writable:!0,configurable:!0}),this.desc=e,this.value=this.host[this.key],Object.defineProperty(this.host,this.key,{configurable:!0,enumerable:this.desc.enumerable,get:this.get.bind(this),set:this.set.bind(this)})}},{key:"off",value:function(){this.ownProperty?this.notDefined?delete this.host[this.key]:(this.desc.get||this.desc.set||(this.desc.value=this.value),Object.defineProperty(this.host,this.key,this.desc)):delete this.host[this.key]}},{key:"get",value:function(){return this.desc.get&&(this.value=this.desc.get.call(this.host)),this.getter(this.value),this.value}},{key:"set",value:function(e){this.notDefined=!1,this.desc.set&&this.desc.set.call(this.host,e),(this.desc.writable||this.desc.get||this.desc.set)&&(this.value=e),this.setter(this.value)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var o=n(16);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})})}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.hybrids=t():e.hybrids=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=49)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=t.error=void 0;var r=n(7),o=new r.Debug("[@hybrids/engine]"),i=o.error,u=o.warning;t.error=i,t.warning=u},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return function(){s||(0,f.error)(ReferenceError,"proxy: Illegal invocation of '%fn'",{fn:e.name});for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(void 0,[s].concat(n))}}function i(e,t){var n=s;s=e;var r=t();return s=n,r}function u(e){s||(0,f.error)(ReferenceError,"proxy: Illegal invocation of '%fn'",{fn:e.name});var t=s;return function(){return i(t,e)}}function a(e,t){l.set(e,t)}function c(e){for(var t=e.prototype;t;)y.has(t)||(y.add(t),Object.getOwnPropertyNames(t).forEach(function(e){if("constructor"!==e){var n=Object.getOwnPropertyDescriptor(t,e);n.value&&"function"==typeof n.value?!function(){var o=n.value,u=r({},e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(l.get(this),o.bind.apply(o,[this].concat(t)))});n.value=u[e],Object.defineProperty(t,e,n)}():n.get&&!function(){var r=n.get,o=n.set;n.get=function(){var e=this;return i(l.get(this),function(){return r.call(e)})},n.set&&(n.set=function(e){var t=this;return i(l.get(this),function(){return o.call(t,e)})}),Object.defineProperty(t,e,n)}()}})),t=Object.getPrototypeOf(t),t===Object.prototype&&(t=null)}Object.defineProperty(t,"__esModule",{value:!0}),t.injectable=o,t.callWithContext=i,t.resolve=u,t.mapInstance=a,t.proxy=c;var f=n(2),s=null,l=new WeakMap,y=new WeakSet},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=t.error=void 0;var r=n(7),o=new r.Debug("[@hybrids/core]"),i=o.error,u=o.warning;t.error=i,t.warning=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CONTROLLER=Symbol("controller"),t.PLUGINS=Symbol("plugins"),t.OPTIONS=Symbol("options")},function(e,t,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.parent=t.resolve=t.injectable=t.schedule=t.listenTo=t.host=t.dispatchEvent=t.define=t.children=void 0;var o=n(20);Object.defineProperty(t,"children",{enumerable:!0,get:function(){return r(o).default}});var i=n(21);Object.defineProperty(t,"define",{enumerable:!0,get:function(){return r(i).default}});var u=n(6);Object.defineProperty(t,"dispatchEvent",{enumerable:!0,get:function(){return r(u).default}});var a=n(22);Object.defineProperty(t,"host",{enumerable:!0,get:function(){return r(a).default}});var c=n(24);Object.defineProperty(t,"listenTo",{enumerable:!0,get:function(){return r(c).default}});var f=n(26);Object.defineProperty(t,"schedule",{enumerable:!0,get:function(){return r(f).default}});var s=n(1);Object.defineProperty(t,"injectable",{enumerable:!0,get:function(){return s.injectable}}),Object.defineProperty(t,"resolve",{enumerable:!0,get:function(){return s.resolve}});var l=n(25);Object.defineProperty(t,"parent",{enumerable:!0,get:function(){return r(l).default}});var y=n(3);Object.keys(y).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}),n(2)},function(e,t,n){"use strict";function r(e,t,n){var r=Object.assign({bubbles:!0,cancelable:!1},n),o=void 0;document.createEvent?(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,r.bubbles,r.cancelable,r.detail)):o=new CustomEvent(t,r),e.dispatchEvent(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=r;var o=n(1);t.default=(0,o.injectable)(r)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27);Object.defineProperty(t,"Debug",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=[],n=e.split("").reduce(function(e,n){switch(n){case".":return t.push({property:e,proto:{}}),"";case"[":return t.push({property:e,proto:[]}),"";case"]":return e;default:return e+n}},"");return t.push({property:n}),t}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),c=function(){function e(t){r(this,e),t||(0,a.error)(TypeError,"path: Path cannot be empty"),"object"===("undefined"==typeof t?"undefined":i(t))?Object.assign(this,t):(this.evaluate=t,"()"===t.substr(-2)?(t=t.substr(0,t.length-2),this.isComputed=!0):this.isComputed=!1,this.path=o(t))}return u(e,[{key:"get",value:function(e){var t=this,n=e;return this.path.every(function(e){var r=e.property,o=e.proto;return n=n[r],!n||!o||n instanceof Object||(0,a.error)(TypeError,"path: "+(t.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be an object: %type",{evaluate:t.evaluate,property:r,type:"undefined"==typeof n?"undefined":i(n)}),n}),n}},{key:"set",value:function(e,t){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.path.reduce(function(e,t){var r=t.property,o=t.proto;return o?(e.context[r]?e.context[r]instanceof Object||(0,a.error)(TypeError,"path: "+(n.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be an object: %type",{evaluate:n.evaluate,property:r,type:i(e.context[r])}):e.context[r]=o.constructor(),e.context=e.context[r]):e.property=r,e},{context:e});return(r||void 0===o.context[o.property])&&(o.context[o.property]=t),o.context[o.property]}},{key:"call",value:function(e){var t,n=this,r=this.path.reduce(function(e,t){var r=t.property,o=t.proto;return o?(e.context=e.context[r],e.context instanceof Object||(0,a.error)(TypeError,"path: "+(n.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be an object: %type",{evaluate:n.evaluate,property:r,type:i(e.context)})):e.property=r,e},{context:e}),o=i(r.context[r.property]);"function"!==o&&(0,a.error)(TypeError,"path: "+(this.isNestedProperty?"'%property' in '%evaluate'":"'%evaluate'")+" must be a function: %type",{evaluate:this.evaluate,property:r.property,type:o});for(var u=arguments.length,c=Array(u>1?u-1:0),f=1;f<u;f++)c[f-1]=arguments[f];return(t=r.context)[r.property].apply(t,c)}},{key:"delete",value:function(e){var t={context:e,property:this.path[0].property};this.path.some(function(n){var r=n.property;return!{}.hasOwnProperty.call(e,r)||(Object.keys(e).length>1&&(t={context:e,property:r}),e=e[r],!1)}),delete t.context[t.property]}},{key:"rootProperty",get:function(){return this.path[0].property}},{key:"isNestedProperty",get:function(){return this.path.length>1}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}function i(e,t){switch(t){case"string":return String(e);case"number":return Number(e);case"boolean":return Boolean(e);case"object":var n="undefined"==typeof e?"undefined":c(e);switch(n){case"object":return null!==e?Object(e):null;case"string":try{var r=JSON.parse(e);if("object"===("undefined"==typeof r?"undefined":c(r)))return r;throw new TypeError}catch(e){return(0,f.error)(e,"reflect property: Invalid type coercion: '%valueType' to '%type'",{valueType:n,type:t})}default:return(0,f.error)(TypeError,"reflect property: Invalid type coercion: '%valueType' to '%type'",{valueType:n,type:t})}case"undefined":return e;default:var o="undefined"==typeof e?"undefined":c(e);return o===t?e:(0,f.error)(TypeError,"reflect property: Invalid type coercion: '%valueType' to '%type'",{valueType:o,type:t})}}function u(e){var t="undefined"==typeof e?"undefined":c(e);switch(t){case"string":return{property:e,attr:r(e)};case"object":var n=Object.assign({attr:!0},e);return n.attr&&(n.attr=n.attr!==!0?n.attr:r(n.property)),n;default:return(0,f.error)(TypeError,"normalize property: Property description must be an object or string: %type",{type:t})}}function a(e){s||(s=[],Promise.resolve().then(function(){for(;s[0];){var e=s.shift();e()}s=null})),s.unshift(e)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.camelToDash=r,t.dashToCamel=o,t.reflectValue=i,t.normalizeProperty=u,t.queue=a;var f=n(2),s=void 0},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=p.get(e);return n&&n.has(t)?o({},""+y+t,n.get(t)):e.parentElement?i(e.parentElement,t):{}}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p.get(e);return n&&n.forEach(function(e,n){({}).hasOwnProperty.call(t,n)||(t[n]=e)}),e.parentElement?u(e.parentElement,t):t}function a(e,t){var n=p.get(e);n||(n=new Map,p.set(e,n)),Object.keys(t).forEach(function(e){n.set(e,t[e])})}function c(e){var t=p.get(e);if(t){var n=function(){var e={};return t.forEach(function(t,n){return e[n]=t}),{v:e}}();if("object"===("undefined"==typeof n?"undefined":s(n)))return n.v}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.LOCALS_PREFIX=void 0;var f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.defineLocals=a,t.getOwnLocals=c;var l=n(0),y=t.LOCALS_PREFIX="$",p=new WeakMap,d=function(){function e(t,n,o){var u=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];r(this,e),this.node=t,this.path=o,this.filters=a,this.path.rootProperty[0]===y?!function(){var e=u.path.rootProperty.substr(1);Object.defineProperty(u,"context",{get:function(){return i(u.node,e)}}),u.path.isNestedProperty||(u.set=function(){(0,l.error)(TypeError,"expression: Local variable '%local' is readonly",{local:e})})}():this.context=n}return f(e,[{key:"applyFilters",value:function(e){return this.filters.reduce(function(e,t){return t(e)},e)}},{key:"get",value:function(e){if(this.isComputed){var t=u(this.node,e);return this.applyFilters(this.path.call(this.context,t))}return this.applyFilters(this.path.get(this.context))}},{key:"set",value:function(e,t){this.path.set(this.context,this.applyFilters(e),t)}},{key:"evaluate",get:function(){return this.path.evaluate}},{key:"isComputed",get:function(){return this.path.isComputed}}]),e}();t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(10),u=new WeakMap,a=function(){function e(t,n,o){r(this,e),this.items=t?Array.from(t.childNodes):[],this.target=n,o&&u.set(n,this)}return o(e,[{key:"getFirstItem",value:function(){return this.items[0]}},{key:"getLastItem",value:function(){return this.items[this.items.length-1]}},{key:"getValue",value:function(){return this.value}},{key:"isAfter",value:function(e){return e&&e.getLastItem().nextSibling===this.getFirstItem()}},{key:"remove",value:function(){this.items.forEach(function(t){if(t instanceof e)t.remove();else{var n=u.get(t);n&&n.remove(),t.parentNode.removeChild(t)}})}},{key:"insertAfter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target;return this.items.length?(t instanceof e?t=t.getLastItem():t!==this.target&&u.get(t)&&(t=u.get(t).getLastItem()||t),this.items.forEach(function(n){n instanceof e?t=n.insertAfter(t):(t.parentNode.insertBefore(n,t.nextSibling),t=u.get(n)?u.get(n).insertAfter(n):n)}),t):t}},{key:"setLocals",value:function(e,t){this.value=t,this.items.forEach(function(t){return(0,i.defineLocals)(t,e)})}}]),e}();t.default=a},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return Array.isArray(e)?e:Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){for(e=e.firstChild;e;)(e.nodeType===Node.ELEMENT_NODE&&"style"!==e.tagName.toLowerCase()||e.nodeType===Node.COMMENT_NODE)&&(t(e),a(e,t)),e=e.nextSibling}function c(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function f(e){switch("undefined"==typeof e?"undefined":v(e)){case"object":return Number(e.textContent.split(":")[1]);default:return e}}function s(e,t,n){return""}function l(e){return Array.from(e.childNodes).forEach(function(t){switch(t.nodeType){case Node.TEXT_NODE:if(e.nodeType===Node.ELEMENT_NODE&&1===e.childNodes.length&&t.textContent.trim().match(/^{{(([^}]|\n)+)}}$/g)){var n=t.textContent.trim();n=n.substr(2,n.length-4).trim(),e.removeChild(t),e.setAttribute(k+"text-content",n)}else{var r=t.textContent.replace(/{{(([^}]|\n)+)}}/g,function(e,t){return"<span "+k+'text-content="'+t.trim()+'"></span>'});r!==t.textContent&&(Array.from(c(r).childNodes).forEach(function(n){e.insertBefore(n,t)}),e.removeChild(t))}break;case Node.ELEMENT_NODE:var o=function(){var n=[];return Array.from(t.attributes).forEach(function(e){var r=e.name,o=e.value;r.substr(0,1)===E&&(t.removeAttribute(r),n.push({name:r.substr(1),value:o}))}),n.reduce(function(t,n){var r=n.name,o=n.value,i=c("<template "+j+r+'="'+o+'"></template>').childNodes[0];return e.insertBefore(i,t),i.content.appendChild(t),t=i},t),l(t),"break"}();if("break"===o)break}}),e}function y(e,t){return e.split("|").map(function(e,n){var r=e.split(":").slice(0,2).map(function(e){return e.trim()});if(0===n){var o=r.pop();r.unshift(o)}return r[1]&&r.splice.apply(r,[1,1].concat(u(r[1].split(",").map(function(e){return e.trim()})))),t[r[0]]||(t[r[0]]=new g.default(r[0])),r})}function p(e,t,n){var r=0;e.nodeType===Node.ELEMENT_NODE&&Array.from(e.attributes).filter(function(e){var t=e.name;return t.length>1}).forEach(function(t){try{if(t.name.substr(0,2)===j)!function(){var e=t.name.substr(2);r=r||[],t.value.split(";").forEach(function(o){r.push({a:t.name,m:e,p:y(o,n)})})}();else{var o=t.name.substr(0,1);switch(o){case k:var i=t.name.substr(1).replace(/-([a-z])/g,function(e){return e[1].toUpperCase()});r=r||[],r.push({a:t.name,m:"prop",p:y(i+":"+(t.value||i),n)});break;case P:var u=t.name.substr(1);r=r||[],r.push({a:t.name,m:"on",p:y(u+":"+(t.value||u),n)})}}}catch(n){(0,b.error)(n,"template: Parsing failed %node",{node:s(e,t.name)})}e.removeAttribute(t.name)}),t.push(r)}function d(e,t){var n={e:e,m:[]},r=t.t.length,o=[];return t.t.push(n),r&&(e.parentNode.insertBefore(document.createComment("template:"+r),e),e.parentNode.removeChild(e)),a(l(e.content),function(e){p(e,n.m,t.p),"TEMPLATE"===e.nodeName&&o.push(e)}),o.forEach(function(e){return d(e,t)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.TEMPLATE_PREFIX=t.EVENT_PREFIX=t.PROPERTY_PREFIX=t.MARKER_PREFIX=void 0;var h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.stringifyMarker=s;var b=n(0),m=n(8),g=r(m),O=n(10),w=r(O),j=t.MARKER_PREFIX="--",k=t.PROPERTY_PREFIX=":",P=t.EVENT_PREFIX="@",E=t.TEMPLATE_PREFIX="*",_=new WeakMap,S=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.markers,u=void 0===o?{}:o,a=r.filters,c=void 0===a?{}:a,f=r.name,s=r.styles;if(i(this,t),this.markers=u,this.filters=c,"object"===("undefined"==typeof n?"undefined":v(n))){if("TEMPLATE"!==n.nodeName)return void(this.container={p:Object.keys(n.p).reduce(function(e,t){return e[t]=new g.default(n.p[t]),e},{}),t:n.t.map(function(e,t){!t&&s&&[].concat(s).forEach(function(t){e.e="<style>"+t+"</style>"+e.e});var n=document.createElement("template");return n.innerHTML=e.e,e.e=n,e}).reduceRight(function(t,n){return e.ShadyCSS&&f&&e.ShadyCSS.prepareTemplate(n.e,f),t.unshift(n),t},[])});n=n.innerHTML}s&&[].concat(s).forEach(function(e){n="<style>"+e+"</style>"+n});var l=document.createElement("template");l.innerHTML=n,e.ShadyCSS&&f&&e.ShadyCSS.prepareTemplate(l,f),this.container=d(l,{t:[],p:{}})}return h(t,[{key:"compile",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=f(n),c=this.container.t[i];c||(0,b.error)(ReferenceError,"template not found: %s",i);var l=document.importNode(c.e.content,!0);"object"===("undefined"==typeof n?"undefined":v(n))&&(r=Object.assign((0,O.getOwnLocals)(n),r)),r&&Array.from(l.childNodes).filter(function(e){return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.COMMENT_NODE}).forEach(function(e){return(0,O.defineLocals)(e,r)});var y=0;return a(l,function(n){var r=c.m[y];r&&r.forEach(function(r){var i=r.a,a=r.m,c=r.p;try{var f=t.markers[a],l=o(c[0]),y=l[0],p=l.slice(1),d=c.slice(1).map(function(e){var n=o(e),r=n[0],i=n.slice(1);return function(e){var n;return(n=t.container.p[r]).call.apply(n,[t.filters,e].concat(u(i)))}}),h=t.container.p[y],v=new w.default(n,e,h,d),m=f.apply(void 0,[{attr:i,node:n,expr:v}].concat(u(p)));if(m){var g=_.get(n);g||(g=[],_.set(n,g)),g.push({fn:m,expr:v,attr:i})}}catch(e){(0,b.error)(e,"template: Compilation failed %node",{node:s(n,i,t.container.t)})}}),y+=1}),l}},{key:"run",value:function(e,t){var n=this;a(e,function(e){var r=_.get(e);r&&r.forEach(function(r){try{t(r)}catch(t){(0,b.error)(t,"template: Execution failed %node",{node:s(e,r.attr,n.container.t)})}})})}},{key:"export",value:function(){return JSON.parse(JSON.stringify(this.container,function(e,t){return"object"===("undefined"==typeof t?"undefined":v(t))&&"TEMPLATE"===t.nodeName?t.innerHTML:t}))}},{key:"getRootPathProperties",value:function(){var e=this.container.p;return new Set(Object.keys(e).filter(function(t){return!(e[t].isComputed&&!e[t].isNestedProperty)}).map(function(t){return e[t].rootProperty}).filter(function(e){return e[0]!==O.LOCALS_PREFIX}))}}]),t}();t.default=S}).call(t,n(4))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(44),c=r(a),f=new WeakMap,s=function(){function e(t,n){var r=this;i(this,e);var o=e.singleton(t,n,this);return o!==this?o:(this.proxy=new c.default(t,n,function(e){return r.getters.forEach(function(t){return t(e)})},function(e){return r.setters.forEach(function(t){return t(e)})}),this.getters=new Set,this.setters=new Set,this)}return u(e,null,[{key:"singleton",value:function(e,t,n){var r=f.get(e);if(r){if(r[t])return r[t];r[t]=n}else f.set(e,o({},t,n));return n}}]),u(e,[{key:"observe",value:function(e,t){var n=this;return this.getters.size||this.proxy.on(),this.getters.add(e),this.setters.add(t||e),function(){n.unobserve(e,t)}}},{key:"unobserve",value:function(e,t){this.getters.delete(e),this.setters.delete(t||e),this.getters.size||this.setters.size||this.proxy.off()}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(42),c=r(a),f="__papillon_state_map__";if({}.hasOwnProperty.call(window,f)){if(!(window[f]instanceof WeakMap))throw new ReferenceError("window."+f+" already defined")}else Object.defineProperty(window,f,{value:new WeakMap});var s=window[f],l=0,y=!1,p=function(){function e(t){if(o(this,e),!e.isObject(t))throw new TypeError("Invalid arguments");var n=s.get(t);if(n)return n;s.set(t,this);var r=new c.default;return this.cache=Object.keys(t).reduce(function(n,o){var i=n[o]=t[o];return e.isObject(i)&&new e(i),r.set(i,o),n},{}),this.keyMap=r,this.target=t,this.lastCheck=e.now(),this.lastChange=0,this}return u(e,null,[{key:"now",value:function(){return y||(l+=1,y=window.requestAnimationFrame(function(){y=void 0})),l}},{key:"isObject",value:function(e){return"object"===("undefined"==typeof e?"undefined":i(e))&&null!==e}},{key:"is",value:function(e,t){return 0===e&&0===t?1/e===1/t:e!==e?t!==t:e===t}}]),u(e,[{key:"isChanged",value:function(){var t=this,n=e.now();return n>this.lastCheck&&!function(){var r=!1;t.lastCheck=n,t.changelog={},Object.keys(t.cache).forEach(function(e){if(!{}.hasOwnProperty.call(t.target,e)){var n=t.cache[e];t.changelog[e]={type:"delete",oldValue:n},r=!0}});var o=new c.default,i={};t.cache=Object.keys(t.target).reduce(function(n,u){var a=t.target[u];if({}.hasOwnProperty.call(t.cache,u)?e.is(a,t.cache[u])||(t.changelog[u]=t.changelog[u]||{type:"set"},t.changelog[u].oldValue=t.cache[u],r=!0):(t.changelog[u]={type:"set"},r=!0),e.isObject(a)){var c=new e(a);c.isChanged()&&(r=!0,t.changelog[u]||(t.changelog[u]={type:"modify"},t.changelog[u].changelog=c.changelog))}if(t.changelog[u]){var f=t.keyMap.shift(a,u);f&&f!==u&&t.target[f]!==a&&(t.changelog[u].oldKey=f,t.changelog[f]?t.changelog[f].newKey=u:i[f]=u),i[u]&&(t.changelog[u].newKey=i[u])}return n[u]=a,o.set(a,u),n},{}),t.keyMap=o,r?t.lastChange=t.lastCheck:t.changelog=void 0}(),this.lastChange===n}}]),e}();t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(14);Object.defineProperty(t,"State",{enumerable:!0,get:function(){return r(o).default}});var i=n(43);Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return r(i).default}});var u=n(13);Object.defineProperty(t,"PropertyObserver",{enumerable:!0,get:function(){return r(u).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(47),c=r(a),f=new WeakMap,s=function(){function e(t,n){var r=this;i(this,e);var o=e.singleton(t,n,this);return o!==this?o:(this.proxy=new c.default(t,n,function(e){return r.getters.forEach(function(t){return t(e)})},function(e){return r.setters.forEach(function(t){return t(e)})}),this.getters=new Set,this.setters=new Set,this)}return u(e,null,[{key:"singleton",value:function(e,t,n){var r=f.get(e);if(r){if(r[t])return r[t];r[t]=n}else f.set(e,o({},t,n));return n}}]),u(e,[{key:"observe",value:function(e,t){var n=this;return this.getters.size||this.proxy.on(),this.getters.add(e),this.setters.add(t||e),function(){n.unobserve(e,t)}}},{key:"unobserve",value:function(e,t){this.getters.delete(e),this.setters.delete(t||e),this.getters.size||this.setters.size||this.proxy.off()}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(45),c=r(a),f="__papillon_state_map__";if({}.hasOwnProperty.call(window,f)){if(!(window[f]instanceof WeakMap))throw new ReferenceError("window."+f+" already defined")}else Object.defineProperty(window,f,{value:new WeakMap});var s=window[f],l=0,y=!1,p=function(){function e(t){if(o(this,e),!e.isObject(t))throw new TypeError("Invalid arguments");var n=s.get(t);if(n)return n;s.set(t,this);var r=new c.default;return this.cache=Object.keys(t).reduce(function(n,o){var i=n[o]=t[o];return e.isObject(i)&&new e(i),r.set(i,o),n},{}),this.keyMap=r,this.target=t,this.lastCheck=e.now(),this.lastChange=0,this}return u(e,null,[{key:"now",value:function(){return y||(l+=1,y=window.requestAnimationFrame(function(){y=void 0})),l}},{key:"isObject",value:function(e){return"object"===("undefined"==typeof e?"undefined":i(e))&&null!==e}},{key:"is",value:function(e,t){return 0===e&&0===t?1/e===1/t:e!==e?t!==t:e===t}}]),u(e,[{key:"isChanged",value:function(){var t=this,n=e.now();return n>this.lastCheck&&!function(){var r=!1;t.lastCheck=n,t.changelog={},Object.keys(t.cache).forEach(function(e){if(!{}.hasOwnProperty.call(t.target,e)){var n=t.cache[e];t.changelog[e]={type:"delete",oldValue:n},r=!0}});var o=new c.default,i={};t.cache=Object.keys(t.target).reduce(function(n,u){var a=t.target[u];if({}.hasOwnProperty.call(t.cache,u)?e.is(a,t.cache[u])||(t.changelog[u]=t.changelog[u]||{type:"set"},t.changelog[u].oldValue=t.cache[u],r=!0):(t.changelog[u]={type:"set"},r=!0),e.isObject(a)){var c=new e(a);c.isChanged()&&(r=!0,t.changelog[u]||(t.changelog[u]={type:"modify"},t.changelog[u].changelog=c.changelog))}if(t.changelog[u]){var f=t.keyMap.shift(a,u);f&&f!==u&&t.target[f]!==a&&(t.changelog[u].oldKey=f,t.changelog[f]?t.changelog[f].newKey=u:i[f]=u),i[u]&&(t.changelog[u].newKey=i[u])}return n[u]=a,o.set(a,u),n},{}),t.keyMap=o,r?t.lastChange=t.lastCheck:t.changelog=void 0}(),this.lastChange===n}}]),e}();t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.engine=void 0;var o=n(28);Object.defineProperty(t,"engine",{enumerable:!0,get:function(){return r(o).default}}),n(0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(41);Object.defineProperty(t,"vdom",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){"use strict";function r(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Array.from(e.children).forEach(function(e){e.constructor[u.CONTROLLER]===t?(o.push(e[u.CONTROLLER]),n.deep&&n.nested&&r(e,t,n,o)):n.deep&&r(e,t,n,o)}),o}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],i=function(){var i=r(e,t,n);Object.assign(o,i),o.length=i.length,(0,a.dispatchEvent)(e,"hybrid-update",{bubbles:!1})};return new MutationObserver(i).observe(e,{childList:!0,subtree:!!n.deep}),e.addEventListener("hybrid-connect",i),o}Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.children=o;var i=(n(2),n(1)),u=n(3),a=n(6);t.default=(0,i.injectable)(o)},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(t,n){if(e.customElements.get(t)){var r=e.customElements.get(t);if(r[v.CONTROLLER]===n)return r;(0,l.error)(TypeError,"define: Element '%name' already defined",{name:t})}(0,d.proxy)(n);var a=n.options||{};if(a.define)try{c(a.define)}catch(e){(0,l.error)(e,"define: Invalid 'define' option")}var f=[],y=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,null,[{key:"observedAttributes",get:function(){return f}},{key:v.CONTROLLER,get:function(){return n}},{key:v.OPTIONS,get:function(){return a}}]),t}(p.default);a.properties=(a.properties||[]).map(h.normalizeProperty).filter(function(e){var t=e.property,r=e.attr;if(Reflect.has(n.prototype,t)){for(var o=void 0,i=n.prototype;!o;)o=Object.getOwnPropertyDescriptor(i,t),i=Object.getPrototypeOf(i);if(!o.get&&"function"==typeof o.value)return Object.defineProperty(y.prototype,t,{value:function(){var e;return(e=this[v.CONTROLLER])[t].apply(e,arguments)}}),!1}return r&&f.push(r), | ||
!0});var b=Object.assign({},a,{name:t});return Object.defineProperty(y,v.PLUGINS,{value:(a.plugins||[]).map(function(e){return e(b,n)}).filter(function(e){return e})}),e.customElements.define(t,y),y}function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];switch(t.length||(0,l.error)(TypeError,"define: Invalid arguments"),f(t[0])){case"object":return Object.keys(t[0]).reduce(function(e,n){return e[n]=a((0,h.camelToDash)(n),t[0][n]),e},{});case"string":return 1===t.length?function(e){return a(t[0],e),e}:a.apply(void 0,t);default:return(0,l.error)(TypeError,"define: Invalid arguments")}}Object.defineProperty(t,"__esModule",{value:!0});var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=c;var l=n(2),y=n(23),p=r(y),d=n(1),h=n(9),v=n(3)}).call(t,n(4))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=(0,r.injectable)(function(e){return e})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Reflect.construct(HTMLElement,t,this.constructor)}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),s=n(9),l=n(6),y=n(3);Object.setPrototypeOf(u.prototype,HTMLElement.prototype);var p=function(e){function t(){r(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return(0,f.callWithContext)(e,function(){Object.defineProperty(e,y.CONTROLLER,{value:new e.constructor[y.CONTROLLER]})}),(0,f.mapInstance)(e[y.CONTROLLER],e),e.constructor[y.OPTIONS].properties.forEach(function(t){var n=t.property,r=t.attr,o=e[y.CONTROLLER][n],i="undefined"==typeof o?"undefined":a(o);"boolean"===i&&Object.defineProperty(e[y.CONTROLLER],n,{get:function(){return o},set:function(t){o=t,"boolean"==typeof t&&Promise.resolve().then(function(){o?e.hasAttribute(r)||e.setAttribute(r,""):e.hasAttribute(r)&&e.removeAttribute(r)})},enumerable:!0});var u=void 0;({}).hasOwnProperty.call(e,n)&&(u=e[n]),Object.defineProperty(e,n,{get:function(){return this[y.CONTROLLER][n]},set:function(e){this[y.CONTROLLER][n]=(0,s.reflectValue)(e,i)}}),void 0!==u&&(e[n]=u)}),e.constructor[y.PLUGINS].map(function(t){return t(e,e[y.CONTROLLER])}),e}return i(t,e),c(t,[{key:"connectedCallback",value:function(){this[y.CONTROLLER].connect&&this[y.CONTROLLER].connect(),(0,l.dispatchEvent)(this,"hybrid-connect",{bubbles:!1})}},{key:"disconnectedCallback",value:function(){this[y.CONTROLLER].disconnect&&this[y.CONTROLLER].disconnect(),(0,l.dispatchEvent)(this,"hybrid-disconnect",{bubbles:!1})}},{key:"attributeChangedCallback",value:function(e,t,n){var r=this,o=(0,s.dashToCamel)(e);n=null!==n&&n;var i=""===n||n;i!==this[o]&&(0,s.queue)(function(){return r[o]=i})}},{key:Symbol.toStringTag,get:function(){return"HTMLHybridElement"}}]),t}(u);t.default=p},function(e,t,n){"use strict";function r(e,t,n,r){var o=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.apply(e[i.CONTROLLER],r)};return e.addEventListener(t,o,r),function(){return e.removeEventListener(t,o,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.listenTo=r;var o=n(1),i=n(3);t.default=(0,o.injectable)(r)},function(e,t,n){"use strict";function r(e,t){for(var n=e.parentElement;n;){if(n.constructor[i.CONTROLLER]===t)return n[i.CONTROLLER];n=n.parentElement}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.parent=r;var o=(n(2),n(1)),i=n(3);t.default=(0,o.injectable)(r)},function(e,t,n){"use strict";(function(e){function n(t){return r?o.add(t):(o=(new Set).add(t),r=e.requestAnimationFrame(function(){o.forEach(function(e){return e()}),r=o=void 0})),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=void 0,o=void 0}).call(t,n(4))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return e.replace(/%[a-z]+/gi,function(e){return t[e.substr(1)]})}function i(e){return e.replace(/ +/gi," ").replace(/(^\n+|\n+$)/,"")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=!1,c=!!a&&new a,f=function(){function e(t){r(this,e),this.prefix=t||"[@hybrids/debug]",this.messages=new Map,this.error=this.error.bind(this),this.warning=this.warning.bind(this)}return u(e,[{key:"docs",value:function(e){var t=this;Object.keys(e).forEach(function(n){return t.messages.set(n,i(e[n]))})}},{key:"resolve",value:function(e,t,n){var r=o(t,n);if("function"==typeof e)e=new e("\n"+this.prefix+" "+r);else try{"\n"!==e.message[0]&&(e.message="\n"+this.prefix+" "+e.message),e.message=e.message+"\n"+this.prefix+" "+r}catch(t){throw e}return e}},{key:"warning",value:function(){var e=this.resolve.apply(this,arguments);c.warn(e)}},{key:"error",value:function(){throw this.resolve.apply(this,arguments)}}]),e}();t.default=f},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(t,n,r){n.run(t.shadowRoot,function(e){var t=e.expr.get(),n=void 0;if(c.State.isObject(t)){var o=new c.State(t);o.isChanged()?n={type:"modify",changelog:o.changelog}:c.State.is(t,e.cache)||(n={type:"set"})}else({}).hasOwnProperty.call(e,"cache")&&c.State.is(t,e.cache)||(n={type:"set",oldValue:e.cache});n&&e.fn(t,n,r),e.cache=t}),e.ShadyCSS&&e.ShadyCSS.applyStyle(t)}function u(e){var t=new l.default(e.template,{markers:Object.assign({},p.default,e.markers),filters:Object.assign({},h.default,e.filters),styles:e.styles,name:e.name}),n=t.getRootPathProperties();return e.properties.forEach(function(e){var t=e.property;return n.add(t)}),function(e,r){var u=new Set([].concat(o(n),[Object.keys(r)])),s=function(e,n){return t.compile(r,e,n)},l=f.schedule.bind(null,function(){i(e,t,s)});(0,f.schedule)(function(){var t=e.attachShadow({mode:"open"});t.appendChild(s()),l()}),u.forEach(function(e){new c.PropertyObserver(r,e).observe(function(e){return e&&"object"===("undefined"==typeof e?"undefined":a(e))?l():null},l)}),e.addEventListener("hybrid-update",l)}}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=u;var c=n(15),f=n(5),s=(n(0),n(12)),l=r(s),y=n(30),p=r(y),d=n(29),h=r(d)}).call(t,n(4))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={string:String,boolean:Boolean,number:Number,not:function(e){return!e}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=r(o),u=n(35),a=r(u),c=n(32),f=r(c),s=n(33),l=r(s),y=n(34),p=r(y),d=n(36),h=r(d),v=n(37),b=r(v),m=n(38),g=r(m),O=n(39),w=r(O);t.default={attr:i.default,model:a.default,class:f.default,for:l.default,if:p.default,on:h.default,prop:b.default,ref:g.default,style:w.default}},function(e,t,n){"use strict";function r(e){var t=e.node,n=e.expr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.evaluate;return function(e){e===!1||void 0===e||null===e?t.removeAttribute(r):t.setAttribute(r,e===!0?"":e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=e.node;e.expr;return n.length?function(e){n.forEach(function(t){e?i.classList.add(t):i.classList.remove(t)})}:function(e,t){var n=t.type,r=t.oldValue,u=t.changelog;switch(n){case"modify":var a=function(){var t=Array.isArray(e);return Object.keys(u).forEach(function(n){switch(u[n].type){case"delete":i.classList.remove(t?u[n].oldValue:n);break;default:t?(u[n].oldValue&&i.classList.remove(u[n].oldValue),i.classList.add(e[n])):e[n]?i.classList.add(n):i.classList.remove(n)}}),"break"}();if("break"===a)break;default:e?!function(){var t=Array.isArray(e);Object.keys(e).forEach(function(n){t?i.classList.add(e[n]):e[n]?i.classList.add(n):i.classList.remove(n)})}():"object"===("undefined"==typeof r?"undefined":o(r))&&null!==r&&!function(){var e=Array.isArray(r);Object.keys(r).forEach(function(t){e?i.classList.remove(r[t]):i.classList.remove(t)})}()}}}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;n(0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=e.index,n=e.length;return Object.assign({number:t+1,first:0===t,last:t===n-1,odd:t%2===0,even:t%2===1},e)}Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e){var t=e.node,n=(e.expr,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"item"),r=new a.default(null,t,!0).items;return function(e,u,c){var f=u.type,s=u.changelog,l=Object.keys(e),y=Reflect.has(e,"length")?e.length:l.length;switch(f){case"modify":var p=function(){var u=[];return Object.assign(r,Object.keys(s).reduce(function(f,p){var d=s[p],h=d.type,v=d.oldKey,b=d.newKey;if("delete"===h)r[p]&&u.push(r[p]);else if("modify"!==h){var m,g=l.indexOf(p),O=l[g-1],w=f[O]||r[O],j=void 0;v||b?(j=r[v]||new a.default(c(t),t),v&&(delete r[v],r[p]&&!b&&u.push(r[p])),j.isAfter(w)||j.insertAfter(w)):r[p]?j=r[p]:(j=new a.default(c(t),t),j.insertAfter(w)),j.setLocals(i((m={},o(m,n,e[p]),o(m,"length",y),o(m,"index",g),o(m,"key",p),m)),e[p]),f[p]=j}return f},{})),u.forEach(function(e){return e.remove()}),Array.isArray(e)&&(r.length=e.length),"break"}();if("break"===p)break;default:!function(){var u=Object.keys(r),f=u.filter(function(t){return!{}.hasOwnProperty.call(e,t)}),s=new Set(f.map(function(e){return r[e]})),p=void 0;Object.assign(r,l.reduce(function(f,l,d){var h,v=void 0,b=u.find(function(t){return r[t]&&r[t].getValue()===e[l]})||{}.hasOwnProperty.call(r,l)&&l;return b?(v=r[b],delete r[b],s.delete(v),b!==l&&(r[l]&&s.add(r[l]),v.isAfter(p)||v.insertAfter(p))):(v=new a.default(c(t),t),v.insertAfter(p)),v.setLocals(i((h={},o(h,n,e[l]),o(h,"index",d),o(h,"length",y),o(h,"key",l),h)),e[l]),p=v,f[l]=v,f},{})),s.forEach(function(e){return e.remove()}),f.forEach(function(e){return r[e]&&delete r[e]}),Array.isArray(e)&&(r.length=e.length)}()}}};var u=(n(0),n(11)),a=r(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.node,n=void 0;return function(e,r,o){e?(n=new u.default(o(t),t),n.insertAfter()):(n&&n.remove(),n=null)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=(n(0),n(11)),u=r(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return{up:function(){t.set(n.get(e))},down:function(){e.checked=t.get()===n.get(e)}}}function i(e,t,n){return{up:function(){var r=t.get(),o=n.get(e);if(e.hasAttribute("value"))if(r&&Array.isArray(r)||(r=[],t.set(r)),e.checked)r.indexOf(o)===-1&&r.push(o);else{var i=r.indexOf(o);i>-1&&r.splice(i,1)}else t.set(e.checked)},down:function(t){e.hasAttribute("value")?t?e.checked=t.indexOf(n.get(e))>-1:e.checked=!1:e.checked=!!t}}}function u(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{up:function(){var o=t.get(),i=Array.from(e.options).filter(function(e){return e.selected}).map(function(e){return n.get(e)});r?(Array.isArray(o)||(o=[],t.set(o)),Object.assign(o,i),o.length=i.length):t.set(i[0])},down:function(t){r?void 0===t&&(t=[]):t=[t],Array.from(e.options).forEach(function(e){var r=n.get(e);e.selected=t.indexOf(r)>-1})}}}function a(e,t,n){return{up:function(){t.set(n.get(e))},down:function(t){void 0!==t&&n.set(e,t)}}}function c(e){var t=e.node,n=e.expr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",c=arguments[2],s=new l.default(r),y=void 0,p=!1;switch(t.type){case"radio":y=o(t,n,s);break;case"checkbox":y=i(t,n,s);break;case"select-one":y=u(t,n,s);break;case"select-multiple":y=u(t,n,s,!0);break;default:"INPUT"===t.nodeName&&(c=c||"input"),y=a(t,n,s)}return t.addEventListener(c||"change",function(){p=!0,f.Observer.requestAnimationFrame(y.up),f.Observer.requestAnimationFrame(function(){return p=!1})}),function(e){p||y.down(e)}}Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=c;var f=n(15),s=(n(0),n(8)),l=r(s)},function(e,t,n){"use strict";function r(e,t,n){var r=e.node,u=e.expr,a=e.attr;r.addEventListener(t,function(e){try{u.get({event:e})}catch(e){(0,i.error)(e,"on: Execution failed %node",{node:(0,o.stringifyMarker)(r,a)})}},"capture"===n)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(12),i=n(0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){for(var t=e.node,n=e.expr,r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var a=(o.length?o:[n.evaluate]).map(function(e){return new u.default(e)});return function(e){a.forEach(function(n){return n.set(t,e)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(8),u=r(i)},function(e,t,n){"use strict";function r(e){var t=e.node,n=e.expr;n.set(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var u=e.node;e.expr;return n.length?function(e){n.map(r).forEach(function(t){e||0===e?u.style.setProperty(t,e):u.style.removeProperty(t)})}:function(e,t){var n=t.type,o=t.oldValue,a=t.changelog;switch(n){case"modify":Object.keys(a).forEach(function(t){switch(a[t].type){case"delete":u.style.removeProperty(r(t));break;default:u.style.setProperty(r(t),e[t])}});break;default:e?Object.keys(e).forEach(function(t){return u.style.setProperty(r(t),e[t])}):"object"===("undefined"==typeof o?"undefined":i(o))&&null!==o&&Object.keys(o).forEach(function(e){return u.style.removeProperty(r(e))})}}}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=o;n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=t.error=void 0;var r=n(7),o=new r.Debug("[@hybrids/vdom]"),i=o.error,u=o.warning;t.error=i,t.warning=u},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n=e.properties,o=e.render,c=e.autobind,f=void 0===c||c,s=n.map(function(e){var t=e.property;return t}),l=new Set;return f&&!function(){for(var e=t.prototype;e;)Reflect.ownKeys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);n.get||"render"===t||l.add(t)}),e=Object.getPrototypeOf(e),e===Object.prototype&&(e=null)}(),function(e,t){var n={},c=new Set([].concat(r(Object.keys(t)),r(s))),f=a.schedule.bind(null,function(){var r=!1;c.forEach(function(e){var o=t[e];if(o&&"object"===("undefined"==typeof o?"undefined":i(o))){var a=new u.State(o);!a.isChanged()&&o===n[e]&&{}.hasOwnProperty.call(n,e)||(r=!0)}else o===n[e]&&{}.hasOwnProperty.call(n,e)||(r=!0);n[e]=o}),r&&o(t.render(),e.shadowRoot)});c.forEach(function(e){return new u.PropertyObserver(t,e).observe(f)}),l.forEach(function(e){return t[e]=t[e].bind(t)}),(0,a.schedule)(function(){e.attachShadow({mode:"open"}),f()})}}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=o;var u=n(48),a=n(5);n(40)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e),this.map=new Map}return o(e,[{key:"set",value:function(e,t){var n=this.map.get(e);return n||(n=new Set,this.map.set(e,n)),t&&n.add(t),n}},{key:"shift",value:function(e,t){var n=this.map.get(e);if(n&&n.size){if(n.has(t))return n.delete(t),t;var r=!0,o=!1,i=void 0;try{for(var u,a=n[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value;return n.delete(c),c}}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}}return!1}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(14),a=r(u),c=n(13),f=r(c),s=void 0,l=void 0,y=function(){function e(t,n,r){var i=this;if(o(this,e),!t||!n||!r)throw new TypeError("Invalid arguments");this.revert=[],this.state=new a.default([].concat(n).reduce(function(e,n){var r=new f.default(t,n);return e[n]=t[n],i.revert.push(r.observe(function(t){a.default.is(e[n],t)?a.default.isObject(t)&&i.check():(e[n]=t,i.check())})),e},{})),this.callback=function(){i.state.isChanged()&&r(i.state.changelog)}}return i(e,null,[{key:"requestAnimationFrame",value:function(e){return s?l.add(e):(l=(new Set).add(e),s=window.requestAnimationFrame(function(){l.forEach(function(e){return e()}),s=l=void 0})),e}},{key:"cancelAnimationFrame",value:function(e){l&&l.delete(e)}}]),i(e,[{key:"check",value:function(){e.requestAnimationFrame(this.callback)}},{key:"destroy",value:function(){e.cancelAnimationFrame(this.callback),this.revert.forEach(function(e){return e()})}}]),e}();t.default=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n,o,i){r(this,e),this.host=t,this.key=n,this.getter=o,this.setter=i||o}return o(e,[{key:"getOwnDescriptor",value:function(){var e=Object.getOwnPropertyDescriptor(this.host,this.key);if(e){if(!e.configurable)throw new TypeError("Cannot create proxy for not configurable property '"+this.key+"'");if(!e.get&&!e.set&&!e.writable)throw new TypeError("Cannot create proxy for readonly property '"+this.key+"'")}return e}},{key:"getProtoDescriptor",value:function(){for(var e=this,t=Object.getPrototypeOf(this.host),n=void 0;t&&!(n=Object.getOwnPropertyDescriptor(t,this.key));)t=Object.getPrototypeOf(t);return n&&(n.get||n.set||(n.get=function(){delete e.host[e.key];var t=e.host[e.key];return e.on(),t},n.set=function(t){delete e.host[e.key],e.host[e.key]=t,e.on()})),n}},{key:"on",value:function(){var e=this.getOwnDescriptor();e?this.ownProperty=!0:(this.ownProperty=!1,e=this.getProtoDescriptor()),e||(this.ownProperty=!0,this.notDefined=!0,e={enumerable:!0,writable:!0,configurable:!0}),this.desc=e,this.value=this.host[this.key],Object.defineProperty(this.host,this.key,{configurable:!0,enumerable:this.desc.enumerable,get:this.get.bind(this),set:this.set.bind(this)})}},{key:"off",value:function(){this.ownProperty?this.notDefined?delete this.host[this.key]:(this.desc.get||this.desc.set||(this.desc.value=this.value),Object.defineProperty(this.host,this.key,this.desc)):delete this.host[this.key]}},{key:"get",value:function(){return this.desc.get&&(this.value=this.desc.get.call(this.host)),this.getter(this.value),this.value}},{key:"set",value:function(e){this.notDefined=!1,this.desc.set&&this.desc.set.call(this.host,e),(this.desc.writable||this.desc.get||this.desc.set)&&(this.value=e),this.setter(this.value)}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e),this.map=new Map}return o(e,[{key:"set",value:function(e,t){var n=this.map.get(e);return n||(n=new Set,this.map.set(e,n)),t&&n.add(t),n}},{key:"shift",value:function(e,t){var n=this.map.get(e);if(n&&n.size){if(n.has(t))return n.delete(t),t;var r=!0,o=!1,i=void 0;try{for(var u,a=n[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value;return n.delete(c),c}}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}}return!1}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(17),a=r(u),c=n(16),f=r(c),s=void 0,l=void 0,y=function(){function e(t,n,r){var i=this;if(o(this,e),!t||!n||!r)throw new TypeError("Invalid arguments");this.revert=[],this.state=new a.default([].concat(n).reduce(function(e,n){var r=new f.default(t,n);return e[n]=t[n],i.revert.push(r.observe(function(t){a.default.is(e[n],t)?a.default.isObject(t)&&i.check():(e[n]=t,i.check())})),e},{})),this.callback=function(){i.state.isChanged()&&r(i.state.changelog)}}return i(e,null,[{key:"requestAnimationFrame",value:function(e){return s?l.add(e):(l=(new Set).add(e),s=window.requestAnimationFrame(function(){l.forEach(function(e){return e()}),s=l=void 0})),e}},{key:"cancelAnimationFrame",value:function(e){l&&l.delete(e)}}]),i(e,[{key:"check",value:function(){e.requestAnimationFrame(this.callback)}},{key:"destroy",value:function(){e.cancelAnimationFrame(this.callback),this.revert.forEach(function(e){return e()})}}]),e}();t.default=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n,o,i){r(this,e),this.host=t,this.key=n,this.getter=o,this.setter=i||o}return o(e,[{key:"getOwnDescriptor",value:function(){var e=Object.getOwnPropertyDescriptor(this.host,this.key);if(e){if(!e.configurable)throw new TypeError("Cannot create proxy for not configurable property '"+this.key+"'");if(!e.get&&!e.set&&!e.writable)throw new TypeError("Cannot create proxy for readonly property '"+this.key+"'")}return e}},{key:"getProtoDescriptor",value:function(){for(var e=this,t=Object.getPrototypeOf(this.host),n=void 0;t&&!(n=Object.getOwnPropertyDescriptor(t,this.key));)t=Object.getPrototypeOf(t);return n&&(n.get||n.set||(n.get=function(){delete e.host[e.key];var t=e.host[e.key];return e.on(),t},n.set=function(t){delete e.host[e.key],e.host[e.key]=t,e.on()})),n}},{key:"on",value:function(){var e=this.getOwnDescriptor();e?this.ownProperty=!0:(this.ownProperty=!1,e=this.getProtoDescriptor()),e||(this.ownProperty=!0,this.notDefined=!0,e={enumerable:!0,writable:!0,configurable:!0}),this.desc=e,this.value=this.host[this.key],Object.defineProperty(this.host,this.key,{configurable:!0,enumerable:this.desc.enumerable,get:this.get.bind(this),set:this.set.bind(this)})}},{key:"off",value:function(){this.ownProperty?this.notDefined?delete this.host[this.key]:(this.desc.get||this.desc.set||(this.desc.value=this.value),Object.defineProperty(this.host,this.key,this.desc)):delete this.host[this.key]}},{key:"get",value:function(){return this.desc.get&&(this.value=this.desc.get.call(this.host)),this.getter(this.value),this.value}},{key:"set",value:function(e){this.notDefined=!1,this.desc.set&&this.desc.set.call(this.host,e),(this.desc.writable||this.desc.get||this.desc.set)&&(this.value=e),this.setter(this.value)}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17);Object.defineProperty(t,"State",{enumerable:!0,get:function(){return r(o).default}});var i=n(46);Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return r(i).default}});var u=n(16);Object.defineProperty(t,"PropertyObserver",{enumerable:!0,get:function(){return r(u).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var o=n(18);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var i=n(19);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})})}])}); | ||
//# sourceMappingURL=hybrids.min.js.map |
{ | ||
"name": "hybrids", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Web Components Toolkit", | ||
@@ -25,5 +25,2 @@ "main": "dist/hybrids.js", | ||
"devDependencies": { | ||
"@webcomponents/custom-elements": "github:webcomponents/custom-elements", | ||
"@webcomponents/shadycss": "github:webcomponents/shadycss", | ||
"@webcomponents/shadydom": "github:webcomponents/shadydom", | ||
"babel-cli": "^6.18.0", | ||
@@ -48,5 +45,4 @@ "babel-core": "^6.7.6", | ||
"lerna": "2.0.0-beta.30", | ||
"template": "github:webcomponents/template", | ||
"webpack": "2.2.0-rc.4" | ||
} | ||
} |
142
README.md
@@ -1,3 +0,143 @@ | ||
# hybrids | ||
# Hybrids | ||
Hybrids is a toolkit for creating web components using [Custom Elements](https://www.w3.org/TR/custom-elements/), [Template](https://www.w3.org/TR/html-templates/) and [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) specifications. It supposed to create the simplest and the easiest to use API. | ||
Name of the project is taken from *hybrid architecture*, which is a core concept of the library. | ||
#### Hybrid Architecture | ||
* Component logic decoupled from custom element prototype | ||
* Full logic encapsulation with public and private access | ||
* Attributes and properties mapping with type reflection | ||
* Normalized lifecycle callbacks | ||
* Easily extendable functionality with plugins | ||
* Helper methods for listen and dispatch events, get children or parent components and more | ||
* Future possibility for server side rendering* | ||
### Core Packages | ||
| Package | Description | | ||
|-------------------|---------------------------------------| | ||
| `@hybrids/core` | Hybrid custom elements definition and helper methods | | ||
| `@hybrids/shim` | Collection of polyfills for required Web APIs | | ||
| `@hybrids/debug` | Helpful documentation in browser DevTools | | ||
### Plugins | ||
| Package | Description | | ||
|-------------------|---------------------------------------| | ||
| `@hybrids/engine` | View engine with unidirectional data binding using consistent and predictable micro DSL | | ||
| `@hybrids/vdom` | Middleware for connecting any React-like render library | | ||
| `@hybrids/store`* | State management adapted for Hybrid Custom Elements | | ||
\* Not yet implemented | ||
## Getting Started | ||
Simple counter component can be defined like this: | ||
```javascript | ||
class MyCounter { | ||
constructor() { | ||
this.value = 0; | ||
} | ||
count() { | ||
this.value += 1; | ||
} | ||
} | ||
``` | ||
There is no inheritance, no dependency injection or difficult structure - just simple definition. How can we make it | ||
a web component, but still using it's API? | ||
```javascript | ||
import { define } from '@hybrids/core'; | ||
import { engine } from '@hybrids/engine'; | ||
class MyCounter { | ||
static get options() { | ||
return { | ||
plugins: [engine], | ||
properties: ['value', 'count'] | ||
template: `{{ value }}` | ||
}; | ||
} | ||
constructor() { | ||
this.value = 0; | ||
} | ||
count() { | ||
this.value += 1; | ||
} | ||
} | ||
define({ MyCounter }); | ||
``` | ||
From now `<my-counter>` is fully working custom element: | ||
* It displays current value in Shadow DOM (it uses `@hybrids/engine` plugin) | ||
* Value can be set by attribute `<my-counter value="100"></my-counter>` | ||
* You can access your element in DOM and set property `myCounter.value = 10` | ||
or call `myCounter.count()` | ||
However, the definition has not changed. There is only one difference - `options` static property. This object contains metadata required for connecting logic and custom element. | ||
For example, using `engine` plugin is optional and can be easily replaced with `vdom` package to use React-like library. | ||
## Documentation | ||
Work in progress. | ||
## Installation | ||
#### NPM/Yarn | ||
The best way to use Hybrids is to use package manager and JavaScript bundler (e.g. [webpack](https://webpack.js.org/)): | ||
```bash | ||
npm install --save @hybrids/core | ||
# install plugins which you will use | ||
npm install --save @hybrids/engine | ||
npm install --save @hybrids/vdom | ||
``` | ||
```javascript | ||
import { define } from '@hybrids/core'; | ||
import { engine } from '@hybrids/engine'; | ||
``` | ||
Packages are in development mode by default. Remember to create production package with `process.env.NODE_ENV` set to `production`. | ||
#### In Browsers | ||
Alternatively you can use built version of Hybrids. Bundle contains `core`, `engine` and `vdom` packages exported in global `hybrids` namespace (UMD). All packages has named exports, so you can use all available API like this: `hybrids.define` or `hybrids.engine`. | ||
**Development mode** | ||
```html | ||
<script src="https://unpkg.com/hybrids@0.6.1/dist/hybrids.js"></script> | ||
``` | ||
**Production mode** | ||
```html | ||
<script src="https://unpkg.com/hybrids@0.6.1/dist/hybrids.min.js"></script> | ||
``` | ||
## Browser Support | ||
Hybrids supports all evergreen browsers and IE11 with polyfills included where needed. Codebase uses ES2015 APIs, so for IE11 you need also include polyfill for that. The easiest way is to use `@hybrids/shim` and [`core-js`](https://github.com/zloirock/core-js) packages at top of your project: | ||
```javascript | ||
import 'core-js/shim'; // only for IE11 | ||
import '@hybrids/shim'; | ||
... | ||
``` | ||
`@hybrids/shim` contains following polyfills: | ||
* Custom Elements: [https://github.com/webcomponents/custom-elements](https://github.com/webcomponents/custom-elements) | ||
* Template: [https://github.com/webcomponents/template](https://github.com/webcomponents/template) | ||
* Shady DOM: [https://github.com/webcomponents/shadydom](https://github.com/webcomponents/shadydom) | ||
* Shady CSS: [https://github.com/webcomponents/shadycss](https://github.com/webcomponents/shadycss) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
791857
20
9
499
144