Full Code of YMFE/qreact for AI

master 9d579a361948 cached
167 files
6.4 MB
1.7M tokens
1 requests
Download .txt
Showing preview only (6,803K chars total). Download the full file or copy to clipboard to get everything.
Repository: YMFE/qreact
Branch: master
Commit: 9d579a361948
Files: 167
Total size: 6.4 MB

Directory structure:
gitextract_s_rwaydx/

├── .babelrc
├── .eslintrc.js
├── .gitignore
├── .npmignore
├── .prettierrc
├── LICENSE
├── README.md
├── dist/
│   ├── React.js
│   ├── ReactDOMServer.js
│   ├── ReactIE.js
│   ├── ReactNoop.js
│   └── Router.js
├── lib/
│   ├── ReactBrowserEventEmitter.js
│   ├── ReactChildren.js
│   ├── ReactDOMFactories.js
│   ├── ReactInputSelection.js
│   ├── ReactPropTypes.js
│   ├── ReactProxy.js
│   ├── ReactShallowRenderer.js
│   ├── ReactTestUtils.js
│   ├── ReduxIE.js
│   ├── babel.js
│   ├── createClass.js
│   ├── createReactNoop.js
│   ├── createResource.js
│   ├── createSubscription.js
│   ├── deepForceUpdate.js
│   ├── devtools.js
│   ├── injectTapEventPlugin.js
│   ├── onlyChild.js
│   ├── polyfill.js
│   ├── shallowCompare.js
│   ├── sliceChildren.js
│   └── traverseAllChildren.js
├── package.json
├── packages/
│   ├── core/
│   │   ├── Children.js
│   │   ├── Component.js
│   │   ├── PropTypes.js
│   │   ├── PureComponent.js
│   │   ├── README.md
│   │   ├── __tests__/
│   │   │   ├── ReactChildren-test.js
│   │   │   ├── ReactContextValidator-test.js
│   │   │   ├── ReactES6Class-test.js
│   │   │   ├── ReactElement-test.js
│   │   │   ├── ReactElementClone-test.js
│   │   │   ├── ReactElementValidator-test.internal.js
│   │   │   ├── ReactJSXElement-test.js
│   │   │   ├── ReactJSXElementValidator-test.js
│   │   │   ├── ReactProxy-test.js
│   │   │   ├── ReactPureComponent-test.js
│   │   │   ├── createReactClassIntegration-test.js
│   │   │   ├── forwardRef-test.internal.js
│   │   │   └── onlyChild-test.js
│   │   ├── createClass.js
│   │   ├── createContext.js
│   │   ├── createElement.js
│   │   ├── createPortal.js
│   │   ├── createRef.js
│   │   ├── createRenderer.js
│   │   ├── shallowEqual.js
│   │   └── util.js
│   ├── fiber/
│   │   ├── ErrorBoundary.js
│   │   ├── Fiber.js
│   │   ├── README.md
│   │   ├── Refs.js
│   │   ├── beginWork.js
│   │   ├── commitWork.js
│   │   ├── createInstance.js
│   │   ├── effectTag.js
│   │   ├── findHostInstance.js
│   │   ├── insertPoint.js
│   │   ├── scheduleWork.js
│   │   ├── scheduler.js
│   │   └── unbatch.js
│   ├── readme.md
│   ├── render/
│   │   ├── canvas/
│   │   │   └── readme.md
│   │   ├── console/
│   │   │   └── readme.md
│   │   ├── dom/
│   │   │   ├── DOMRenderer.js
│   │   │   ├── __tests__/
│   │   │   │   ├── README.md
│   │   │   │   ├── ReactComponent-test.js
│   │   │   │   ├── ReactComponentLifeCycle-test.js
│   │   │   │   ├── ReactCompositeComponent-test.js
│   │   │   │   ├── ReactCompositeComponentNestedState-test.js
│   │   │   │   ├── ReactCompositeComponentState-test.js
│   │   │   │   ├── ReactDOMComponentTree-test.js
│   │   │   │   ├── ReactDOMEventListener-test.js
│   │   │   │   ├── ReactDOMFiber-test.js
│   │   │   │   ├── ReactDOMInput-test.js
│   │   │   │   ├── ReactDOMOption-test.js
│   │   │   │   ├── ReactDOMSVG-test.js
│   │   │   │   ├── ReactDOMSelect-test.js
│   │   │   │   ├── ReactDOMTextComponent-test.js
│   │   │   │   ├── ReactDOMTextarea-test.js
│   │   │   │   ├── ReactEmptyComponent-test.js
│   │   │   │   ├── ReactErrorBoundaries-test.internal.js
│   │   │   │   ├── ReactIdentity-test.js
│   │   │   │   ├── ReactMount-test.js
│   │   │   │   ├── ReactMountDestruction-test.js
│   │   │   │   ├── ReactMultiChild-test.js
│   │   │   │   ├── ReactMultiChildReconcile-test.js
│   │   │   │   ├── ReactStatelessComponent-test.js
│   │   │   │   ├── ReactTestUtils-test.js
│   │   │   │   ├── ReactUpdates-test.js
│   │   │   │   ├── __snapshots__/
│   │   │   │   │   └── ReactTestUtils-test.js.snap
│   │   │   │   ├── findDOMNode-test.js
│   │   │   │   ├── refs-destruction-test.js
│   │   │   │   ├── refs-test.js
│   │   │   │   └── renderSubtreeIntoContainer-test.js
│   │   │   ├── browser.js
│   │   │   ├── compat.js
│   │   │   ├── duplex.js
│   │   │   ├── event.js
│   │   │   ├── findDOMNode.js
│   │   │   ├── index.ie8.js
│   │   │   ├── index.js
│   │   │   ├── props.js
│   │   │   ├── readme.md
│   │   │   └── style.js
│   │   ├── noop/
│   │   │   ├── NoopRenderer.js
│   │   │   ├── index.js
│   │   │   └── readme.md
│   │   ├── readme.md
│   │   └── server/
│   │       ├── Renderer.js
│   │       ├── __tests2__/
│   │       │   ├── index.js
│   │       │   └── utils/
│   │       │       └── ReactDOMServerIntegrationTestUtils.js
│   │       ├── duplex.js
│   │       ├── encode.js
│   │       ├── html.js
│   │       ├── index.js
│   │       ├── namespaces.js
│   │       ├── readme.md
│   │       └── style.js
│   ├── router/
│   │   ├── history.js
│   │   ├── index.jsx
│   │   ├── readme.md
│   │   └── utils.js
│   └── store/
│       ├── createRedux.js
│       ├── index.js
│       ├── pluginFactory.js
│       ├── plugins.js
│       ├── readme.md
│       ├── rematch.js
│       └── utils.js
├── scripts/
│   ├── build/
│   │   ├── ReactSelection.js
│   │   ├── create-class.js
│   │   ├── rollup.ie.js
│   │   ├── rollup.js
│   │   ├── rollup.noop.js
│   │   ├── rollup.reach.js
│   │   ├── rollup.selection.js
│   │   ├── rollup.ssr.js
│   │   ├── shallowCompare.index.js
│   │   └── shallowCompare.js
│   ├── build.js
│   └── jest/
│       ├── codes.json
│       ├── config.build.js
│       ├── config.source.js
│       ├── matchers/
│       │   └── toWarnDev.js
│       ├── noHaste.js
│       ├── preprocessor.js
│       ├── setupEnvironment.js
│       ├── setupTests.js
│       ├── spec-equivalence-reporter/
│       │   └── setupTests.js
│       └── typescript/
│           ├── jest.d.ts
│           └── preprocessor.js
├── server.js
└── version.md

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{
    "presets": [
        ["env",{ "modules": false }], "react"
    ],
   
    "plugins": [
        [  "transform-class-properties",
            "transform-es2015-classes", {
                "loose": true
            }
        ],
        ["transform-object-rest-spread", { "useBuiltIns": true }],
        ["module-resolver", {
           "root": ["."],
           "alias": {
             "react-core":"./packages/core",
             "react-fiber": "./packages/fiber",
             "prop-types": "./lib/ReactPropTypes",
             "create-react-class": "./lib/createClass",
             "react-server-renderer":"./dist/ReactDOMServer",
             "react-noop-renderer": "./dist/ReactNoop",
             "react": "./dist/React",
             "lib": "./lib",
             "react-dom": "./dist/React",
             "test-utils": "./lib/ReactTestUtils"
           }
         }]
    ]
}

