Socket
Socket
Sign inDemoInstall

inferno

Package Overview
Dependencies
Maintainers
3
Versions
334
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferno - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

32

dist/inferno-component.js

@@ -59,7 +59,32 @@ /*!

var screenWidth = window.screen.width;
var screenHeight = window.screen.height;
var scrollX = 0;
var scrollY = 0;
window.onscroll = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
};
window.resize = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
screenWidth = window.screen.width;
screenHeight = window.screen.height;
};
function Lifecycle() {
this._listeners = [];
this.scrollX = null;
this.scrollY = null;
this.screenHeight = screenHeight;
this.screenWidth = screenWidth;
}
Lifecycle.prototype = {
refresh: function refresh() {
this.scrollX = window.scrollX;
this.scrollY = window.scrollY;
},
addListener: function addListener(callback) {

@@ -79,3 +104,5 @@ this._listeners.push(callback);

// TODO: for node we need to check if document is valid
var noOp = 'Inferno Warning: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.';
// Copy of the util from dom/util, otherwise it makes massive bundles
function getActiveNode() {

@@ -85,2 +112,3 @@ return document.activeElement;

// Copy of the util from dom/util, otherwise it makes massive bundles
function resetActiveNode(activeNode) {

@@ -92,4 +120,2 @@ if (activeNode !== document.body && document.activeElement !== activeNode) {

var noOp = 'Inferno Warning: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.';
function queueStateChanges(component, newState, callback) {

@@ -96,0 +122,0 @@ for (var stateKey in newState) {

2

dist/inferno-component.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoComponent=e()}(this,function(){"use strict";function t(){this._listeners=[]}function e(t){return void 0===t||null===t}function n(){return document.activeElement}function o(t){t!==document.body&&document.activeElement!==t&&t.focus()}function i(t,e,n){for(var o in e)t._pendingState[o]=e[o];t._pendingSetState===!1&&(t._pendingSetState=!0,r(t,!1,n))}function r(e,i,r){(e._deferSetState===!1||i)&&!function(){e._pendingSetState=!1;var u=e._pendingState,s=e.state,c=a.extends({},s,u);e._pendingState={};var l=e._updateComponent(s,c,e.props,e.props,i),f=e._lastNode,p=f.dom.parentNode,d=n(),h=new t;e._patch(f,l,p,h,e.context,null,!1),e._lastNode=l,h.addListener(function(){h.trigger(),r&&r()}),o(d)}()}var a={};a.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},t.prototype={addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=0;t<this._listeners.length;t++)this._listeners[t]()}};var u="Inferno Warning: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",s=function(){function t(e){a.classCallCheck(this,t),this.props=e||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._lastNode=null,this._unmounted=!1,this.context={},this._patch=null}return a.createClass(t,[{key:"render",value:function(){}},{key:"forceUpdate",value:function(t){if(this._unmounted===!0)throw Error(u);r(this,!0,t)}},{key:"setState",value:function(t,e){if(this._unmounted===!0)throw Error(u);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");i(this,t,e)}},{key:"componentDidMount",value:function(){}},{key:"componentWillMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(){}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillReceiveProps",value:function(){}},{key:"componentWillUpdate",value:function(){}},{key:"getChildContext",value:function(){}},{key:"_updateComponent",value:function(t,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!e(i)&&e(i.children)&&(i.children=o.children),o!==i||t!==n||r){o!==i&&(this._blockSetState=!0,this.componentWillReceiveProps(i),this._blockSetState=!1);var a=this.shouldComponentUpdate(i,n);if(a!==!1){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var u=this.render();return this.componentDidUpdate(o,t),u}}}}]),t}();return s});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoComponent=e()}(this,function(){"use strict";function t(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=c,this.screenWidth=l}function e(t){return void 0===t||null===t}function n(){return document.activeElement}function o(t){t!==document.body&&document.activeElement!==t&&t.focus()}function i(t,e,n){for(var o in e)t._pendingState[o]=e[o];t._pendingSetState===!1&&(t._pendingSetState=!0,r(t,!1,n))}function r(e,i,r){(e._deferSetState===!1||i)&&!function(){e._pendingSetState=!1;var l=e._pendingState,c=e.state,u=s.extends({},c,l);e._pendingState={};var a=e._updateComponent(c,u,e.props,e.props,i),d=e._lastNode,f=d.dom.parentNode,p=n(),h=new t;e._patch(d,a,f,h,e.context,null,!1),e._lastNode=a,h.addListener(function(){h.trigger(),r&&r()}),o(p)}()}var s={};s.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var l=window.screen.width,c=window.screen.height,u=0,a=0;window.onscroll=function(t){u=window.scrollX,a=window.scrollY},window.resize=function(t){u=window.scrollX,a=window.scrollY,l=window.screen.width,c=window.screen.height},t.prototype={refresh:function(){this.scrollX=window.scrollX,this.scrollY=window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=0;t<this._listeners.length;t++)this._listeners[t]()}};var d="Inferno Warning: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",f=function(){function t(e){s.classCallCheck(this,t),this.props=e||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._lastNode=null,this._unmounted=!1,this.context={},this._patch=null}return s.createClass(t,[{key:"render",value:function(){}},{key:"forceUpdate",value:function(t){if(this._unmounted===!0)throw Error(d);r(this,!0,t)}},{key:"setState",value:function(t,e){if(this._unmounted===!0)throw Error(d);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");i(this,t,e)}},{key:"componentDidMount",value:function(){}},{key:"componentWillMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(){}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillReceiveProps",value:function(){}},{key:"componentWillUpdate",value:function(){}},{key:"getChildContext",value:function(){}},{key:"_updateComponent",value:function(t,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!e(i)&&e(i.children)&&(i.children=o.children),o!==i||t!==n||r){o!==i&&(this._blockSetState=!0,this.componentWillReceiveProps(i),this._blockSetState=!1);var s=this.shouldComponentUpdate(i,n);if(s!==!1){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var l=this.render();return this.componentDidUpdate(o,t),l}}}}]),t}();return f});

@@ -99,2 +99,3 @@ /*!

this.key = null;
this.clipData = null;
}

@@ -167,3 +168,3 @@

}
events[prop.substring(2).toLowerCase()] = props[prop];
events[prop.toLowerCase()] = props[prop];
delete props[prop];

@@ -170,0 +171,0 @@ } else if (isAttrAComponentHook(prop) && isFunction(tag)) {

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.InfernoCreateElement=n()}(this,function(){"use strict";function t(t){return t instanceof Array}function n(t){return void 0===t||null===t}function e(t){return void 0===t||null===t||t===!1}function o(t){return"function"==typeof t}function r(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function l(t){return"onCreated"===t||"onAttached"===t||"onWillDetach"===t||"onWillUpdate"===t||"onDidUpdate"===t}function u(t){return"onComponentWillMount"===t||"onComponentDidMount"===t||"onComponentWillUnmount"===t||"onComponentShouldUpdate"===t||"onComponentWillUpdate"===t||"onComponentDidUpdate"===t}function i(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null}function s(t){return new i(t)}function a(e,i){var s=null,a=null,f=null,c=null,h=null;if(!n(e)){if(t(e))return e;for(var d in e)"className"===d?c=e[d]:"style"===d?h=e[d]:l(d)&&!o(i)?(n(a)&&(a={}),a[d.substring(2).toLowerCase()]=e[d],delete e[d]):r(d)&&!o(i)?(n(s)&&(s={}),s[d.substring(2).toLowerCase()]=e[d],delete e[d]):u(d)&&o(i)?(n(a)&&(a={}),a["c"+d.substring(3)]=e[d],delete e[d]):o(i)?f=e:(n(f)&&(f={}),f[d]=e[d])}return{attrs:f,events:s,className:c,style:h,hooks:a}}function f(o){var r=o.tag,l=o.attrs,u=o.children,i=o.className,f=o.style;o.events,o.hooks;if(void 0===r&&!n(l)&&!l.tpl&&!n(u)&&0===u.length)return null;var h=n(l)||n(l.key)?void 0:l.key;n(u)||0!==u.length?e(u)||(u=c(t(u)&&1===u.length?u[0]:u)):u=null,void 0!==h&&delete l.key;var d=a(l,r),y=s();return i=i||d.className,f=f||d.style,y.tag=r||null,y.attrs=d.attrs||null,y.events=d.events||null,y.hooks=d.hooks||null,y.children=void 0!==u?u:null,y.key=void 0!==h?h:null,y.className=void 0!==i?i:null,y.style=void 0!==f?f:null,y}function c(e){var o=!n(e);if(o&&t(e)){for(var r=[],l=0;l<e.length;l++){var u=e[l];n(u)||"object"!==("undefined"==typeof u?"undefined":d.typeof(u))?r.push(u):t(u)?u.length>0?r.push(c(u)):r.push(null):r.push(f(u))}return r}return o&&"object"===("undefined"==typeof e?"undefined":d.typeof(e))&&void 0===e.dom?f(e):e}function h(t,n){for(var e=arguments.length,o=Array(e>2?e-2:0),r=2;e>r;r++)o[r-2]=arguments[r];return f({tag:t,attrs:n,children:o})}var d={};return d.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},d.classCallCheck=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},d.createClass=function(){function t(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(n,e,o){return e&&t(n.prototype,e),o&&t(n,o),n}}(),d.extends=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},i.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}},h});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.InfernoCreateElement=n()}(this,function(){"use strict";function t(t){return t instanceof Array}function n(t){return void 0===t||null===t}function e(t){return void 0===t||null===t||t===!1}function o(t){return"function"==typeof t}function l(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function r(t){return"onCreated"===t||"onAttached"===t||"onWillDetach"===t||"onWillUpdate"===t||"onDidUpdate"===t}function i(t){return"onComponentWillMount"===t||"onComponentDidMount"===t||"onComponentWillUnmount"===t||"onComponentShouldUpdate"===t||"onComponentWillUpdate"===t||"onComponentDidUpdate"===t}function u(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function s(t){return new u(t)}function a(e,u){var s=null,a=null,f=null,c=null,h=null;if(!n(e)){if(t(e))return e;for(var d in e)"className"===d?c=e[d]:"style"===d?h=e[d]:r(d)&&!o(u)?(n(a)&&(a={}),a[d.substring(2).toLowerCase()]=e[d],delete e[d]):l(d)&&!o(u)?(n(s)&&(s={}),s[d.toLowerCase()]=e[d],delete e[d]):i(d)&&o(u)?(n(a)&&(a={}),a["c"+d.substring(3)]=e[d],delete e[d]):o(u)?f=e:(n(f)&&(f={}),f[d]=e[d])}return{attrs:f,events:s,className:c,style:h,hooks:a}}function f(o){var l=o.tag,r=o.attrs,i=o.children,u=o.className,f=o.style;o.events,o.hooks;if(void 0===l&&!n(r)&&!r.tpl&&!n(i)&&0===i.length)return null;var h=n(r)||n(r.key)?void 0:r.key;n(i)||0!==i.length?e(i)||(i=c(t(i)&&1===i.length?i[0]:i)):i=null,void 0!==h&&delete r.key;var d=a(r,l),y=s();return u=u||d.className,f=f||d.style,y.tag=l||null,y.attrs=d.attrs||null,y.events=d.events||null,y.hooks=d.hooks||null,y.children=void 0!==i?i:null,y.key=void 0!==h?h:null,y.className=void 0!==u?u:null,y.style=void 0!==f?f:null,y}function c(e){var o=!n(e);if(o&&t(e)){for(var l=[],r=0;r<e.length;r++){var i=e[r];n(i)||"object"!==("undefined"==typeof i?"undefined":d.typeof(i))?l.push(i):t(i)?i.length>0?l.push(c(i)):l.push(null):l.push(f(i))}return l}return o&&"object"===("undefined"==typeof e?"undefined":d.typeof(e))&&void 0===e.dom?f(e):e}function h(t,n){for(var e=arguments.length,o=Array(e>2?e-2:0),l=2;e>l;l++)o[l-2]=arguments[l];return f({tag:t,attrs:n,children:o})}var d={};return d.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},d.classCallCheck=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},d.createClass=function(){function t(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(n,e,o){return e&&t(n.prototype,e),o&&t(n,o),n}}(),d.extends=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},u.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}},h});

@@ -59,7 +59,32 @@ /*!

var screenWidth = window.screen.width;
var screenHeight = window.screen.height;
var scrollX = 0;
var scrollY = 0;
window.onscroll = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
};
window.resize = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
screenWidth = window.screen.width;
screenHeight = window.screen.height;
};
function Lifecycle() {
this._listeners = [];
this.scrollX = null;
this.scrollY = null;
this.screenHeight = screenHeight;
this.screenWidth = screenWidth;
}
Lifecycle.prototype = {
refresh: function refresh() {
this.scrollX = window.scrollX;
this.scrollY = window.scrollY;
},
addListener: function addListener(callback) {

@@ -198,3 +223,3 @@ this._listeners.push(callback);

}
var dom = mountNode(nextNode, null, namespace, lifecycle, context, instance, isSVG);
var dom = mount(nextNode, null, namespace, lifecycle, context, instance, isSVG);

@@ -457,2 +482,19 @@ nextNode.dom = dom;

function handleLazyAttached(node, lifecycle, dom) {
lifecycle.addListener(function () {
var rect = dom.getBoundingClientRect();
if (lifecycle.scrollY === null) {
lifecycle.refresh();
}
node.clipData = {
top: rect.top + lifecycle.scrollY,
left: rect.left + lifecycle.scrollX,
bottom: rect.bottom + lifecycle.scrollY,
right: rect.right + lifecycle.scrollX,
pending: false
};
});
}
function diffChildren(lastNode, nextNode, dom, lifecycle, context, instance, isSVG) {

@@ -478,3 +520,3 @@ var nextChildren = nextNode.children;

} else {
mountNode(nextChildren, dom, lifecycle, context, instance, isSVG);
mount(nextChildren, dom, lifecycle, context, instance, isSVG);
}

@@ -588,3 +630,37 @@ }

function diffNodesWithTemplate(lastNode, nextNode, lastBp, nextBp, parentDom, lifecycle, context, instance) {
var lazyNodeMap = new Map();
function patchLazyNode(value) {
patchNode(value.lastNode, value.nextNode, value.parentDom, value.lifecycle, null, null, false, true);
value.clipData.pending = false;
}
function runPatchLazyNodes() {
if (typeof requestIdleCallback !== 'undefined') {
requestIdleCallback(patchLazyNodes);
} else {
setTimeout(patchLazyNodes, 100);
}
}
function patchLazyNodes() {
lazyNodeMap.forEach(patchLazyNode);
lazyNodeMap.clear();
runPatchLazyNodes();
}
runPatchLazyNodes();
function setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle) {
var lazyNodeEntry = lazyNodeMap.get(dom);
if (lazyNodeEntry === void 0) {
lazyNodeMap.set(dom, { lastNode: lastNode, nextNode: nextNode, parentDom: parentDom, clipData: clipData, lifecycle: lifecycle });
} else {
lazyNodeEntry.nextNode = nextNode;
}
clipData.pending = true;
}
function diffNodesWithTemplate(lastNode, nextNode, lastBp, nextBp, parentDom, lifecycle, context, instance, skipLazyCheck) {
var nextHooks = void 0;

@@ -631,2 +707,20 @@

if (nextBp.lazy === true && skipLazyCheck === false) {
var clipData = lastNode.clipData;
if (lifecycle.scrollY === null) {
lifecycle.refresh();
}
nextNode.clipData = clipData;
if (clipData.pending === true || clipData.top - lifecycle.scrollY > lifecycle.screenHeight) {
setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle);
return;
}
if (clipData.bottom < lifecycle.scrollY) {
setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle);
return;
}
}
if (lastChildrenType > 0 || nextChildrenType > 0) {

@@ -643,3 +737,3 @@ if (nextChildrenType === 5 || lastChildrenType === 5) {

} else {
mountNode(nextChildren, dom, lifecycle, context, instance);
mount(nextChildren, dom, lifecycle, context, instance);
}

@@ -807,3 +901,3 @@ } else if (nextChildrenType === 0 || isInvalidNode(nextChildren)) {

function patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG) {
function patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG, skipLazyCheck) {
var lastBp = lastNode.bp;

@@ -815,3 +909,3 @@ var nextBp = nextNode.bp;

} else {
diffNodesWithTemplate(lastNode, nextNode, lastBp, nextBp, parentDom, lifecycle, context, instance);
diffNodesWithTemplate(lastNode, nextNode, lastBp, nextBp, parentDom, lifecycle, context, instance, skipLazyCheck);
}

@@ -822,5 +916,5 @@ }

if (isNode !== null) {
patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG);
patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG, false);
} else if (isInvalidNode(lastNode)) {
mountNode(nextNode, parentDom, lifecycle, context, instance, isSVG);
mount(nextNode, parentDom, lifecycle, context, instance, isSVG);
} else if (isInvalidNode(nextNode)) {

@@ -832,3 +926,3 @@ remove(lastNode, parentDom);

} else {
var dom = mountNode(nextNode, null, lifecycle, context, instance, isSVG);
var dom = mount(nextNode, null, lifecycle, context, instance, isSVG);
nextNode.dom = dom;

@@ -841,3 +935,3 @@ replaceNode(parentDom, dom, parentDom.firstChild);

} else {
patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG);
patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG, false);
}

@@ -942,3 +1036,3 @@ }

if (!isInvalidNode(nextNode)) {
patch(lastNode, nextNode, parentDom, lifecycle, context, instance, true, false);
patch(lastNode, nextNode, parentDom, lifecycle, context, instance, false, false);
lastNode.dom = nextNode.dom;

@@ -965,3 +1059,3 @@ instance._lastNode = nextNode;

_nextNode.dom = dom;
patch(instance, _nextNode, dom, lifecycle, context, null, true, false);
patch(instance, _nextNode, dom, lifecycle, context, null, false, false);
lastNode.instance = _nextNode;

@@ -1006,3 +1100,3 @@ if (nextHooksDefined && !isNullOrUndefined(nextHooks.componentDidUpdate)) {

} else {
domNode = mountNode(nextChild, null, context, instance, isSVG);
domNode = mount(nextChild, null, context, instance, isSVG);
}

@@ -1063,3 +1157,3 @@

} else if (sameLength === true) {
var _domNode = mountNode(_nextChild, null, lifecycle, context, instance, isSVG);
var _domNode = mount(_nextChild, null, lifecycle, context, instance, isSVG);
var _domChild = domChildren[index];

@@ -1236,3 +1330,3 @@

for (; nextStartIndex <= nextEndIndex; nextStartIndex++) {
insertOrAppendKeyed(dom, mountNode(nextChildren[nextStartIndex], null, lifecycle, context, instance, isSVG), nextNode);
insertOrAppendKeyed(dom, mount(nextChildren[nextStartIndex], null, lifecycle, context, instance, isSVG), nextNode);
}

@@ -1318,3 +1412,3 @@ }

nextNode = pos + 1 < nextChildrenLength ? nextChildren[pos + 1].dom : null;
insertOrAppendKeyed(dom, mountNode(nextChildren[pos], null, lifecycle, context, instance, isSVG), nextNode);
insertOrAppendKeyed(dom, mount(nextChildren[pos], null, lifecycle, context, instance, isSVG), nextNode);
} else {

@@ -1335,3 +1429,3 @@ if (index < 0 || i !== seq[index]) {

nextNode = pos + 1 < nextChildrenLength ? nextChildren[pos + 1].dom : null;
insertOrAppendKeyed(dom, mountNode(nextChildren[pos], null, lifecycle, context, instance, isSVG), nextNode);
insertOrAppendKeyed(dom, mount(nextChildren[pos], null, lifecycle, context, instance, isSVG), nextNode);
}

@@ -1433,3 +1527,3 @@ }

function mountNode(node, parentDom, lifecycle, context, instance, isSVG) {
function mount(node, parentDom, lifecycle, context, instance, isSVG) {
if (isArray(node)) {

@@ -1479,2 +1573,5 @@ return placeholder(node, parentDom);

}
if (bp.lazy === true) {
handleLazyAttached(node, lifecycle, dom);
}
// bp.childrenType:

@@ -1493,3 +1590,3 @@ // 0: no children

case 2:
mountNode(node.children, dom, lifecycle, context, instance);
mount(node.children, dom, lifecycle, context, instance);
break;

@@ -1598,3 +1695,3 @@ case 3:

// TODO check for text nodes and arrays
var dom = mountNode(node, null, lifecycle, context, instance, isSVG);
var dom = mount(node, null, lifecycle, context, instance, isSVG);

@@ -1609,3 +1706,3 @@ parentDom.replaceChild(dom, placeholder);

for (var i = 0; i < children.length; i++) {
mountNode(children[i], parentDom, lifecycle, context, instance);
mount(children[i], parentDom, lifecycle, context, instance);
}

@@ -1637,3 +1734,3 @@ }

} else {
var domNode = mountNode(child, parentDom, lifecycle, context, instance, isSVG);
var domNode = mount(child, parentDom, lifecycle, context, instance, isSVG);

@@ -1666,3 +1763,3 @@ if (isNonKeyed || !hasKeyedAssumption && child && isNullOrUndefined(child.key)) {

} else {
mountNode(children, parentDom, lifecycle, context, instance, isSVG);
mount(children, parentDom, lifecycle, context, instance, isSVG);
}

@@ -1712,3 +1809,3 @@ }

if (!isNullOrUndefined(node)) {
dom = mountNode(node, null, lifecycle, context, instance);
dom = mount(node, null, lifecycle, context, instance);
instance._lastNode = node;

@@ -1738,3 +1835,3 @@ if (parentDom !== null) {

var _node = Component(props);
dom = mountNode(_node, null, lifecycle, context, null);
dom = mount(_node, null, lifecycle, context, null);

@@ -1792,3 +1889,3 @@ parentNode.instance = _node;

if (root === null) {
mountNode(node, parentDom, lifecycle, {}, null, false);
mount(node, parentDom, lifecycle, {}, null, false);
lifecycle.trigger();

@@ -1805,2 +1902,3 @@ roots.push({ node: node, dom: parentDom });

root.node = node;
window.node = node;
resetActiveNode(activeNode);

@@ -1807,0 +1905,0 @@ }

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.InfernoDOM=n()}(this,function(){"use strict";function e(){this._listeners=[]}function n(e,n){if(!o(e)){var r=t(e);(r&&e.length>0||!r)&&(n?n.children=e:n={children:e})}return n}function t(e){return e instanceof Array}function r(e){return void 0!==e.prototype.render}function l(e){return"string"==typeof e||"number"==typeof e}function o(e){return void 0===e||null===e}function i(e){return void 0===e||null===e||e===!1}function a(e){return"function"==typeof e}function s(e){return"string"==typeof e}function d(e){return e instanceof Promise}function u(e,n,t){e.splice(e.indexOf(n),1,t)}function f(e){return!o(e.append)}function c(e,n,t){o(t)?f(n)?n.append(e):e.appendChild(n):f(n)?n.insert(e,t):f(t)?e.insertBefore(n,t.childNodes[0]||t.dom):e.insertBefore(n,t)}function v(e,n,t){o(t)?e.appendChild(n):e.insertBefore(n,t)}function h(e,n){var t=void 0;return t=n===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function p(e,n,t){if(null===n)return document.createTextNode(e);if(!t){var r=document.createTextNode(e);return n.appendChild(r),r}if(""===e){var l=document.createTextNode("");return n.appendChild(l),l}n.textContent=e}function m(e,n,t,r,l,i,a,s){var d=null,u=e._lastNode;o(u)||(d=e,e=u);var f=Y(n,null,r,l,i,a,s);n.dom=f,y(t,f,e.dom),null!==d&&(d._lastNode=n),g(e)}function y(e,n,t){f(t)?t.replaceWith(n):e.replaceChild(n,t)}function g(e){if(!i(e)&&!l(e)){var n=e.instance,r=null,a=null;o(n)||(r=n.hooks,a=n.children,void 0!==n.render&&(n.componentWillUnmount(),n._unmounted=!0));var s=e.hooks||r;o(s)||(o(s.willDetach)||s.willDetach(e.dom),o(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var d=e.children||a;if(!o(d))if(t(d))for(var u=0;u<d.length;u++)g(d[u]);else g(d)}}function C(){return document.createTextNode("")}function k(e,n){var t=e.dom;t===n?t.innerHTML="":(n.removeChild(t),me&&R(e)),g(e)}function b(e,n,t){for(var r=n||Object.keys(e),l=0;l<r.length;l++){var o=r[l];t[o]=null}}function x(e,n,t){for(var r=0;r<n.length;r++)e.insertBefore(n[r],t)}function N(){return document.activeElement}function w(e,n){if(me){var t=n.length;if(t>5)for(var r=0;t>r;r++){var l=n[r];i(l)||R(l)}}e.textContent=""}function O(e){e!==document.body&&document.activeElement!==e&&e.focus()}function U(){var e=[],n=document.createTextNode(""),t=null,r={dom:n,childNodes:e,appendChild:function(r){e.push(r),t&&t.insertBefore(r,n)},removeChild:function(n){t&&t.removeChild(n),e.splice(e.indexOf(n),1)},insertBefore:function(n,r){t&&t.insertBefore(n,r),e.splice(e.indexOf(r),0,n)},replaceChild:function(n,r){t.replaceChild(n,r),u(e,r,n)},append:function(r){r.appendChild(n),t=r,x(t,e,n)},insert:function(r,l){r.insertBefore(n,l),t=r,x(t,e,n)},remove:function(){t.removeChild(n);for(var r=0;r<e.length;r++)t.removeChild(e[r]);t=null},replaceWith:function(r){t.replaceChild(r,n);for(var l=0;l<e.length;l++)t.removeChild(e[l]);t=null},getElementsByTagName:null};return Object.defineProperty(r,"parentNode",{get:function(){return t}}),Object.defineProperty(r,"firstChild",{get:function(){return e[0]}}),r}function j(e,n){return n.length&&!o(n[0])&&!o(n[0].key)&&!o(n[1])&&!o(n[1].key)}function S(e,n){if("option"===e.tag){var t=e.attrs&&e.attrs.value;n[t]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var r=0,l=e.children.length;l>r;r++)S(e.children[r],n)}function T(e){var n=e.attrs&&e.attrs.value,r={};if(t(n))for(var l=0,o=n.length;o>l;l++)r[n[l]]=n[l];else r[n]=n;for(var i=0,a=e.children.length;a>i;i++)S(e.children[i],r);e.attrs&&e.attrs[n]&&delete e.attrs.value}function _(e,n){var t=C();return null!==n&&n.appendChild(t),i(e)||(e.dom=t),t}function K(e,n,t){o(e.created)||e.created(t),o(e.attached)||n.addListener(function(){e.attached(t)})}function E(e,n,r,a,s,d,u){var f=n.children,c=e.children;if(c!==f){var v=null;e.domChildren&&(v=n.domChildren=e.domChildren),i(c)?l(f)?H(r,c,f):o(f)||(t(f)?re(n,f,r,a,s,d,u):Y(f,r,a,s,d,u)):i(f)?w(r,c):t(c)?t(f)?null===v&&c.length>1?F(c,f,r,a,s,d,u):j(c,f)?F(c,f,r,a,s,d,u):z(c,f,r,v||(n.domChildren=[]),a,s,d,0,u):z(c,[f],r,v||[],a,s,d,0):t(f)?z([c],f,r,v||(n.domChildren=[r.firstChild]),a,s,d,0,u):l(f)?H(r,c,f):l(c)?P(c,f,r,a,s,d,null,u):P(c,f,r,a,s,d,!0,u)}}function A(e,n,t,r){e&&(s(n)&&delete e.refs[n],s(t)&&(e.refs[t]=r))}function W(e,n,t,r,l){var i=n.events,a=e.events,s=!o(i),d=!o(a);s?d?G(a,i,t,r,l):ie(i,r,l):d&&b(a,t,l)}function B(e,n,t,r,l,i){"select"===e.tag&&T(n);var a=n.attrs,s=e.attrs,d=o(a),u=!o(s);if(!d)for(var f=r||Object.keys(a),c=f.length,v=0;c>v;v++){var h=f[v],p=u&&s[h],m=a[h];p!==m&&("ref"===h?A(i,p,m,l):X(h,m,l))}if(u)for(var y=t||Object.keys(s),g=y.length,C=0;g>C;C++){var k=y[C];(d||o(a[k]))&&("ref"===k?A(i,s[k],null,l):l.removeAttribute(k))}}function M(e,n,t,l,a,s,d,u){var f=void 0;n.hasHooks===!0&&(f=n.hooks&&!o(f.willUpdate))&&f.willUpdate(e.dom);var c=n.tag||l.tag,v=e.tag||t.tag;if(v!==c)if(e.bp.isComponent===!0){var h=e.instance;l.isComponent===!0?(m(h||e,n,a,s,d,u,!1),g(e)):r(v)?D(h._lastNode,n,a,s,d,u,!0):D(h,n,a,s,d,u,!0)}else m(e,n,a,s,d,u,!1);else if(o(v))n.dom=e.dom;else if(t.isComponent===!0)l.isComponent===!0&&(n.instance=e.instance,n.dom=e.dom,q(!0,n,n.tag,t,l,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,a,s,d));else{var p=e.dom,y=t.childrenType,C=l.childrenType;if(n.dom=p,y>0||C>0)if(5===C||5===y)E(e,n,p,s,d,u);else{var b=e.children,x=n.children;0===y||i(b)?C>2?re(n,x,p,s,d,u):Y(x,p,s,d,u):0===C||i(x)?y>2?w(p,b):k(b,p):b!==x&&(4===y&&4===C?F(b,x,p,s,d,u):2===y&&2===C?P(b,x,p,s,d,u,!0,!1):1===y&&1===C?H(p,b,x):E(e,n,p,s,d,u))}if(t.hasAttrs!==!0&&l.hasAttrs!==!0||B(e,n,t.attrKeys,l.attrKeys,p,u),t.hasEvents!==!0&&l.hasEvents!==!0||W(e,n,t.eventKeys,l.eventKeys,p),t.hasClassName===!0||l.hasClassName===!0){var N=n.className;e.className!==N&&(o(N)?p.removeAttribute("class"):p.className=N)}if(t.hasStyle===!0||l.hasStyle===!0){var O=n.style;e.style!==O&&I(e.style,O,p)}n.hasHooks!==!0||o(f.didUpdate)||f.didUpdate(p)}}function D(e,n,t,l,i,s,u){if(d(n))n.then(function(n){P(e,n,t,l,i,s,null,!1)});else{var f=n.hooks,c=!o(f);c&&!o(f.willUpdate)&&f.willUpdate(e.dom);var v=n.tag||(o(n.bp)?null:n.bp.tag),h=e.tag||(o(e.bp)?null:e.bp.tag);if("svg"===v&&(u=!0),h!==v){var p=e.instance;a(h)?a(v)?m(p||e,n,t,l,i,s,u):r(h)?D(p._lastNode,n,t,l,i,s,!0,u):D(p,n,t,l,i,s,!0,u):m(p||e,n,t,l,i,s,u)}else if(o(h))n.dom=e.dom;else if(a(h))a(v)&&(n.instance=e.instance,n.dom=e.dom,q(!1,n,n.tag,null,null,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,t,l,i));else{var y=e.dom,g=n.className,C=n.style;n.dom=y,E(e,n,y,l,i,s,u),B(e,n,null,null,y,s),W(e,n,null,null,y),e.className!==g&&(o(g)?y.removeAttribute("class"):y.className=g),e.style!==C&&I(e.style,C,y),c&&!o(f.didUpdate)&&f.didUpdate(y)}}}function V(e){switch(e.length){case 5:return"value"===e;case 7:return"checked"===e;case 8:return"disabled"===e||"selected"===e;default:return!1}}function H(e,n,t){l(n)?e.firstChild.nodeValue=t:e.textContent=t}function L(e,n,t,r,l,o,i){var a=e.bp,s=n.bp;void 0===a||void 0===s?D(e,n,t,r,l,o,i):M(e,n,a,s,t,r,l,o)}function P(e,n,t,r,o,a,s,d){if(null!==s)L(e,n,t,r,o,a,d);else if(i(e))Y(n,t,r,o,a,d);else if(i(n))k(e,t);else if(l(e))if(l(n))t.firstChild.nodeValue=n;else{var u=Y(n,null,r,o,a,d);n.dom=u,y(t,u,t.firstChild)}else if(l(n)){var f=document.createTextNode(n);y(t,f,e.dom)}else L(e,n,t,r,o,a,d)}function I(e,n,t){if(s(n))t.style.cssText=n;else if(o(e)){if(!o(n))for(var r=Object.keys(n),l=0;l<r.length;l++){var i=r[l];t.style[i]=n[i]}}else if(o(n))t.removeAttribute("style");else{for(var a=Object.keys(n),d=0;d<a.length;d++){var u=a[d];t.style[u]=n[u]}for(var f=Object.keys(e),c=0;c<f.length;c++){var v=f[c];o(n[v])&&(t.style[v]="")}}}function G(e,n,t,r,l){for(var i=r||Object.keys(n),a=0;a<i.length;a++){var s=i[a],d=e[s],u=n[s];d!==u&&(l[s]=u)}for(var f=t||Object.keys(e),c=0;c<f.length;c++){var v=f[c];o(n[v])&&(l[v]=null)}}function X(e,n,t){V(e)?"value"===e?t.value=null===n?"":n:t[e]=n:n===!1||o(n)?t.removeAttribute(e):pe[e]?t.setAttributeNS(pe[e],e,n===!0?e:n):t.setAttribute(e,n===!0?e:n)}function q(e,t,l,a,s,d,u,f,c,v,h,p,m){if(f=n(v,f),r(l)){var y=d.props,g=d.state,C=d.state,k=d.getChildContext();o(k)||(m=ce.extends({},m,k)),d.context=m;var b=d._updateComponent(g,C,y,f);i(b)||(P(t,b,h,p,m,d,!0,!1),t.dom=b.dom,d._lastNode=b)}else{var x=!0,N=e&&s.hasHooks===!0||!o(c);if(N&&!o(c.componentShouldUpdate)&&(x=c.componentShouldUpdate(t.dom,u,f)),x!==!1){N&&!o(c.componentWillUpdate)&&c.componentWillUpdate(t.dom,u,f);var w=l(f);if(!i(w)){var O=t.dom;w.dom=O,P(d,w,O,p,m,null,!0,!1),t.instance=w,N&&!o(c.componentDidUpdate)&&c.componentDidUpdate(t.dom,u,f)}}}}function z(e,n,r,a,s,d,u,f,v){var h=void 0===r.append,p=e.length,m=n.length,C=p===m;if(C===!1)if(p>m)for(;p!==m;){var b=e[p-1];i(b)||(r.removeChild(a[p-1+f]),h&&a.splice(p-1+f,1),g(b),p--,e.pop())}else for(;p!==m;){var x=n[p],N=void 0;e.push(x),N=l(x)?document.createTextNode(x):Y(x,null,d,u,v),c(r,N),h&&(1===p&&a.push(r.firstChild),h&&a.splice(p+f,0,N)),p++}for(var w=0;m>w;w++){var O=e[w],S=n[w],T=w+f;if(O!==S)if(i(S)){if(!i(O))if(t(O)&&0===O.length)for(var _=0;_<O.length;_++)k(O[_],r);else{var K=a[T];o(K)&&T--,r.removeChild(a[T]),h&&(a.splice(T,1),f--),g(O)}}else if(i(O)){if(l(S)){var E=document.createTextNode(S),A=a[T];if(o(A)){var W=a[T+1];c(r,E,W),h&&a.splice(T,1,E)}else c(r,E,A),h&&a.splice(T,0,E)}else if(C===!0){var B=Y(S,null,s,d,u,v),M=a[T];if(o(M)){var D=a[T+1];c(r,B,D),h&&a.splice(T,1,B)}else c(r,B,M),h&&a.splice(T,0,B)}}else if(l(S))if(1===p)l(O)?void 0!==r.getElementsByTagName?r.firstChild.nodeValue=S:r.nodeValue=S:(g(O),r.textContent=S);else{var V=document.createTextNode(S),H=a[T];o(H)?r.nodeValue=V.nodeValue:l(O)?H.nodeValue=S:void 0===H.append?(h&&a.splice(T,1,V),y(r,V,H)):(c(r,V,H.firstChild),H.remove(),a.splice(0,a.length,V)),g(O)}else if(t(S))if(j(O,S))F(O,S,a[T],s,d,u,v);else if(t(O)){var L=a[T];if(void 0===L.append)if(S.length>1&&1===O.length){var I=U();I.insert(r,L),I.appendChild(L),h&&a.splice(T,1,I),z(O,S,I,I.childNodes,s,d,u,0,v)}else z(O,S,r,a,s,d,u,0,v);else z(O,S,a[T],a[T].childNodes,s,d,u,0,v)}else if(S.length>1){var G=U();G.appendChild(r.firstChild),c(r,G,r.firstChild),h&&a.splice(T,1,G),z([O],S,G,G.childNodes,s,d,u,w,v)}else z([O],S,r,a,s,d,u,w,v);else t(O)?z(O,[S],a,a[T].childNodes,s,d,u,0,v):P(O,S,r,s,d,u,null,v)}}function F(e,n,t,r,l,o,i){for(var a=e.length,s=n.length,d=void 0,u=a-1,f=s-1,c=0,h=0,p=null,m=null,y=null,g=null,C=void 0,b=void 0,x=0,N=void 0,w=void 0;u>=c&&f>=h&&(m=n[h],p=e[c],m.key===p.key);)P(p,m,t,r,l,o,!0,i),h++,c++;for(;u>=c&&f>=h&&(y=n[f],g=e[u],y.key===g.key);)P(g,y,t,r,l,o,!0,i),f--,u--;for(;u>=c&&f>=h&&(y=n[f],p=e[c],y.key===p.key);)b=s>f+1?n[f+1].dom:null,P(p,y,t,r,l,o,!0,i),v(t,y.dom,b),f--,c++;for(;u>=c&&f>=h&&(m=n[h],g=e[u],m.key===g.key);)b=e[c].dom,P(g,m,t,r,l,o,!0,i),v(t,m.dom,b),h++,u--;if(c>u){if(f>=h)for(b=s>f+1?n[f+1].dom:null;f>=h;h++)v(t,Y(n[h],null,r,l,o,i),b)}else if(h>f)for(;u>=c;)k(e[c++],t);else{var O=u-c+1,U=f-h+1,j=new Array(U);for(d=0;U>d;d++)j[d]=-1;var S=!1,T=0;if(16>=O*U)for(d=c;u>=d;d++){var _=!0;for(g=e[d],C=h;f>=C;C++)if(y=n[C],g.key===y.key){j[C-h]=d,x>C?S=!0:x=C,P(g,y,t,r,l,o,!0,i),_=!1;break}_&&(k(g,t),T++)}else{var K=new Map;for(d=h;f>=d;d++)w=n[d],K.set(w.key,d);for(d=u;d>=c;d--)g=e[d],C=K.get(g.key),void 0===C?(k(g,t),T++):(y=n[C],j[C-h]=d,x>C?S=!0:x=C,P(g,y,t,r,l,o,!0,i))}if(S){var E=J(j);for(C=E.length-1,d=U-1;d>=0;d--)-1===j[d]?(N=d+h,b=s>N+1?n[N+1].dom:null,v(t,Y(n[N],null,r,l,o,i),b)):0>C||d!==E[C]?(N=d+h,b=s>N+1?n[N+1].dom:null,v(t,n[N].dom,b)):C--}else if(O-T!==U)for(d=U-1;d>=0;d--)-1===j[d]&&(N=d+h,b=s>N+1?n[N+1].dom:null,v(t,Y(n[N],null,r,l,o,i),b))}}function J(e){var n=e.slice(0),t=[];t.push(0);var r=void 0,l=void 0,o=void 0,i=void 0,a=void 0;for(r=0;r<e.length;r++)if(-1!==e[r])if(l=t[t.length-1],e[l]<e[r])n[r]=l,t.push(r);else{for(o=0,i=t.length-1;i>o;)a=(o+i)/2|0,e[t[a]]<e[r]?o=a+1:i=a;e[r]<e[t[o]]&&(o>0&&(n[r]=t[o-1]),t[o]=r)}for(o=t.length,i=t[o-1];o-- >0;)t[o]=i,i=n[i];return t}function Q(e,n,t,r,l){if(void 0!==n){var i=e.key,a=null===i?n.pools.nonKeyed:n.pools.keyed[i];if(!o(a)){var s=a.pop();if(!o(s))return P(s,e,null,null,t,r,l,!0),e.dom}}return null}function R(e){var n=e.bp;if(!o(n)){var t=e.key,r=n.pools;if(null===t){var l=r.nonKeyed;l&&l.push(e)}else{var i=r.keyed;(i[t]||(i[t]=[])).push(e)}return!0}return!1}function Y(e,n,r,l,o,a){if(t(e))return _(e,n);if(i(e))return null;var s=e.bp;if(me){var d=Q(e,s,r,l,o);if(null!==d)return null!==n&&n.appendChild(d),d}return void 0===s?ee(e,n,r,l,o,a):$(e,s,n,r,l,o)}function Z(e){"select"===e.tag&&T(e)}function $(e,n,t,r,l,o){var i=e.tag;if(n.isComponent===!0)return ae(e,i,e.attrs||{},e.hooks,e.children,t,r,l);var a=h(n.tag,n.isSVG);switch(e.dom=a,n.hasHooks===!0&&K(e.hooks,r,a),n.childrenType){case 1:p(e.children,a,!0);break;case 2:Y(e.children,a,r,l,o);break;case 3:re(e,e.children,a,r,l,o);break;case 4:te(e.children,a,r,l,o);break;case 5:le(e,e.children,a,r,l,o)}if(n.hasAttrs===!0){Z(e);var s=e.attrs;if(null===n.attrKeys){var d=Object.keys(s);n.attrKeys=n.attrKeys?n.attrKeys.concat(d):d}var u=n.attrKeys;se(s,u,a,o)}if(n.hasClassName===!0&&(a.className=e.className),n.hasStyle===!0&&I(null,e.style,a),n.hasEvents===!0){var f=e.events;null===n.eventKeys&&(n.eventKeys=Object.keys(f));var c=n.eventKeys;ie(f,c,a)}return null!==t&&t.appendChild(a),a}function ee(e,n,t,r,l,d){var u=e.tag;if(null===u)return _(e,n);if(a(u))return ae(e,u,e.attrs||{},e.hooks,e.children,n,t,r);if(!s(u)||""===u)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===u&&(d=!0);var f=h(u,d),c=e.children,v=e.attrs,p=e.events,m=e.hooks,y=e.className,g=e.style;return e.dom=f,o(m)||K(m,t,f),i(c)||le(e,c,f,t,r,l,d),o(v)||(Z(e),se(v,Object.keys(v),f,l)),o(y)||(f.className=y),o(g)||I(null,g,f),o(p)||ie(p,Object.keys(p),f),null!==n&&n.appendChild(f),f}function ne(e,n,t,r,l,o,i){var a=C();t&&t.push(a),e.then(function(e){var s=Y(e,null,r,l,o,i);n.replaceChild(s,a),t&&u(t,a,s)}),n.appendChild(a)}function te(e,n,t,r,l){for(var o=0;o<e.length;o++)Y(e[o],n,t,r,l)}function re(e,n,r,a,s,u,f){for(var v=null,h=!1,m=!1,y=0;y<n.length;y++){var g=n[y];if(l(g))h=!0,v=v||[],v.push(p(g,r,!1));else if(!o(g)&&t(g)){var C=U();h=!0,re(e,g,C,a,s,u,f),c(r,C),v=v||[],v.push(C)}else if(d(g))ne(g,r,v,a,s,u,f);else{var k=Y(g,r,a,s,u,f);h||!m&&g&&o(g.key)?(h=!0,v=v||[],v.push(k)):i(g)?(h=!0,v=v||[],v.push(k)):m===!1&&(m=!0)}}null!==v&&v.length>1&&h===!0&&(e.domChildren=v)}function le(e,n,r,o,i,a,s){t(n)?re(e,n,r,o,i,a,s):l(n)?p(n,r,!0):d(n)?ne(n,r,null,o,i,a,s):Y(n,r,o,i,a,s)}function oe(e,n,t){!i(e)&&s(n)&&(e.refs[n]=t)}function ie(e,n,t){for(var r=0;r<n.length;r++){var l=n[r];t[l]=e[l]}}function ae(e,t,l,i,a,s,d,u){l=n(a,l);var f=void 0;if(r(t)){var c=new t(l);c._patch=P;var v=c.getChildContext();o(v)||(u=ce.extends({},u,v)),c.context=u,c._pendingSetState=!0,c.componentWillMount();var h=c.shouldComponentUpdate();if(h){c.componentWillUpdate();var p=c._pendingState,m=c.state;c.state=ce.extends({},m,p)}var y=c.render();c._pendingSetState=!1,o(y)||(f=Y(y,null,d,u,c),c._lastNode=y,null!==s&&s.appendChild(f),c.componentDidMount(),c.componentDidUpdate()),e.dom=f,e.instance=c}else{o(i)||(o(i.componentWillMount)||i.componentWillMount(null,l),o(i.componentDidMount)||d.addListener(function(){i.componentDidMount(f,l)}));var g=t(l);f=Y(g,null,d,u,null),e.instance=g,null!==s&&s.appendChild(f),e.dom=f}return f}function se(e,n,t,r){for(var l=0;l<n.length;l++){var o=n[l];"ref"===o?oe(r,e[o],t):X(o,e[o],t)}}function de(e){for(var n=0;n<ye.length;n++){var t=ye[n];if(t.dom===e)return t}return null}function ue(e){for(var n=0;n<ye.length;n++){var t=ye[n];if(t===e)return void ye.splice(n,1)}}function fe(n,t){var r=de(t),l=new e;if(null===r)Y(n,t,l,{},null,!1),l.trigger(),ye.push({node:n,dom:t});else{var o=N();P(r.node,n,t,l,{},null,null,!1),l.trigger(),null===n&&ue(r),r.node=n,O(o)}}var ce={};ce.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},ce.classCallCheck=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},ce.createClass=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),ce.extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},e.prototype={addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e]()}};var ve="http://www.w3.org/1999/xlink",he="http://www.w3.org/XML/1998/namespace",pe={"xlink:href":ve,"xlink:arcrole":ve,"xlink:actuate":ve,"xlink:role":ve,"xlink:row":ve,"xlink:titlef":ve,"xlink:type":ve,"xml:base":he,"xml:lang":he,"xml:space":he},me=!0,ye=[],ge={render:fe};return ge});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.InfernoDOM=n()}(this,function(){"use strict";function e(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=Ce,this.screenWidth=ye}function n(e,n){if(!o(e)){var l=t(e);(l&&e.length>0||!l)&&(n?n.children=e:n={children:e})}return n}function t(e){return e instanceof Array}function l(e){return void 0!==e.prototype.render}function r(e){return"string"==typeof e||"number"==typeof e}function o(e){return void 0===e||null===e}function i(e){return void 0===e||null===e||e===!1}function a(e){return"function"==typeof e}function s(e){return"string"==typeof e}function d(e){return e instanceof Promise}function c(e,n,t){e.splice(e.indexOf(n),1,t)}function u(e){return!o(e.append)}function f(e,n,t){o(t)?u(n)?n.append(e):e.appendChild(n):u(n)?n.insert(e,t):u(t)?e.insertBefore(n,t.childNodes[0]||t.dom):e.insertBefore(n,t)}function h(e,n,t){o(t)?e.appendChild(n):e.insertBefore(n,t)}function v(e,n){var t=void 0;return t=n===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function p(e,n,t){if(null===n)return document.createTextNode(e);if(!t){var l=document.createTextNode(e);return n.appendChild(l),l}if(""===e){var r=document.createTextNode("");return n.appendChild(r),r}n.textContent=e}function m(e,n,t,l,r,i,a,s){var d=null,c=e._lastNode;o(c)||(d=e,e=c);var u=te(n,null,l,r,i,a,s);n.dom=u,g(t,u,e.dom),null!==d&&(d._lastNode=n),y(e)}function g(e,n,t){u(t)?t.replaceWith(n):e.replaceChild(n,t)}function y(e){if(!i(e)&&!r(e)){var n=e.instance,l=null,a=null;o(n)||(l=n.hooks,a=n.children,void 0!==n.render&&(n.componentWillUnmount(),n._unmounted=!0));var s=e.hooks||l;o(s)||(o(s.willDetach)||s.willDetach(e.dom),o(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var d=e.children||a;if(!o(d))if(t(d))for(var c=0;c<d.length;c++)y(d[c]);else y(d)}}function C(){return document.createTextNode("")}function k(e,n){var t=e.dom;t===n?t.innerHTML="":(n.removeChild(t),Ue&&ne(e)),y(e)}function w(e,n,t){for(var l=n||Object.keys(e),r=0;r<l.length;r++){var o=l[r];t[o]=null}}function b(e,n,t){for(var l=0;l<n.length;l++)e.insertBefore(n[l],t)}function N(){return document.activeElement}function x(e,n){if(Ue){var t=n.length;if(t>5)for(var l=0;t>l;l++){var r=n[l];i(r)||ne(r)}}e.textContent=""}function O(e){e!==document.body&&document.activeElement!==e&&e.focus()}function U(){var e=[],n=document.createTextNode(""),t=null,l={dom:n,childNodes:e,appendChild:function(l){e.push(l),t&&t.insertBefore(l,n)},removeChild:function(n){t&&t.removeChild(n),e.splice(e.indexOf(n),1)},insertBefore:function(n,l){t&&t.insertBefore(n,l),e.splice(e.indexOf(l),0,n)},replaceChild:function(n,l){t.replaceChild(n,l),c(e,l,n)},append:function(l){l.appendChild(n),t=l,b(t,e,n)},insert:function(l,r){l.insertBefore(n,r),t=l,b(t,e,n)},remove:function(){t.removeChild(n);for(var l=0;l<e.length;l++)t.removeChild(e[l]);t=null},replaceWith:function(l){t.replaceChild(l,n);for(var r=0;r<e.length;r++)t.removeChild(e[r]);t=null},getElementsByTagName:null};return Object.defineProperty(l,"parentNode",{get:function(){return t}}),Object.defineProperty(l,"firstChild",{get:function(){return e[0]}}),l}function j(e,n){return n.length&&!o(n[0])&&!o(n[0].key)&&!o(n[1])&&!o(n[1].key)}function T(e,n){if("option"===e.tag){var t=e.attrs&&e.attrs.value;n[t]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var l=0,r=e.children.length;r>l;l++)T(e.children[l],n)}function S(e){var n=e.attrs&&e.attrs.value,l={};if(t(n))for(var r=0,o=n.length;o>r;r++)l[n[r]]=n[r];else l[n]=n;for(var i=0,a=e.children.length;a>i;i++)T(e.children[i],l);e.attrs&&e.attrs[n]&&delete e.attrs.value}function D(e,n){var t=C();return null!==n&&n.appendChild(t),i(e)||(e.dom=t),t}function _(e,n,t){o(e.created)||e.created(t),o(e.attached)||n.addListener(function(){e.attached(t)})}function E(e,n,t){n.addListener(function(){var l=t.getBoundingClientRect();null===n.scrollY&&n.refresh(),e.clipData={top:l.top+n.scrollY,left:l.left+n.scrollX,bottom:l.bottom+n.scrollY,right:l.right+n.scrollX,pending:!1}})}function K(e,n,l,a,s,d,c){var u=n.children,f=e.children;if(f!==u){var h=null;e.domChildren&&(h=n.domChildren=e.domChildren),i(f)?r(u)?I(l,f,u):o(u)||(t(u)?se(n,u,l,a,s,d,c):te(u,l,a,s,d,c)):i(u)?x(l,f):t(f)?t(u)?null===h&&f.length>1?Z(f,u,l,a,s,d,c):j(f,u)?Z(f,u,l,a,s,d,c):Q(f,u,l,h||(n.domChildren=[]),a,s,d,0,c):Q(f,[u],l,h||[],a,s,d,0):t(u)?Q([f],u,l,h||(n.domChildren=[l.firstChild]),a,s,d,0,c):r(u)?I(l,f,u):r(f)?q(f,u,l,a,s,d,null,c):q(f,u,l,a,s,d,!0,c)}}function A(e,n,t,l){e&&(s(n)&&delete e.refs[n],s(t)&&(e.refs[t]=l))}function W(e,n,t,l,r){var i=n.events,a=e.events,s=!o(i),d=!o(a);s?d?R(a,i,t,l,r):ue(i,l,r):d&&w(a,t,r)}function B(e,n,t,l,r,i){"select"===e.tag&&S(n);var a=n.attrs,s=e.attrs,d=o(a),c=!o(s);if(!d)for(var u=l||Object.keys(a),f=u.length,h=0;f>h;h++){var v=u[h],p=c&&s[v],m=a[v];p!==m&&("ref"===v?A(i,p,m,r):F(v,m,r))}if(c)for(var g=t||Object.keys(s),y=g.length,C=0;y>C;C++){var k=g[C];(d||o(a[k]))&&("ref"===k?A(i,s[k],null,r):r.removeAttribute(k))}}function M(e){z(e.lastNode,e.nextNode,e.parentDom,e.lifecycle,null,null,!1,!0),e.clipData.pending=!1}function Y(){"undefined"!=typeof requestIdleCallback?requestIdleCallback(V):setTimeout(V,100)}function V(){be.forEach(M),be.clear(),Y()}function X(e,n,t,l,r,o){var i=be.get(n);void 0===i?be.set(n,{lastNode:t,nextNode:l,parentDom:r,clipData:e,lifecycle:o}):i.nextNode=l,e.pending=!0}function H(e,n,t,r,a,s,d,c,u){var f=void 0;n.hasHooks===!0&&(f=n.hooks&&!o(f.willUpdate))&&f.willUpdate(e.dom);var h=n.tag||r.tag,v=e.tag||t.tag;if(v!==h)if(e.bp.isComponent===!0){var p=e.instance;r.isComponent===!0?(m(p||e,n,a,s,d,c,!1),y(e)):l(v)?L(p._lastNode,n,a,s,d,c,!0):L(p,n,a,s,d,c,!0)}else m(e,n,a,s,d,c,!1);else if(o(v))n.dom=e.dom;else if(t.isComponent===!0)r.isComponent===!0&&(n.instance=e.instance,n.dom=e.dom,J(!0,n,n.tag,t,r,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,a,s,d));else{var g=e.dom,C=t.childrenType,w=r.childrenType;if(n.dom=g,r.lazy===!0&&u===!1){var b=e.clipData;if(null===s.scrollY&&s.refresh(),n.clipData=b,b.pending===!0||b.top-s.scrollY>s.screenHeight)return void X(b,g,e,n,a,s);if(b.bottom<s.scrollY)return void X(b,g,e,n,a,s)}if(C>0||w>0)if(5===w||5===C)K(e,n,g,s,d,c);else{var N=e.children,O=n.children;0===C||i(N)?w>2?se(n,O,g,s,d,c):te(O,g,s,d,c):0===w||i(O)?C>2?x(g,N):k(N,g):N!==O&&(4===C&&4===w?Z(N,O,g,s,d,c):2===C&&2===w?q(N,O,g,s,d,c,!0,!1):1===C&&1===w?I(g,N,O):K(e,n,g,s,d,c))}if(t.hasAttrs!==!0&&r.hasAttrs!==!0||B(e,n,t.attrKeys,r.attrKeys,g,c),t.hasEvents!==!0&&r.hasEvents!==!0||W(e,n,t.eventKeys,r.eventKeys,g),t.hasClassName===!0||r.hasClassName===!0){var U=n.className;e.className!==U&&(o(U)?g.removeAttribute("class"):g.className=U)}if(t.hasStyle===!0||r.hasStyle===!0){var j=n.style;e.style!==j&&G(e.style,j,g)}n.hasHooks!==!0||o(f.didUpdate)||f.didUpdate(g)}}function L(e,n,t,r,i,s,c){if(d(n))n.then(function(n){q(e,n,t,r,i,s,null,!1)});else{var u=n.hooks,f=!o(u);f&&!o(u.willUpdate)&&u.willUpdate(e.dom);var h=n.tag||(o(n.bp)?null:n.bp.tag),v=e.tag||(o(e.bp)?null:e.bp.tag);if("svg"===h&&(c=!0),v!==h){var p=e.instance;a(v)?a(h)?m(p||e,n,t,r,i,s,c):l(v)?L(p._lastNode,n,t,r,i,s,!0,c):L(p,n,t,r,i,s,!0,c):m(p||e,n,t,r,i,s,c)}else if(o(v))n.dom=e.dom;else if(a(v))a(h)&&(n.instance=e.instance,n.dom=e.dom,J(!1,n,n.tag,null,null,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,t,r,i));else{var g=e.dom,y=n.className,C=n.style;n.dom=g,K(e,n,g,r,i,s,c),B(e,n,null,null,g,s),W(e,n,null,null,g),e.className!==y&&(o(y)?g.removeAttribute("class"):g.className=y),e.style!==C&&G(e.style,C,g),f&&!o(u.didUpdate)&&u.didUpdate(g)}}}function P(e){switch(e.length){case 5:return"value"===e;case 7:return"checked"===e;case 8:return"disabled"===e||"selected"===e;default:return!1}}function I(e,n,t){r(n)?e.firstChild.nodeValue=t:e.textContent=t}function z(e,n,t,l,r,o,i,a){var s=e.bp,d=n.bp;void 0===s||void 0===d?L(e,n,t,l,r,o,i):H(e,n,s,d,t,l,r,o,a)}function q(e,n,t,l,o,a,s,d){if(null!==s)z(e,n,t,l,o,a,d,!1);else if(i(e))te(n,t,l,o,a,d);else if(i(n))k(e,t);else if(r(e))if(r(n))t.firstChild.nodeValue=n;else{var c=te(n,null,l,o,a,d);n.dom=c,g(t,c,t.firstChild)}else if(r(n)){var u=document.createTextNode(n);g(t,u,e.dom)}else z(e,n,t,l,o,a,d,!1)}function G(e,n,t){if(s(n))t.style.cssText=n;else if(o(e)){if(!o(n))for(var l=Object.keys(n),r=0;r<l.length;r++){var i=l[r];t.style[i]=n[i]}}else if(o(n))t.removeAttribute("style");else{for(var a=Object.keys(n),d=0;d<a.length;d++){var c=a[d];t.style[c]=n[c]}for(var u=Object.keys(e),f=0;f<u.length;f++){var h=u[f];o(n[h])&&(t.style[h]="")}}}function R(e,n,t,l,r){for(var i=l||Object.keys(n),a=0;a<i.length;a++){var s=i[a],d=e[s],c=n[s];d!==c&&(r[s]=c)}for(var u=t||Object.keys(e),f=0;f<u.length;f++){var h=u[f];o(n[h])&&(r[h]=null)}}function F(e,n,t){P(e)?"value"===e?t.value=null===n?"":n:t[e]=n:n===!1||o(n)?t.removeAttribute(e):Oe[e]?t.setAttributeNS(Oe[e],e,n===!0?e:n):t.setAttribute(e,n===!0?e:n)}function J(e,t,r,a,s,d,c,u,f,h,v,p,m){if(u=n(h,u),l(r)){var g=d.props,y=d.state,C=d.state,k=d.getChildContext();o(k)||(m=ge.extends({},m,k)),d.context=m;var w=d._updateComponent(y,C,g,u);i(w)||(q(t,w,v,p,m,d,!1,!1),t.dom=w.dom,d._lastNode=w)}else{var b=!0,N=e&&s.hasHooks===!0||!o(f);if(N&&!o(f.componentShouldUpdate)&&(b=f.componentShouldUpdate(t.dom,c,u)),b!==!1){N&&!o(f.componentWillUpdate)&&f.componentWillUpdate(t.dom,c,u);var x=r(u);if(!i(x)){var O=t.dom;x.dom=O,q(d,x,O,p,m,null,!1,!1),t.instance=x,N&&!o(f.componentDidUpdate)&&f.componentDidUpdate(t.dom,c,u)}}}}function Q(e,n,l,a,s,d,c,u,h){var v=void 0===l.append,p=e.length,m=n.length,C=p===m;if(C===!1)if(p>m)for(;p!==m;){var w=e[p-1];i(w)||(l.removeChild(a[p-1+u]),v&&a.splice(p-1+u,1),y(w),p--,e.pop())}else for(;p!==m;){var b=n[p],N=void 0;e.push(b),N=r(b)?document.createTextNode(b):te(b,null,d,c,h),f(l,N),v&&(1===p&&a.push(l.firstChild),v&&a.splice(p+u,0,N)),p++}for(var x=0;m>x;x++){var O=e[x],T=n[x],S=x+u;if(O!==T)if(i(T)){if(!i(O))if(t(O)&&0===O.length)for(var D=0;D<O.length;D++)k(O[D],l);else{var _=a[S];o(_)&&S--,l.removeChild(a[S]),v&&(a.splice(S,1),u--),y(O)}}else if(i(O)){if(r(T)){var E=document.createTextNode(T),K=a[S];if(o(K)){var A=a[S+1];f(l,E,A),v&&a.splice(S,1,E)}else f(l,E,K),v&&a.splice(S,0,E)}else if(C===!0){var W=te(T,null,s,d,c,h),B=a[S];if(o(B)){var M=a[S+1];f(l,W,M),v&&a.splice(S,1,W)}else f(l,W,B),v&&a.splice(S,0,W)}}else if(r(T))if(1===p)r(O)?void 0!==l.getElementsByTagName?l.firstChild.nodeValue=T:l.nodeValue=T:(y(O),l.textContent=T);else{var Y=document.createTextNode(T),V=a[S];o(V)?l.nodeValue=Y.nodeValue:r(O)?V.nodeValue=T:void 0===V.append?(v&&a.splice(S,1,Y),g(l,Y,V)):(f(l,Y,V.firstChild),V.remove(),a.splice(0,a.length,Y)),y(O)}else if(t(T))if(j(O,T))Z(O,T,a[S],s,d,c,h);else if(t(O)){var X=a[S];if(void 0===X.append)if(T.length>1&&1===O.length){var H=U();H.insert(l,X),H.appendChild(X),v&&a.splice(S,1,H),Q(O,T,H,H.childNodes,s,d,c,0,h)}else Q(O,T,l,a,s,d,c,0,h);else Q(O,T,a[S],a[S].childNodes,s,d,c,0,h)}else if(T.length>1){var L=U();L.appendChild(l.firstChild),f(l,L,l.firstChild),v&&a.splice(S,1,L),Q([O],T,L,L.childNodes,s,d,c,x,h)}else Q([O],T,l,a,s,d,c,x,h);else t(O)?Q(O,[T],a,a[S].childNodes,s,d,c,0,h):q(O,T,l,s,d,c,null,h)}}function Z(e,n,t,l,r,o,i){for(var a=e.length,s=n.length,d=void 0,c=a-1,u=s-1,f=0,v=0,p=null,m=null,g=null,y=null,C=void 0,w=void 0,b=0,N=void 0,x=void 0;c>=f&&u>=v&&(m=n[v],p=e[f],m.key===p.key);)q(p,m,t,l,r,o,!0,i),v++,f++;for(;c>=f&&u>=v&&(g=n[u],y=e[c],g.key===y.key);)q(y,g,t,l,r,o,!0,i),u--,c--;for(;c>=f&&u>=v&&(g=n[u],p=e[f],g.key===p.key);)w=s>u+1?n[u+1].dom:null,q(p,g,t,l,r,o,!0,i),h(t,g.dom,w),u--,f++;for(;c>=f&&u>=v&&(m=n[v],y=e[c],m.key===y.key);)w=e[f].dom,q(y,m,t,l,r,o,!0,i),h(t,m.dom,w),v++,c--;if(f>c){if(u>=v)for(w=s>u+1?n[u+1].dom:null;u>=v;v++)h(t,te(n[v],null,l,r,o,i),w)}else if(v>u)for(;c>=f;)k(e[f++],t);else{var O=c-f+1,U=u-v+1,j=new Array(U);for(d=0;U>d;d++)j[d]=-1;var T=!1,S=0;if(16>=O*U)for(d=f;c>=d;d++){var D=!0;for(y=e[d],C=v;u>=C;C++)if(g=n[C],y.key===g.key){j[C-v]=d,b>C?T=!0:b=C,q(y,g,t,l,r,o,!0,i),D=!1;break}D&&(k(y,t),S++)}else{var _=new Map;for(d=v;u>=d;d++)x=n[d],_.set(x.key,d);for(d=c;d>=f;d--)y=e[d],C=_.get(y.key),void 0===C?(k(y,t),S++):(g=n[C],j[C-v]=d,b>C?T=!0:b=C,q(y,g,t,l,r,o,!0,i))}if(T){var E=$(j);for(C=E.length-1,d=U-1;d>=0;d--)-1===j[d]?(N=d+v,w=s>N+1?n[N+1].dom:null,h(t,te(n[N],null,l,r,o,i),w)):0>C||d!==E[C]?(N=d+v,w=s>N+1?n[N+1].dom:null,h(t,n[N].dom,w)):C--}else if(O-S!==U)for(d=U-1;d>=0;d--)-1===j[d]&&(N=d+v,w=s>N+1?n[N+1].dom:null,h(t,te(n[N],null,l,r,o,i),w))}}function $(e){var n=e.slice(0),t=[];t.push(0);var l=void 0,r=void 0,o=void 0,i=void 0,a=void 0;for(l=0;l<e.length;l++)if(-1!==e[l])if(r=t[t.length-1],e[r]<e[l])n[l]=r,t.push(l);else{for(o=0,i=t.length-1;i>o;)a=(o+i)/2|0,e[t[a]]<e[l]?o=a+1:i=a;e[l]<e[t[o]]&&(o>0&&(n[l]=t[o-1]),t[o]=l)}for(o=t.length,i=t[o-1];o-- >0;)t[o]=i,i=n[i];return t}function ee(e,n,t,l,r){if(void 0!==n){var i=e.key,a=null===i?n.pools.nonKeyed:n.pools.keyed[i];if(!o(a)){var s=a.pop();if(!o(s))return q(s,e,null,null,t,l,r,!0),e.dom}}return null}function ne(e){var n=e.bp;if(!o(n)){var t=e.key,l=n.pools;if(null===t){var r=l.nonKeyed;r&&r.push(e)}else{var i=l.keyed;(i[t]||(i[t]=[])).push(e)}return!0}return!1}function te(e,n,l,r,o,a){if(t(e))return D(e,n);if(i(e))return null;var s=e.bp;if(Ue){var d=ee(e,s,l,r,o);if(null!==d)return null!==n&&n.appendChild(d),d}return void 0===s?oe(e,n,l,r,o,a):re(e,s,n,l,r,o)}function le(e){"select"===e.tag&&S(e)}function re(e,n,t,l,r,o){var i=e.tag;if(n.isComponent===!0)return fe(e,i,e.attrs||{},e.hooks,e.children,t,l,r);var a=v(n.tag,n.isSVG);switch(e.dom=a,n.hasHooks===!0&&_(e.hooks,l,a),n.lazy===!0&&E(e,l,a),n.childrenType){case 1:p(e.children,a,!0);break;case 2:te(e.children,a,l,r,o);break;case 3:se(e,e.children,a,l,r,o);break;case 4:ae(e.children,a,l,r,o);break;case 5:de(e,e.children,a,l,r,o)}if(n.hasAttrs===!0){le(e);var s=e.attrs;if(null===n.attrKeys){var d=Object.keys(s);n.attrKeys=n.attrKeys?n.attrKeys.concat(d):d}var c=n.attrKeys;he(s,c,a,o)}if(n.hasClassName===!0&&(a.className=e.className),n.hasStyle===!0&&G(null,e.style,a),n.hasEvents===!0){var u=e.events;null===n.eventKeys&&(n.eventKeys=Object.keys(u));var f=n.eventKeys;ue(u,f,a)}return null!==t&&t.appendChild(a),a}function oe(e,n,t,l,r,d){var c=e.tag;if(null===c)return D(e,n);if(a(c))return fe(e,c,e.attrs||{},e.hooks,e.children,n,t,l);if(!s(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(d=!0);var u=v(c,d),f=e.children,h=e.attrs,p=e.events,m=e.hooks,g=e.className,y=e.style;return e.dom=u,o(m)||_(m,t,u),i(f)||de(e,f,u,t,l,r,d),o(h)||(le(e),he(h,Object.keys(h),u,r)),o(g)||(u.className=g),o(y)||G(null,y,u),o(p)||ue(p,Object.keys(p),u),null!==n&&n.appendChild(u),u}function ie(e,n,t,l,r,o,i){var a=C();t&&t.push(a),e.then(function(e){var s=te(e,null,l,r,o,i);n.replaceChild(s,a),t&&c(t,a,s)}),n.appendChild(a)}function ae(e,n,t,l,r){for(var o=0;o<e.length;o++)te(e[o],n,t,l,r)}function se(e,n,l,a,s,c,u){for(var h=null,v=!1,m=!1,g=0;g<n.length;g++){var y=n[g];if(r(y))v=!0,h=h||[],h.push(p(y,l,!1));else if(!o(y)&&t(y)){var C=U();v=!0,se(e,y,C,a,s,c,u),f(l,C),h=h||[],h.push(C)}else if(d(y))ie(y,l,h,a,s,c,u);else{var k=te(y,l,a,s,c,u);v||!m&&y&&o(y.key)?(v=!0,h=h||[],h.push(k)):i(y)?(v=!0,h=h||[],h.push(k)):m===!1&&(m=!0)}}null!==h&&h.length>1&&v===!0&&(e.domChildren=h)}function de(e,n,l,o,i,a,s){t(n)?se(e,n,l,o,i,a,s):r(n)?p(n,l,!0):d(n)?ie(n,l,null,o,i,a,s):te(n,l,o,i,a,s)}function ce(e,n,t){!i(e)&&s(n)&&(e.refs[n]=t)}function ue(e,n,t){for(var l=0;l<n.length;l++){var r=n[l];t[r]=e[r]}}function fe(e,t,r,i,a,s,d,c){r=n(a,r);var u=void 0;if(l(t)){var f=new t(r);f._patch=q;var h=f.getChildContext();o(h)||(c=ge.extends({},c,h)),f.context=c,f._pendingSetState=!0,f.componentWillMount();var v=f.shouldComponentUpdate();if(v){f.componentWillUpdate();var p=f._pendingState,m=f.state;f.state=ge.extends({},m,p)}var g=f.render();f._pendingSetState=!1,o(g)||(u=te(g,null,d,c,f),f._lastNode=g,null!==s&&s.appendChild(u),f.componentDidMount(),f.componentDidUpdate()),e.dom=u,e.instance=f}else{o(i)||(o(i.componentWillMount)||i.componentWillMount(null,r),o(i.componentDidMount)||d.addListener(function(){i.componentDidMount(u,r)}));var y=t(r);u=te(y,null,d,c,null),e.instance=y,null!==s&&s.appendChild(u),e.dom=u}return u}function he(e,n,t,l){for(var r=0;r<n.length;r++){var o=n[r];"ref"===o?ce(l,e[o],t):F(o,e[o],t)}}function ve(e){for(var n=0;n<je.length;n++){var t=je[n];if(t.dom===e)return t}return null}function pe(e){for(var n=0;n<je.length;n++){var t=je[n];if(t===e)return void je.splice(n,1)}}function me(n,t){var l=ve(t),r=new e;if(null===l)te(n,t,r,{},null,!1),r.trigger(),je.push({node:n,dom:t});else{var o=N();q(l.node,n,t,r,{},null,null,!1),r.trigger(),null===n&&pe(l),l.node=n,window.node=n,O(o)}}var ge={};ge.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},ge.classCallCheck=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},ge.createClass=function(){function e(e,n){for(var t=0;t<n.length;t++){var l=n[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(n,t,l){return t&&e(n.prototype,t),l&&e(n,l),n}}(),ge.extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e};var ye=window.screen.width,Ce=window.screen.height,ke=0,we=0;window.onscroll=function(e){ke=window.scrollX,we=window.scrollY},window.resize=function(e){ke=window.scrollX,we=window.scrollY,ye=window.screen.width,Ce=window.screen.height},e.prototype={refresh:function(){this.scrollX=window.scrollX,this.scrollY=window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e]()}};var be=new Map;Y();var Ne="http://www.w3.org/1999/xlink",xe="http://www.w3.org/XML/1998/namespace",Oe={"xlink:href":Ne,"xlink:arcrole":Ne,"xlink:actuate":Ne,"xlink:role":Ne,"xlink:row":Ne,"xlink:titlef":Ne,"xlink:type":Ne,"xml:base":xe,"xml:lang":xe,"xml:space":xe},Ue=!0,je=[],Te={render:me};return Te});

@@ -67,46 +67,2 @@ /*!

function documentCreateElement(tag, isSVG) {
var dom = void 0;
if (isSVG === true) {
dom = document.createElementNS('http://www.w3.org/2000/svg', tag);
} else {
dom = document.createElement(tag);
}
return dom;
}
// Runs only once in applications lifetime
var isBrowser = typeof window !== 'undefined' && window.document;
function createUniversalElement(tag, attrs, isSVG) {
if (isBrowser) {
var dom = documentCreateElement(tag, isSVG);
if (attrs) {
createStaticAttributes(attrs, dom);
}
return dom;
}
return null;
}
function createStaticAttributes(attrs, dom) {
var attrKeys = Object.keys(attrs);
for (var i = 0; i < attrKeys.length; i++) {
var attr = attrKeys[i];
var value = attrs[attr];
if (attr === 'className') {
dom.className = value;
} else {
if (value === true) {
dom.setAttribute(attr, attr);
} else if (!isNullOrUndefined(value) && value !== false && !isAttrAnEvent(attr)) {
dom.setAttribute(attr, value);
}
}
}
}
function VNode(blueprint) {

@@ -124,2 +80,3 @@ this.bp = blueprint;

this.key = null;
this.clipData = null;
}

@@ -192,2 +149,3 @@

var blueprint = {
lazy: shape.lazy || false,
dom: null,

@@ -251,2 +209,47 @@ pools: {

// Runs only once in applications lifetime
var isBrowser = typeof window !== 'undefined' && window.document;
// Copy of the util from dom/util, otherwise it makes massive bundles
function documentCreateElement(tag, isSVG) {
var dom = void 0;
if (isSVG === true) {
dom = document.createElementNS('http://www.w3.org/2000/svg', tag);
} else {
dom = document.createElement(tag);
}
return dom;
}
function createUniversalElement(tag, attrs, isSVG) {
if (isBrowser) {
var dom = documentCreateElement(tag, isSVG);
if (attrs) {
createStaticAttributes(attrs, dom);
}
return dom;
}
return null;
}
function createStaticAttributes(attrs, dom) {
var attrKeys = Object.keys(attrs);
for (var i = 0; i < attrKeys.length; i++) {
var attr = attrKeys[i];
var value = attrs[attr];
if (attr === 'className') {
dom.className = value;
} else {
if (value === true) {
dom.setAttribute(attr, attr);
} else if (!isNullOrUndefined(value) && value !== false && !isAttrAnEvent(attr)) {
dom.setAttribute(attr, value);
}
}
}
}
var index = {

@@ -253,0 +256,0 @@ createBlueprint: createBlueprint,

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Inferno=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function n(t,e){var n=void 0;return n=e===!0?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function r(t,e,r){if(u){var l=n(t,r);return e&&s(e,l),l}return null}function s(n,r){for(var s=Object.keys(n),l=0;l<s.length;l++){var o=s[l],i=n[o];"className"===o?r.className=i:i===!0?r.setAttribute(o,o):t(i)||i===!1||e(o)||r.setAttribute(o,i)}}function l(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null}function o(t){return new l(t)}function i(e,n){var r=e.tag||null,s=!(!r||void 0===r.arg),o=t(e.children)?null:e.children,i=!(!o||void 0===o.arg),a=e.attrs||null,u=!(!a||void 0===a.arg),c=e.hooks||null,f=!(!c||void 0===c.arg),h=e.events||null,y=!(!h||void 0===h.arg),d=void 0!==e.key?e.key:null,v=!t(d)&&!t(d.arg),m=e.style||null,g=!(!m||void 0===m.arg),p=void 0!==e.className?e.className:null,b=!(!p||void 0===p.arg),k={dom:null,pools:{keyed:{},nonKeyed:[]},tag:s?null:r,className:""!==p&&p?p:null,style:""!==m&&m?m:null,isComponent:s,hasAttrs:u||!!a,hasHooks:f,hasEvents:y,hasStyle:g||!(""===m||!m),hasClassName:b||!(""===p||!p),childrenType:void 0===n?o?5:0:n,attrKeys:null,eventKeys:null,isSVG:e.isSVG||!1};return function(){var t=new l(k);return s===!0&&(t.tag=arguments[r.arg]),i===!0&&(t.children=arguments[o.arg]),u===!0?t.attrs=arguments[a.arg]:t.attrs=a,f===!0&&(t.hooks=arguments[c.arg]),y===!0&&(t.events=arguments[h.arg]),v===!0&&(t.key=arguments[d.arg]),g===!0?t.style=arguments[m.arg]:t.style=k.style,b===!0?t.className=arguments[p.arg]:t.className=k.className,t}}var a={};a.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var u="undefined"!=typeof window&&window.document;l.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var c={createBlueprint:i,createVNode:o,universal:{createElement:r}};return c});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Inferno=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function n(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function r(t){return new n(t)}function s(e,r){var s=e.tag||null,l=!(!s||void 0===s.arg),o=t(e.children)?null:e.children,i=!(!o||void 0===o.arg),a=e.attrs||null,u=!(!a||void 0===a.arg),c=e.hooks||null,f=!(!c||void 0===c.arg),h=e.events||null,y=!(!h||void 0===h.arg),d=void 0!==e.key?e.key:null,v=!t(d)&&!t(d.arg),m=e.style||null,g=!(!m||void 0===m.arg),p=void 0!==e.className?e.className:null,b=!(!p||void 0===p.arg),k={lazy:e.lazy||!1,dom:null,pools:{keyed:{},nonKeyed:[]},tag:l?null:s,className:""!==p&&p?p:null,style:""!==m&&m?m:null,isComponent:l,hasAttrs:u||!!a,hasHooks:f,hasEvents:y,hasStyle:g||!(""===m||!m),hasClassName:b||!(""===p||!p),childrenType:void 0===r?o?5:0:r,attrKeys:null,eventKeys:null,isSVG:e.isSVG||!1};return function(){var t=new n(k);return l===!0&&(t.tag=arguments[s.arg]),i===!0&&(t.children=arguments[o.arg]),u===!0?t.attrs=arguments[a.arg]:t.attrs=a,f===!0&&(t.hooks=arguments[c.arg]),y===!0&&(t.events=arguments[h.arg]),v===!0&&(t.key=arguments[d.arg]),g===!0?t.style=arguments[m.arg]:t.style=k.style,b===!0?t.className=arguments[p.arg]:t.className=k.className,t}}function l(t,e){var n=void 0;return n=e===!0?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function o(t,e,n){if(u){var r=l(t,n);return e&&i(e,r),r}return null}function i(n,r){for(var s=Object.keys(n),l=0;l<s.length;l++){var o=s[l],i=n[o];"className"===o?r.className=i:i===!0?r.setAttribute(o,o):t(i)||i===!1||e(o)||r.setAttribute(o,i)}}var a={};a.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var u="undefined"!=typeof window&&window.document,c={createBlueprint:s,createVNode:r,universal:{createElement:o}};return c});
{
"name": "inferno",
"version": "0.7.0",
"version": "0.7.1",
"license": "MPL-2.0",

@@ -5,0 +5,0 @@ "description": "An extremely fast, isomorphic JavaScript library for building modern user interfaces",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc