text: "use strict";
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var inferno_1 = require("inferno");
  exports.cloneVNode = inferno_1.cloneVNode;
  exports.createVNode = inferno_1.createVNode;
  exports.EMPTY_OBJ = inferno_1.EMPTY_OBJ;
  exports.findDOMNode = inferno_1.findDOMNode;
  exports.render = inferno_1.render;
  var inferno_component_1 = require("inferno-component");
  exports.Component = inferno_component_1.default;
  var inferno_create_class_1 = require("inferno-create-class");
  exports.createClass = inferno_create_class_1.default;
  var inferno_create_element_1 = require("inferno-create-element");
  var inferno_shared_1 = require("inferno-shared");
  exports.NO_OP = inferno_shared_1.NO_OP;
  var isValidElement_1 = require("./isValidElement");
  exports.isValidElement = isValidElement_1.default;
  var PropTypes_1 = require("./PropTypes");
  exports.PropTypes = PropTypes_1.default;
  var SVGDOMPropertyConfig_1 = require("./SVGDOMPropertyConfig");
  inferno_1.options.findDOMNodeEnabled = true;
  function unmountComponentAtNode(container) {
      inferno_1.render(null, container);
      return true;
  }
  exports.unmountComponentAtNode = unmountComponentAtNode;
  var ARR = [];
  var Children = {
      map: function (children, fn, ctx) {
          if (inferno_shared_1.isNullOrUndef(children)) {
              return children;
          }
          children = Children.toArray(children);
          if (ctx && ctx !== children) {
              fn = fn.bind(ctx);
          }
          return children.map(fn);
      },
      forEach: function (children, fn, ctx) {
          if (inferno_shared_1.isNullOrUndef(children)) {
              return;
          }
          children = Children.toArray(children);
          if (ctx && ctx !== children) {
              fn = fn.bind(ctx);
          }
          for (var i = 0, len = children.length; i < len; i++) {
              fn(children[i], i, children);
          }
      },
      count: function (children) {
          children = Children.toArray(children);
          return children.length;
      },
      only: function (children) {
          children = Children.toArray(children);
          if (children.length !== 1) {
              throw new Error('Children.only() expects only one child.');
          }
          return children[0];
      },
      toArray: function (children) {
          if (inferno_shared_1.isNullOrUndef(children)) {
              return [];
          }
          return inferno_shared_1.isArray(children) ? children : ARR.concat(children);
      }
  };
  exports.Children = Children;
  inferno_component_1.default.prototype.isReactComponent = {};
  var currentComponent = null;
  inferno_1.options.beforeRender = function (component) {
      currentComponent = component;
  };
  inferno_1.options.afterRender = function () {
      currentComponent = null;
  };
  var version = '15.4.2';
  exports.version = version;
  function normalizeProps(name, props) {
      if ((name === 'input' || name === 'textarea') && props.type !== 'radio' && props.onChange) {
          var type = props.type;
          var eventName = void 0;
          if (type === 'checkbox') {
              eventName = 'onclick';
          }
          else if (type === 'file') {
              eventName = 'onchange';
          }
          else {
              eventName = 'oninput';
          }
          if (!props[eventName]) {
              props[eventName] = props.onChange;
              delete props.onChange;
          }
      }
      for (var prop in props) {
          if (prop === 'onDoubleClick') {
              props.onDblClick = props[prop];
              delete props[prop];
          }
          if (prop === 'htmlFor') {
              props.for = props[prop];
              delete props[prop];
          }
          var mappedProp = SVGDOMPropertyConfig_1.default[prop];
          if (mappedProp && mappedProp !== prop) {
              props[mappedProp] = props[prop];
              delete props[prop];
          }
      }
  }
  // we need to add persist() to Event (as React has it for synthetic events)
  // this is a hack and we really shouldn't be modifying a global object this way,
  // but there isn't a performant way of doing this apart from trying to proxy
  // every prop event that starts with "on", i.e. onClick or onKeyPress
  // but in reality devs use onSomething for many things, not only for
  // input events
  if (typeof Event !== 'undefined' && !Event.prototype.persist) {
      // tslint:disable-next-line:no-empty
      Event.prototype.persist = function () { };
  }
  function iterableToArray(iterable) {
      var iterStep;
      var tmpArr = [];
      do {
          iterStep = iterable.next();
          if (iterStep.value) {
              tmpArr.push(iterStep.value);
          }
      } while (!iterStep.done);
      return tmpArr;
  }
  var hasSymbolSupport = typeof Symbol !== 'undefined';
  var injectStringRefs = function (originalFunction) {
      return function (name, _props) {
          var children = [];
          for (var _i = 2; _i < arguments.length; _i++) {
              children[_i - 2] = arguments[_i];
          }
          var props = _props || {};
          var ref = props.ref;
          if (typeof ref === 'string' && !inferno_shared_1.isNull(currentComponent)) {
              currentComponent.refs = currentComponent.refs || {};
              props.ref = function (val) {
                  this.refs[ref] = val;
              }.bind(currentComponent);
          }
          if (typeof name === 'string') {
              normalizeProps(name, props);
          }
          // React supports iterable children, in addition to Array-like
          if (hasSymbolSupport) {
              for (var i = 0, len = children.length; i < len; i++) {
                  var child = children[i];
                  if (child && !inferno_shared_1.isArray(child) && !inferno_shared_1.isString(child) && inferno_shared_1.isFunction(child[Symbol.iterator])) {
                      children[i] = iterableToArray(child[Symbol.iterator]());
                  }
              }
          }
          return originalFunction.apply(void 0, [name, props].concat(children));
      };
  };
  var createElement = injectStringRefs(inferno_create_element_1.default);
  exports.createElement = createElement;
  var cloneElement = injectStringRefs(inferno_1.cloneVNode);
  exports.cloneElement = cloneElement;
  var oldCreateVNode = inferno_1.options.createVNode;
  inferno_1.options.createVNode = function (vNode) {
      var children = vNode.children;
      var props = vNode.props;
      if (inferno_shared_1.isNullOrUndef(props)) {
          props = vNode.props = {};
      }
      if (!inferno_shared_1.isNullOrUndef(children) && inferno_shared_1.isNullOrUndef(props.children)) {
          props.children = children;
      }
      if (oldCreateVNode) {
          oldCreateVNode(vNode);
      }
  };
  // Credit: preact-compat - https://github.com/developit/preact-compat :)
  function shallowDiffers(a, b) {
      for (var i in a) {
          if (!(i in b)) {
              return true;
          }
      }
      for (var i in b) {
          if (a[i] !== b[i]) {
              return true;
          }
      }
      return false;
  }
  function PureComponent(props, context) {
      inferno_component_1.default.call(this, props, context);
  }
  exports.PureComponent = PureComponent;
  PureComponent.prototype = new inferno_component_1.default({}, {});
  PureComponent.prototype.shouldComponentUpdate = function (props, state) {
      return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
  };
  var WrapperComponent = (function (_super) {
      __extends(WrapperComponent, _super);
      function WrapperComponent() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      WrapperComponent.prototype.getChildContext = function () {
          // tslint:disable-next-line
          return this.props['context'];
      };
      WrapperComponent.prototype.render = function (props) {
          return props.children;
      };
      return WrapperComponent;
  }(inferno_component_1.default));
  function unstable_renderSubtreeIntoContainer(parentComponent, vNode, container, callback) {
      var wrapperVNode = inferno_1.createVNode(4, WrapperComponent, null, null, {
          children: vNode,
          context: parentComponent.context
      });
      var component = inferno_1.render(wrapperVNode, container);
      if (callback) {
          // callback gets the component as context, no other argument.
          callback.call(component);
      }
      return component;
  }
  exports.unstable_renderSubtreeIntoContainer = unstable_renderSubtreeIntoContainer;
  // Credit: preact-compat - https://github.com/developit/preact-compat
  var ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' ');
  function createFactory(type) {
      return createElement.bind(null, type);
  }
  exports.createFactory = createFactory;
  var DOM = {};
  exports.DOM = DOM;
  for (var i = ELEMENTS.length; i--;) {
      DOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]);
  }
  // Mask React global in browser enviornments when React is not used.
  if (inferno_shared_1.isBrowser && typeof window.React === 'undefined') {
      var exports_1 = {
          createVNode: inferno_1.createVNode,
          render: inferno_1.render,
          isValidElement: isValidElement_1.default,
          createElement: createElement,
          Component: inferno_component_1.default,
          PureComponent: PureComponent,
          unmountComponentAtNode: unmountComponentAtNode,
          cloneElement: cloneElement,
          PropTypes: PropTypes_1.default,
          createClass: inferno_create_class_1.default,
          findDOMNode: inferno_1.findDOMNode,
          Children: Children,
          cloneVNode: inferno_1.cloneVNode,
          NO_OP: inferno_shared_1.NO_OP,
          version: version,
          unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer,
          createFactory: createFactory,
          DOM: DOM,
          EMPTY_OBJ: inferno_1.EMPTY_OBJ
      };
      window.React = exports_1;
      window.ReactDOM = exports_1;
  }
  exports.default = {
      createVNode: inferno_1.createVNode,
      render: inferno_1.render,
      isValidElement: isValidElement_1.default,
      createElement: createElement,
      Component: inferno_component_1.default,
      PureComponent: PureComponent,
      unmountComponentAtNode: unmountComponentAtNode,
      cloneElement: cloneElement,
      PropTypes: PropTypes_1.default,
      createClass: inferno_create_class_1.default,
      findDOMNode: inferno_1.findDOMNode,
      Children: Children,
      cloneVNode: inferno_1.cloneVNode,
      NO_OP: inferno_shared_1.NO_OP,
      version: version,
      unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer,
      createFactory: createFactory,
      DOM: DOM,
      EMPTY_OBJ: inferno_1.EMPTY_OBJ
  };
  