================================================
FILE: .eslintrc.js
================================================
module.exports = {
    "env": {
        "browser": true,
        "commonjs": true,
        "es6": true,
        "node": true
    },
    "extends": "eslint:recommended",
    "parser": "babel-eslint",
    "parserOptions": {
        "ecmaFeatures": {
            "experimentalObjectRestSpread": true,
            "jsx": true
        },
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "globals": {
        define: true
    },
    "rules": {
        "indent": [
            "error",
            4,
            {
                "SwitchCase": 1
            }
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "double"
        ],
        "semi": [
            "error",
            "always"
        ],
        "comma-dangle": [
            "error",
            "never"
        ],
        "strict": 0
    }
};

================================================
FILE: .gitignore
================================================
# kdiff3 ignore
*.orig

# maven ignore
target/

# eclipse ignore
.settings/
.project
.classpath

# idea ignore
.idea/
*.ipr
*.iml
*.iws

# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp

# system ignore
.DS_Store
Thumbs.db

# package ignore (optional)
# *.jar
# *.war
# *.zip
# *.tar
# *.tar.gz

*node_modules*
__tmp__*

/coverage

================================================
FILE: .npmignore
================================================
/test/
/scripts/
/examples/
.babelrc
/coverage/
/build/

================================================
FILE: .prettierrc
================================================
{
  "tabWidth": 4,
  "useTabs": false,
  "singleQuote": false
}

================================================
FILE: LICENSE
================================================
                              Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "{}"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2018, The YMFE Team.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

================================================
FILE: README.md
================================================
# 简介

`QReact`是去哪儿网推出的一款**高度兼容 React**迷你的 React 框架,让 React 在业务线上更具通用价值。

众所周知,React 一直存在体积过大的诟病,集成了许多在线上环境不需要功能。YMFE 团队在熟读其源码的基础上,去芜存精,重新实现了 React 所有公开接口,体积只有 React 的约三分之一,从而解决它在移动端上加载过慢的问题。由于没有使用高级 API,因此只需在 webpack ,uglify 上修改配置,便能运用于 IE8 上,从而解决 PC 端同学使用 React 的问题。

它对比官方 react, preact, inferno, react-lite 等框架,它具有以下优势。

* 对比 `preact`等迷你框架,QReact 的事件系统更为完善,更具扩展性。像 `mouseenter/mouseleave`,`focus/blur` 等不冒泡的事件,`preact` 简单的基于**addEventListener(type, fn, true)**是无法正常运行。

* 对比 `preact`等迷你框架,QReact 在处理混杂着 ref 与生命周期钩子的逻辑时,与官方的行为是保持一致。React.Children 与 React.cloneElement 在 key 生成策略上也是与官方行为一致。其他迷你框架则出入很大,或干脆没有实现。简而言之,QReact 与 React 高度兼容,在细节上做得原汁原味。因此它 99%上运行阿里的**antd**这样复杂的 UI 框架,当然我们不限于此,会努力做到完全兼容。

* QReact 实现了官方 `react/lib` 下的许多子模块,它们的实现也非常简洁,从而整体减少 bundle 的大小。如果没有实现它们,许多第三方库就会直接引用官方提供的 `react/lib` 子模块,但由于迷你 React 们的内部实现与官方不一样,因此即便引用,也会运行出错。其次,RN 也用到它们,,这也为 QReact 支持三端合一的 QRN-WEB 做技术支撑。

* QReact 包含了 `react` 及 `react-dom` 的全部功能,同时有着更小的体积,QReact@2.1.4 的体积为(`minified: 34.45KB gzipped : 12.88KB`),作为对比, `react@16.2.0` + `react-dom@16.2.0` 的体积则大了很多(`minified: 5.1KB + 88.7KB = 93.8KB gzipped: 2.2KB + 28.3KB = 30.5KB`)。

* QReact 支持 IE6 - IE8,详细信息请[参见使用](https://qreact.ymfe.org/documents/IE.html)中的“在 IE 6 - IE 8 及以下使用”。

* QReact 是一个充满活力的库,它的开发版本[anujs](https://github.com/RubyLouvre/anu)几乎每天都有更新,不断跟进官方 React 的新特性,React 16 的一些新功能也渐渐加入。

## 如何使用

详细使用方式请[参见使用](https://qreact.ymfe.org/)。

## 组件规范

为了减少常见的编码错误,请尽量遵循[编码规范](https://qreact.ymfe.org/guide/index.html)。

## 鸣谢

QReact 基于开源项目 [developit preact@7.1.0](https://github.com/developit/preact/tree/7.1.0/) [developit preact-compat@3.14.1](https://github.com/developit/preact-compat/tree/3.14.1) 及 [Facebook React@v15.3.1](https://github.com/facebook/react/tree/v15.3.1)。

QReact 在开发过程,从 preact, react-lite 的源码受到许多启迪,特此鸣谢。

欢迎大家对 QReact 与 anujs 进行试用与提 issue 与 PR!


================================================
FILE: dist/React.js
================================================
/**
 * Powered by YMFE (https://ymfe.org)
 */

(function(global, factory) {
    typeof exports === "object" && typeof module !== "undefined"
        ? (module.exports = factory())
        : typeof define === "function" && define.amd
            ? define(factory)
            : (global.React = factory());
})(this, function() {
    var arrayPush = Array.prototype.push;
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var gSBU = "getSnapshotBeforeUpdate";
    var gDSFP = "getDerivedStateFromProps";
    var hasSymbol = typeof Symbol === "function" && Symbol["for"];
    var effects = [];
    var topFibers = [];
    var topNodes = [];
    var emptyObject = {};
    var REACT_ELEMENT_TYPE = hasSymbol
        ? Symbol["for"]("react.element")
        : 0xeac7;
    function noop() {}
    function Fragment(props) {
        return props.children;
    }
    function returnFalse() {
        return false;
    }
    function returnTrue() {
        return true;
    }
    function resetStack(info) {
        keepLast(info.containerStack);
        keepLast(info.contextStack);
    }
    function keepLast(list) {
        var n = list.length;
        list.splice(0, n - 1);
    }
    function get(key) {
        return key._reactInternalFiber;
    }
    var __type = Object.prototype.toString;
    var fakeWindow = {};
    function getWindow() {
        try {
            return window;
        } catch (e) {
            try {
                return global;
            } catch (e) {
                return fakeWindow;
            }
        }
    }
    function isMounted(instance) {
        var fiber = get(instance);
        return !!(fiber && fiber.hasMounted);
    }
    function toWarnDev(msg, deprecated) {
        msg = deprecated ? msg + " is deprecated" : msg;
        var process = getWindow().process;
        if (process && process.env.NODE_ENV === "development") {
            throw msg;
        }
    }
    function extend(obj, props) {
        for (var i in props) {
            if (hasOwnProperty.call(props, i)) {
                obj[i] = props[i];
            }
        }
        return obj;
    }
    function inherit(SubClass, SupClass) {
        function Bridge() {}
        var orig = SubClass.prototype;
        Bridge.prototype = SupClass.prototype;
        var fn = (SubClass.prototype = new Bridge());
        extend(fn, orig);
        fn.constructor = SubClass;
        return fn;
    }
    try {
        var supportEval = Function("a", "return a + 1")(2) == 3;
    } catch (e) {}
    function miniCreateClass(ctor, superClass, methods, statics) {
        var className = ctor.name || "IEComponent";
        var Ctor = supportEval
            ? Function(
                  "superClass",
                  "ctor",
                  "return function " +
                      className +
                      " (props, context) {\n            superClass.apply(this, arguments); \n            ctor.apply(this, arguments);\n      }"
              )(superClass, ctor)
            : function Ctor() {
                  superClass.apply(this, arguments);
                  ctor.apply(this, arguments);
              };
        Ctor.displayName = className;
        var fn = inherit(Ctor, superClass);
        extend(fn, methods);
        if (statics) {
            extend(Ctor, statics);
        }
        return Ctor;
    }
    var lowerCache = {};
    function toLowerCase(s) {
        return lowerCache[s] || (lowerCache[s] = s.toLowerCase());
    }
    function isFn(obj) {
        return __type.call(obj) === "[object Function]";
    }
    var rword = /[^, ]+/g;
    function oneObject(array, val) {
        if (array + "" === array) {
            array = array.match(rword) || [];
        }
        var result = {},
            value = val !== void 666 ? val : 1;
        for (var i = 0, n = array.length; i < n; i++) {
            result[array[i]] = value;
        }
        return result;
    }
    var rcamelize = /[-_][^-_]/g;
    function camelize(target) {
        if (!target || (target.indexOf("-") < 0 && target.indexOf("_") < 0)) {
            return target;
        }
        var str = target.replace(rcamelize, function(match) {
            return match.charAt(1).toUpperCase();
        });
        return firstLetterLower(str);
    }
    function firstLetterLower(str) {
        return str.charAt(0).toLowerCase() + str.slice(1);
    }
    var numberMap = {
        "[object Boolean]": 2,
        "[object Number]": 3,
        "[object String]": 4,
        "[object Function]": 5,
        "[object Symbol]": 6,
        "[object Array]": 7
    };
    function typeNumber(data) {
        if (data === null) {
            return 1;
        }
        if (data === void 666) {
            return 0;
        }
        var a = numberMap[__type.call(data)];
        return a || 8;
    }

    function createRenderer(methods) {
        return extend(Renderer, methods);
    }
    var middlewares = [];
    var Renderer = {
        controlledCbs: [],
        mountOrder: 1,
        macrotasks: [],
        boundaries: [],
        middleware: function middleware(obj) {
            if (obj.begin && obj.end) {
                middlewares.push(obj);
            }
        },
        updateControlled: function updateControlled() {},
        fireMiddlewares: function fireMiddlewares(begin) {
            var index = begin ? middlewares.length - 1 : 0,
                delta = begin ? -1 : 1,
                method = begin ? "begin" : "end",
                obj = void 0;
            while ((obj = middlewares[index])) {
                obj[method]();
                index += delta;
            }
        },
        currentOwner: null
    };

    var fakeObject = {
        enqueueSetState: returnFalse,
        isMounted: returnFalse
    };
    function Component(props, context) {
        Renderer.currentOwner = this;
        this.context = context;
        this.props = props;
        this.refs = {};
        this.updater = fakeObject;
        this.state = null;
    }
    Component.prototype = {
        constructor: Component,
        replaceState: function replaceState() {
            toWarnDev("replaceState", true);
        },
        isReactComponent: returnTrue,
        isMounted: function isMounted$$1() {
            toWarnDev("isMounted", true);
            return this.updater.isMounted(this);
        },
        setState: function setState(state, cb) {
            this.updater.enqueueSetState(this, state, cb);
        },
        forceUpdate: function forceUpdate(cb) {
            this.updater.enqueueSetState(this, true, cb);
        },
        render: function render() {
            throw "must implement render";
        }
    };

    var _typeof =
        typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
            ? function(obj) {
                  return typeof obj;
              }
            : function(obj) {
                  return obj &&
                      typeof Symbol === "function" &&
                      obj.constructor === Symbol &&
                      obj !== Symbol.prototype
                      ? "symbol"
                      : typeof obj;
              };
    var RESERVED_PROPS = {
        key: true,
        ref: true,
        __self: true,
        __source: true
    };
    function makeProps(type, config, props, children, len) {
        var defaultProps = void 0,
            propName = void 0;
        for (propName in config) {
            if (
                hasOwnProperty.call(config, propName) &&
                !RESERVED_PROPS.hasOwnProperty(propName)
            ) {
                props[propName] = config[propName];
            }
        }
        if (type && type.defaultProps) {
            defaultProps = type.defaultProps;
            for (propName in defaultProps) {
                if (props[propName] === undefined) {
                    props[propName] = defaultProps[propName];
                }
            }
        }
        if (len === 1) {
            props.children = children[0];
        } else if (len > 1) {
            props.children = children;
        }
        return props;
    }
    function hasValidRef(config) {
        return config.ref !== undefined;
    }
    function hasValidKey(config) {
        return config.key !== undefined;
    }
    function createElement(type, config) {
        for (
            var _len = arguments.length,
                children = Array(_len > 2 ? _len - 2 : 0),
                _key = 2;
            _key < _len;
            _key++
        ) {
            children[_key - 2] = arguments[_key];
        }
        var props = {},
            tag = 5,
            key = null,
            ref = null,
            argsLen = children.length;
        if (type && type.call) {
            tag = type.prototype && type.prototype.render ? 2 : 1;
        } else if (type + "" !== type) {
            toWarnDev("React.createElement: type is invalid.");
        }
        if (config != null) {
            if (hasValidRef(config)) {
                ref = config.ref;
            }
            if (hasValidKey(config)) {
                key = "" + config.key;
            }
        }
        props = makeProps(type, config || {}, props, children, argsLen);
        return ReactElement(type, tag, props, key, ref, Renderer.currentOwner);
    }
    function cloneElement(element, config) {
        var props = Object.assign({}, element.props);
        var type = element.type;
        var key = element.key;
        var ref = element.ref;
        var tag = element.tag;
        var owner = element._owner;
        for (
            var _len2 = arguments.length,
                children = Array(_len2 > 2 ? _len2 - 2 : 0),
                _key2 = 2;
            _key2 < _len2;
            _key2++
        ) {
            children[_key2 - 2] = arguments[_key2];
        }
        var argsLen = children.length;
        if (config != null) {
            if (hasValidRef(config)) {
                ref = config.ref;
                owner = Renderer.currentOwner;
            }
            if (hasValidKey(config)) {
                key = "" + config.key;
            }
        }
        props = makeProps(type, config || {}, props, children, argsLen);
        return ReactElement(type, tag, props, key, ref, owner);
    }
    function createFactory(type) {
        var factory = createElement.bind(null, type);
        factory.type = type;
        return factory;
    }
    function ReactElement(type, tag, props, key, ref, owner) {
        var ret = {
            type: type,
            tag: tag,
            props: props
        };
        if (tag !== 6) {
            ret.$$typeof = REACT_ELEMENT_TYPE;
            ret.key = key || null;
            var refType = typeNumber(ref);
            if (
                refType === 2 ||
                refType === 3 ||
                refType === 4 ||
                refType === 5 ||
                refType === 8
            ) {
                if (refType < 4) {
                    ref += "";
                }
                ret.ref = ref;
            } else {
                ret.ref = null;
            }
            ret._owner = owner;
        }
        return ret;
    }
    function isValidElement(vnode) {
        return !!vnode && vnode.$$typeof === REACT_ELEMENT_TYPE;
    }
    function createVText(text) {
        return ReactElement("#text", 6, text + "");
    }
    function escape(key) {
        var escapeRegex = /[=:]/g;
        var escaperLookup = {
            "=": "=0",
            ":": "=2"
        };
        var escapedString = ("" + key).replace(escapeRegex, function(match) {
            return escaperLookup[match];
        });
        return "$" + escapedString;
    }
    var lastText = void 0,
        flattenIndex = void 0,
        flattenObject = void 0;
    function flattenCb(context, child, key, childType) {
        if (child === null) {
            lastText = null;
            return;
        }
        if (childType === 3 || childType === 4) {
            if (lastText) {
                lastText.props += child;
                return;
            }
            lastText = child = createVText(child);
        } else {
            lastText = null;
        }
        if (!flattenObject[key]) {
            flattenObject[key] = child;
        } else {
            key = "." + flattenIndex;
            flattenObject[key] = child;
        }
        flattenIndex++;
    }
    function fiberizeChildren(children, fiber) {
        flattenObject = {};
        flattenIndex = 0;
        if (children !== void 666) {
            lastText = null;
            traverseAllChildren(children, "", flattenCb);
        }
        flattenIndex = 0;
        return (fiber.children = flattenObject);
    }
    function getComponentKey(component, index) {
        if (
            (typeof component === "undefined"
                ? "undefined"
                : _typeof(component)) === "object" &&
            component !== null &&
            component.key != null
        ) {
            return escape(component.key);
        }
        return index.toString(36);
    }
    var SEPARATOR = ".";
    var SUBSEPARATOR = ":";
    function traverseAllChildren(children, nameSoFar, callback, bookKeeping) {
        var childType = typeNumber(children);
        var invokeCallback = false;
        switch (childType) {
            case 0:
            case 1:
            case 2:
            case 5:
            case 6:
                children = null;
                invokeCallback = true;
                break;
            case 3:
            case 4:
                invokeCallback = true;
                break;
            case 8:
                if (children.$$typeof || children instanceof Component) {
                    invokeCallback = true;
                } else if (children.hasOwnProperty("toString")) {
                    children = children + "";
                    invokeCallback = true;
                    childType = 3;
                }
                break;
        }
        if (invokeCallback) {
            callback(
                bookKeeping,
                children,
                nameSoFar === ""
                    ? SEPARATOR + getComponentKey(children, 0)
                    : nameSoFar,
                childType
            );
            return 1;
        }
        var subtreeCount = 0;
        var nextNamePrefix =
            nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
        if (children.forEach) {
            children.forEach(function(child, i) {
                var nextName = nextNamePrefix + getComponentKey(child, i);
                subtreeCount += traverseAllChildren(
                    child,
                    nextName,
                    callback,
                    bookKeeping
                );
            });
            return subtreeCount;
        }
        var iteratorFn = getIteractor(children);
        if (iteratorFn) {
            iterator = iteratorFn.call(children);
            var ii = 0,
                step;
            while (!(step = iterator.next()).done) {
                child = step.value;
                nextName = nextNamePrefix + getComponentKey(child, ii++);
                subtreeCount += traverseAllChildren(
                    child,
                    nextName,
                    callback,
                    bookKeeping
                );
            }
            return subtreeCount;
        }
        throw "children: type is invalid.";
    }
    var REAL_SYMBOL = hasSymbol && Symbol.iterator;
    var FAKE_SYMBOL = "@@iterator";
    function getIteractor(a) {
        var iteratorFn = (REAL_SYMBOL && a[REAL_SYMBOL]) || a[FAKE_SYMBOL];
        if (iteratorFn && iteratorFn.call) {
            return iteratorFn;
        }
    }

    var Children = {
        only: function only(children) {
            if (isValidElement(children)) {
                return children;
            }
            throw new Error("expect only one child");
        },
        count: function count(children) {
            if (children == null) {
                return 0;
            }
            return traverseAllChildren(children, "", noop);
        },
        map: function map(children, func, context) {
            return proxyIt(children, func, [], context);
        },
        forEach: function forEach(children, func, context) {
            return proxyIt(children, func, null, context);
        },
        toArray: function toArray$$1(children) {
            return proxyIt(children, K, []);
        }
    };
    function proxyIt(children, func, result, context) {
        if (children == null) {
            return [];
        }
        mapChildren(children, null, func, result, context);
        return result;
    }
    function K(el) {
        return el;
    }
    function mapChildren(children, prefix, func, result, context) {
        var keyPrefix = "";
        if (prefix != null) {
            keyPrefix = escapeUserProvidedKey(prefix) + "/";
        }
        traverseAllChildren(children, "", traverseCallback, {
            context: context,
            keyPrefix: keyPrefix,
            func: func,
            result: result,
            count: 0
        });
    }
    var userProvidedKeyEscapeRegex = /\/+/g;
    function escapeUserProvidedKey(text) {
        return ("" + text).replace(userProvidedKeyEscapeRegex, "$&/");
    }
    function traverseCallback(bookKeeping, child, childKey) {
        var result = bookKeeping.result,
            keyPrefix = bookKeeping.keyPrefix,
            func = bookKeeping.func,
            context = bookKeeping.context;
        var mappedChild = func.call(context, child, bookKeeping.count++);
        if (!result) {
            return;
        }
        if (Array.isArray(mappedChild)) {
            mapChildren(mappedChild, childKey, K, result);
        } else if (mappedChild != null) {
            if (isValidElement(mappedChild)) {
                mappedChild = extend({}, mappedChild);
                mappedChild.key =
                    keyPrefix +
                    (mappedChild.key &&
                    (!child || child.key !== mappedChild.key)
                        ? escapeUserProvidedKey(mappedChild.key) + "/"
                        : "") +
                    childKey;
            }
            result.push(mappedChild);
        }
    }

    var check = function check() {
        return check;
    };
    check.isRequired = check;
    var PropTypes = {
        array: check,
        bool: check,
        func: check,
        number: check,
        object: check,
        string: check,
        any: check,
        arrayOf: check,
        element: check,
        instanceOf: check,
        node: check,
        objectOf: check,
        oneOf: check,
        oneOfType: check,
        shape: check
    };

    function shallowEqual(objA, objB) {
        if (Object.is(objA, objB)) {
            return true;
        }
        if (typeNumber(objA) < 7 || typeNumber(objB) < 7) {
            return false;
        }
        var keysA = Object.keys(objA);
        var keysB = Object.keys(objB);
        if (keysA.length !== keysB.length) {
            return false;
        }
        for (var i = 0; i < keysA.length; i++) {
            if (
                !hasOwnProperty.call(objB, keysA[i]) ||
                !Object.is(objA[keysA[i]], objB[keysA[i]])
            ) {
                return false;
            }
        }
        return true;
    }

    var PureComponent = miniCreateClass(
        function PureComponent() {
            this.isPureComponent = true;
        },
        Component,
        {
            shouldComponentUpdate: function shouldComponentUpdate(
                nextProps,
                nextState
            ) {
                var a = shallowEqual(this.props, nextProps);
                var b = shallowEqual(this.state, nextState);
                return !a || !b;
            }
        }
    );

    function createRef() {
        return {
            current: null
        };
    }
    function forwardRef(fn) {
        createRef.render = fn;
        return createRef;
    }

    function AnuPortal(props) {
        return props.children;
    }
    function createPortal(children, parent) {
        var child = createElement(AnuPortal, {
            children: children,
            parent: parent
        });
        child.isPortal = true;
        return child;
    }

    var uuid = 1;
    function gud() {
        return uuid++;
    }
    var MAX_NUMBER = 1073741823;
    function createEventEmitter(value) {
        var handlers = [];
        return {
            on: function on(handler) {
                handlers.push(handler);
            },
            off: function off(handler) {
                handlers = handlers.filter(function(h) {
                    return h !== handler;
                });
            },
            get: function get$$1() {
                return value;
            },
            set: function set(newValue, changedBits) {
                value = newValue;
                handlers.forEach(function(handler) {
                    return handler(value, changedBits);
                });
            }
        };
    }
    function createContext(defaultValue, calculateChangedBits) {
        var contextProp = "__create-react-context-" + gud() + "__";
        function create(obj, value) {
            obj[contextProp] = value;
            return obj;
        }
        var Provider = miniCreateClass(
            function Provider(props) {
                this.emitter = createEventEmitter(props.value);
            },
            Component,
            {
                getChildContext: function getChildContext() {
                    return create({}, this.emitter);
                },
                UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(
                    nextProps
                ) {
                    if (this.props.value !== nextProps.value) {
                        var oldValue = this.props.value;
                        var newValue = nextProps.value;
                        var changedBits = void 0;
                        if (Object.is(oldValue, newValue)) {
                            changedBits = 0;
                        } else {
                            changedBits = isFn(calculateChangedBits)
                                ? calculateChangedBits(oldValue, newValue)
                                : MAX_NUMBER;
                            changedBits |= 0;
                            if (changedBits !== 0) {
                                this.emitter.set(nextProps.value, changedBits);
                            }
                        }
                    }
                },
                render: function render() {
                    return this.props.children;
                }
            },
            {
                childContextTypes: create({}, PropTypes.object.isRequired)
            }
        );
        var Consumer = miniCreateClass(
            function Consumer(props, context) {
                var _this = this;
                this.observedBits = 0;
                this.state = {
                    value: this.getValue()
                };
                this.emitter = context[contextProp];
                this.onUpdate = function(newValue, changedBits) {
                    var observedBits = _this.observedBits | 0;
                    if ((observedBits & changedBits) !== 0) {
                        _this.setState({
                            value: _this.getValue()
                        });
                    }
                };
            },
            Component,
            {
                UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(
                    nextProps
                ) {
                    var observedBits = nextProps.observedBits;
                    this.observedBits =
                        observedBits == null ? MAX_NUMBER : observedBits;
                },
                getValue: function getValue() {
                    if (this.emitter) {
                        return this.emitter.get();
                    } else {
                        return defaultValue;
                    }
                },
                componentDidMount: function componentDidMount() {
                    if (this.emitter) {
                        this.emitter.on(this.onUpdate);
                    }
                    var observedBits = this.props.observedBits;
                    this.observedBits =
                        observedBits == null ? MAX_NUMBER : observedBits;
                },
                componentWillUnmount: function componentWillUnmount() {
                    if (this.emitter) {
                        this.emitter.off(this.onUpdate);
                    }
                },
                render: function render() {
                    return this.props.children(this.state.value);
                }
            },
            {
                contextTypes: create({}, PropTypes.object)
            }
        );
        return {
            Provider: Provider,
            Consumer: Consumer
        };
    }

    function findHostInstance(fiber) {
        if (!fiber) {
            return null;
        } else if (fiber.nodeType) {
            return fiber;
        } else if (fiber.tag > 3) {
            return fiber.stateNode;
        } else if (fiber.tag < 3) {
            return findHostInstance(fiber.stateNode);
        } else if (fiber.refs && fiber.render) {
            fiber = get(fiber);
            var childrenMap = fiber.children;
            if (childrenMap) {
                for (var i in childrenMap) {
                    var dom = findHostInstance(childrenMap[i]);
                    if (dom) {
                        return dom;
                    }
                }
            }
        }
        return null;
    }

    function findDOMNode(fiber) {
        if (fiber == null) {
            return null;
        }
        if (fiber.nodeType === 1) {
            return fiber;
        }
        if (!fiber.render) {
            throw "findDOMNode:invalid type";
        }
        return findHostInstance(fiber);
    }

    function DOMElement(type) {
        this.nodeName = type;
        this.style = {};
        this.children = [];
    }
    var NAMESPACE = {
        svg: "http://www.w3.org/2000/svg",
        xmlns: "http://www.w3.org/2000/xmlns/",
        xlink: "http://www.w3.org/1999/xlink",
        xhtml: "http://www.w3.org/1999/xhtml",
        math: "http://www.w3.org/1998/Math/MathML"
    };
    var fn = (DOMElement.prototype = {
        contains: Boolean
    });
    String(
        "replaceChild,appendChild,removeAttributeNS,setAttributeNS,removeAttribute,setAttribute" +
            ",getAttribute,insertBefore,removeChild,addEventListener,removeEventListener,attachEvent" +
            ",detachEvent"
    ).replace(/\w+/g, function(name) {
        fn[name] = function() {
            toWarnDev("need implement " + name);
        };
    });
    var fakeDoc = new DOMElement();
    fakeDoc.createElement = fakeDoc.createElementNS = fakeDoc.createDocumentFragment = function(
        type
    ) {
        return new DOMElement(type);
    };
    fakeDoc.createTextNode = fakeDoc.createComment = Boolean;
    fakeDoc.documentElement = new DOMElement("html");
    fakeDoc.body = new DOMElement("body");
    fakeDoc.nodeName = "#document";
    fakeDoc.textContent = "";
    var win = getWindow();
    var inBrowser = !!win.alert;
    if (!inBrowser) {
        win.document = fakeDoc;
    }
    var document = win.document;
    var versions = {
        88: 7,
        80: 6,
        "00": NaN,
        "08": NaN
    };
    var msie =
        document.documentMode ||
        versions[
            typeNumber(document.all) + "" + typeNumber(win.XMLHttpRequest)
        ];
    var modern = /NaN|undefined/.test(msie) || msie > 8;
    function contains(a, b) {
        if (b) {
            while ((b = b.parentNode)) {
                if (b === a) {
                    return true;
                }
            }
        }
        return false;
    }

    var rnumber = /^-?\d+(\.\d+)?$/;
    function patchStyle(dom, lastStyle, nextStyle) {
        if (lastStyle === nextStyle) {
            return;
        }
        for (var name in nextStyle) {
            var val = nextStyle[name];
            if (lastStyle[name] !== val) {
                name = cssName(name, dom);
                if (val !== 0 && !val) {
                    val = "";
                } else if (rnumber.test(val) && !cssNumber[name]) {
                    val = val + "px";
                }
                try {
                    dom.style[name] = val;
                } catch (e) {
                    console.log(
                        "dom.style[" + name + "] = " + val + "throw error"
                    );
                }
            }
        }
        for (var _name in lastStyle) {
            if (!(_name in nextStyle)) {
                _name = cssName(_name, dom);
                dom.style[_name] = "";
            }
        }
    }
    var cssNumber = oneObject(
        "animationIterationCount,columnCount,order,flex,flexGrow,flexShrink,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom"
    );
    var prefixes = ["", "-webkit-", "-o-", "-moz-", "-ms-"];
    var cssMap = oneObject("float", "cssFloat");
    function cssName(name, dom) {
        if (cssMap[name]) {
            return cssMap[name];
        }
        var host = (dom && dom.style) || {};
        for (var i = 0, n = prefixes.length; i < n; i++) {
            var camelCase = camelize(prefixes[i] + name);
            if (camelCase in host) {
                return (cssMap[name] = camelCase);
            }
        }
        return null;
    }

    function getSafeValue(value) {
        switch (typeNumber(value)) {
            case 2:
            case 3:
            case 8:
            case 4:
            case 0:
                return value;
            default:
                return "";
        }
    }
    var duplexMap = {
        input: {
            init: function init(node, props) {
                var defaultValue =
                    props.defaultValue == null ? "" : props.defaultValue;
                return (node._wrapperState = {
                    initialValue: getSafeValue(
                        props.value != null ? props.value : defaultValue
                    )
                });
            },
            mount: function mount(node, props, state) {
                if (
                    props.hasOwnProperty("value") ||
                    props.hasOwnProperty("defaultValue")
                ) {
                    var stateValue = "" + state.initialValue;
                    if (node.value === "" && node.value !== stateValue) {
                        syncValue(node, "value", stateValue);
                    }
                    node.defaultValue = stateValue;
                }
                var name = node.name;
                if (name !== "") {
                    node.name = "";
                }
                node.defaultChecked = !node.defaultChecked;
                node.defaultChecked = !node.defaultChecked;
                if (name !== "") {
                    node.name = name;
                }
            },
            update: function update(node, props) {
                if (props.checked != null) {
                    syncValue(node, "checked", !!props.checked);
                }
                var isActive = node === node.ownerDocument.activeElement;
                var value = isActive ? node.value : getSafeValue(props.value);
                if (value != null) {
                    if (props.type === "number") {
                        if (
                            (value === 0 && node.value === "") ||
                            node.value != value
                        ) {
                            syncValue(node, "value", "" + value);
                        }
                    } else if (node.value !== "" + value) {
                        syncValue(node, "value", "" + value);
                    }
                }
                if (props.hasOwnProperty("value")) {
                    setDefaultValue(node, props.type, value, isActive);
                } else if (props.hasOwnProperty("defaultValue")) {
                    setDefaultValue(
                        node,
                        props.type,
                        getSafeValue(props.defaultValue),
                        isActive
                    );
                }
                if (props.checked == null && props.defaultChecked != null) {
                    node.defaultChecked = !!props.defaultChecked;
                }
            }
        },
        select: {
            init: function init(node, props) {
                var value = props.value;
                return (node._wrapperState = {
                    initialValue: value != null ? value : props.defaultValue,
                    wasMultiple: !!props.multiple
                });
            },
            mount: function mount(node, props) {
                var multiple = (node.multiple = !!props.multiple);
                var value = props.value;
                if (value != null) {
                    updateOptions(node, multiple, value, false);
                } else if (props.defaultValue != null) {
                    updateOptions(node, multiple, props.defaultValue, true);
                }
            },
            update: function update(node, props) {
                node._wrapperState.initialValue = void 666;
                var wasMultiple = node._wrapperState.wasMultiple;
                var multiple = (node._wrapperState.wasMultiple = !!props.multiple);
                var value = props.value;
                if (value != null) {
                    updateOptions(node, multiple, value, false);
                } else if (wasMultiple !== multiple) {
                    if (props.defaultValue != null) {
                        updateOptions(node, multiple, props.defaultValue, true);
                    } else {
                        updateOptions(
                            node,
                            multiple,
                            multiple ? [] : "",
                            false
                        );
                    }
                }
            }
        },
        textarea: {
            init: function init(node, props) {
                var initialValue = props.value;
                if (initialValue == null) {
                    var defaultValue = props.defaultValue;
                    var children = props.children;
                    if (children != null) {
                        defaultValue = textContent(node);
                        node.innerHTML = "";
                    }
                    if (defaultValue == null) {
                        defaultValue = "";
                    }
                    initialValue = defaultValue;
                }
                return (node._wrapperState = {
                    initialValue: "" + initialValue
                });
            },
            mount: function mount(node, props, state) {
                var text = textContent(node);
                var stateValue = "" + state.initialValue;
                if (text !== stateValue) {
                    syncValue(node, "value", stateValue);
                }
            },
            update: function update(node, props) {
                var value = props.value;
                if (value != null) {
                    var newValue = "" + value;
                    if (newValue !== node.value) {
                        syncValue(node, "value", newValue);
                    }
                    if (props.defaultValue == null) {
                        node.defaultValue = newValue;
                    }
                }
                if (props.defaultValue != null) {
                    node.defaultValue = props.defaultValue;
                }
            }
        },
        option: {
            init: function init() {},
            update: function update(node, props) {
                duplexMap.option.mount(node, props);
            },
            mount: function mount(node, props) {
                var elems = node.getElementsByTagName("*");
                var n = elems.length,
                    el = void 0;
                if (n) {
                    for (n = n - 1, el; (el = elems[n--]); ) {
                        node.removeChild(el);
                    }
                }
                if ("value" in props) {
                    node.duplexValue = node.value = props.value;
                } else {
                    node.duplexValue = node.text;
                }
            }
        }
    };
    function textContent(node) {
        return node.textContent || node.innerText;
    }
    function setDefaultValue(node, type, value, isActive) {
        if (type !== "number" || !isActive) {
            if (value == null) {
                node.defaultValue = "" + node._wrapperState.initialValue;
            } else if (node.defaultValue !== "" + value) {
                node.defaultValue = "" + value;
            }
        }
    }
    function updateOptions(node, multiple, propValue, setDefaultSelected) {
        var options = node.options;
        if (multiple) {
            var selectedValues = propValue;
            var selectedValue = {};
            for (var i = 0; i < selectedValues.length; i++) {
                selectedValue["$" + selectedValues[i]] = true;
            }
            for (var _i = 0; _i < options.length; _i++) {
                var selected = selectedValue.hasOwnProperty(
                    "$" + options[_i].duplexValue
                );
                if (options[_i].selected !== selected) {
                    options[_i].selected = selected;
                }
                if (selected && setDefaultSelected) {
                    options[_i].defaultSelected = true;
                }
            }
        } else {
            var _selectedValue = "" + propValue;
            var defaultSelected = null;
            for (var _i2 = 0; _i2 < options.length; _i2++) {
                if (options[_i2].duplexValue === _selectedValue) {
                    options[_i2].selected = true;
                    if (setDefaultSelected) {
                        options[_i2].defaultSelected = true;
                    }
                    return;
                }
                if (defaultSelected === null && !options[_i2].disabled) {
                    defaultSelected = options[_i2];
                }
            }
            if (defaultSelected !== null) {
                defaultSelected.selected = true;
            }
        }
    }
    function syncValue(dom, name, value) {
        dom.__anuSetValue = true;
        dom[name] = value;
        dom.__anuSetValue = false;
    }
    function duplexAction(fiber) {
        var dom = fiber.stateNode,
            name = fiber.name,
            props = fiber.props,
            lastProps = fiber.lastProps;
        var fns = duplexMap[name];
        if (name !== "option") {
            enqueueDuplex(dom);
        }
        if (!lastProps || lastProps == emptyObject) {
            var state = fns.init(dom, props);
            fns.mount(dom, props, state);
        } else {
            fns.update(dom, props);
        }
    }
    var duplexNodes = [];
    function enqueueDuplex(dom) {
        if (duplexNodes.indexOf(dom) == -1) {
            duplexNodes.push(dom);
        }
    }
    function fireDuplex() {
        var radioMap = {};
        if (duplexNodes.length) {
            do {
                var dom = duplexNodes.shift();
                var e = dom.__events;
                var fiber = e && e.vnode;
                if (fiber && !fiber.disposed) {
                    var props = fiber.props;
                    var tag = fiber.name;
                    if (name === "select") {
                        var value = props.value;
                        if (value != null) {
                            updateOptions(dom, !!props.multiple, value, false);
                        }
                    } else {
                        duplexMap[tag].update(dom, props);
                        var _name = props.name;
                        if (
                            props.type === "radio" &&
                            _name != null &&
                            !radioMap[_name]
                        ) {
                            radioMap[_name] = 1;
                            collectNamedCousins(dom, _name);
                        }
                    }
                }
            } while (duplexNodes.length);
        }
    }
    function collectNamedCousins(rootNode, name) {
        var queryRoot = rootNode;
        while (queryRoot.parentNode) {
            queryRoot = queryRoot.parentNode;
        }
        var group = queryRoot.getElementsByTagName("input");
        for (var i = 0; i < group.length; i++) {
            var otherNode = group[i];
            if (
                otherNode === rootNode ||
                otherNode.name !== name ||
                otherNode.type !== "radio" ||
                otherNode.form !== rootNode.form
            ) {
                continue;
            }
            enqueueDuplex(otherNode);
        }
    }

    var rform = /textarea|input|select|option/i;
    var globalEvents = {};
    var eventPropHooks = {};
    var eventHooks = {};
    var eventLowerCache = {
        onClick: "click",
        onChange: "change",
        onWheel: "wheel"
    };
    function eventAction(dom, name, val, lastProps, fiber) {
        var events = dom.__events || (dom.__events = {});
        events.vnode = fiber;
        var refName = toLowerCase(name.slice(2));
        if (val === false) {
            delete events[refName];
        } else {
            if (!lastProps[name]) {
                var eventName = getBrowserName(name);
                var hook = eventHooks[eventName];
                if (hook) {
                    hook(dom, eventName);
                }
                addGlobalEvent(eventName);
            }
            events[refName] = val;
        }
    }
    var isTouch = "ontouchstart" in document;
    function dispatchEvent(e, type, endpoint) {
        e = new SyntheticEvent(e);
        if (type) {
            e.type = type;
        }
        var bubble = e.type,
            terminal = endpoint || document,
            hook = eventPropHooks[e.type];
        if (hook && false === hook(e)) {
            return;
        }
        Renderer.batchedUpdates(function() {
            var paths = collectPaths(e.target, terminal, {});
            var captured = bubble + "capture";
            triggerEventFlow(paths, captured, e);
            if (!e._stopPropagation) {
                triggerEventFlow(paths.reverse(), bubble, e);
            }
        }, e);
    }
    var nodeID = 1;
    function collectPaths(begin, end, unique) {
        var paths = [];
        var node = begin;
        while (node && node.nodeType == 1) {
            var checkChange = node;
            if (node.__events) {
                var vnode = node.__events.vnode;
                inner: while (vnode.return) {
                    if (vnode.tag === 5) {
                        node = vnode.stateNode;
                        if (node === end) {
                            return paths;
                        }
                        if (!node) {
                            break inner;
                        }
                        var uid = node.uniqueID || (node.uniqueID = ++nodeID);
                        if (node.__events && !unique[uid]) {
                            unique[uid] = 1;
                            paths.push({ node: node, events: node.__events });
                        }
                    }
                    vnode = vnode.return;
                }
            }
            if (node === checkChange) {
                node = node.parentNode;
            }
        }
        return paths;
    }
    function triggerEventFlow(paths, prop, e) {
        for (var i = paths.length; i--; ) {
            var path = paths[i];
            var fn = path.events[prop];
            if (isFn(fn)) {
                e.currentTarget = path.node;
                fn.call(void 666, e);
                if (e._stopPropagation) {
                    break;
                }
            }
        }
    }
    function addGlobalEvent(name, capture) {
        if (!globalEvents[name]) {
            globalEvents[name] = true;
            addEvent(document, name, dispatchEvent, capture);
        }
    }
    function addEvent(el, type, fn, bool) {
        if (el.addEventListener) {
            el.addEventListener(type, fn, bool || false);
        } else if (el.attachEvent) {
            el.attachEvent("on" + type, fn);
        }
    }
    var rcapture = /Capture$/;
    function getBrowserName(onStr) {
        var lower = eventLowerCache[onStr];
        if (lower) {
            return lower;
        }
        var camel = onStr.slice(2).replace(rcapture, "");
        lower = camel.toLowerCase();
        eventLowerCache[onStr] = lower;
        return lower;
    }
    function getRelatedTarget(e) {
        if (!e.timeStamp) {
            e.relatedTarget =
                e.type === "mouseover" ? e.fromElement : e.toElement;
        }
        return e.relatedTarget;
    }
    function getTarget(e) {
        return e.target || e.srcElement;
    }
    String("load,error").replace(/\w+/g, function(name) {
        eventHooks[name] = function(dom, type) {
            var mark = "__" + type;
            if (!dom[mark]) {
                dom[mark] = true;
                addEvent(dom, type, dispatchEvent);
            }
        };
    });
    String("mouseenter,mouseleave").replace(/\w+/g, function(name) {
        eventHooks[name] = function(dom, type) {
            var mark = "__" + type;
            if (!dom[mark]) {
                dom[mark] = true;
                var mask = type === "mouseenter" ? "mouseover" : "mouseout";
                addEvent(dom, mask, function(e) {
                    var t = getRelatedTarget(e);
                    if (!t || (t !== dom && !contains(dom, t))) {
                        var common = getLowestCommonAncestor(dom, t);
                        dispatchEvent(e, type, common);
                    }
                });
            }
        };
    });
    var specialHandles = {};
    function createHandle(name, fn) {
        return (specialHandles[name] = function(e) {
            if (fn && fn(e) === false) {
                return;
            }
            dispatchEvent(e, name);
        });
    }
    function onCompositionStart(e) {
        e.target.__onComposition = true;
    }
    function onCompositionEnd(e) {
        e.target.__onComposition = false;
    }
    var input2change = /text|password|search|url|email/i;
    if (!document["__input"]) {
        globalEvents.input = document["__input"] = true;
        addEvent(document, "compositionstart", onCompositionStart);
        addEvent(document, "compositionend", onCompositionEnd);
        addEvent(document, "input", function(e) {
            var dom = getTarget(e);
            if (input2change.test(dom.type)) {
                if (!dom.__onComposition) {
                    dispatchEvent(e, "change");
                }
            }
            dispatchEvent(e);
        });
    }
    function getLowestCommonAncestor(instA, instB) {
        var depthA = 0;
        for (var tempA = instA; tempA; tempA = tempA.parentNode) {
            depthA++;
        }
        var depthB = 0;
        for (var tempB = instB; tempB; tempB = tempB.parentNode) {
            depthB++;
        }
        while (depthA - depthB > 0) {
            instA = instA.parentNode;
            depthA--;
        }
        while (depthB - depthA > 0) {
            instB = instB.parentNode;
            depthB--;
        }
        var depth = depthA;
        while (depth--) {
            if (instA === instB) {
                return instA;
            }
            instA = instA.parentNode;
            instB = instB.parentNode;
        }
        return null;
    }
    eventPropHooks.change = function(e) {
        enqueueDuplex(e.target);
    };
    createHandle("doubleclick");
    createHandle("scroll");
    createHandle("wheel");
    globalEvents.wheel = true;
    globalEvents.scroll = true;
    globalEvents.doubleclick = true;
    if (isTouch) {
        eventHooks.click = eventHooks.clickcapture = function(dom) {
            dom.onclick = dom.onclick || noop;
        };
    }
    eventPropHooks.click = function(e) {
        return !e.target.disabled;
    };
    var fixWheelType =
        document.onwheel !== void 666
            ? "wheel"
            : "onmousewheel" in document
                ? "mousewheel"
                : "DOMMouseScroll";
    eventHooks.wheel = function(dom) {
        addEvent(dom, fixWheelType, specialHandles.wheel);
    };
    eventPropHooks.wheel = function(event) {
        event.deltaX =
            "deltaX" in event
                ? event.deltaX
                : "wheelDeltaX" in event
                    ? -event.wheelDeltaX
                    : 0;
        event.deltaY =
            "deltaY" in event
                ? event.deltaY
                : "wheelDeltaY" in event
                    ? -event.wheelDeltaY
                    : "wheelDelta" in event
                        ? -event.wheelDelta
                        : 0;
    };
    var focusMap = {
        focus: "focus",
        blur: "blur"
    };
    var innerFocus = void 0;
    function blurFocus(e) {
        var dom = getTarget(e);
        var type = focusMap[e.type];
        if (Renderer.inserting) {
            if (type === "blur") {
                innerFocus = true;
                Renderer.inserting.focus();
                return;
            }
        }
        if (innerFocus) {
            innerFocus = false;
            return;
        }
        do {
            if (dom.nodeType === 1) {
                if (dom.__events && dom.__events[type]) {
                    dispatchEvent(e, type);
                    break;
                }
            } else {
                break;
            }
        } while ((dom = dom.parentNode));
    }
    "blur,focus".replace(/\w+/g, function(type) {
        globalEvents[type] = true;
        if (modern) {
            var mark = "__" + type;
            if (!document[mark]) {
                document[mark] = true;
                addEvent(document, type, blurFocus, true);
            }
        } else {
            eventHooks[type] = function(dom, name) {
                addEvent(dom, focusMap[name], blurFocus);
            };
        }
    });
    eventHooks.scroll = function(dom, name) {
        addEvent(dom, name, specialHandles[name]);
    };
    eventHooks.doubleclick = function(dom, name) {
        addEvent(document, "dblclick", specialHandles[name]);
    };
    function SyntheticEvent(event) {
        if (event.nativeEvent) {
            return event;
        }
        for (var i in event) {
            if (!eventProto[i]) {
                this[i] = event[i];
            }
        }
        if (!this.target) {
            this.target = event.srcElement;
        }
        this.fixEvent();
        this.timeStamp = new Date() - 0;
        this.nativeEvent = event;
    }
    var eventProto = (SyntheticEvent.prototype = {
        fixEvent: noop,
        fixHooks: noop,
        persist: noop,
        preventDefault: function preventDefault() {
            var e = this.nativeEvent || {};
            e.returnValue = this.returnValue = false;
            if (e.preventDefault) {
                e.preventDefault();
            }
        },
        stopPropagation: function stopPropagation() {
            var e = this.nativeEvent || {};
            e.cancelBubble = this._stopPropagation = true;
            if (e.stopPropagation) {
                e.stopPropagation();
            }
        },
        stopImmediatePropagation: function stopImmediatePropagation() {
            this.stopPropagation();
            this.stopImmediate = true;
        },
        toString: function toString() {
            return "[object Event]";
        }
    });
    Renderer.eventSystem = {
        eventPropHooks: eventPropHooks,
        addEvent: addEvent,
        dispatchEvent: dispatchEvent,
        SyntheticEvent: SyntheticEvent
    };

    var NOWORK = 1;
    var WORKING = 2;
    var PLACE = 3;
    var CONTENT = 5;
    var ATTR = 7;
    var DUPLEX = 11;
    var DETACH = 13;
    var HOOK = 17;
    var REF = 19;
    var CALLBACK = 23;
    var CAPTURE = 29;
    var effectNames = [DUPLEX, HOOK, REF, DETACH, CALLBACK, CAPTURE].sort(
        function(a, b) {
            return a - b;
        }
    );
    var effectLength = effectNames.length;

    var isSpecialAttr = {
        style: 1,
        autoFocus: 1,
        innerHTML: 1,
        dangerouslySetInnerHTML: 1
    };
    var svgCache = {};
    var strategyCache = {};
    var svgCamelCase = {
        w: { r: 1, b: 1, t: 1 },
        e: { n: 1, t: 1, f: 1, p: 1, c: 1, m: 1, a: 2, u: 1, s: 1, v: 1 },
        o: { r: 1 },
        c: { m: 1 },
        p: { p: 1 },
        t: { s: 2, t: 1, u: 1, c: 1, d: 1, o: 1, x: 1, y: 1, l: 1 },
        l: { r: 1, m: 1, u: 1, b: -1, l: -1, s: -1 },
        r: { r: 1, u: 2, h: 1, w: 1, c: 1, e: 1 },
        h: { r: 1, a: 1, l: 1, t: 1 },
        y: { p: 1, s: 1, t: 1, c: 1 },
        g: { c: 1 },
        k: { a: -1, h: -1, r: -1, s: -1, t: -1, c: 1, u: 1 },
        m: { o: 1, l: 1, a: 1 },
        n: { c: 1, t: 1, u: 1 },
        s: { a: 3 },
        f: { x: 1, y: 1 },
        d: { e: 1, f: 1, m: 1, d: 1 },
        x: { c: 1 }
    };
    var specialSVGPropertyName = {
        "overline-thickness": 2,
        "underline-thickness": 2,
        "overline-position": 2,
        "underline-position": 2,
        "stroke-miterlimit": 2,
        "baseline-shift": 2,
        "clip-path": 2,
        "font-size": 2,
        "font-size-adjust": 2,
        "font-stretch": 2,
        "font-style": 2,
        "text-decoration": 2,
        "vert-origin-x": 2,
        "vert-origin-y": 2,
        "paint-order": 2,
        "fill-rule": 2,
        "color-rendering": 2,
        "marker-end": 2,
        "pointer-events": 2,
        "units-per-em": 2,
        "strikethrough-thickness": 2,
        "lighting-color": 2
    };
    var repeatedKey = [
        "et",
        "ep",
        "em",
        "es",
        "pp",
        "ts",
        "td",
        "to",
        "lr",
        "rr",
        "re",
        "ht",
        "gc"
    ];
    function createRepaceFn(split) {
        return function(match) {
            return match.slice(0, 1) + split + match.slice(1).toLowerCase();
        };
    }
    var rhump = /([a-z])([A-Z])/;
    var toHyphen = createRepaceFn("-");
    var toColon = createRepaceFn(":");
    function getSVGAttributeName(name) {
        if (svgCache[name]) {
            return svgCache[name];
        }
        var match = name.match(rhump);
        if (!match) {
            return (svgCache[name] = name);
        }
        var prefix = match[1];
        var postfix = match[2].toLowerCase();
        var orig = name;
        var count = svgCamelCase[prefix] && svgCamelCase[prefix][postfix];
        if (count) {
            if (count === -1) {
                return (svgCache[orig] = {
                    name: name.replace(rhump, toColon),
                    ifSpecial: true
                });
            }
            if (~repeatedKey.indexOf(prefix + postfix)) {
                var dashName = name.replace(rhump, toHyphen);
                if (specialSVGPropertyName[dashName]) {
                    name = dashName;
                }
            }
        } else {
            name = name.replace(rhump, toHyphen);
        }
        return (svgCache[orig] = name);
    }
    function diffProps(dom, lastProps, nextProps, fiber) {
        var isSVG = fiber.namespaceURI === NAMESPACE.svg;
        var tag = fiber.type;
        var continueProps = skipProps;
        if (!isSVG && rform.test(fiber.type)) {
            continueProps = duplexProps;
            if (!("onChange" in nextProps)) {
                eventAction(dom, "onChange", noop, lastProps, fiber);
            }
            fiber.effectTag *= DUPLEX;
            fiber.onDuplex = continueProps.onDuplex;
        }
        for (var name in nextProps) {
            if (continueProps[name]) {
                continue;
            }
            var val = nextProps[name];
            if (val !== lastProps[name]) {
                var which = tag + isSVG + name;
                var action = strategyCache[which];
                if (!action) {
                    action = strategyCache[which] = getPropAction(
                        dom,
                        name,
                        isSVG
                    );
                }
                actionStrategy[action](dom, name, val, lastProps, fiber);
            }
        }
        for (var _name in lastProps) {
            if (continueProps[_name]) {
                continue;
            }
            if (!nextProps.hasOwnProperty(_name)) {
                var _which = tag + isSVG + _name;
                var _action = strategyCache[_which];
                if (!_action) {
                    continue;
                }
                actionStrategy[_action](dom, _name, false, lastProps, fiber);
            }
        }
    }
    function isBooleanAttr(dom, name) {
        var val = dom[name];
        return val === true || val === false;
    }
    function isEventName(name) {
        return /^on[A-Z]/.test(name);
    }
    function getPropAction(dom, name, isSVG) {
        if (isSVG && name === "className") {
            return "svgClass";
        }
        if (isSpecialAttr[name]) {
            return name;
        }
        if (isEventName(name)) {
            return "event";
        }
        if (isSVG) {
            return "svgAttr";
        }
        if (name === "width" || name === "height") {
            return "attribute";
        }
        if (isBooleanAttr(dom, name)) {
            return "booleanAttr";
        }
        return name.indexOf("data-") === 0 || dom[name] === void 666
            ? "attribute"
            : "property";
    }
    var builtinStringProps = {
        className: 1,
        title: 1,
        name: 1,
        type: 1,
        alt: 1,
        lang: 1
    };
    var skipProps = {
        innerHTML: 1,
        children: 1,
        onDuplex: noop
    };
    var duplexProps = {
        value: 1,
        defaultValue: 1,
        checked: 1,
        innerHTML: 1,
        children: 1
    };
    var actionStrategy = {
        style: function style(dom, _, val, lastProps) {
            patchStyle(dom, lastProps.style || emptyObject, val || emptyObject);
        },
        autoFocus: function autoFocus(dom) {
            if (
                /input|text/i.test(dom.nodeName) ||
                dom.contentEditable === "true"
            ) {
                dom.focus();
            }
        },
        svgClass: function svgClass(dom, name, val) {
            if (!val) {
                dom.removeAttribute("class");
            } else {
                dom.setAttribute("class", val);
            }
        },
        svgAttr: function svgAttr(dom, name, val) {
            var method =
                typeNumber(val) < 3 && !val
                    ? "removeAttribute"
                    : "setAttribute";
            var nameRes = getSVGAttributeName(name);
            if (nameRes.ifSpecial) {
                var prefix = nameRes.name.split(":")[0];
                dom[method + "NS"](NAMESPACE[prefix], nameRes.name, val || "");
            } else {
                dom[method](nameRes, val || "");
            }
        },
        booleanAttr: function booleanAttr(dom, name, val) {
            dom[name] = !!val;
            if (dom[name] === false) {
                dom.removeAttribute(name);
            } else if (dom[name] === "false") {
                dom[name] = "";
            }
        },
        attribute: function attribute(dom, name, val) {
            if (val == null || val === false) {
                return dom.removeAttribute(name);
            }
            try {
                dom.setAttribute(name, val);
            } catch (e) {
                console.warn("setAttribute error", name, val);
            }
        },
        property: function property(dom, name, val) {
            try {
                if (!val && val !== 0) {
                    if (builtinStringProps[name]) {
                        dom[name] = "";
                    } else {
                        dom.removeAttribute(name);
                    }
                } else {
                    dom[name] = val;
                }
            } catch (e) {
                try {
                    dom.setAttribute(name, val);
                } catch (e) {}
            }
        },
        event: eventAction,
        dangerouslySetInnerHTML: function dangerouslySetInnerHTML(
            dom,
            name,
            val,
            lastProps
        ) {
            var oldhtml = lastProps[name] && lastProps[name].__html;
            var html = val && val.__html;
            html = html == null ? "" : html;
            if (html !== oldhtml) {
                dom.innerHTML = html;
            }
        }
    };

    function UpdateQueue() {
        return {
            pendingStates: [],
            pendingCbs: []
        };
    }
    function createInstance(fiber, context) {
        var updater = {
            mountOrder: Renderer.mountOrder++,
            enqueueSetState: returnFalse,
            isMounted: isMounted
        };
        var props = fiber.props,
            type = fiber.type,
            tag = fiber.tag,
            ref = fiber.ref,
            isStateless = tag === 1,
            lastOwn = Renderer.currentOwner,
            instance = {
                refs: {},
                props: props,
                context: context,
                ref: ref,
                __proto__: type.prototype
            };
        fiber.errorHook = "constructor";
        try {
            if (isStateless) {
                extend(instance, {
                    __isStateless: true,
                    __init: true,
                    renderImpl: type,
                    render: function f() {
                        var a = this.__keep;
                        if (a) {
                            delete this.__keep;
                            return a.value;
                        }
                        a = this.renderImpl(this.props, this.context);
                        if (a && a.render) {
                            delete this.__isStateless;
                            for (var i in a) {
                                instance[i == "render" ? "renderImpl" : i] =
                                    a[i];
                            }
                        } else if (this.__init) {
                            this.__keep = {
                                value: a
                            };
                        }
                        return a;
                    }
                });
                Renderer.currentOwner = instance;
                if (type.render) {
                    instance.render = function() {
                        return type.render(this.props, this.ref);
                    };
                } else {
                    instance.render();
                    delete instance.__init;
                }
            } else {
                instance = new type(props, context);
                if (!(instance instanceof Component)) {
                    throw type.name + " doesn't extend React.Component";
                }
            }
        } finally {
            Renderer.currentOwner = lastOwn;
            fiber.stateNode = instance;
            fiber.updateQueue = UpdateQueue();
            instance._reactInternalFiber = fiber;
            instance.updater = updater;
            instance.context = context;
            updater.enqueueSetState = Renderer.updateComponent;
            if (type[gDSFP] || instance[gSBU]) {
                instance.__useNewHooks = true;
            }
        }
        return instance;
    }

    function Fiber(vnode) {
        extend(this, vnode);
        var type = vnode.type || "ProxyComponent(react-hot-loader)";
        this.name = type.displayName || type.name || type;
        this.effectTag = 1;
    }

    function pushError(fiber, hook, error) {
        var names = [];
        var boundary = findCatchComponent(fiber, names, hook);
        var stack = describeError(names, hook);
        if (boundary) {
            if (fiber.hasMounted) {
            } else {
                fiber.stateNode = {
                    updater: fakeObject
                };
                fiber.effectTag = NOWORK;
            }
            var values =
                boundary.capturedValues || (boundary.capturedValues = []);
            values.push(error, {
                componentStack: stack
            });
        } else {
            var p = fiber.return;
            for (var i in p.children) {
                if (p.children[i] == fiber) {
                    fiber.type = noop;
                }
            }
            while (p) {
                p._hydrating = false;
                p = p.return;
            }
            if (!Renderer.catchError) {
                Renderer.catchStack = stack;
                Renderer.catchError = error;
            }
        }
    }
    function guardCallback(host, hook, args) {
        try {
            return applyCallback(host, hook, args);
        } catch (error) {
            pushError(get(host), hook, error);
        }
    }
    function applyCallback(host, hook, args) {
        var fiber = host._reactInternalFiber;
        fiber.errorHook = hook;
        var fn = host[hook];
        if (hook == "componentWillUnmount") {
            host[hook] = noop;
        }
        if (fn) {
            return fn.apply(host, args);
        }
        return true;
    }
    function describeError(names, hook) {
        var segments = ["**" + hook + "** method occur error "];
        names.forEach(function(name, i) {
            if (names[i + 1]) {
                segments.push(
                    "in " + name + " (created By " + names[i + 1] + ")"
                );
            }
        });
        return segments.join("\n\r").trim();
    }
    function findCatchComponent(fiber, names, hook) {
        var instance = void 0,
            name = void 0,
            topFiber = fiber,
            retry = void 0,
            boundary = void 0;
        while (fiber) {
            name = fiber.name;
            if (fiber.tag < 4) {
                names.push(name);
                instance = fiber.stateNode || {};
                if (instance.componentDidCatch && !boundary) {
                    if (!fiber.caughtError && topFiber !== fiber) {
                        boundary = fiber;
                    } else if (fiber.caughtError) {
                        retry = fiber;
                    }
                }
            } else if (fiber.tag === 5) {
                names.push(name);
            }
            fiber = fiber.return;
            if (boundary) {
                var boundaries = Renderer.boundaries;
                if (!retry || retry !== boundary) {
                    var effectTag = boundary.effectTag;
                    var f = boundary.alternate;
                    if (f && !f.catchError) {
                        f.forward = boundary.forward;
                        f.sibling = boundary.sibling;
                        if (boundary.return.child == boundary) {
                            boundary.return.child = f;
                        }
                        boundary = f;
                    }
                    if (!boundary.catchError) {
                        if (
                            hook == "componentWillUnmount" ||
                            hook == "componentDidUpdate"
                        ) {
                            boundary.effectTag = CAPTURE;
                        } else {
                            boundary.effectTag = effectTag * CAPTURE;
                        }
                        boundaries.unshift(boundary);
                        boundary.catchError = true;
                    }
                    if (retry) {
                        var arr = boundary.effects || (boundary.effects = []);
                        arr.push(retry);
                    }
                }
                return boundary;
            }
        }
    }
    function removeFormBoundaries(fiber) {
        delete fiber.catchError;
        var arr = Renderer.boundaries;
        var index = arr.indexOf(fiber);
        if (index !== -1) {
            arr.splice(index, 1);
        }
    }
    function detachFiber(fiber, effects$$1) {
        fiber.effectTag = DETACH;
        effects$$1.push(fiber);
        fiber.disposed = true;
        for (var child = fiber.child; child; child = child.sibling) {
            detachFiber(child, effects$$1);
        }
    }

    function getInsertPoint(fiber) {
        var parent = fiber.parent;
        while (fiber) {
            if (fiber.stateNode === parent || fiber.isPortal) {
                return null;
            }
            var found = forward(fiber);
            if (found) {
                return found;
            }
            fiber = fiber.return;
        }
    }
    function setInsertPoints(children) {
        for (var i in children) {
            var child = children[i];
            if (child.disposed) {
                continue;
            }
            if (child.tag > 4) {
                var p = child.parent;
                child.effectTag = PLACE;
                child.forwardFiber = p.insertPoint;
                p.insertPoint = child;
                for (
                    var pp = child.return;
                    pp && pp.effectTag === NOWORK;
                    pp = pp.return
                ) {
                    pp.effectTag = WORKING;
                }
            } else {
                if (child.child) {
                    setInsertPoints(child.children);
                }
            }
        }
    }
    function forward(fiber) {
        var found;
        while (fiber.forward) {
            fiber = fiber.forward;
            if (fiber.disposed || fiber.isPortal) {
                continue;
            }
            if (fiber.tag > 3) {
                return fiber;
            }
            if (fiber.child) {
                found = downward(fiber);
                if (found) {
                    return found;
                }
            }
        }
    }
    function downward(fiber) {
        var found;
        while (fiber.lastChild) {
            fiber = fiber.lastChild;
            if (fiber.disposed || fiber.isPortal) {
                return;
            }
            if (fiber.tag > 3) {
                return fiber;
            }
            if (fiber.forward) {
                found = forward(fiber);
                if (found) {
                    return found;
                }
            }
        }
    }

    function reconcileDFS(fiber, info, deadline, ENOUGH_TIME) {
        var topWork = fiber;
        outerLoop: while (fiber) {
            if (fiber.disposed || deadline.timeRemaining() <= ENOUGH_TIME) {
                break;
            }
            var occurError = void 0;
            if (fiber.tag < 3) {
                var keepbook = Renderer.currentOwner;
                try {
                    updateClassComponent(fiber, info);
                } catch (e) {
                    occurError = true;
                    pushError(fiber, fiber.errorHook, e);
                }
                Renderer.currentOwner = keepbook;
                if (fiber.batching) {
                    delete fiber.updateFail;
                    delete fiber.batching;
                }
            } else {
                updateHostComponent(fiber, info);
            }
            if (fiber.child && !fiber.updateFail && !occurError) {
                fiber = fiber.child;
                continue outerLoop;
            }
            var f = fiber;
            while (f) {
                var instance = f.stateNode;
                if (f.tag > 3 || f.shiftContainer) {
                    if (f.shiftContainer) {
                        delete f.shiftContainer;
                        info.containerStack.shift();
                    }
                } else {
                    var updater = instance && instance.updater;
                    if (f.shiftContext) {
                        delete f.shiftContext;
                        info.contextStack.shift();
                    }
                    if (f.hasMounted && instance[gSBU]) {
                        updater.snapshot = guardCallback(instance, gSBU, [
                            updater.prevProps,
                            updater.prevState
                        ]);
                    }
                }
                if (f === topWork) {
                    break outerLoop;
                }
                if (f.sibling) {
                    fiber = f.sibling;
                    continue outerLoop;
                }
                f = f.return;
            }
        }
    }
    function updateHostComponent(fiber, info) {
        var props = fiber.props,
            tag = fiber.tag,
            prev = fiber.alternate;
        if (!fiber.stateNode) {
            fiber.parent = info.containerStack[0];
            fiber.stateNode = Renderer.createElement(fiber);
        }
        var parent = fiber.parent;
        fiber.forwardFiber = parent.insertPoint;
        parent.insertPoint = fiber;
        fiber.effectTag = PLACE;
        if (tag === 5) {
            fiber.stateNode.insertPoint = null;
            info.containerStack.unshift(fiber.stateNode);
            fiber.shiftContainer = true;
            fiber.effectTag *= ATTR;
            if (fiber.ref) {
                fiber.effectTag *= REF;
            }
            diffChildren(fiber, props.children);
        } else {
            if (!prev || prev.props !== props) {
                fiber.effectTag *= CONTENT;
            }
        }
    }
    function mergeStates(fiber, nextProps) {
        var instance = fiber.stateNode,
            pendings = fiber.updateQueue.pendingStates,
            n = pendings.length,
            state = fiber.memoizedState || instance.state;
        if (n === 0) {
            return state;
        }
        var nextState = extend({}, state);
        var fail = true;
        for (var i = 0; i < n; i++) {
            var pending = pendings[i];
            if (pending) {
                if (isFn(pending)) {
                    var a = pending.call(instance, nextState, nextProps);
                    if (!a) {
                        continue;
                    } else {
                        pending = a;
                    }
                }
                fail = false;
                extend(nextState, pending);
            }
        }
        if (fail) {
            return state;
        } else {
            return (fiber.memoizedState = nextState);
        }
    }
    function updateClassComponent(fiber, info) {
        var type = fiber.type,
            instance = fiber.stateNode,
            props = fiber.props;
        var contextStack = info.contextStack,
            containerStack = info.containerStack;
        var newContext = getMaskedContext(
            instance,
            type.contextTypes,
            contextStack
        );
        if (instance == null) {
            fiber.parent =
                type === AnuPortal ? props.parent : containerStack[0];
            instance = createInstance(fiber, newContext);
            cacheContext(instance, contextStack[0], newContext);
        }
        instance._reactInternalFiber = fiber;
        var isStateful = !instance.__isStateless;
        if (isStateful) {
            var updateQueue = fiber.updateQueue;
            delete fiber.updateFail;
            if (fiber.hasMounted) {
                applybeforeUpdateHooks(
                    fiber,
                    instance,
                    props,
                    newContext,
                    contextStack
                );
            } else {
                applybeforeMountHooks(
                    fiber,
                    instance,
                    props,
                    newContext,
                    contextStack
                );
            }
            if (fiber.memoizedState) {
                instance.state = fiber.memoizedState;
            }
            fiber.batching = updateQueue.batching;
            var cbs = updateQueue.pendingCbs;
            if (cbs.length) {
                fiber.pendingCbs = cbs;
                fiber.effectTag *= CALLBACK;
            }
            if (fiber.ref) {
                fiber.effectTag *= REF;
            }
        } else if (type === AnuPortal) {
            containerStack.unshift(fiber.parent);
            fiber.shiftContainer = true;
        }
        instance.context = newContext;
        fiber.memoizedProps = instance.props = props;
        fiber.memoizedState = instance.state;
        if (instance.getChildContext) {
            var context = instance.getChildContext();
            context = Object.assign({}, contextStack[0], context);
            fiber.shiftContext = true;
            contextStack.unshift(context);
        }
        if (isStateful) {
            if (fiber.parent && fiber.hasMounted && fiber.dirty) {
                fiber.parent.insertPoint = getInsertPoint(fiber);
            }
            if (fiber.updateFail) {
                cloneChildren(fiber);
                fiber._hydrating = false;
                return;
            }
            delete fiber.dirty;
            fiber.effectTag *= HOOK;
        } else {
            fiber.effectTag = WORKING;
        }
        if (fiber.catchError) {
            return;
        }
        fiber._hydrating = true;
        Renderer.currentOwner = instance;
        var rendered = applyCallback(instance, "render", []);
        diffChildren(fiber, rendered);
    }
    function applybeforeMountHooks(fiber, instance, newProps) {
        fiber.setout = true;
        if (instance.__useNewHooks) {
            setStateByProps(instance, fiber, newProps, instance.state);
        } else {
            callUnsafeHook(instance, "componentWillMount", []);
        }
        delete fiber.setout;
        mergeStates(fiber, newProps);
        fiber.updateQueue = UpdateQueue();
    }
    function applybeforeUpdateHooks(
        fiber,
        instance,
        newProps,
        newContext,
        contextStack
    ) {
        var oldProps = fiber.memoizedProps;
        var oldState = fiber.memoizedState;
        var updater = instance.updater;
        updater.prevProps = oldProps;
        updater.prevState = oldState;
        var propsChanged = oldProps !== newProps;
        var contextChanged = instance.context !== newContext;
        fiber.setout = true;
        if (!instance.__useNewHooks) {
            if (propsChanged || contextChanged) {
                var prevState = instance.state;
                callUnsafeHook(instance, "componentWillReceiveProps", [
                    newProps,
                    newContext
                ]);
                if (prevState !== instance.state) {
                    fiber.memoizedState = instance.state;
                }
            }
        }
        var newState = (instance.state = oldState);
        var updateQueue = fiber.updateQueue;
        mergeStates(fiber, newProps);
        newState = fiber.memoizedState;
        setStateByProps(instance, fiber, newProps, newState);
        newState = fiber.memoizedState;
        delete fiber.setout;
        fiber._hydrating = true;
        if (
            !propsChanged &&
            newState === oldState &&
            contextStack.length == 1 &&
            !updateQueue.isForced
        ) {
            fiber.updateFail = true;
        } else {
            var args = [newProps, newState, newContext];
            fiber.updateQueue = UpdateQueue();
            if (
                !updateQueue.isForced &&
                !applyCallback(instance, "shouldComponentUpdate", args)
            ) {
                fiber.updateFail = true;
            } else if (!instance.__useNewHooks) {
                callUnsafeHook(instance, "componentWillUpdate", args);
            }
        }
    }
    function callUnsafeHook(a, b, c) {
        applyCallback(a, b, c);
        applyCallback(a, "UNSAFE_" + b, c);
    }
    function isSameNode(a, b) {
        if (a.type === b.type && a.key === b.key) {
            return true;
        }
    }
    function setStateByProps(instance, fiber, nextProps, prevState) {
        fiber.errorHook = gDSFP;
        var fn = fiber.type[gDSFP];
        if (fn) {
            var partialState = fn.call(null, nextProps, prevState);
            if (typeNumber(partialState) === 8) {
                fiber.memoizedState = Object.assign(
                    {},
                    prevState,
                    partialState
                );
            }
        }
    }
    function cloneChildren(fiber) {
        var prev = fiber.alternate;
        if (prev && prev.child) {
            var pc = prev.children;
            var cc = (fiber.children = {});
            fiber.child = prev.child;
            fiber.lastChild = prev.lastChild;
            for (var i in pc) {
                var a = pc[i];
                a.return = fiber;
                cc[i] = a;
            }
            setInsertPoints(cc);
        }
    }
    function cacheContext(instance, unmaskedContext, context) {
        instance.__unmaskedContext = unmaskedContext;
        instance.__maskedContext = context;
    }
    function getMaskedContext(instance, contextTypes, contextStack) {
        if (instance && !contextTypes) {
            return instance.context;
        }
        var context = {};
        if (!contextTypes) {
            return context;
        }
        var unmaskedContext = contextStack[0];
        if (instance) {
            var cachedUnmasked = instance.__unmaskedContext;
            if (cachedUnmasked === unmaskedContext) {
                return instance.__maskedContext;
            }
        }
        for (var key in contextTypes) {
            if (contextTypes.hasOwnProperty(key)) {
                context[key] = unmaskedContext[key];
            }
        }
        if (instance) {
            cacheContext(instance, unmaskedContext, context);
        }
        return context;
    }
    function diffChildren(parentFiber, children) {
        var oldFibers = parentFiber.children;
        if (oldFibers) {
            parentFiber.oldChildren = oldFibers;
        } else {
            oldFibers = {};
        }
        var newFibers = fiberizeChildren(children, parentFiber);
        var effects$$1 = parentFiber.effects || (parentFiber.effects = []);
        var matchFibers = new Object();
        delete parentFiber.child;
        for (var i in oldFibers) {
            var newFiber = newFibers[i];
            var oldFiber = oldFibers[i];
            if (newFiber && newFiber.type === oldFiber.type) {
                matchFibers[i] = oldFiber;
                if (newFiber.key != null) {
                    oldFiber.key = newFiber.key;
                }
                continue;
            }
            detachFiber(oldFiber, effects$$1);
        }
        var prevFiber = void 0,
            index = 0;
        for (var _i in newFibers) {
            var _newFiber = newFibers[_i];
            var _oldFiber = matchFibers[_i];
            var alternate = null;
            if (_oldFiber) {
                if (isSameNode(_oldFiber, _newFiber)) {
                    alternate = new Fiber(_oldFiber);
                    var oldRef = _oldFiber.ref;
                    _newFiber = extend(_oldFiber, _newFiber);
                    delete _newFiber.disposed;
                    _newFiber.alternate = alternate;
                    if (_newFiber.ref && _newFiber.deleteRef) {
                        delete _newFiber.ref;
                        delete _newFiber.deleteRef;
                    }
                    if (oldRef && oldRef !== _newFiber.ref) {
                        effects$$1.push(alternate);
                    }
                    if (_newFiber.tag === 5) {
                        _newFiber.lastProps = alternate.props;
                    }
                } else {
                    detachFiber(_oldFiber, effects$$1);
                }
            } else {
                _newFiber = new Fiber(_newFiber);
            }
            newFibers[_i] = _newFiber;
            _newFiber.index = index++;
            _newFiber.return = parentFiber;
            if (prevFiber) {
                prevFiber.sibling = _newFiber;
                _newFiber.forward = prevFiber;
            } else {
                parentFiber.child = _newFiber;
                _newFiber.forward = null;
            }
            prevFiber = _newFiber;
        }
        parentFiber.lastChild = prevFiber;
        if (prevFiber) {
            prevFiber.sibling = null;
        }
    }

    var Unbatch = miniCreateClass(
        function Unbatch(props) {
            this.state = {
                child: props.child
            };
        },
        Component,
        {
            render: function render() {
                return this.state.child;
            }
        }
    );

    function getDOMNode() {
        return this;
    }
    var Refs = {
        fireRef: function fireRef(fiber, dom) {
            var ref = fiber.ref;
            var owner = fiber._owner;
            try {
                var number = typeNumber(ref);
                refStrategy[number](owner, ref, dom);
                if (owner && owner.__isStateless) {
                    delete fiber.ref;
                    fiber.deleteRef = true;
                }
            } catch (e) {
                pushError(fiber, "ref", e);
            }
        }
    };
    var refStrategy = {
        4: function _(owner, ref, dom) {
            if (dom === null) {
                delete owner.refs[ref];
            } else {
                if (dom.nodeType) {
                    dom.getDOMNode = getDOMNode;
                }
                owner.refs[ref] = dom;
            }
        },
        5: function _(owner, ref, dom) {
            ref(dom);
        },
        8: function _(owner, ref, dom) {
            ref.current = dom;
        }
    };

    var domFns = ["insertElement", "updateContent", "updateAttribute"];
    var domEffects = [PLACE, CONTENT, ATTR];
    var domRemoved = [];
    function commitDFSImpl(fiber) {
        var topFiber = fiber;
        outerLoop: while (true) {
            if (fiber.effects && fiber.effects.length) {
                fiber.effects.forEach(disposeFiber);
                delete fiber.effects;
            }
            if (fiber.effectTag % PLACE == 0) {
                domEffects.forEach(function(effect, i) {
                    if (fiber.effectTag % effect == 0) {
                        Renderer[domFns[i]](fiber);
                        fiber.effectTag /= effect;
                    }
                });
                fiber.hasMounted = true;
            } else {
                if (fiber.catchError) {
                    removeFormBoundaries(fiber);
                    disposeFibers(fiber);
                }
            }
            if (fiber.updateFail) {
                delete fiber.updateFail;
            }
            if (fiber.child && fiber.child.effectTag > NOWORK) {
                fiber = fiber.child;
                continue;
            }
            var f = fiber;
            while (f) {
                if (f.effectTag === WORKING) {
                    f.effectTag = NOWORK;
                } else if (f.effectTag > WORKING) {
                    commitEffects(f);
                    if (f.capturedValues) {
                        f.effectTag = CAPTURE;
                    }
                }
                if (f === topFiber || f.hostRoot) {
                    break outerLoop;
                }
                if (f.sibling) {
                    fiber = f.sibling;
                    continue outerLoop;
                }
                f = f.return;
            }
        }
    }
    function commitDFS(effects$$1) {
        Renderer.batchedUpdates(function() {
            var el;
            while ((el = effects$$1.shift())) {
                if (el.effectTag === DETACH && el.caughtError) {
                    disposeFiber(el);
                } else {
                    commitDFSImpl(el);
                }
                if (domRemoved.length) {
                    domRemoved.forEach(Renderer.removeElement);
                    domRemoved.length = 0;
                }
            }
        }, {});
        var error = Renderer.catchError;
        if (error) {
            delete Renderer.catchError;
            throw error;
        }
    }
    function commitEffects(fiber) {
        var instance = fiber.stateNode || emptyObject;
        var amount = fiber.effectTag;
        var updater = instance.updater || fakeObject;
        for (var i = 0; i < effectLength; i++) {
            var effectNo = effectNames[i];
            if (effectNo > amount) {
                break;
            }
            if (amount % effectNo === 0) {
                amount /= effectNo;
                switch (effectNo) {
                    case WORKING:
                        break;
                    case DUPLEX:
                        Renderer.updateControlled(fiber);
                        break;
                    case HOOK:
                        if (fiber.hasMounted) {
                            guardCallback(instance, "componentDidUpdate", [
                                updater.prevProps,
                                updater.prevState,
                                updater.snapshot
                            ]);
                        } else {
                            fiber.hasMounted = true;
                            guardCallback(instance, "componentDidMount", []);
                        }
                        delete fiber._hydrating;
                        if (fiber.catchError) {
                            fiber.effectTag = amount;
                            return;
                        }
                        break;
                    case REF:
                        Refs.fireRef(fiber, instance);
                        break;
                    case CALLBACK:
                        var queue = fiber.pendingCbs;
                        fiber._hydrating = true;
                        queue.forEach(function(fn) {
                            fn.call(instance);
                        });
                        delete fiber._hydrating;
                        delete fiber.pendingCbs;
                        break;
                    case CAPTURE:
                        var values = fiber.capturedValues;
                        fiber.caughtError = true;
                        var a = values.shift();
                        var b = values.shift();
                        if (!values.length) {
                            fiber.effectTag = amount;
                            delete fiber.capturedValues;
                        }
                        instance.componentDidCatch(a, b);
                        break;
                }
            }
        }
        fiber.effectTag = NOWORK;
    }
    function disposeFibers(fiber) {
        var list = [fiber.oldChildren, fiber.children];
        for (var i = 0; i < 2; i++) {
            var c = list[i];
            if (c) {
                for (var _i in c) {
                    var child = c[_i];
                    if (!child.disposed && child.hasMounted) {
                        disposeFiber(child, true);
                        disposeFibers(child);
                    }
                }
            }
        }
        delete fiber.child;
        delete fiber.lastChild;
        delete fiber.oldChildren;
        fiber.children = {};
    }
    function disposeFiber(fiber, force) {
        var stateNode = fiber.stateNode,
            effectTag = fiber.effectTag;
        if (!stateNode) {
            return;
        }
        if (!stateNode.__isStateless && fiber.ref) {
            Refs.fireRef(fiber, null);
        }
        if (effectTag % DETACH == 0 || force === true) {
            if (fiber.tag > 3) {
                domRemoved.push(fiber);
            } else {
                if (fiber.hasMounted) {
                    stateNode.updater.enqueueSetState = returnFalse;
                    guardCallback(stateNode, "componentWillUnmount", []);
                    delete fiber.stateNode;
                }
            }
            delete fiber.alternate;
            delete fiber.hasMounted;
            fiber.disposed = true;
        }
        fiber.effectTag = NOWORK;
    }

    var macrotasks = Renderer.macrotasks;
    var boundaries = Renderer.boundaries;
    var batchedtasks = [];
    function render(vnode, root, callback) {
        var container = createContainer(root),
            immediateUpdate = false;
        if (!container.hostRoot) {
            var fiber = new Fiber({
                type: Unbatch,
                tag: 2,
                props: {},
                hasMounted: true,
                memoizedState: {},
                return: container
            });
            fiber.index = 0;
            container.child = fiber;
            var instance = createInstance(fiber, {});
            container.hostRoot = instance;
            immediateUpdate = true;
            Renderer.emptyElement(container);
        }
        var carrier = {};
        updateComponent(
            container.hostRoot,
            {
                child: vnode
            },
            wrapCb(callback, carrier),
            immediateUpdate
        );
        return carrier.instance;
    }
    function wrapCb(fn, carrier) {
        return function() {
            var fiber = get(this);
            var target = fiber.child ? fiber.child.stateNode : null;
            fn && fn.call(target);
            carrier.instance = target;
        };
    }
    function performWork(deadline) {
        workLoop(deadline);
        if (boundaries.length) {
            macrotasks.unshift.apply(macrotasks, boundaries);
            boundaries.length = 0;
        }
        topFibers.forEach(function(el) {
            var microtasks = el.microtasks;
            while ((el = microtasks.shift())) {
                if (!el.disposed) {
                    macrotasks.push(el);
                }
            }
        });
        if (macrotasks.length) {
            requestIdleCallback(performWork);
        }
    }
    var ENOUGH_TIME = 1;
    var deadline = {
        didTimeout: false,
        timeRemaining: function timeRemaining() {
            return 2;
        }
    };
    function requestIdleCallback(fn) {
        fn(deadline);
    }
    Renderer.scheduleWork = function() {
        performWork(deadline);
    };
    var isBatching = false;
    Renderer.batchedUpdates = function(callback, event) {
        var keepbook = isBatching;
        isBatching = true;
        try {
            event && Renderer.fireMiddlewares(true);
            return callback(event);
        } finally {
            isBatching = keepbook;
            if (!isBatching) {
                var el = void 0;
                while ((el = batchedtasks.shift())) {
                    if (!el.disabled) {
                        macrotasks.push(el);
                    }
                }
                event && Renderer.fireMiddlewares();
                Renderer.scheduleWork();
            }
        }
    };
    function workLoop(deadline) {
        var fiber = macrotasks.shift(),
            info = void 0;
        if (fiber) {
            if (fiber.type === Unbatch) {
                info = fiber.return;
            } else {
                var dom = getContainer(fiber);
                info = {
                    containerStack: [dom],
                    contextStack: [fiber.stateNode.__unmaskedContext]
                };
            }
            reconcileDFS(fiber, info, deadline, ENOUGH_TIME);
            updateCommitQueue(fiber);
            resetStack(info);
            if (macrotasks.length && deadline.timeRemaining() > ENOUGH_TIME) {
                workLoop(deadline);
            } else {
                commitDFS(effects);
            }
        }
    }
    function updateCommitQueue(fiber) {
        var hasBoundary = boundaries.length;
        if (fiber.type !== Unbatch) {
            if (hasBoundary) {
                arrayPush.apply(effects, boundaries);
            } else {
                effects.push(fiber);
            }
        } else {
            effects.push(fiber);
        }
        boundaries.length = 0;
    }
    function mergeUpdates(fiber, state, isForced, callback) {
        var updateQueue = fiber.updateQueue;
        if (isForced) {
            updateQueue.isForced = true;
        }
        if (state) {
            updateQueue.pendingStates.push(state);
        }
        if (isFn(callback)) {
            updateQueue.pendingCbs.push(callback);
        }
    }
    function fiberContains(p, son) {
        while (son.return) {
            if (son.return === p) {
                return true;
            }
            son = son.return;
        }
    }
    function getQueue(fiber) {
        while (fiber) {
            if (fiber.microtasks) {
                return fiber.microtasks;
            }
            fiber = fiber.return;
        }
    }
    function pushChildQueue(fiber, queue) {
        var maps = {};
        for (var i = queue.length, el; (el = queue[--i]); ) {
            if (fiber === el) {
                queue.splice(i, 1);
                continue;
            } else if (fiberContains(fiber, el)) {
                queue.splice(i, 1);
                continue;
            }
            maps[el.stateNode.updater.mountOrder] = true;
        }
        var enqueue = true,
            p = fiber,
            hackSCU = [];
        while (p.return) {
            p = p.return;
            var instance = p.stateNode;
            if (
                instance.refs &&
                !instance.__isStateless &&
                p.type !== Unbatch
            ) {
                hackSCU.push(p);
                var u = instance.updater;
                if (maps[u.mountOrder]) {
                    enqueue = false;
                    break;
                }
            }
        }
        hackSCU.forEach(function(el) {
            el.updateQueue.batching = true;
        });
        if (enqueue) {
            queue.push(fiber);
        }
    }
    function updateComponent(instance, state, callback, immediateUpdate) {
        var fiber = get(instance);
        fiber.dirty = true;
        var sn = typeNumber(state);
        var isForced = state === true;
        var microtasks = getQueue(fiber);
        state = isForced ? null : sn === 5 || sn === 8 ? state : null;
        if (fiber.setout) {
            immediateUpdate = false;
        } else if ((isBatching && !immediateUpdate) || fiber._hydrating) {
            pushChildQueue(fiber, batchedtasks);
        } else {
            immediateUpdate = immediateUpdate || !fiber._hydrating;
            pushChildQueue(fiber, microtasks);
        }
        mergeUpdates(fiber, state, isForced, callback);
        if (immediateUpdate) {
            Renderer.scheduleWork();
        }
    }
    Renderer.updateComponent = updateComponent;
    function validateTag(el) {
        return el && el.appendChild;
    }
    function createContainer(root, onlyGet, validate) {
        validate = validate || validateTag;
        if (!validate(root)) {
            throw "container is not a element";
        }
        root.anuProp = 2018;
        var useProp = root.anuProp === 2018;
        if (useProp) {
            root.anuProp = void 0;
            if (get(root)) {
                return get(root);
            }
        } else {
            var index = topNodes.indexOf(root);
            if (index !== -1) {
                return topFibers[index];
            }
        }
        if (onlyGet) {
            return null;
        }
        var container = new Fiber({
            stateNode: root,
            tag: 5,
            name: "hostRoot",
            contextStack: [{}],
            containerStack: [root],
            microtasks: [],
            type: root.nodeName || root.type
        });
        if (useProp) {
            root._reactInternalFiber = container;
        }
        topNodes.push(root);
        topFibers.push(container);
        return container;
    }
    function getContainer(p) {
        if (p.parent) {
            return p.parent;
        }
        while ((p = p.return)) {
            if (p.tag === 5) {
                return p.stateNode;
            }
        }
    }

    var reuseTextNodes = [];
    function createElement$1(vnode) {
        var p = vnode.return;
        var type = vnode.type,
            props = vnode.props,
            ns = vnode.ns;
        switch (type) {
            case "#text":
                var node = reuseTextNodes.pop();
                if (node) {
                    node.nodeValue = props;
                    return node;
                }
                return document.createTextNode(props);
            case "#comment":
                return document.createComment(props);
            case "svg":
                ns = NAMESPACE.svg;
                break;
            case "math":
                ns = NAMESPACE.math;
                break;
            default:
                do {
                    var s =
                        p.name == "AnuPortal"
                            ? p.props.parent
                            : p.tag === 5
                                ? p.stateNode
                                : null;
                    if (s) {
                        ns = s.namespaceURI;
                        if (
                            p.type === "foreignObject" ||
                            ns === NAMESPACE.xhtml
                        ) {
                            ns = "";
                        }
                        break;
                    }
                } while ((p = p.return));
                break;
        }
        try {
            if (ns) {
                vnode.namespaceURI = ns;
                return document.createElementNS(ns, type);
            }
        } catch (e1) {}
        var elem = document.createElement(type);
        var inputType = props && props.type;
        if (inputType && elem.uniqueID) {
            try {
                elem = document.createElement(
                    "<" + type + " type='" + inputType + "'/>"
                );
            } catch (e2) {}
        }
        return elem;
    }
    var hyperspace = document.createElement("div");
    function _emptyElement(node) {
        while (node.firstChild) {
            node.removeChild(node.firstChild);
        }
    }
    Renderer.middleware({
        begin: noop,
        end: fireDuplex
    });
    function _removeElement(node) {
        if (!node) {
            return;
        }
        var nodeType = node.nodeType;
        if (nodeType === 1 && node.__events) {
            node.__events = null;
        } else if (nodeType === 3 && reuseTextNodes.length < 100) {
            reuseTextNodes.push(node);
        }
        hyperspace.appendChild(node);
        hyperspace.removeChild(node);
    }
    function insertElement(fiber) {
        var dom = fiber.stateNode,
            parent = fiber.parent;
        try {
            var insertPoint = fiber.forwardFiber
                ? fiber.forwardFiber.stateNode
                : null;
            var after = insertPoint
                ? insertPoint.nextSibling
                : parent.firstChild;
            if (after == dom) {
                return;
            }
            if (after === null && dom === parent.lastChild) {
                return;
            }
            Renderer.inserting = fiber.tag === 5 && document.activeElement;
            parent.insertBefore(dom, after);
            Renderer.inserting = null;
        } catch (e) {
            throw e;
        }
    }
    render.Render = Renderer;
    function mergeContext(container, context) {
        container.contextStack[0] = Object.assign({}, context);
    }
    var DOMRenderer = createRenderer({
        render: render,
        updateAttribute: function updateAttribute(fiber) {
            var props = fiber.props,
                lastProps = fiber.lastProps,
                stateNode = fiber.stateNode;
            diffProps(stateNode, lastProps || emptyObject, props, fiber);
        },
        updateContent: function updateContent(fiber) {
            fiber.stateNode.nodeValue = fiber.props;
        },
        updateControlled: duplexAction,
        createElement: createElement$1,
        insertElement: insertElement,
        emptyElement: function emptyElement(fiber) {
            _emptyElement(fiber.stateNode);
        },
        unstable_renderSubtreeIntoContainer: function unstable_renderSubtreeIntoContainer(
            instance,
            vnode,
            root,
            callback
        ) {
            var container = createContainer(root),
                context = container.contextStack[0],
                fiber = get(instance),
                backup = void 0;
            do {
                var inst = fiber.stateNode;
                if (inst.getChildContext) {
                    backup = mergeContext(container, inst.getChildContext());
                    break;
                } else {
                    backup = fiber;
                }
            } while ((fiber = fiber.return));
            if (backup && backup.contextStack) {
                mergeContext(container, backup.contextStack[0]);
            }
            return Renderer.render(vnode, root, callback);
        },
        unmountComponentAtNode: function unmountComponentAtNode(root) {
            var container = createContainer(root, true);
            var instance = container && container.hostRoot;
            if (instance) {
                Renderer.updateComponent(
                    instance,
                    {
                        child: null
                    },
                    function() {
                        removeTop(root);
                    },
                    true
                );
                return true;
            }
            return false;
        },
        removeElement: function removeElement(fiber) {
            var dom = fiber.stateNode;
            if (dom) {
                _removeElement(dom);
                delete fiber.stateNode;
                if (dom._reactInternalFiber) {
                    removeTop(dom);
                }
            }
        }
    });
    function removeTop(dom) {
        var j = topNodes.indexOf(dom);
        if (j !== -1) {
            topFibers.splice(j, 1);
            topNodes.splice(j, 1);
        }
        dom._reactInternalFiber = null;
    }

    var win$1 = getWindow();
    var prevReact = win$1.React;
    var React = void 0;
    if (prevReact && prevReact.eventSystem) {
        React = prevReact;
    } else {
        var render$1 = DOMRenderer.render,
            eventSystem = DOMRenderer.eventSystem,
            unstable_renderSubtreeIntoContainer =
                DOMRenderer.unstable_renderSubtreeIntoContainer,
            unmountComponentAtNode = DOMRenderer.unmountComponentAtNode;
        React = win$1.React = win$1.ReactDOM = {
            eventSystem: eventSystem,
            findDOMNode: findDOMNode,
            unmountComponentAtNode: unmountComponentAtNode,
            unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer,
            version: "2.2.1",
            render: render$1,
            hydrate: render$1,
            unstable_batchedUpdates: DOMRenderer.batchedUpdates,
            Fragment: Fragment,
            PropTypes: PropTypes,
            Children: Children,
            createPortal: createPortal,
            createContext: createContext,
            Component: Component,
            createRef: createRef,
            forwardRef: forwardRef,
            createElement: createElement,
            cloneElement: cloneElement,
            PureComponent: PureComponent,
            isValidElement: isValidElement,
            createFactory: createFactory
        };
    }
    var React$1 = React;

    return React$1;
});


================================================
FILE: dist/ReactDOMServer.js
================================================
(function(global, factory) {
    typeof exports === "object" && typeof module !== "undefined"
        ? (module.exports = factory(require("stream")))
        : typeof define === "function" && define.amd
            ? define(["stream"], factory)
            : (global.ReactDOMServer = factory(global.stream));
})(this, function(stream) {
    var hasSymbol = typeof Symbol === "function" && Symbol["for"];

    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var REACT_ELEMENT_TYPE = hasSymbol
        ? Symbol["for"]("react.element")
        : 0xeac7;
    function Fragment(props) {
        return props.children;
    }

    function extend(obj, props) {
        for (var i in props) {
            if (hasOwnProperty.call(props, i)) {
                obj[i] = props[i];
            }
        }
        return obj;
    }

    var __type = Object.prototype.toString;
    function noop() {}

    var rword = /[^, ]+/g;
    function oneObject(array, val) {
        if (array + "" === array) {
            array = array.match(rword) || [];
        }
        var result = {},
            value = val !== void 666 ? val : 1;
        for (var i = 0, n = array.length; i < n; i++) {
            result[array[i]] = value;
        }
        return result;
    }

    var options = oneObject(
        [
            "beforeProps",
            "afterCreate",
            "beforeInsert",
            "beforeDelete",
            "beforeUpdate",
            "afterUpdate",
            "beforePatch",
            "afterPatch",
            "beforeUnmount",
            "afterMount"
        ],
        noop
    );
    var numberMap = {
        "[object Boolean]": 2,
        "[object Number]": 3,
        "[object String]": 4,
        "[object Function]": 5,
        "[object Symbol]": 6,
        "[object Array]": 7
    };
    function typeNumber(data) {
        if (data === null) {
            return 1;
        }
        if (data === void 666) {
            return 0;
        }
        var a = numberMap[__type.call(data)];
        return a || 8;
    }

    function getDOMNode() {
        return this;
    }
    var pendingRefs = [];
    var Refs = {
        mountOrder: 1,
        currentOwner: null,
        controlledCbs: [],
        fireRef: function fireRef(fiber, dom, vnode) {
            if (fiber._disposed || fiber._isStateless) {
                dom = null;
            }
            var ref = vnode.ref;
            if (typeof ref === "function") {
                return ref(dom);
            }
            if (ref && Object.prototype.hasOwnProperty.call(ref, "current")) {
                ref.current = dom;
                return;
            }
            if (!ref) {
                return;
            }
            var owner = vnode._owner;
            if (!owner) {
                throw "Element ref was specified as a string (" +
                    ref +
                    ") but no owner was set";
            }
            if (dom) {
                if (dom.nodeType) {
                    dom.getDOMNode = getDOMNode;
                }
                owner.refs[ref] = dom;
            } else {
                delete owner.refs[ref];
            }
        }
    };

    function Vnode(type, tag, props, key, ref) {
        this.type = type;
        this.tag = tag;
        if (tag !== 6) {
            this.props = props;
            this._owner = Refs.currentOwner;
            if (key) {
                this.key = key;
            }
            var refType = typeNumber(ref);
            if (
                refType === 3 ||
                refType === 4 ||
                refType === 5 ||
                refType === 8
            ) {
                this._hasRef = true;
                this.ref = ref;
            }
        }
        options.afterCreate(this);
    }
    Vnode.prototype = {
        getDOMNode: function getDOMNode() {
            return this.stateNode || null;
        },
        $$typeof: REACT_ELEMENT_TYPE
    };

    function createVText(type, text) {
        var vnode = new Vnode(type, 6);
        vnode.text = text;
        return vnode;
    }

    var lastText = void 0;
    var flattenIndex = void 0;
    var flattenObject = void 0;
    function flattenCb(child, key) {
        var childType = typeNumber(child);
        if (childType < 3) {
            lastText = null;
            return;
        } else if (childType < 5) {
            if (lastText) {
                lastText.text += child;
                return;
            }
            lastText = child = createVText("#text", child + "");
        } else {
            lastText = null;
        }
        if (!flattenObject["." + key]) {
            flattenObject["." + key] = child;
        } else {
            key = "." + flattenIndex;
            flattenObject[key] = child;
        }
        child.index = flattenIndex++;
    }
    function fiberizeChildren(c, fiber) {
        flattenObject = {};
        flattenIndex = 0;
        if (c !== void 666) {
            lastText = null;
            operateChildren(c, "", flattenCb, isIterable(c), true);
        }
        flattenIndex = 0;
        return (fiber._children = flattenObject);
    }
    function computeName(el, i, prefix, isTop) {
        var k = i + "";
        if (el) {
            if (el.type == Fragment) {
                k = el.key ? "" : k;
            } else {
                k = el.key ? "$" + el.key : k;
            }
        }
        if (!isTop && prefix) {
            return prefix + ":" + k;
        }
        return k;
    }
    function isIterable(el) {
        if (el instanceof Object) {
            if (el.forEach) {
                return 1;
            }
            if (el.type === Fragment) {
                return 2;
            }
            var t = getIteractor(el);
            if (t) {
                return t;
            }
        }
        return 0;
    }
    function operateChildren(children, prefix, callback, iterableType, isTop) {
        var key = void 0,
            el = void 0,
            t = void 0,
            iterator = void 0;
        switch (iterableType) {
            case 0:
                if (
                    Object(children) === children &&
                    !children.call &&
                    !children.type
                ) {
                    throw "children中存在非法的对象";
                }
                key =
                    prefix ||
                    (children && children.key ? "$" + children.key : "0");
                callback(children, key);
                break;
            case 1:
                children.forEach(function(el, i) {
                    operateChildren(
                        el,
                        computeName(el, i, prefix, isTop),
                        callback,
                        isIterable(el),
                        false
                    );
                });
                break;
            case 2:
                key = children && children.key ? "$" + children.key : "";
                key = isTop ? key : prefix ? prefix + ":0" : key || "0";
                el = children.props.children;
                t = isIterable(el);
                if (!t) {
                    el = [el];
                    t = 1;
                }
                operateChildren(el, key, callback, t, false);
                break;
            default:
                iterator = iterableType.call(children);
                var ii = 0,
                    step;
                while (!(step = iterator.next()).done) {
                    el = step.value;
                    operateChildren(
                        el,
                        computeName(el, ii, prefix, isTop),
                        callback,
                        isIterable(el),
                        false
                    );
                    ii++;
                }
                break;
        }
    }
    var REAL_SYMBOL = hasSymbol && Symbol.iterator;
    var FAKE_SYMBOL = "@@iterator";
    function getIteractor(a) {
        var iteratorFn = (REAL_SYMBOL && a[REAL_SYMBOL]) || a[FAKE_SYMBOL];
        if (iteratorFn && iteratorFn.call) {
            return iteratorFn;
        }
    }

    function DOMElement(type) {
        this.nodeName = type;
        this.style = {};
        this.children = [];
    }

    var fn = (DOMElement.prototype = {
        contains: Boolean
    });
    String(
        "replaceChild,appendChild,removeAttributeNS,setAttributeNS,removeAttribute,setAttribute" +
            ",getAttribute,insertBefore,removeChild,addEventListener,removeEventListener,attachEvent" +
            ",detachEvent"
    ).replace(/\w+/g, function(name) {
        fn[name] = function() {
            console.log("fire " + name);
        };
    });
    var fakeDoc = new DOMElement();
    fakeDoc.createElement = fakeDoc.createElementNS = fakeDoc.createDocumentFragment = function(
        type
    ) {
        return new DOMElement(type);
    };
    fakeDoc.createTextNode = fakeDoc.createComment = Boolean;
    fakeDoc.documentElement = new DOMElement("html");
    fakeDoc.body = new DOMElement("body");
    fakeDoc.nodeName = "#document";
    fakeDoc.textContent = "";
    try {
        var w = window;
        var b = !!w.alert;
    } catch (e) {
        b = false;
        w = {
            document: fakeDoc
        };
    }

    var win = w;
    var document = w.document || fakeDoc;

    var fragment = document.createDocumentFragment();

    var versions = {
        88: 7,
        80: 6,
        "00": NaN,
        "08": NaN
    };
    var msie =
        document.documentMode ||
        versions[
            typeNumber(document.all) + "" + typeNumber(win.XMLHttpRequest)
        ];
    var modern = /NaN|undefined/.test(msie) || msie > 8;

    function getMaskedContext(curContext, contextTypes) {
        var context = {};
        if (!contextTypes || !curContext) {
            return context;
        }
        for (var key in contextTypes) {
            if (contextTypes.hasOwnProperty(key)) {
                context[key] = curContext[key];
            }
        }
        return context;
    }
    function getUnmaskedContext(instance, parentContext) {
        var context = instance.getChildContext();
        if (context) {
            parentContext = extend(extend({}, parentContext), context);
        }
        return parentContext;
    }
    function getContextProvider(fiber) {
        do {
            var c = fiber._unmaskedContext;
            if (c) {
                return c;
            }
        } while ((fiber = fiber.return));
    }

    var matchHtmlRegExp = /["'&<>]/;
    function escapeHtml(string) {
        var str = "" + string;
        var match = matchHtmlRegExp.exec(str);
        if (!match) {
            return str;
        }
        var escape;
        var html = "";
        var index = 0;
        var lastIndex = 0;
        for (index = match.index; index < str.length; index++) {
            switch (str.charCodeAt(index)) {
                case 34:
                    escape = "&quot;";
                    break;
                case 38:
                    escape = "&amp;";
                    break;
                case 39:
                    escape = "&#x27;";
                    break;
                case 60:
                    escape = "&lt;";
                    break;
                case 62:
                    escape = "&gt;";
                    break;
                default:
                    continue;
            }
            if (lastIndex !== index) {
                html += str.substring(lastIndex, index);
            }
            lastIndex = index + 1;
            html += escape;
        }
        return lastIndex !== index
            ? html + str.substring(lastIndex, index)
            : html;
    }
    function encodeEntities(text) {
        if (typeof text === "boolean" || typeof text === "number") {
            return "" + text;
        }
        return escapeHtml(text);
    }

    var rnumber = /^-?\d+(\.\d+)?$/;

    var cssNumber = oneObject(
        "animationIterationCount,columnCount,order,flex,flexGrow,flexShrink,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom"
    );
    var cssMap = oneObject("float", "cssFloat");

    var _typeof =
        typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
            ? function(obj) {
                  return typeof obj;
              }
            : function(obj) {
                  return obj &&
                      typeof Symbol === "function" &&
                      obj.constructor === Symbol &&
                      obj !== Symbol.prototype
                      ? "symbol"
                      : typeof obj;
              };
    var skipAttributes = {
        ref: 1,
        key: 1,
        children: 1,
        dangerouslySetInnerHTML: 1,
        innerHTML: 1
    };
    var cssCached = {
        styleFloat: "float",
        cssFloat: "float"
    };
    var rXlink = /^xlink:?(.+)/;
    function cssName$$1(name) {
        if (cssCached[name]) {
            return cssCached[name];
        }
        return (cssCached[name] = name
            .replace(/([A-Z])/g, "-$1")
            .toLowerCase());
    }
    function stringifyClassName(obj) {
        var arr = [];
        for (var i in obj) {
            if (obj[i]) {
                arr.push(i);
            }
        }
        return arr.join(" ");
    }
    var attrCached = {};
    function encodeAttributes(value) {
        if (attrCached[value]) {
            return attrCached[value];
        }
        return (attrCached[value] = '"' + encodeEntities(value) + '"');
    }
    function skipFalseAndFunction(a) {
        return a !== false && Object(a) !== a;
    }
    function stringifyStyleObject(obj) {
        var arr = [];
        for (var i in obj) {
            var val = obj[i];
            if (obj != null) {
                var unit = "";
                if (rnumber.test(val) && !cssNumber[i]) {
                    unit = "px";
                }
                arr.push(cssName$$1(i) + ": " + val + unit);
            }
        }
        return arr.join("; ");
    }
    var forElement = {
        select: 1,
        input: 1,
        textarea: 1
    };
    function stringifyAttributes(props, type) {
        var attrs = [];
        for (var _name in props) {
            var v = props[_name];
            if (skipAttributes[_name]) {
                continue;
            }
            var checkType = false;
            if (_name === "className" || _name === "class") {
                _name = "class";
                if (
                    v &&
                    (typeof v === "undefined" ? "undefined" : _typeof(v)) ===
                        "object"
                ) {
                    v = stringifyClassName(v);
                    checkType = true;
                }
            } else if (_name === "style") {
                if (Object(v) == v) {
                    v = stringifyStyleObject(v);
                    checkType = true;
                } else {
                    continue;
                }
            } else if (_name === "defaultValue") {
                if (forElement[type]) {
                    _name = "value";
                }
            } else if (_name === "defaultChecked") {
                if (forElement[type]) {
                    _name = "checked";
                    v = "";
                    checkType = true;
                }
            } else if (_name.match(rXlink)) {
                _name = _name.toLowerCase().replace(rXlink, "xlink:$1");
            }
            if (checkType || skipFalseAndFunction(v)) {
                attrs.push(_name + "=" + encodeAttributes(v + ""));
            }
        }
        return attrs.length ? " " + attrs.join(" ") : "";
    }
    var regeneratorRuntime = {
        mark: function() {}
    };
    var _marked = regeneratorRuntime.mark(renderVNodeGen);
    function renderVNode(vnode, context) {
        var _vnode = vnode,
            tag = _vnode.tag,
            type = _vnode.type,
            props = _vnode.props;
        switch (type) {
            case "#text":
                return encodeEntities(vnode.text);
            case "#comment":
                return "<!--" + vnode.text + "-->";
            default:
                var innerHTML$$1 = props && props.dangerouslySetInnerHTML;
                innerHTML$$1 = innerHTML$$1 && innerHTML$$1.__html;
                if (tag === 5) {
                    if (type === "option") {
                        for (
                            var p = vnode.return;
                            p && p.type !== "select";
                            p = p.return
                        ) {}
                        if (p && p.valuesSet) {
                            var curValue = getOptionValue(vnode);
                            if (p.valuesSet["&" + curValue]) {
                                props = Object.assign({ selected: "" }, props);
                            }
                        }
                    } else if (type === "select") {
                        var selectValue =
                            vnode.props.value || vnode.props.defaultValue;
                        if (selectValue != null) {
                            var values = [].concat(selectValue),
                                valuesSet = {};
                            values.forEach(function(el) {
                                valuesSet["&" + el] = true;
                            });
                            vnode.valuesSet = valuesSet;
                        }
                    }
                    var str = "<" + type + stringifyAttributes(props, type);
                    if (voidTags[type]) {
                        return str + "/>\n";
                    }
                    str += ">";
                    if (innerHTML$$1) {
                        str += innerHTML$$1;
                    } else {
                        var cstr = "";
                        var fakeUpdater = {
                            _reactInternalFiber: vnode
                        };
                        var children = fiberizeChildren(
                            props.children,
                            fakeUpdater
                        );
                        for (var i in children) {
                            var child = children[i];
                            child.return = vnode;
                            cstr += renderVNode(child, context);
                        }
                        vnode.updater = fakeUpdater;
                    }
                    if (vnode.type === "textarea" && !cstr) {
                        str +=
                            vnode.props.value || vnode.props.defaultValue || "";
                    } else {
                        str += cstr;
                    }
                    return str + "</" + type + ">\n";
                } else if (tag < 3) {
                    var data = {
                        context: context
                    };
                    vnode = toVnode(vnode, data);
                    context = data.context;
                    return renderVNode(vnode, context);
                } else if (Array.isArray(vnode)) {
                    var multiChild = "";
                    vnode.forEach(function(el) {
                        multiChild += renderVNode(el, context);
                    });
                    return multiChild;
                } else {
                    throw "数据不合法";
                }
        }
    }
    function renderVNodeGen(vnode, context) {
        var _vnode2,
            tag,
            type,
            props,
            innerHTML$$1,
            p,
            curValue,
            selectValue,
            values,
            valuesSet,
            str,
            fakeUpdater,
            children,
            i,
            child,
            data,
            multiChild;
        return regeneratorRuntime.wrap(
            function renderVNodeGen$(_context) {
                while (1) {
                    switch ((_context.prev = _context.next)) {
                        case 0:
                            (_vnode2 = vnode),
                                (tag = _vnode2.tag),
                                (type = _vnode2.type),
                                (props = _vnode2.props);
                            _context.t0 = type;
                            _context.next =
                                _context.t0 === "#text"
                                    ? 4
                                    : _context.t0 === "#comment"
                                        ? 7
                                        : 10;
                            break;
                        case 4:
                            _context.next = 6;
                            return encodeEntities(vnode.text);
                        case 6:
                            return _context.abrupt("break", 40);
                        case 7:
                            _context.next = 9;
                            return "<!--" + vnode.text + "-->";
                        case 9:
                            return _context.abrupt("break", 40);
                        case 10:
                            innerHTML$$1 =
                                props && props.dangerouslySetInnerHTML;
                            innerHTML$$1 = innerHTML$$1 && innerHTML$$1.__html;
                            if (!(tag === 5)) {
                                _context.next = 24;
                                break;
                            }
                            if (type === "option") {
                                for (
                                    p = vnode.return;
                                    p && p.type !== "select";
                                    p = p.return
                                ) {}
                                if (p && p.valuesSet) {
                                    curValue = getOptionValue(vnode);
                                    if (p.valuesSet["&" + curValue]) {
                                        props = Object.assign(
                                            { selected: "" },
                                            props
                                        );
                                    }
                                }
                            } else if (type === "select") {
                                selectValue =
                                    vnode.props.value ||
                                    vnode.props.defaultValue;
                                if (selectValue != null) {
                                    (values = [].concat(selectValue)),
                                        (valuesSet = {});
                                    values.forEach(function(el) {
                                        valuesSet["&" + el] = true;
                                    });
                                    vnode.valuesSet = valuesSet;
                                }
                            }
                            str = "<" + type + stringifyAttributes(props, type);
                            if (!voidTags[type]) {
                                _context.next = 18;
                                break;
                            }
                            _context.next = 18;
                            return str + "/>\n";
                        case 18:
                            str += ">";
                            if (innerHTML$$1) {
                                str += innerHTML$$1;
                            } else {
                                fakeUpdater = {
                                    vnode: vnode
                                };
                                children = fiberizeChildren(
                                    props.children,
                                    fakeUpdater
                                );
                                for (i in children) {
                                    child = children[i];
                                    child.return = vnode;
                                    str += renderVNode(child, context);
                                }
                                vnode.updater = fakeUpdater;
                            }
                            _context.next = 22;
                            return str + "</" + type + ">\n";
                        case 22:
                            _context.next = 40;
                            break;
                        case 24:
                            if (!(tag < 3)) {
                                _context.next = 32;
                                break;
                            }
                            data = {
                                context: context
                            };
                            vnode = toVnode(vnode, data);
                            context = data.context;
                            _context.next = 30;
                            return renderVNode(vnode, context);
                        case 30:
                            _context.next = 40;
                            break;
                        case 32:
                            if (!Array.isArray(vnode)) {
                                _context.next = 39;
                                break;
                            }
                            multiChild = "";
                            vnode.forEach(function(el) {
                                multiChild += renderVNode(el, context);
                            });
                            _context.next = 37;
                            return multiChild;
                        case 37:
                            _context.next = 40;
                            break;
                        case 39:
                            throw "数据不合法";
                        case 40:
                        case "end":
                            return _context.stop();
                    }
                }
            },
            _marked,
            this
        );
    }
    function getOptionValue(option) {
        if ("value" in option.props) {
            return option.props.value;
        } else {
            var a = option.props.children;
            if (a + "" === "a") {
                return a;
            } else {
                return a.text;
            }
        }
    }
    var voidTags = [
        "area",
        "base",
        "br",
        "col",
        "embed",
        "hr",
        "img",
        "input",
        "link",
        "meta",
        "param",
        "source",
        "track",
        "wbr"
    ];
    function toVnode(vnode, data) {
        var parentContext = data.context,
            Type = vnode.type,
            instance,
            rendered;
        if (vnode.tag < 3) {
            var props = vnode.props;
            var instanceContext = getMaskedContext(
                parentContext,
                Type.contextTypes
            );
            if (vnode.tag === 1) {
                rendered = Type(props, instanceContext);
                if (rendered && rendered.render) {
                    rendered = rendered.render();
                }
                instance = {};
            } else {
                instance = new Type(props, instanceContext);
                instance.props = instance.props || props;
                instance.context = instance.context || instanceContext;
                if (instance.componentWillMount) {
                    try {
                        instance.componentWillMount();
                    } catch (e) {}
                }
                rendered = instance.render();
            }
            rendered = fixVnode(rendered);
            if (instance.componentWillMount) {
                instance.componentWillMount();
            }
            if (instance.getChildContext) {
                data.context = getUnmaskedContext(instance, parentContext);
            }
            if (Array.isArray(rendered)) {
                return rendered.map(function(el) {
                    return toVnode(el, data, instance);
                });
            } else {
                return toVnode(rendered, data, instance);
            }
        } else {
            return vnode;
        }
    }
    function fixVnode(vnode) {
        var number = typeNumber(vnode);
        if (number < 3) {
            return {
                tag: 6,
                text: "",
                type: "#text"
            };
        } else if (number < 5) {
            return {
                tag: 6,
                text: vnode + "",
                type: "#text"
            };
        } else {
            return vnode;
        }
    }
    function renderToString(vnode, context) {
        return renderVNode(fixVnode(vnode), context || {});
    }
    function renderToNodeStream(vnode, context) {
        var rs = new stream.Readable();
        var it = renderVNodeGen(vnode, context || {});
        rs._read = function() {
            var v = it.next();
            if (!v.done) {
                rs.push(v.value.toString());
            } else {
                rs.push(null);
            }
        };
        return rs;
    }
    var index = {
        renderToString: renderToString,
        renderToStaticMarkup: renderToString,
        renderToNodeStream: renderToNodeStream,
        renderToStaticNodeStream: renderToNodeStream
    };

    return index;
});


================================================
FILE: dist/ReactIE.js
================================================
/**
 * Powered by YMFE (https://ymfe.org)
 */

(function(global, factory) {
    typeof exports === "object" && typeof module !== "undefined"
        ? (module.exports = factory())
        : typeof define === "function" && define.amd
            ? define(factory)
            : (global.React = factory());
})(this, function() {
    var arrayPush = Array.prototype.push;
    var innerHTML = "dangerouslySetInnerHTML";
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var gSBU = "getSnapshotBeforeUpdate";
    var gDSFP = "getDerivedStateFromProps";
    var hasSymbol = typeof Symbol === "function" && Symbol["for"];
    var effects = [];
    var topFibers = [];
    var topNodes = [];
    var emptyObject = {};
    var REACT_ELEMENT_TYPE = hasSymbol
        ? Symbol["for"]("react.element")
        : 0xeac7;
    function noop() {}
    function Fragment(props) {
        return props.children;
    }
    function returnFalse() {
        return false;
    }
    function returnTrue() {
        return true;
    }
    function resetStack(info) {
        keepLast(info.containerStack);
        keepLast(info.contextStack);
    }
    function keepLast(list) {
        var n = list.length;
        list.splice(0, n - 1);
    }
    function get(key) {
        return key._reactInternalFiber;
    }
    var __type = Object.prototype.toString;
    var fakeWindow = {};
    function getWindow() {
        try {
            return window;
        } catch (e) {
            try {
                return global;
            } catch (e) {
                return fakeWindow;
            }
        }
    }
    function isMounted(instance) {
        var fiber = get(instance);
        return !!(fiber && fiber.hasMounted);
    }
    function toWarnDev(msg, deprecated) {
        msg = deprecated ? msg + " is deprecated" : msg;
        var process = getWindow().process;
        if (process && process.env.NODE_ENV === "development") {
            throw msg;
        }
    }
    function extend(obj, props) {
        for (var i in props) {
            if (hasOwnProperty.call(props, i)) {
                obj[i] = props[i];
            }
        }
        return obj;
    }
    function inherit(SubClass, SupClass) {
        function Bridge() {}
        var orig = SubClass.prototype;
        Bridge.prototype = SupClass.prototype;
        var fn = (SubClass.prototype = new Bridge());
        extend(fn, orig);
        fn.constructor = SubClass;
        return fn;
    }
    try {
        var supportEval = Function("a", "return a + 1")(2) == 3;
    } catch (e) {}
    function miniCreateClass(ctor, superClass, methods, statics) {
        var className = ctor.name || "IEComponent";
        var Ctor = supportEval
            ? Function(
                  "superClass",
                  "ctor",
                  "return function " +
                      className +
                      " (props, context) {\n            superClass.apply(this, arguments); \n            ctor.apply(this, arguments);\n      }"
              )(superClass, ctor)
            : function Ctor() {
                  superClass.apply(this, arguments);
                  ctor.apply(this, arguments);
              };
        Ctor.displayName = className;
        var fn = inherit(Ctor, superClass);
        extend(fn, methods);
        if (statics) {
            extend(Ctor, statics);
        }
        return Ctor;
    }
    var lowerCache = {};
    function toLowerCase(s) {
        return lowerCache[s] || (lowerCache[s] = s.toLowerCase());
    }
    function isFn(obj) {
        return __type.call(obj) === "[object Function]";
    }
    var rword = /[^, ]+/g;
    function oneObject(array, val) {
        if (array + "" === array) {
            array = array.match(rword) || [];
        }
        var result = {},
            value = val !== void 666 ? val : 1;
        for (var i = 0, n = array.length; i < n; i++) {
            result[array[i]] = value;
        }
        return result;
    }
    var rcamelize = /[-_][^-_]/g;
    function camelize(target) {
        if (!target || (target.indexOf("-") < 0 && target.indexOf("_") < 0)) {
            return target;
        }
        var str = target.replace(rcamelize, function(match) {
            return match.charAt(1).toUpperCase();
        });
        return firstLetterLower(str);
    }
    function firstLetterLower(str) {
        return str.charAt(0).toLowerCase() + str.slice(1);
    }
    var numberMap = {
        "[object Boolean]": 2,
        "[object Number]": 3,
        "[object String]": 4,
        "[object Function]": 5,
        "[object Symbol]": 6,
        "[object Array]": 7
    };
    function typeNumber(data) {
        if (data === null) {
            return 1;
        }
        if (data === void 666) {
            return 0;
        }
        var a = numberMap[__type.call(data)];
        return a || 8;
    }

    function createRenderer(methods) {
        return extend(Renderer, methods);
    }
    var middlewares = [];
    var Renderer = {
        controlledCbs: [],
        mountOrder: 1,
        macrotasks: [],
        boundaries: [],
        middleware: function middleware(obj) {
            if (obj.begin && obj.end) {
                middlewares.push(obj);
            }
        },
        updateControlled: function updateControlled() {},
        fireMiddlewares: function fireMiddlewares(begin) {
            var index = begin ? middlewares.length - 1 : 0,
                delta = begin ? -1 : 1,
                method = begin ? "begin" : "end",
                obj = void 0;
            while ((obj = middlewares[index])) {
                obj[method]();
                index += delta;
            }
        },
        currentOwner: null
    };

    var fakeObject = {
        enqueueSetState: returnFalse,
        isMounted: returnFalse
    };
    function Component(props, context) {
        Renderer.currentOwner = this;
        this.context = context;
        this.props = props;
        this.refs = {};
        this.updater = fakeObject;
        this.state = null;
    }
    Component.prototype = {
        constructor: Component,
        replaceState: function replaceState() {
            toWarnDev("replaceState", true);
        },
        isReactComponent: returnTrue,
        isMounted: function isMounted$$1() {
            toWarnDev("isMounted", true);
            return this.updater.isMounted(this);
        },
        setState: function setState(state, cb) {
            this.updater.enqueueSetState(this, state, cb);
        },
        forceUpdate: function forceUpdate(cb) {
            this.updater.enqueueSetState(this, true, cb);
        },
        render: function render() {
            throw "must implement render";
        }
    };

    var _typeof =
        typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
            ? function(obj) {
                  return typeof obj;
              }
            : function(obj) {
                  return obj &&
                      typeof Symbol === "function" &&
                      obj.constructor === Symbol &&
                      obj !== Symbol.prototype
                      ? "symbol"
                      : typeof obj;
              };
    var RESERVED_PROPS = {
        key: true,
        ref: true,
        __self: true,
        __source: true
    };
    function makeProps(type, config, props, children, len) {
        var defaultProps = void 0,
            propName = void 0;
        for (propName in config) {
            if (
                hasOwnProperty.call(config, propName) &&
                !RESERVED_PROPS.hasOwnProperty(propName)
            ) {
                props[propName] = config[propName];
            }
        }
        if (type && type.defaultProps) {
            defaultProps = type.defaultProps;
            for (propName in defaultProps) {
                if (props[propName] === undefined) {
                    props[propName] = defaultProps[propName];
                }
            }
        }
        if (len === 1) {
            props.children = children[0];
        } else if (len > 1) {
            props.children = children;
        }
        return props;
    }
    function hasValidRef(config) {
        return config.ref !== undefined;
    }
    function hasValidKey(config) {
        return config.key !== undefined;
    }
    function createElement(type, config) {
        for (
            var _len = arguments.length,
                children = Array(_len > 2 ? _len - 2 : 0),
                _key = 2;
            _key < _len;
            _key++
        ) {
            children[_key - 2] = arguments[_key];
        }
        var props = {},
            tag = 5,
            key = null,
            ref = null,
            argsLen = children.length;
        if (type && type.call) {
            tag = type.prototype && type.prototype.render ? 2 : 1;
        } else if (type + "" !== type) {
            toWarnDev("React.createElement: type is invalid.");
        }
        if (config != null) {
            if (hasValidRef(config)) {
                ref = config.ref;
            }
            if (hasValidKey(config)) {
                key = "" + config.key;
            }
        }
        props = makeProps(type, config || {}, props, children, argsLen);
        return ReactElement(type, tag, props, key, ref, Renderer.currentOwner);
    }
    function cloneElement(element, config) {
        var props = Object.assign({}, element.props);
        var type = element.type;
        var key = element.key;
        var ref = element.ref;
        var tag = element.tag;
        var owner = element._owner;
        for (
            var _len2 = arguments.length,
                children = Array(_len2 > 2 ? _len2 - 2 : 0),
                _key2 = 2;
            _key2 < _len2;
            _key2++
        ) {
            children[_key2 - 2] = arguments[_key2];
        }
        var argsLen = children.length;
        if (config != null) {
            if (hasValidRef(config)) {
                ref = config.ref;
                owner = Renderer.currentOwner;
            }
            if (hasValidKey(config)) {
                key = "" + config.key;
            }
        }
        props = makeProps(type, config || {}, props, children, argsLen);
        return ReactElement(type, tag, props, key, ref, owner);
    }
    function createFactory(type) {
        var factory = createElement.bind(null, type);
        factory.type = type;
        return factory;
    }
    function ReactElement(type, tag, props, key, ref, owner) {
        var ret = {
            type: type,
            tag: tag,
            props: props
        };
        if (tag !== 6) {
            ret.$$typeof = REACT_ELEMENT_TYPE;
            ret.key = key || null;
            var refType = typeNumber(ref);
            if (
                refType === 2 ||
                refType === 3 ||
                refType === 4 ||
                refType === 5 ||
                refType === 8
            ) {
                if (refType < 4) {
                    ref += "";
                }
                ret.ref = ref;
            } else {
                ret.ref = null;
            }
            ret._owner = owner;
        }
        return ret;
    }
    function isValidElement(vnode) {
        return !!vnode && vnode.$$typeof === REACT_ELEMENT_TYPE;
    }
    function createVText(text) {
        return ReactElement("#text", 6, text + "");
    }
    function escape(key) {
        var escapeRegex = /[=:]/g;
        var escaperLookup = {
            "=": "=0",
            ":": "=2"
        };
        var escapedString = ("" + key).replace(escapeRegex, function(match) {
            return escaperLookup[match];
        });
        return "$" + escapedString;
    }
    var lastText = void 0,
        flattenIndex = void 0,
        flattenObject = void 0;
    function flattenCb(context, child, key, childType) {
        if (child === null) {
            lastText = null;
            return;
        }
        if (childType === 3 || childType === 4) {
            if (lastText) {
                lastText.props += child;
                return;
            }
            lastText = child = createVText(child);
        } else {
            lastText = null;
        }
        if (!flattenObject[key]) {
            flattenObject[key] = child;
        } else {
            key = "." + flattenIndex;
            flattenObject[key] = child;
        }
        flattenIndex++;
    }
    function fiberizeChildren(children, fiber) {
        flattenObject = {};
        flattenIndex = 0;
        if (children !== void 666) {
            lastText = null;
            traverseAllChildren(children, "", flattenCb);
        }
        flattenIndex = 0;
        return (fiber.children = flattenObject);
    }
    function getComponentKey(component, index) {
        if (
            (typeof component === "undefined"
                ? "undefined"
                : _typeof(component)) === "object" &&
            component !== null &&
            component.key != null
        ) {
            return escape(component.key);
        }
        return index.toString(36);
    }
    var SEPARATOR = ".";
    var SUBSEPARATOR = ":";
    function traverseAllChildren(children, nameSoFar, callback, bookKeeping) {
        var childType = typeNumber(children);
        var invokeCallback = false;
        switch (childType) {
            case 0:
            case 1:
            case 2:
            case 5:
            case 6:
                children = null;
                invokeCallback = true;
                break;
            case 3:
            case 4:
                invokeCallback = true;
                break;
            case 8:
                if (children.$$typeof || children instanceof Component) {
                    invokeCallback = true;
                } else if (children.hasOwnProperty("toString")) {
                    children = children + "";
                    invokeCallback = true;
                    childType = 3;
                }
                break;
        }
        if (invokeCallback) {
            callback(
                bookKeeping,
                children,
                nameSoFar === ""
                    ? SEPARATOR + getComponentKey(children, 0)
                    : nameSoFar,
                childType
            );
            return 1;
        }
        var subtreeCount = 0;
        var nextNamePrefix =
            nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
        if (children.forEach) {
            children.forEach(function(child, i) {
                var nextName = nextNamePrefix + getComponentKey(child, i);
                subtreeCount += traverseAllChildren(
                    child,
                    nextName,
                    callback,
                    bookKeeping
                );
            });
            return subtreeCount;
        }
        var iteratorFn = getIteractor(children);
        if (iteratorFn) {
            iterator = iteratorFn.call(children);
            var ii = 0,
                step;
            while (!(step = iterator.next()).done) {
                child = step.value;
                nextName = nextNamePrefix + getComponentKey(child, ii++);
                subtreeCount += traverseAllChildren(
                    child,
                    nextName,
                    callback,
                    bookKeeping
                );
            }
            return subtreeCount;
        }
        throw "children: type is invalid.";
    }
    var REAL_SYMBOL = hasSymbol && Symbol.iterator;
    var FAKE_SYMBOL = "@@iterator";
    function getIteractor(a) {
        var iteratorFn = (REAL_SYMBOL && a[REAL_SYMBOL]) || a[FAKE_SYMBOL];
        if (iteratorFn && iteratorFn.call) {
            return iteratorFn;
        }
    }

    var Children = {
        only: function only(children) {
            if (isValidElement(children)) {
                return children;
            }
            throw new Error("expect only one child");
        },
        count: function count(children) {
            if (children == null) {
                return 0;
            }
            return traverseAllChildren(children, "", noop);
        },
        map: function map(children, func, context) {
            return proxyIt(children, func, [], context);
        },
        forEach: function forEach(children, func, context) {
            return proxyIt(children, func, null, context);
        },
        toArray: function toArray$$1(children) {
            return proxyIt(children, K, []);
        }
    };
    function proxyIt(children, func, result, context) {
        if (children == null) {
            return [];
        }
        mapChildren(children, null, func, result, context);
        return result;
    }
    function K(el) {
        return el;
    }
    function mapChildren(children, prefix, func, result, context) {
        var keyPrefix = "";
        if (prefix != null) {
            keyPrefix = escapeUserProvidedKey(prefix) + "/";
        }
        traverseAllChildren(children, "", traverseCallback, {
            context: context,
            keyPrefix: keyPrefix,
            func: func,
            result: result,
            count: 0
        });
    }
    var userProvidedKeyEscapeRegex = /\/+/g;
    function escapeUserProvidedKey(text) {
        return ("" + text).replace(userProvidedKeyEscapeRegex, "$&/");
    }
    function traverseCallback(bookKeeping, child, childKey) {
        var result = bookKeeping.result,
            keyPrefix = bookKeeping.keyPrefix,
            func = bookKeeping.func,
            context = bookKeeping.context;
        var mappedChild = func.call(context, child, bookKeeping.count++);
        if (!result) {
            return;
        }
        if (Array.isArray(mappedChild)) {
            mapChildren(mappedChild, childKey, K, result);
        } else if (mappedChild != null) {
            if (isValidElement(mappedChild)) {
                mappedChild = extend({}, mappedChild);
                mappedChild.key =
                    keyPrefix +
                    (mappedChild.key &&
                    (!child || child.key !== mappedChild.key)
                        ? escapeUserProvidedKey(mappedChild.key) + "/"
                        : "") +
                    childKey;
            }
            result.push(mappedChild);
        }
    }

    var check = function check() {
        return check;
    };
    check.isRequired = check;
    var PropTypes = {
        array: check,
        bool: check,
        func: check,
        number: check,
        object: check,
        string: check,
        any: check,
        arrayOf: check,
        element: check,
        instanceOf: check,
        node: check,
        objectOf: check,
        oneOf: check,
        oneOfType: check,
        shape: check
    };

    function shallowEqual(objA, objB) {
        if (Object.is(objA, objB)) {
            return true;
        }
        if (typeNumber(objA) < 7 || typeNumber(objB) < 7) {
            return false;
        }
        var keysA = Object.keys(objA);
        var keysB = Object.keys(objB);
        if (keysA.length !== keysB.length) {
            return false;
        }
        for (var i = 0; i < keysA.length; i++) {
            if (
                !hasOwnProperty.call(objB, keysA[i]) ||
                !Object.is(objA[keysA[i]], objB[keysA[i]])
            ) {
                return false;
            }
        }
        return true;
    }

    var PureComponent = miniCreateClass(
        function PureComponent() {
            this.isPureComponent = true;
        },
        Component,
        {
            shouldComponentUpdate: function shouldComponentUpdate(
                nextProps,
                nextState
            ) {
                var a = shallowEqual(this.props, nextProps);
                var b = shallowEqual(this.state, nextState);
                return !a || !b;
            }
        }
    );

    function createRef() {
        return {
            current: null
        };
    }
    function forwardRef(fn) {
        createRef.render = fn;
        return createRef;
    }

    function AnuPortal(props) {
        return props.children;
    }
    function createPortal(children, parent) {
        var child = createElement(AnuPortal, {
            children: children,
            parent: parent
        });
        child.isPortal = true;
        return child;
    }

    var uuid = 1;
    function gud() {
        return uuid++;
    }
    var MAX_NUMBER = 1073741823;
    function createEventEmitter(value) {
        var handlers = [];
        return {
            on: function on(handler) {
                handlers.push(handler);
            },
            off: function off(handler) {
                handlers = handlers.filter(function(h) {
                    return h !== handler;
                });
            },
            get: function get$$1() {
                return value;
            },
            set: function set(newValue, changedBits) {
                value = newValue;
                handlers.forEach(function(handler) {
                    return handler(value, changedBits);
                });
            }
        };
    }
    function createContext(defaultValue, calculateChangedBits) {
        var contextProp = "__create-react-context-" + gud() + "__";
        function create(obj, value) {
            obj[contextProp] = value;
            return obj;
        }
        var Provider = miniCreateClass(
            function Provider(props) {
                this.emitter = createEventEmitter(props.value);
            },
            Component,
            {
                getChildContext: function getChildContext() {
                    return create({}, this.emitter);
                },
                UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(
                    nextProps
                ) {
                    if (this.props.value !== nextProps.value) {
                        var oldValue = this.props.value;
                        var newValue = nextProps.value;
                        var changedBits = void 0;
                        if (Object.is(oldValue, newValue)) {
                            changedBits = 0;
                        } else {
                            changedBits = isFn(calculateChangedBits)
                                ? calculateChangedBits(oldValue, newValue)
                                : MAX_NUMBER;
                            changedBits |= 0;
                            if (changedBits !== 0) {
                                this.emitter.set(nextProps.value, changedBits);
                            }
                        }
                    }
                },
                render: function render() {
                    return this.props.children;
                }
            },
            {
                childContextTypes: create({}, PropTypes.object.isRequired)
            }
        );
        var Consumer = miniCreateClass(
            function Consumer(props, context) {
                var _this = this;
                this.observedBits = 0;
                this.state = {
                    value: this.getValue()
                };
                this.emitter = context[contextProp];
                this.onUpdate = function(newValue, changedBits) {
                    var observedBits = _this.observedBits | 0;
                    if ((observedBits & changedBits) !== 0) {
                        _this.setState({
                            value: _this.getValue()
                        });
                    }
                };
            },
            Component,
            {
                UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(
                    nextProps
                ) {
                    var observedBits = nextProps.observedBits;
                    this.observedBits =
                        observedBits == null ? MAX_NUMBER : observedBits;
                },
                getValue: function getValue() {
                    if (this.emitter) {
                        return this.emitter.get();
                    } else {
                        return defaultValue;
                    }
                },
                componentDidMount: function componentDidMount() {
                    if (this.emitter) {
                        this.emitter.on(this.onUpdate);
                    }
                    var observedBits = this.props.observedBits;
                    this.observedBits =
                        observedBits == null ? MAX_NUMBER : observedBits;
                },
                componentWillUnmount: function componentWillUnmount() {
                    if (this.emitter) {
                        this.emitter.off(this.onUpdate);
                    }
                },
                render: function render() {
                    return this.props.children(this.state.value);
                }
            },
            {
                contextTypes: create({}, PropTypes.object)
            }
        );
        return {
            Provider: Provider,
            Consumer: Consumer
        };
    }

    function findHostInstance(fiber) {
        if (!fiber) {
            return null;
        } else if (fiber.nodeType) {
            return fiber;
        } else if (fiber.tag > 3) {
            return fiber.stateNode;
        } else if (fiber.tag < 3) {
            return findHostInstance(fiber.stateNode);
        } else if (fiber.refs && fiber.render) {
            fiber = get(fiber);
            var childrenMap = fiber.children;
            if (childrenMap) {
                for (var i in childrenMap) {
                    var dom = findHostInstance(childrenMap[i]);
                    if (dom) {
                        return dom;
                    }
                }
            }
        }
        return null;
    }

    function findDOMNode(fiber) {
        if (fiber == null) {
            return null;
        }
        if (fiber.nodeType === 1) {
            return fiber;
        }
        if (!fiber.render) {
            throw "findDOMNode:invalid type";
        }
        return findHostInstance(fiber);
    }

    function DOMElement(type) {
        this.nodeName = type;
        this.style = {};
        this.children = [];
    }
    var NAMESPACE = {
        svg: "http://www.w3.org/2000/svg",
        xmlns: "http://www.w3.org/2000/xmlns/",
        xlink: "http://www.w3.org/1999/xlink",
        xhtml: "http://www.w3.org/1999/xhtml",
        math: "http://www.w3.org/1998/Math/MathML"
    };
    var fn = (DOMElement.prototype = {
        contains: Boolean
    });
    String(
        "replaceChild,appendChild,removeAttributeNS,setAttributeNS,removeAttribute,setAttribute" +
            ",getAttribute,insertBefore,removeChild,addEventListener,removeEventListener,attachEvent" +
            ",detachEvent"
    ).replace(/\w+/g, function(name) {
        fn[name] = function() {
            toWarnDev("need implement " + name);
        };
    });
    var fakeDoc = new DOMElement();
    fakeDoc.createElement = fakeDoc.createElementNS = fakeDoc.createDocumentFragment = function(
        type
    ) {
        return new DOMElement(type);
    };
    fakeDoc.createTextNode = fakeDoc.createComment = Boolean;
    fakeDoc.documentElement = new DOMElement("html");
    fakeDoc.body = new DOMElement("body");
    fakeDoc.nodeName = "#document";
    fakeDoc.textContent = "";
    var win = getWindow();
    var inBrowser = !!win.alert;
    if (!inBrowser) {
        win.document = fakeDoc;
    }
    var document = win.document;
    var versions = {
        88: 7,
        80: 6,
        "00": NaN,
        "08": NaN
    };
    var msie =
        document.documentMode ||
        versions[
            typeNumber(document.all) + "" + typeNumber(win.XMLHttpRequest)
        ];
    var modern = /NaN|undefined/.test(msie) || msie > 8;
    function contains(a, b) {
        if (b) {
            while ((b = b.parentNode)) {
                if (b === a) {
                    return true;
                }
            }
        }
        return false;
    }

    var rnumber = /^-?\d+(\.\d+)?$/;
    function patchStyle(dom, lastStyle, nextStyle) {
        if (lastStyle === nextStyle) {
            return;
        }
        for (var name in nextStyle) {
            var val = nextStyle[name];
            if (lastStyle[name] !== val) {
                name = cssName(name, dom);
                if (val !== 0 && !val) {
                    val = "";
                } else if (rnumber.test(val) && !cssNumber[name]) {
                    val = val + "px";
                }
                try {
                    dom.style[name] = val;
                } catch (e) {
                    console.log(
                        "dom.style[" + name + "] = " + val + "throw error"
                    );
                }
            }
        }
        for (var _name in lastStyle) {
            if (!(_name in nextStyle)) {
                _name = cssName(_name, dom);
                dom.style[_name] = "";
            }
        }
    }
    var cssNumber = oneObject(
        "animationIterationCount,columnCount,order,flex,flexGrow,flexShrink,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom"
    );
    var prefixes = ["", "-webkit-", "-o-", "-moz-", "-ms-"];
    var cssMap = oneObject("float", "cssFloat");
    function cssName(name, dom) {
        if (cssMap[name]) {
            return cssMap[name];
        }
        var host = (dom && dom.style) || {};
        for (var i = 0, n = prefixes.length; i < n; i++) {
            var camelCase = camelize(prefixes[i] + name);
            if (camelCase in host) {
                return (cssMap[name] = camelCase);
            }
        }
        return null;
    }

    function getSafeValue(value) {
        switch (typeNumber(value)) {
            case 2:
            case 3:
            case 8:
            case 4:
            case 0:
                return value;
            default:
                return "";
        }
    }
    var duplexMap = {
        input: {
            init: function init(node, props) {
                var defaultValue =
                    props.defaultValue == null ? "" : props.defaultValue;
                return (node._wrapperState = {
                    initialValue: getSafeValue(
                        props.value != null ? props.value : defaultValue
                    )
                });
            },
            mount: function mount(node, props, state) {
                if (
                    props.hasOwnProperty("value") ||
                    props.hasOwnProperty("defaultValue")
                ) {
                    var stateValue = "" + state.initialValue;
                    if (node.value === "" && node.value !== stateValue) {
                        syncValue(node, "value", stateValue);
                    }
                    node.defaultValue = stateValue;
                }
                var name = node.name;
                if (name !== "") {
                    node.name = "";
                }
                node.defaultChecked = !node.defaultChecked;
                node.defaultChecked = !node.defaultChecked;
                if (name !== "") {
                    node.name = name;
                }
            },
            update: function update(node, props) {
                if (props.checked != null) {
                    syncValue(node, "checked", !!props.checked);
                }
                var isActive = node === node.ownerDocument.activeElement;
                var value = isActive ? node.value : getSafeValue(props.value);
                if (value != null) {
                    if (props.type === "number") {
                        if (
                            (value === 0 && node.value === "") ||
                            node.value != value
                        ) {
                            syncValue(node, "value", "" + value);
                        }
                    } else if (node.value !== "" + value) {
                        syncValue(node, "value", "" + value);
                    }
                }
                if (props.hasOwnProperty("value")) {
                    setDefaultValue(node, props.type, value, isActive);
                } else if (props.hasOwnProperty("defaultValue")) {
                    setDefaultValue(
                        node,
                        props.type,
                        getSafeValue(props.defaultValue),
                        isActive
                    );
                }
                if (props.checked == null && props.defaultChecked != null) {
                    node.defaultChecked = !!props.defaultChecked;
                }
            }
        },
        select: {
            init: function init(node, props) {
                var value = props.value;
                return (node._wrapperState = {
                    initialValue: value != null ? value : props.defaultValue,
                    wasMultiple: !!props.multiple
                });
            },
            mount: function mount(node, props) {
                var multiple = (node.multiple = !!props.multiple);
                var value = props.value;
                if (value != null) {
                    updateOptions(node, multiple, value, false);
                } else if (props.defaultValue != null) {
                    updateOptions(node, multiple, props.defaultValue, true);
                }
            },
            update: function update(node, props) {
                node._wrapperState.initialValue = void 666;
                var wasMultiple = node._wrapperState.wasMultiple;
                var multiple = (node._wrapperState.wasMultiple = !!props.multiple);
                var value = props.value;
                if (value != null) {
                    updateOptions(node, multiple, value, false);
                } else if (wasMultiple !== multiple) {
                    if (props.defaultValue != null) {
                        updateOptions(node, multiple, props.defaultValue, true);
                    } else {
                        updateOptions(
                            node,
                            multiple,
                            multiple ? [] : "",
                            false
                        );
                    }
                }
            }
        },
        textarea: {
            init: function init(node, props) {
                var initialValue = props.value;
                if (initialValue == null) {
                    var defaultValue = props.defaultValue;
                    var children = props.children;
                    if (children != null) {
                        defaultValue = textContent(node);
                        node.innerHTML = "";
                    }
                    if (defaultValue == null) {
                        defaultValue = "";
                    }
                    initialValue = defaultValue;
                }
                return (node._wrapperState = {
                    initialValue: "" + initialValue
                });
            },
            mount: function mount(node, props, state) {
                var text = textContent(node);
                var stateValue = "" + state.initialValue;
                if (text !== stateValue) {
                    syncValue(node, "value", stateValue);
                }
            },
            update: function update(node, props) {
                var value = props.value;
                if (value != null) {
                    var newValue = "" + value;
                    if (newValue !== node.value) {
                        syncValue(node, "value", newValue);
                    }
                    if (props.defaultValue == null) {
                        node.defaultValue = newValue;
                    }
                }
                if (props.defaultValue != null) {
                    node.defaultValue = props.defaultValue;
                }
            }
        },
        option: {
            init: function init() {},
            update: function update(node, props) {
                duplexMap.option.mount(node, props);
            },
            mount: function mount(node, props) {
                var elems = node.getElementsByTagName("*");
                var n = elems.length,
                    el = void 0;
                if (n) {
                    for (n = n - 1, el; (el = elems[n--]); ) {
                        node.removeChild(el);
                    }
                }
                if ("value" in props) {
                    node.duplexValue = node.value = props.value;
                } else {
                    node.duplexValue = node.text;
                }
            }
        }
    };
    function textContent(node) {
        return node.textContent || node.innerText;
    }
    function setDefaultValue(node, type, value, isActive) {
        if (type !== "number" || !isActive) {
            if (value == null) {
                node.defaultValue = "" + node._wrapperState.initialValue;
            } else if (node.defaultValue !== "" + value) {
                node.defaultValue = "" + value;
            }
        }
    }
    function updateOptions(node, multiple, propValue, setDefaultSelected) {
        var options = node.options;
        if (multiple) {
            var selectedValues = propValue;
            var selectedValue = {};
            for (var i = 0; i < selectedValues.length; i++) {
                selectedValue["$" + selectedValues[i]] = true;
            }
            for (var _i = 0; _i < options.length; _i++) {
                var selected = selectedValue.hasOwnProperty(
                    "$" + options[_i].duplexValue
                );
                if (options[_i].selected !== selected) {
                    options[_i].selected = selected;
                }
                if (selected && setDefaultSelected) {
                    options[_i].defaultSelected = true;
                }
            }
        } else {
            var _selectedValue = "" + propValue;
            var defaultSelected = null;
            for (var _i2 = 0; _i2 < options.length; _i2++) {
                if (options[_i2].duplexValue === _selectedValue) {
                    options[_i2].selected = true;
                    if (setDefaultSelected) {
                        options[_i2].defaultSelected = true;
                    }
                    return;
                }
                if (defaultSelected === null && !options[_i2].disabled) {
                    defaultSelected = options[_i2];
                }
            }
            if (defaultSelected !== null) {
                defaultSelected.selected = true;
            }
        }
    }
    function syncValue(dom, name, value) {
        dom.__anuSetValue = true;
        dom[name] = value;
        dom.__anuSetValue = false;
    }
    function duplexAction(fiber) {
        var dom = fiber.stateNode,
            name = fiber.name,
            props = fiber.props,
            lastProps = fiber.lastProps;
        var fns = duplexMap[name];
        if (name !== "option") {
            enqueueDuplex(dom);
        }
        if (!lastProps || lastProps == emptyObject) {
            var state = fns.init(dom, props);
            fns.mount(dom, props, state);
        } else {
            fns.update(dom, props);
        }
    }
    var duplexNodes = [];
    function enqueueDuplex(dom) {
        if (duplexNodes.indexOf(dom) == -1) {
            duplexNodes.push(dom);
        }
    }
    function fireDuplex() {
        var radioMap = {};
        if (duplexNodes.length) {
            do {
                var dom = duplexNodes.shift();
                var e = dom.__events;
                var fiber = e && e.vnode;
                if (fiber && !fiber.disposed) {
                    var props = fiber.props;
                    var tag = fiber.name;
                    if (name === "select") {
                        var value = props.value;
                        if (value != null) {
                            updateOptions(dom, !!props.multiple, value, false);
                        }
                    } else {
                        duplexMap[tag].update(dom, props);
                        var _name = props.name;
                        if (
                            props.type === "radio" &&
                            _name != null &&
                            !radioMap[_name]
                        ) {
                            radioMap[_name] = 1;
                            collectNamedCousins(dom, _name);
                        }
                    }
                }
            } while (duplexNodes.length);
        }
    }
    function collectNamedCousins(rootNode, name) {
        var queryRoot = rootNode;
        while (queryRoot.parentNode) {
            queryRoot = queryRoot.parentNode;
        }
        var group = queryRoot.getElementsByTagName("input");
        for (var i = 0; i < group.length; i++) {
            var otherNode = group[i];
            if (
                otherNode === rootNode ||
                otherNode.name !== name ||
                otherNode.type !== "radio" ||
                otherNode.form !== rootNode.form
            ) {
                continue;
            }
            enqueueDuplex(otherNode);
        }
    }

    var rform = /textarea|input|select|option/i;
    var globalEvents = {};
    var eventPropHooks = {};
    var eventHooks = {};
    var eventLowerCache = {
        onClick: "click",
        onChange: "change",
        onWheel: "wheel"
    };
    function eventAction(dom, name, val, lastProps, fiber) {
        var events = dom.__events || (dom.__events = {});
        events.vnode = fiber;
        var refName = toLowerCase(name.slice(2));
        if (val === false) {
            delete events[refName];
        } else {
            if (!lastProps[name]) {
                var eventName = getBrowserName(name);
                var hook = eventHooks[eventName];
                if (hook) {
                    hook(dom, eventName);
                }
                addGlobalEvent(eventName);
            }
            events[refName] = val;
        }
    }
    var isTouch = "ontouchstart" in document;
    function dispatchEvent(e, type, endpoint) {
        e = new SyntheticEvent(e);
        if (type) {
            e.type = type;
        }
        var bubble = e.type,
            terminal = endpoint || document,
            hook = eventPropHooks[e.type];
        if (hook && false === hook(e)) {
            return;
        }
        Renderer.batchedUpdates(function() {
            var paths = collectPaths(e.target, terminal, {});
            var captured = bubble + "capture";
            triggerEventFlow(paths, captured, e);
            if (!e._stopPropagation) {
                triggerEventFlow(paths.reverse(), bubble, e);
            }
        }, e);
    }
    var nodeID = 1;
    function collectPaths(begin, end, unique) {
        var paths = [];
        var node = begin;
        while (node && node.nodeType == 1) {
            var checkChange = node;
            if (node.__events) {
                var vnode = node.__events.vnode;
                inner: while (vnode.return) {
                    if (vnode.tag === 5) {
                        node = vnode.stateNode;
                        if (node === end) {
                            return paths;
                        }
                        if (!node) {
                            break inner;
                        }
                        var uid = node.uniqueID || (node.uniqueID = ++nodeID);
                        if (node.__events && !unique[uid]) {
                            unique[uid] = 1;
                            paths.push({ node: node, events: node.__events });
                        }
                    }
                    vnode = vnode.return;
                }
            }
            if (node === checkChange) {
                node = node.parentNode;
            }
        }
        return paths;
    }
    function triggerEventFlow(paths, prop, e) {
     
Download .txt
gitextract_s_rwaydx/

├── .babelrc
├── .eslintrc.js
├── .gitignore
├── .npmignore
├── .prettierrc
├── LICENSE
├── README.md
├── dist/
│   ├── React.js
│   ├── ReactDOMServer.js
│   ├── ReactIE.js
│   ├── ReactNoop.js
│   └── Router.js
├── lib/
│   ├── ReactBrowserEventEmitter.js
│   ├── ReactChildren.js
│   ├── ReactDOMFactories.js
│   ├── ReactInputSelection.js
│   ├── ReactPropTypes.js
│   ├── ReactProxy.js
│   ├── ReactShallowRenderer.js
│   ├── ReactTestUtils.js
│   ├── ReduxIE.js
│   ├── babel.js
│   ├── createClass.js
│   ├── createReactNoop.js
│   ├── createResource.js
│   ├── createSubscription.js
│   ├── deepForceUpdate.js
│   ├── devtools.js
│   ├── injectTapEventPlugin.js
│   ├── onlyChild.js
│   ├── polyfill.js
│   ├── shallowCompare.js
│   ├── sliceChildren.js
│   └── traverseAllChildren.js
├── package.json
├── packages/
│   ├── core/
│   │   ├── Children.js
│   │   ├── Component.js
│   │   ├── PropTypes.js
│   │   ├── PureComponent.js
│   │   ├── README.md
│   │   ├── __tests__/
│   │   │   ├── ReactChildren-test.js
│   │   │   ├── ReactContextValidator-test.js
│   │   │   ├── ReactES6Class-test.js
│   │   │   ├── ReactElement-test.js
│   │   │   ├── ReactElementClone-test.js
│   │   │   ├── ReactElementValidator-test.internal.js
│   │   │   ├── ReactJSXElement-test.js
│   │   │   ├── ReactJSXElementValidator-test.js
│   │   │   ├── ReactProxy-test.js
│   │   │   ├── ReactPureComponent-test.js
│   │   │   ├── createReactClassIntegration-test.js
│   │   │   ├── forwardRef-test.internal.js
│   │   │   └── onlyChild-test.js
│   │   ├── createClass.js
│   │   ├── createContext.js
│   │   ├── createElement.js
│   │   ├── createPortal.js
│   │   ├── createRef.js
│   │   ├── createRenderer.js
│   │   ├── shallowEqual.js
│   │   └── util.js
│   ├── fiber/
│   │   ├── ErrorBoundary.js
│   │   ├── Fiber.js
│   │   ├── README.md
│   │   ├── Refs.js
│   │   ├── beginWork.js
│   │   ├── commitWork.js
│   │   ├── createInstance.js
│   │   ├── effectTag.js
│   │   ├── findHostInstance.js
│   │   ├── insertPoint.js
│   │   ├── scheduleWork.js
│   │   ├── scheduler.js
│   │   └── unbatch.js
│   ├── readme.md
│   ├── render/
│   │   ├── canvas/
│   │   │   └── readme.md
│   │   ├── console/
│   │   │   └── readme.md
│   │   ├── dom/
│   │   │   ├── DOMRenderer.js
│   │   │   ├── __tests__/
│   │   │   │   ├── README.md
│   │   │   │   ├── ReactComponent-test.js
│   │   │   │   ├── ReactComponentLifeCycle-test.js
│   │   │   │   ├── ReactCompositeComponent-test.js
│   │   │   │   ├── ReactCompositeComponentNestedState-test.js
│   │   │   │   ├── ReactCompositeComponentState-test.js
│   │   │   │   ├── ReactDOMComponentTree-test.js
│   │   │   │   ├── ReactDOMEventListener-test.js
│   │   │   │   ├── ReactDOMFiber-test.js
│   │   │   │   ├── ReactDOMInput-test.js
│   │   │   │   ├── ReactDOMOption-test.js
│   │   │   │   ├── ReactDOMSVG-test.js
│   │   │   │   ├── ReactDOMSelect-test.js
│   │   │   │   ├── ReactDOMTextComponent-test.js
│   │   │   │   ├── ReactDOMTextarea-test.js
│   │   │   │   ├── ReactEmptyComponent-test.js
│   │   │   │   ├── ReactErrorBoundaries-test.internal.js
│   │   │   │   ├── ReactIdentity-test.js
│   │   │   │   ├── ReactMount-test.js
│   │   │   │   ├── ReactMountDestruction-test.js
│   │   │   │   ├── ReactMultiChild-test.js
│   │   │   │   ├── ReactMultiChildReconcile-test.js
│   │   │   │   ├── ReactStatelessComponent-test.js
│   │   │   │   ├── ReactTestUtils-test.js
│   │   │   │   ├── ReactUpdates-test.js
│   │   │   │   ├── __snapshots__/
│   │   │   │   │   └── ReactTestUtils-test.js.snap
│   │   │   │   ├── findDOMNode-test.js
│   │   │   │   ├── refs-destruction-test.js
│   │   │   │   ├── refs-test.js
│   │   │   │   └── renderSubtreeIntoContainer-test.js
│   │   │   ├── browser.js
│   │   │   ├── compat.js
│   │   │   ├── duplex.js
│   │   │   ├── event.js
│   │   │   ├── findDOMNode.js
│   │   │   ├── index.ie8.js
│   │   │   ├── index.js
│   │   │   ├── props.js
│   │   │   ├── readme.md
│   │   │   └── style.js
│   │   ├── noop/
│   │   │   ├── NoopRenderer.js
│   │   │   ├── index.js
│   │   │   └── readme.md
│   │   ├── readme.md
│   │   └── server/
│   │       ├── Renderer.js
│   │       ├── __tests2__/
│   │       │   ├── index.js
│   │       │   └── utils/
│   │       │       └── ReactDOMServerIntegrationTestUtils.js
│   │       ├── duplex.js
│   │       ├── encode.js
│   │       ├── html.js
│   │       ├── index.js
│   │       ├── namespaces.js
│   │       ├── readme.md
│   │       └── style.js
│   ├── router/
│   │   ├── history.js
│   │   ├── index.jsx
│   │   ├── readme.md
│   │   └── utils.js
│   └── store/
│       ├── createRedux.js
│       ├── index.js
│       ├── pluginFactory.js
│       ├── plugins.js
│       ├── readme.md
│       ├── rematch.js
│       └── utils.js
├── scripts/
│   ├── build/
│   │   ├── ReactSelection.js
│   │   ├── create-class.js
│   │   ├── rollup.ie.js
│   │   ├── rollup.js
│   │   ├── rollup.noop.js
│   │   ├── rollup.reach.js
│   │   ├── rollup.selection.js
│   │   ├── rollup.ssr.js
│   │   ├── shallowCompare.index.js
│   │   └── shallowCompare.js
│   ├── build.js
│   └── jest/
│       ├── codes.json
│       ├── config.build.js
│       ├── config.source.js
│       ├── matchers/
│       │   └── toWarnDev.js
│       ├── noHaste.js
│       ├── preprocessor.js
│       ├── setupEnvironment.js
│       ├── setupTests.js
│       ├── spec-equivalence-reporter/
│       │   └── setupTests.js
│       └── typescript/
│           ├── jest.d.ts
│           └── preprocessor.js
├── server.js
└── version.md
Condensed preview — 167 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,008K chars).
[
  {
    "path": ".babelrc",
    "chars": 885,
    "preview": "{\n    \"presets\": [\n        [\"env\",{ \"modules\": false }], \"react\"\n    ],\n   \n    \"plugins\": [\n        [  \"transform-class"
  },
  {
    "path": ".eslintrc.js",
    "chars": 928,
    "preview": "module.exports = {\n    \"env\": {\n        \"browser\": true,\n        \"commonjs\": true,\n        \"es6\": true,\n        \"node\": "
  },
  {
    "path": ".gitignore",
    "chars": 331,
    "preview": "# kdiff3 ignore\n*.orig\n\n# maven ignore\ntarget/\n\n# eclipse ignore\n.settings/\n.project\n.classpath\n\n# idea ignore\n.idea/\n*"
  },
  {
    "path": ".npmignore",
    "chars": 55,
    "preview": "/test/\n/scripts/\n/examples/\n.babelrc\n/coverage/\n/build/"
  },
  {
    "path": ".prettierrc",
    "chars": 63,
    "preview": "{\n  \"tabWidth\": 4,\n  \"useTabs\": false,\n  \"singleQuote\": false\n}"
  },
  {
    "path": "LICENSE",
    "chars": 11341,
    "preview": "                              Apache License\n                           Version 2.0, January 2004\n                      "
  },
  {
    "path": "README.md",
    "chars": 1825,
    "preview": "# 简介\n\n`QReact`是去哪儿网推出的一款**高度兼容 React**迷你的 React 框架,让 React 在业务线上更具通用价值。\n\n众所周知,React 一直存在体积过大的诟病,集成了许多在线上环境不需要功能。YMFE 团队在"
  },
  {
    "path": "dist/React.js",
    "chars": 109375,
    "preview": "/**\n * Powered by YMFE (https://ymfe.org)\n */\n\n(function(global, factory) {\n    typeof exports === \"object\" && typeof mo"
  },
  {
    "path": "dist/ReactDOMServer.js",
    "chars": 29606,
    "preview": "(function(global, factory) {\n    typeof exports === \"object\" && typeof module !== \"undefined\"\n        ? (module.exports "
  },
  {
    "path": "dist/ReactIE.js",
    "chars": 114463,
    "preview": "/**\n * Powered by YMFE (https://ymfe.org)\n */\n\n(function(global, factory) {\n    typeof exports === \"object\" && typeof mo"
  },
  {
    "path": "dist/ReactNoop.js",
    "chars": 67670,
    "preview": "/**\n * 此个版本专门用于测试\n * by 司徒正美 Copyright 2018-05-30\n * IE9+\n */\n\n(function(global, factory) {\n    typeof exports === \"obje"
  },
  {
    "path": "dist/Router.js",
    "chars": 36758,
    "preview": "/**\n * Powered by YMFE (https://ymfe.org)\n */\n\n(function(global, factory) {\n    typeof exports === \"object\" && typeof mo"
  },
  {
    "path": "lib/ReactBrowserEventEmitter.js",
    "chars": 763,
    "preview": "(function umd(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"object\") {\n        module.expor"
  },
  {
    "path": "lib/ReactChildren.js",
    "chars": 55,
    "preview": "//by 司徒正美\nmodule.exports = require(\"../src/Children\");\n"
  },
  {
    "path": "lib/ReactDOMFactories.js",
    "chars": 3128,
    "preview": "(function umd(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"object\") {\n        module.expor"
  },
  {
    "path": "lib/ReactInputSelection.js",
    "chars": 13541,
    "preview": "(function umd(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"object\") {\n        module.expor"
  },
  {
    "path": "lib/ReactPropTypes.js",
    "chars": 859,
    "preview": "(function umd(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"object\") {\n        module.expor"
  },
  {
    "path": "lib/ReactProxy.js",
    "chars": 22358,
    "preview": "/**\n * by 司徒正美 Copyright 2018-05-15\n * IE9+\n */\n\n(function(global, factory) {\n    typeof exports === \"object\" && typeof "
  },
  {
    "path": "lib/ReactShallowRenderer.js",
    "chars": 1187,
    "preview": "(function umd(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"object\") {\n        module.expor"
  },
  {
    "path": "lib/ReactTestUtils.js",
    "chars": 10109,
    "preview": "(function umd(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"object\") {\n        module.expor"
  },
  {
    "path": "lib/ReduxIE.js",
    "chars": 18998,
    "preview": "(function(global, factory) {\n    typeof exports === \"object\" && typeof module !== \"undefined\"\n        ? factory(exports)"
  },
  {
    "path": "lib/babel.js",
    "chars": 5247877,
    "preview": "(function webpackUniversalModuleDefinition(root, factory) {\n    if (typeof exports === \"object\" && typeof module === \"ob"
  },
  {
    "path": "lib/createClass.js",
    "chars": 6391,
    "preview": "/**\n * React.createClass补丁 by 司徒正美 Copyright 2018-05-25\n * IE9+\n */\n\n(function(global, factory) {\n    typeof exports ==="
  },
  {
    "path": "lib/createReactNoop.js",
    "chars": 1057,
    "preview": "function collectVDOM(vdom, array) {\n    if (vdom.tag == 5) {\n        var children = [];\n        var element = {\n        "
  },
  {
    "path": "lib/createResource.js",
    "chars": 4294,
    "preview": "import { noop } from \"../src/util\";\nimport { createContext } from \"../src/createContext\";\nconst Empty = 0;\nconst Pending"
  },
  {
    "path": "lib/createSubscription.js",
    "chars": 3914,
    "preview": "import React from \"react\";\nimport isFn from \"../src/util\";\n\nfunction notFn(fn, warning) {\n    if (!isFn(fn)) {\n        c"
  },
  {
    "path": "lib/deepForceUpdate.js",
    "chars": 4069,
    "preview": "(function(global, factory) {\n    typeof exports === \"object\" && typeof module !== \"undefined\"\n        ? (module.exports "
  },
  {
    "path": "lib/devtools.js",
    "chars": 14031,
    "preview": "(function(global, factory) {\n    typeof exports === \"object\" && typeof module !== \"undefined\"\n        ? (module.exports "
  },
  {
    "path": "lib/injectTapEventPlugin.js",
    "chars": 3915,
    "preview": "(function(global, factory) {\n    //https://github.com/jquery/jquery/blob/master/src/wrapper.js\n    if (typeof define ==="
  },
  {
    "path": "lib/onlyChild.js",
    "chars": 203,
    "preview": "function onlyChild(children) {\n    var el = (children && children.slice && children.slice(0, 1)) || null;\n    if (el && "
  },
  {
    "path": "lib/polyfill.js",
    "chars": 8823,
    "preview": "(function(global) {\n    var oProto = Object.prototype;\n    var toString = oProto.toString;\n    var hasOwnProperty = oPro"
  },
  {
    "path": "lib/shallowCompare.js",
    "chars": 1955,
    "preview": "/**\n * shallowCompares补丁 by 司徒正美 Copyright 2018-05-25\n * IE9+\n */\n\n(function(global, factory) {\n    typeof exports === \""
  },
  {
    "path": "lib/sliceChildren.js",
    "chars": 304,
    "preview": "//by 司徒正美\n//取得Children的某一部分\nvar ReactChildren = require(\"./ReactChildren\");\n\nfunction sliceChildren(children, start, end"
  },
  {
    "path": "lib/traverseAllChildren.js",
    "chars": 335,
    "preview": "//by 司徒正美\n\nvar ReactChildren = require(\"./ReactChildren\");\n\nfunction traverseAllChildren(children, callback, traverseCon"
  },
  {
    "path": "package.json",
    "chars": 2390,
    "preview": "{\n  \"name\": \"qreact\",\n  \"version\": \"2.2.1\",\n  \"description\": \"mini React 16 compatible library\",\n  \"main\": \"dist/React.j"
  },
  {
    "path": "packages/core/Children.js",
    "chars": 2230,
    "preview": "import { traverseAllChildren, isValidElement } from \"./createElement\";\nimport { extend, noop } from \"./util\";\n\nexport co"
  },
  {
    "path": "packages/core/Component.js",
    "chars": 1053,
    "preview": "import { toWarnDev, returnFalse,returnTrue } from \"./util\";\nimport { Renderer } from \"./createRenderer\";\n\n\nexport const "
  },
  {
    "path": "packages/core/PropTypes.js",
    "chars": 385,
    "preview": "\nlet check = function () {\n    return check;\n};\ncheck.isRequired = check;\nexport let PropTypes = {\n    array: check,\n   "
  },
  {
    "path": "packages/core/PureComponent.js",
    "chars": 487,
    "preview": "import { miniCreateClass } from \"./util\";\nimport { Component } from \"./Component\";\nimport { shallowEqual } from \"./shall"
  },
  {
    "path": "packages/core/README.md",
    "chars": 447,
    "preview": "## react-core\n\n只涉及React的一些工厂类,不涉及虚拟DOM与界面是如何交互更新的\n\n* createElement: 创建虚拟DOM ,描述一个视图显示单元或一个业务逻辑容器\n* cloneElement: 复制已经虚拟D"
  },
  {
    "path": "packages/core/__tests__/ReactChildren-test.js",
    "chars": 44861,
    "preview": "\n\"use strict\";\n\ndescribe(\"ReactChildren\", () => {\n    let React;\n    let ReactTestUtils;\n\n    beforeEach(() => {\n       "
  },
  {
    "path": "packages/core/__tests__/ReactContextValidator-test.js",
    "chars": 9990,
    "preview": "// This test doesn't really have a good home yet. I'm leaving it here since this\n// behavior belongs to the old propType"
  },
  {
    "path": "packages/core/__tests__/ReactES6Class-test.js",
    "chars": 16073,
    "preview": "let PropTypes;\nlet React;\nlet ReactDOM;\n\ndescribe('ReactES6Class', () => {\n  let container;\n  const freeze = function (e"
  },
  {
    "path": "packages/core/__tests__/ReactElement-test.js",
    "chars": 17040,
    "preview": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n"
  },
  {
    "path": "packages/core/__tests__/ReactElementClone-test.js",
    "chars": 9949,
    "preview": "'use strict';\n\nlet PropTypes;\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\ndescribe('ReactElementClone', () => {\n  let "
  },
  {
    "path": "packages/core/__tests__/ReactElementValidator-test.internal.js",
    "chars": 13071,
    "preview": "\nlet PropTypes;\nlet ReactFeatureFlags;\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\ndescribe('ReactElementValidator', ("
  },
  {
    "path": "packages/core/__tests__/ReactJSXElement-test.js",
    "chars": 5805,
    "preview": "\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\ndescribe('ReactJSXElement', () => {\n  let Component;\n\n  beforeEach(() => "
  },
  {
    "path": "packages/core/__tests__/ReactJSXElementValidator-test.js",
    "chars": 11754,
    "preview": "\n// TODO: All these warnings should become static errors using Flow instead\n// of dynamic errors when using JSX with Flo"
  },
  {
    "path": "packages/core/__tests__/ReactProxy-test.js",
    "chars": 1635,
    "preview": "let PropTypes;\nlet React;\nlet ReactDOM;\n\ndescribe('ReactProxy', () => {\n    let container;\n    let createProxy = require"
  },
  {
    "path": "packages/core/__tests__/ReactPureComponent-test.js",
    "chars": 3244,
    "preview": "\n'use strict';\n\nlet React;\nlet ReactDOM;\n\ndescribe('ReactPureComponent', () => {\n  beforeEach(() => {\n    React = requir"
  },
  {
    "path": "packages/core/__tests__/createReactClassIntegration-test.js",
    "chars": 20759,
    "preview": "'use strict';\n\nlet PropTypes;\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\nlet createReactClass;\n\ndescribe('create-react"
  },
  {
    "path": "packages/core/__tests__/forwardRef-test.internal.js",
    "chars": 6808,
    "preview": "'use strict';\n\ndescribe('forwardRef', () => {\n  let React;\n  let ReactFeatureFlags;\n  let ReactNoop;\n  ReactNoop = requi"
  },
  {
    "path": "packages/core/__tests__/onlyChild-test.js",
    "chars": 1984,
    "preview": "describe(\"onlyChild\", () => {\n    let React;\n    let WrapComponent;\n  \n    beforeEach(() => {\n        React = require(\"r"
  },
  {
    "path": "packages/core/createClass.js",
    "chars": 4045,
    "preview": "import {\n    extend,\n    isFn,\n    getWindow,\n    miniCreateClass,\n    toWarnDev,\n    __type\n} from \"./util\";\n\n/**\n * 为了"
  },
  {
    "path": "packages/core/createContext.js",
    "chars": 4008,
    "preview": "import {\n    miniCreateClass,\n    isFn\n} from \"./util\";\nimport {\n    Component\n} from \"./Component\";\nimport {\n    PropTy"
  },
  {
    "path": "packages/core/createElement.js",
    "chars": 8102,
    "preview": "import { typeNumber, toWarnDev, hasSymbol, Fragment, REACT_ELEMENT_TYPE, hasOwnProperty } from \"./util\";\nimport { Render"
  },
  {
    "path": "packages/core/createPortal.js",
    "chars": 275,
    "preview": "import { createElement } from \"./createElement\";\n\nexport function AnuPortal(props) {\n    return props.children;\n}\n\nexpor"
  },
  {
    "path": "packages/core/createRef.js",
    "chars": 158,
    "preview": "export function createRef() {\n    return {\n        current: null,\n    };\n}\n\nexport function forwardRef(fn){\n    createRe"
  },
  {
    "path": "packages/core/createRenderer.js",
    "chars": 712,
    "preview": "import { extend } from \"./util\";\nexport function createRenderer(methods) {\n    return extend(Renderer, methods);\n}\nexpor"
  },
  {
    "path": "packages/core/shallowEqual.js",
    "chars": 684,
    "preview": "import { typeNumber, hasOwnProperty } from \"./util\";\nexport function shallowEqual(objA, objB) {\n    if (Object.is(objA, "
  },
  {
    "path": "packages/core/util.js",
    "chars": 4690,
    "preview": "export const arrayPush = Array.prototype.push;\nexport const innerHTML = \"dangerouslySetInnerHTML\";\nexport const hasOwnPr"
  },
  {
    "path": "packages/fiber/ErrorBoundary.js",
    "chars": 4650,
    "preview": "import { noop, get } from \"react-core/util\";\nimport { Renderer } from \"react-core/createRenderer\";\nimport { fakeObject }"
  },
  {
    "path": "packages/fiber/Fiber.js",
    "chars": 254,
    "preview": "import { extend } from \"react-core/util\";\n\n// 实例化组件\nexport function Fiber(vnode) {\n    extend(this, vnode);\n    let type"
  },
  {
    "path": "packages/fiber/README.md",
    "chars": 1703,
    "preview": "## react-fiber\n\nReact16的fiber调度器的迷你实现,将用户对虚拟DOM的所有操作进行更细致的划分,\n调用底层API执行视图更新与业务逻辑\n\n\nscheduleWork主要包含两个方法`render`与`updateC"
  },
  {
    "path": "packages/fiber/Refs.js",
    "chars": 1192,
    "preview": "import { pushError } from \"./ErrorBoundary\";\nimport { typeNumber } from \"react-core/util\";\n\n//fix 0.14对此方法的改动,之前refs里面保存"
  },
  {
    "path": "packages/fiber/beginWork.js",
    "chars": 14008,
    "preview": "import { extend, typeNumber, isFn, gDSFP, gSBU } from \"react-core/util\";\nimport { fiberizeChildren } from \"react-core/cr"
  },
  {
    "path": "packages/fiber/commitWork.js",
    "chars": 6757,
    "preview": "import { emptyObject, returnFalse } from \"react-core/util\";\nimport {\n    NOWORK,\n    WORKING,\n    PLACE,\n    CONTENT,\n  "
  },
  {
    "path": "packages/fiber/createInstance.js",
    "chars": 2900,
    "preview": "import { returnFalse, isMounted, extend, gDSFP, gSBU } from \"react-core/util\";\nimport { Component } from \"react-core/Com"
  },
  {
    "path": "packages/fiber/effectTag.js",
    "chars": 697,
    "preview": "export const NOWORK = 1; //用于叠加其他任务\nexport const WORKING = 2; //决定程序是否继续往下遍历\nexport const PLACE = 3; //插入或移动\nexport cons"
  },
  {
    "path": "packages/fiber/findHostInstance.js",
    "chars": 712,
    "preview": "import { get } from \"react-core/util\";\n\nexport function findHostInstance(fiber) {\n    if (!fiber) {\n        return null;"
  },
  {
    "path": "packages/fiber/insertPoint.js",
    "chars": 1921,
    "preview": "import { PLACE, WORKING, NOWORK } from \"./effectTag\";\n\n//查找它后面的节点\nexport function getInsertPoint(fiber) {\n    let parent"
  },
  {
    "path": "packages/fiber/scheduleWork.js",
    "chars": 8227,
    "preview": "import { reconcileDFS } from \"./beginWork\";\nimport { commitDFS } from \"./commitWork\";\nimport { Renderer } from \"react-co"
  },
  {
    "path": "packages/fiber/scheduler.js",
    "chars": 13692,
    "preview": "// Polyfill requestIdleCallback and cancelIdleCallback\nimport {\n    typeNumber,\n    isFn,\n    getWindow\n} from \"react-co"
  },
  {
    "path": "packages/fiber/unbatch.js",
    "chars": 338,
    "preview": "import { miniCreateClass } from \"react-core/util\";\nimport { Component } from \"react-core/Component\";\n\nexport var Unbatch"
  },
  {
    "path": "packages/readme.md",
    "chars": 238,
    "preview": "## react16的迷你实现\n\ncore: 放置一些公用接口\n\nfiber: 放置调度器,比较有趣. 包含有时间分片,错误处理,批量更新,任务收集,任务分拣。。。\n\nrender: 放置渲染层的具体实现,比如createElement, "
  },
  {
    "path": "packages/render/canvas/readme.md",
    "chars": 9,
    "preview": "## canvas"
  },
  {
    "path": "packages/render/console/readme.md",
    "chars": 34,
    "preview": "## console-render\n\n用于终端,计划打算移植 ink"
  },
  {
    "path": "packages/render/dom/DOMRenderer.js",
    "chars": 5718,
    "preview": "import { diffProps } from \"./props\";\nimport { document, NAMESPACE } from \"./browser\";\nimport {\n    get,\n    noop,\n    ex"
  },
  {
    "path": "packages/render/dom/__tests__/README.md",
    "chars": 102,
    "preview": "https://github.com/facebook/react/tree/master/packages/react-dom/src/__tests__\n\n\nReactDOMEventListener"
  },
  {
    "path": "packages/render/dom/__tests__/ReactComponent-test.js",
    "chars": 19684,
    "preview": "'use strict';\n\nlet React;\nlet ReactDOM;\nlet ReactDOMServer;\nlet ReactTestUtils;\n\ndescribe('ReactComponent', () => {\n  fu"
  },
  {
    "path": "packages/render/dom/__tests__/ReactComponentLifeCycle-test.js",
    "chars": 37210,
    "preview": "'use strict';\n\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\nlet PropTypes;\n\nconst clone = function(o) {\n  return JSON.pa"
  },
  {
    "path": "packages/render/dom/__tests__/ReactCompositeComponent-test.js",
    "chars": 54657,
    "preview": "\"use strict\";\n\nlet ChildUpdates;\nlet MorphingComponent;\nlet React;\nlet ReactDOM;\nlet ReactDOMServer;\nlet ReactCurrentOwn"
  },
  {
    "path": "packages/render/dom/__tests__/ReactCompositeComponentNestedState-test.js",
    "chars": 3285,
    "preview": "'use strict';\n\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\ndescribe('ReactCompositeComponentNestedState-state', () => "
  },
  {
    "path": "packages/render/dom/__tests__/ReactCompositeComponentState-test.js",
    "chars": 15698,
    "preview": "\n'use strict';\n\nlet React;\nlet ReactDOM;\n\nlet TestComponent;\n\ndescribe('ReactCompositeComponent-state', () => {\n  before"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMComponentTree-test.js",
    "chars": 6865,
    "preview": "describe(\"ReactDOMComponentTree\", () => {\n  let React;\n  let ReactDOM;\n  let container;\n\n  beforeEach(() => {\n    jest.r"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMEventListener-test.js",
    "chars": 12151,
    "preview": "'use strict';\n\ndescribe('ReactDOMEventListener', () => {\n\n  let React = require('react');\n  let ReactDOM = require('reac"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMFiber-test.js",
    "chars": 31712,
    "preview": "'use strict';\n\nconst React = require('react');\nconst ReactDOM = require('react-dom');\nconst ReactTestUtils = require('te"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMInput-test.js",
    "chars": 57786,
    "preview": "\n'use strict';\n\nconst emptyFunction = function(){}\n\ndescribe('ReactDOMInput', () => {\n  let React;\n  let ReactDOM;\n  let"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMOption-test.js",
    "chars": 2872,
    "preview": "\ndescribe('ReactDOMOption', () => {\n    let React;\n    let ReactDOM;\n    let ReactTestUtils;\n  \n    beforeEach(() => {\n "
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMSVG-test.js",
    "chars": 7505,
    "preview": "\n\n\n    'use strict';\n\n    let React;\n    let ReactDOM;\n    let ReactDOMServer;\n    \n    describe('ReactDOMSVG', () => {\n"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMSelect-test.js",
    "chars": 23107,
    "preview": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMTextComponent-test.js",
    "chars": 7109,
    "preview": "'use strict';\n\nlet React;\nlet ReactDOM;\nlet ReactDOMServer;\n\n// In standard React, TextComponent keeps track of differen"
  },
  {
    "path": "packages/render/dom/__tests__/ReactDOMTextarea-test.js",
    "chars": 11746,
    "preview": "\nconst emptyFunction = function(){}\n\ndescribe('ReactDOMTextarea', () => {\n  let React;\n  let ReactDOM;\n  let ReactDOMSer"
  },
  {
    "path": "packages/render/dom/__tests__/ReactEmptyComponent-test.js",
    "chars": 7753,
    "preview": "\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\nlet TogglingComponent;\n\nlet log;\n\ndescribe('ReactEmptyComponent', () => {\n"
  },
  {
    "path": "packages/render/dom/__tests__/ReactErrorBoundaries-test.internal.js",
    "chars": 65476,
    "preview": "'use strict';\n\nlet PropTypes;\nlet React;\nlet ReactDOM;\nlet ReactFeatureFlags;\n\ndescribe('ReactErrorBoundaries', () => {\n"
  },
  {
    "path": "packages/render/dom/__tests__/ReactIdentity-test.js",
    "chars": 6564,
    "preview": "let React;\nlet ReactDOM;\nlet ReactTestUtils;\n\ndescribe('ReactIdentity', () => {\n  beforeEach(() => {\n    jest.resetModul"
  },
  {
    "path": "packages/render/dom/__tests__/ReactMount-test.js",
    "chars": 16051,
    "preview": "\n'use strict';\n\n\nlet React;\nlet ReactDOM;\nlet ReactDOMServer;\nlet ReactTestUtils;\n\ndescribe('ReactMount', () => {\n  befo"
  },
  {
    "path": "packages/render/dom/__tests__/ReactMountDestruction-test.js",
    "chars": 2684,
    "preview": "const React = require('react');\nconst ReactDOM = require('react-dom');\n\ndescribe('ReactMount', () => {\n  it('should dest"
  },
  {
    "path": "packages/render/dom/__tests__/ReactMultiChild-test.js",
    "chars": 10657,
    "preview": "\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the"
  },
  {
    "path": "packages/render/dom/__tests__/ReactMultiChildReconcile-test.js",
    "chars": 21735,
    "preview": "const React = require('react');\nconst ReactDOM = require('react-dom');\n\nconst stripEmptyValues = function(obj) {\n  const"
  },
  {
    "path": "packages/render/dom/__tests__/ReactStatelessComponent-test.js",
    "chars": 11502,
    "preview": "'use strict';\n\nlet PropTypes;\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\nfunction StatelessComponent(props) {\n  retur"
  },
  {
    "path": "packages/render/dom/__tests__/ReactTestUtils-test.js",
    "chars": 12517,
    "preview": "'use strict';\n\nlet createRenderer;\nlet React;\nlet ReactDOM;\nlet ReactDOMServer;\nlet ReactTestUtils;\n\nfunction getTestDoc"
  },
  {
    "path": "packages/render/dom/__tests__/ReactUpdates-test.js",
    "chars": 33935,
    "preview": "\n'use strict';\n\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\ndescribe('ReactUpdates', () => {\n  beforeEach(() => {\n    "
  },
  {
    "path": "packages/render/dom/__tests__/__snapshots__/ReactTestUtils-test.js.snap",
    "chars": 515,
    "preview": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`ReactTestUtils Simulate should have locally attached media events 1"
  },
  {
    "path": "packages/render/dom/__tests__/findDOMNode-test.js",
    "chars": 2975,
    "preview": "\"use strict\";\n\nconst React = require(\"react\");\nconst ReactDOM = require(\"react-dom\");\nconst ReactTestUtils = require(\"te"
  },
  {
    "path": "packages/render/dom/__tests__/refs-destruction-test.js",
    "chars": 4425,
    "preview": "'use strict';\n\nlet React;\nlet ReactDOM;\nlet ReactTestUtils;\n\nlet TestComponent;\n\ndescribe('refs-destruction', () => {\n  "
  },
  {
    "path": "packages/render/dom/__tests__/refs-test.js",
    "chars": 10322,
    "preview": "'use strict';\n\nlet React = require('react');\nlet ReactTestUtils = require('test-utils');\n\n/**\n * Counts clicks and has a"
  },
  {
    "path": "packages/render/dom/__tests__/renderSubtreeIntoContainer-test.js",
    "chars": 8488,
    "preview": "'use strict';\n\nconst React = require('react');\nconst PropTypes = require('prop-types');\nconst ReactDOM = require('react-"
  },
  {
    "path": "packages/render/dom/browser.js",
    "chars": 1960,
    "preview": "import { typeNumber, getWindow, toWarnDev } from \"react-core/util\";\n//用于后端的元素节点\nexport function DOMElement(type) {\n    t"
  },
  {
    "path": "packages/render/dom/compat.js",
    "chars": 4955,
    "preview": "import { document, msie } from \"./browser\";\nimport { actionStrategy } from \"./props\";\nimport { oneObject, innerHTML, ext"
  },
  {
    "path": "packages/render/dom/duplex.js",
    "chars": 10937,
    "preview": "import { typeNumber, emptyObject } from \"react-core/util\";\n\nfunction getSafeValue(value) {\n    switch (typeNumber(value)"
  },
  {
    "path": "packages/render/dom/event.js",
    "chars": 11152,
    "preview": "import { document, modern, contains } from \"./browser\";\nimport { isFn, noop, toLowerCase } from \"react-core/util\";\nimpor"
  },
  {
    "path": "packages/render/dom/findDOMNode.js",
    "chars": 360,
    "preview": "import { findHostInstance } from \"react-fiber/findHostInstance\";\n\n// [Top API] ReactDOM.findDOMNode\nexport function find"
  },
  {
    "path": "packages/render/dom/index.ie8.js",
    "chars": 1619,
    "preview": "import { Children } from \"react-core/Children\";\nimport { PropTypes } from \"react-core/PropTypes\";\nimport { Component } f"
  },
  {
    "path": "packages/render/dom/index.js",
    "chars": 1600,
    "preview": "import { Children } from \"react-core/Children\";\nimport { PropTypes } from \"react-core/PropTypes\";\nimport { Component } f"
  },
  {
    "path": "packages/render/dom/props.js",
    "chars": 8927,
    "preview": "import { NAMESPACE } from './browser';\nimport { patchStyle } from './style';\nimport { eventAction, rform } from './event"
  },
  {
    "path": "packages/render/dom/readme.md",
    "chars": 629,
    "preview": "## dom-renderer\n\nReactDOM的迷你实现\n\nbrowser.js 提供了nodejs识别,高紴浏览器识别,IE版本识别,一套假的DOM(让它在nodejs中也不会报错),contains与命名空间集合\n\ncompat.j"
  },
  {
    "path": "packages/render/dom/style.js",
    "chars": 1959,
    "preview": "import { oneObject, camelize } from \"react-core/util\";\nexport let rnumber = /^-?\\d+(\\.\\d+)?$/;\n/**\n * 为元素样子设置样式\n *\n * @e"
  },
  {
    "path": "packages/render/noop/NoopRenderer.js",
    "chars": 3107,
    "preview": "import { noop, topNodes, topFibers } from \"react-core/util\";\nimport { createRenderer } from \"react-core/createRenderer\";"
  },
  {
    "path": "packages/render/noop/index.js",
    "chars": 1388,
    "preview": "\nimport { Children } from \"react-core/Children\";\nimport { PropTypes } from \"react-core/PropTypes\";\nimport { Component } "
  },
  {
    "path": "packages/render/noop/readme.md",
    "chars": 24,
    "preview": "## noop-renderer\n\n用于单元测试"
  },
  {
    "path": "packages/render/readme.md",
    "chars": 16,
    "preview": "## render\n\n各种渲染器"
  },
  {
    "path": "packages/render/server/Renderer.js",
    "chars": 19413,
    "preview": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n"
  },
  {
    "path": "packages/render/server/__tests2__/index.js",
    "chars": 25986,
    "preview": "const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');\n\nlet React;\nlet ReactDOM;\n"
  },
  {
    "path": "packages/render/server/__tests2__/utils/ReactDOMServerIntegrationTestUtils.js",
    "chars": 11022,
    "preview": "'use strict';\n\nconst stream = require('stream');\n\nmodule.exports = function(initModules) {\n  let ReactDOM;\n  let ReactDO"
  },
  {
    "path": "packages/render/server/duplex.js",
    "chars": 3063,
    "preview": "import { Children } from 'react-core/Children';\n\n//收集option元素的文本\nfunction flattenOptionChildren(children) {\n    let cont"
  },
  {
    "path": "packages/render/server/encode.js",
    "chars": 1285,
    "preview": "\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\nfunction escapeHtml(string) {\n    var str = '' + string;\n    var match = matchHtmlRe"
  },
  {
    "path": "packages/render/server/html.js",
    "chars": 2135,
    "preview": "import { createMarkupForStyles } from './style';\nimport { encodeEntities } from './encode';\n\nconst STYLE = 'style';\ncons"
  },
  {
    "path": "packages/render/server/index.js",
    "chars": 1853,
    "preview": "import ReactPartialRenderer from './Renderer';\nimport { miniCreateClass } from 'react-core/util';\n/**\n * Render a ReactE"
  },
  {
    "path": "packages/render/server/namespaces.js",
    "chars": 985,
    "preview": "const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nconst MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\ncons"
  },
  {
    "path": "packages/render/server/readme.md",
    "chars": 27,
    "preview": "## server-renderer\n\n用于后端渲染\n"
  },
  {
    "path": "packages/render/server/style.js",
    "chars": 4532,
    "preview": "\nexport const isUnitlessNumber = {\n    animationIterationCount: true,\n    borderImageOutset: true,\n    borderImageSlice:"
  },
  {
    "path": "packages/router/history.js",
    "chars": 4706,
    "preview": "import {\n    getWindow\n} from \"react-core/util\";\n//计划有history hash iframe三种模式\nexport var modeObject = {}\n//伪造一个Location对"
  },
  {
    "path": "packages/router/index.jsx",
    "chars": 17003,
    "preview": "/* eslint-disable jsx-a11y/anchor-has-content */\nimport { miniCreateClass, getWindow } from \"react-core/util\";\n\nimport {"
  },
  {
    "path": "packages/router/readme.md",
    "chars": 215,
    "preview": "## ReachRouter\n\nReach Router的改造版 \n\n去掉一些高级的es6语法糖,让它最终编译后的代码量更少,兼容性更好\n\n并且在Router组件上添加一个mode属性,值为\"history\" 或\"hash\",“hash“用"
  },
  {
    "path": "packages/router/utils.js",
    "chars": 8644,
    "preview": "////////////////////////////////////////////////////////////////////////////////\n\n// https://www.cnblogs.com/qinxingnet/"
  },
  {
    "path": "packages/store/createRedux.js",
    "chars": 3373,
    "preview": "import * as Redux from 'redux';\nimport {\n    isListener,\n    isFn\n} from './utils';\n\n\nlet composeEnhancersWithDevtools ="
  },
  {
    "path": "packages/store/index.js",
    "chars": 2390,
    "preview": "import {\n    Rematch as RematchCore\n} from './rematch';\nimport {\n    isListener,\n    mergeConfig\n} from './utils';\n\n// a"
  },
  {
    "path": "packages/store/pluginFactory.js",
    "chars": 1794,
    "preview": "import {\n    validate,\n    isFn,\n    isNotFn\n} from './utils';\n\n/**\n * PluginFactory\n *\n * makes Plugin objects extend a"
  },
  {
    "path": "packages/store/plugins.js",
    "chars": 9575,
    "preview": "import {\n    isFn\n} from \"./utils\"\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n    return new(P || (P = Pro"
  },
  {
    "path": "packages/store/readme.md",
    "chars": 3521,
    "preview": "## Rematch\n\nredux一直以难用著称,太多模板代码,并且对异步不友好,于是社区出现各种封装\n\n著名的有\n\n1. dva, 使用更加著名的`redux-saga`来处理异步,但是涉及太多概念\n2. redux-act, 封装了ac"
  },
  {
    "path": "packages/store/rematch.js",
    "chars": 2797,
    "preview": "import {\n    pluginFactory\n} from './pluginFactory';\nimport {\n    dispatchPlugin,\n    effectsPlugin\n} from './plugins';\n"
  },
  {
    "path": "packages/store/utils.js",
    "chars": 3889,
    "preview": "/**\n * validate\n *\n * takes an array of arrays of validations and\n * throws if an error occurs\n */\nexport let validate ="
  },
  {
    "path": "scripts/build/ReactSelection.js",
    "chars": 12903,
    "preview": "import { options, Fragment } from \"../src/util\";\nimport { Children } from \"../src/Children\";\nimport * as eventSystem fro"
  },
  {
    "path": "scripts/build/create-class.js",
    "chars": 816,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build/rollup.ie.js",
    "chars": 837,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build/rollup.js",
    "chars": 936,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build/rollup.noop.js",
    "chars": 840,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build/rollup.reach.js",
    "chars": 1043,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build/rollup.selection.js",
    "chars": 1022,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build/rollup.ssr.js",
    "chars": 603,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport cleanup from \"rollup-plugin-cleanup\";\n\nexport default {\n    input: \"./pa"
  },
  {
    "path": "scripts/build/shallowCompare.index.js",
    "chars": 258,
    "preview": "import { shallowEqual } from \"react-core/shallowEqual\";\nexport default function shallowCompare(instance, nextProps, next"
  },
  {
    "path": "scripts/build/shallowCompare.js",
    "chars": 927,
    "preview": "import babel from \"rollup-plugin-babel\";\nimport replace from \"rollup-plugin-re\";\nimport filesize from \"rollup-plugin-fil"
  },
  {
    "path": "scripts/build.js",
    "chars": 5328,
    "preview": "const fs = require(\"fs\");\nconst ora = require(\"ora\");\nconst path = require(\"path\");\nconst gzipSize = require(\"gzip-size\""
  },
  {
    "path": "scripts/jest/codes.json",
    "chars": 28887,
    "preview": "{\n    \"0\": \"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React"
  },
  {
    "path": "scripts/jest/config.build.js",
    "chars": 1225,
    "preview": "\"use strict\";\n\nconst { readdirSync, statSync } = require(\"fs\");\nconst { join } = require(\"path\");\nconst sourceConfig = r"
  },
  {
    "path": "scripts/jest/config.source.js",
    "chars": 717,
    "preview": "\"use strict\";\n\nmodule.exports = {\n    haste: {\n        hasteImplModulePath: require.resolve(\"./noHaste.js\")\n    },\n    m"
  },
  {
    "path": "scripts/jest/matchers/toWarnDev.js",
    "chars": 4939,
    "preview": "\"use strict\";\n\nconst jestDiff = require(\"jest-diff\");\n\nfunction diffString(a, b) {\n    // jest-diff does not currently h"
  },
  {
    "path": "scripts/jest/noHaste.js",
    "chars": 117,
    "preview": "\"use strict\";\n\nmodule.exports = {\n    getHasteName() {\n        // We never want Haste.\n        return null;\n    }\n};\n"
  },
  {
    "path": "scripts/jest/preprocessor.js",
    "chars": 1896,
    "preview": "\"use strict\";\n\nconst path = require(\"path\");\n\nconst babel = require(\"babel-core\");\n\n// Use require.resolve to be resilie"
  },
  {
    "path": "scripts/jest/setupEnvironment.js",
    "chars": 1580,
    "preview": "/* eslint-disable */\n\nconst NODE_ENV = process.env.NODE_ENV;\nif (NODE_ENV !== \"development\" && NODE_ENV !== \"production\""
  },
  {
    "path": "scripts/jest/setupTests.js",
    "chars": 6316,
    "preview": "\"use strict\";\n\nconst chalk = require(\"chalk\");\n\nif (process.env.REACT_CLASS_EQUIVALENCE_TEST) {\n    // Inside the class "
  },
  {
    "path": "scripts/jest/spec-equivalence-reporter/setupTests.js",
    "chars": 1531,
    "preview": "/*!\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n"
  },
  {
    "path": "scripts/jest/typescript/jest.d.ts",
    "chars": 2282,
    "preview": "declare var jasmine: any;\ndeclare var __DEV__: boolean;\n\ndeclare function afterEach(fn: any): any;\ndeclare function befo"
  },
  {
    "path": "scripts/jest/typescript/preprocessor.js",
    "chars": 3120,
    "preview": "\"use strict\";\n\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst ts = require(\"typescript\");\n\nconst tsOption"
  },
  {
    "path": "server.js",
    "chars": 50,
    "preview": "module.exports = require(\"./dist/ReactDOMServer\");"
  },
  {
    "path": "version.md",
    "chars": 603,
    "preview": "# 更新日志\n\n## v2.2.1(2018.7.27)\n\n1. 添加cacheContext, mergeContext等方法,如果上面的context不变,那么下方的也不会,这样就阻止了无效的cwrp钩子的触发. instance.un"
  }
]

About this extraction

This page contains the full source code of the YMFE/qreact GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 167 files (6.4 MB), approximately 1.7M tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!