diff --git a/blog/2013/06/02/jsfiddle-integration.html b/blog/2013/06/02/jsfiddle-integration.html index b64ebb36d5..79000de039 100644 --- a/blog/2013/06/02/jsfiddle-integration.html +++ b/blog/2013/06/02/jsfiddle-integration.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/06/05/why-react.html b/blog/2013/06/05/why-react.html index ba78c00efc..6049aa5461 100644 --- a/blog/2013/06/05/why-react.html +++ b/blog/2013/06/05/why-react.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/06/12/community-roundup.html b/blog/2013/06/12/community-roundup.html index 2a793b4a9a..c9957dcb3f 100644 --- a/blog/2013/06/12/community-roundup.html +++ b/blog/2013/06/12/community-roundup.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/06/19/community-roundup-2.html b/blog/2013/06/19/community-roundup-2.html index 008bd32377..ab67fffdc5 100644 --- a/blog/2013/06/19/community-roundup-2.html +++ b/blog/2013/06/19/community-roundup-2.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/06/21/react-v0-3-3.html b/blog/2013/06/21/react-v0-3-3.html index 65ec921e1d..cdac25735e 100644 --- a/blog/2013/06/21/react-v0-3-3.html +++ b/blog/2013/06/21/react-v0-3-3.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/06/27/community-roundup-3.html b/blog/2013/06/27/community-roundup-3.html index 8220186aa8..be68911752 100644 --- a/blog/2013/06/27/community-roundup-3.html +++ b/blog/2013/06/27/community-roundup-3.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/02/react-v0-4-autobind-by-default.html b/blog/2013/07/02/react-v0-4-autobind-by-default.html index 80be3a3bdb..76c63594d9 100644 --- a/blog/2013/07/02/react-v0-4-autobind-by-default.html +++ b/blog/2013/07/02/react-v0-4-autobind-by-default.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/03/community-roundup-4.html b/blog/2013/07/03/community-roundup-4.html index 9c44f13c98..bdb7692206 100644 --- a/blog/2013/07/03/community-roundup-4.html +++ b/blog/2013/07/03/community-roundup-4.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html b/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html index d8e86f5ee9..32c9fe289e 100644 --- a/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html +++ b/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/17/react-v0-4-0.html b/blog/2013/07/17/react-v0-4-0.html index 66e589abbf..b2dd0eda2e 100644 --- a/blog/2013/07/17/react-v0-4-0.html +++ b/blog/2013/07/17/react-v0-4-0.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/23/community-roundup-5.html b/blog/2013/07/23/community-roundup-5.html index 4b7caaef00..5b91762480 100644 --- a/blog/2013/07/23/community-roundup-5.html +++ b/blog/2013/07/23/community-roundup-5.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/26/react-v0-4-1.html b/blog/2013/07/26/react-v0-4-1.html index 0f53cb7d1b..ae4535f3e2 100644 --- a/blog/2013/07/26/react-v0-4-1.html +++ b/blog/2013/07/26/react-v0-4-1.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html b/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html index c932cf5f0a..47eb3ad642 100644 --- a/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html +++ b/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/08/05/community-roundup-6.html b/blog/2013/08/05/community-roundup-6.html index 2a5656b1b3..9dae0419db 100644 --- a/blog/2013/08/05/community-roundup-6.html +++ b/blog/2013/08/05/community-roundup-6.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/08/19/use-react-and-jsx-in-python-applications.html b/blog/2013/08/19/use-react-and-jsx-in-python-applications.html index 52b27745ba..aa55c1bd8c 100644 --- a/blog/2013/08/19/use-react-and-jsx-in-python-applications.html +++ b/blog/2013/08/19/use-react-and-jsx-in-python-applications.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/08/26/community-roundup-7.html b/blog/2013/08/26/community-roundup-7.html index 6f67780130..35bf8a3ed9 100644 --- a/blog/2013/08/26/community-roundup-7.html +++ b/blog/2013/08/26/community-roundup-7.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/09/24/community-roundup-8.html b/blog/2013/09/24/community-roundup-8.html index 59c8e10716..6bfacc4a62 100644 --- a/blog/2013/09/24/community-roundup-8.html +++ b/blog/2013/09/24/community-roundup-8.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/10/03/community-roundup-9.html b/blog/2013/10/03/community-roundup-9.html index be66443533..98ed419a6a 100644 --- a/blog/2013/10/03/community-roundup-9.html +++ b/blog/2013/10/03/community-roundup-9.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/10/16/react-v0.5.0.html b/blog/2013/10/16/react-v0.5.0.html index a192e096c8..671057ad79 100644 --- a/blog/2013/10/16/react-v0.5.0.html +++ b/blog/2013/10/16/react-v0.5.0.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/10/29/react-v0-5-1.html b/blog/2013/10/29/react-v0-5-1.html index bf8510c1c2..b28e1f2671 100644 --- a/blog/2013/10/29/react-v0-5-1.html +++ b/blog/2013/10/29/react-v0-5-1.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/11/05/thinking-in-react.html b/blog/2013/11/05/thinking-in-react.html index f86a1a8ca1..9de8dd4889 100644 --- a/blog/2013/11/05/thinking-in-react.html +++ b/blog/2013/11/05/thinking-in-react.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/11/06/community-roundup-10.html b/blog/2013/11/06/community-roundup-10.html index a477faf935..8da737b8f5 100644 --- a/blog/2013/11/06/community-roundup-10.html +++ b/blog/2013/11/06/community-roundup-10.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/11/18/community-roundup-11.html b/blog/2013/11/18/community-roundup-11.html index 0b139261b2..9699996819 100644 --- a/blog/2013/11/18/community-roundup-11.html +++ b/blog/2013/11/18/community-roundup-11.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/12/18/react-v0.5.2-v0.4.2.html b/blog/2013/12/18/react-v0.5.2-v0.4.2.html index 47cd82f810..28ebe0715f 100644 --- a/blog/2013/12/18/react-v0.5.2-v0.4.2.html +++ b/blog/2013/12/18/react-v0.5.2-v0.4.2.html @@ -58,6 +58,8 @@

Recent posts

diff --git a/blog/2013/12/19/react-v0.8.0.html b/blog/2013/12/19/react-v0.8.0.html new file mode 100644 index 0000000000..0054686a85 --- /dev/null +++ b/blog/2013/12/19/react-v0.8.0.html @@ -0,0 +1,169 @@ + + + + + + React | React v0.8 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + +
+

React v0.8

+

December 19, 2013 by Paul O'Shannessy

+ +
+ +
+

I'll start by answering the obvious question:

+ +
+

What happened to 0.6 and 0.7?

+
+ +

It's become increasingly obvious since our launch in May that people want to use React on the server. With the server-side rendering abilities, that's a perfect fit. However using the same copy of React on the server and then packaging it up for the client is surprisingly a harder problem. People have been using our react-tools module which includes React, but when browserifying that ends up packaging all of esprima and some other dependencies that aren't needed on the client. So we wanted to make this whole experience better.

+ +

We talked with Jeff Barczewski who was the owner of the react module on npm. He was kind enough to transition ownership to us and release his package under a different name: autoflow. I encourage you to check it out if you're writing a lot of asynchronous code. In order to not break all of react's current users of 0.7.x, we decided to bump our version to 0.8 and skip the issue entirely. We're also including a warning if you use our react module like you would use the previous package.

+ +

In order to make the transition to 0.8 for our current users as painless as possible, we decided to make 0.8 primarily a bug fix release on top of 0.5. No public APIs were changed (even if they were already marked as deprecated). We haven't added any of the new features we have in master, though we did take the opportunity to pull in some improvements to internals.

+ +

We hope that by releasing react on npm, we will enable a new set of uses that have been otherwise difficult. All feedback is welcome!

+

Changelog #

React #

+
    +
  • Added support for more attributes: + +
      +
    • rows & cols for <textarea>
    • +
    • defer & async for <script>
    • +
    • loop for <audio> & <video>
    • +
    • autoCorrect for form fields (a non-standard attribute only supported by mobile WebKit)
    • +
  • +
  • Improved error messages
  • +
  • Fixed Selection events in IE11
  • +
  • Added onContextMenu events
  • +
+

React with Addons #

+
    +
  • Fixed bugs with TransitionGroup when children were undefined
  • +
  • Added support for onTransition
  • +
+

react-tools #

+
    +
  • Upgraded jstransform and esprima-fb
  • +
+

JSXTransformer #

+
    +
  • Added support for use in IE8
  • +
  • Upgraded browserify, which reduced file size by ~65KB (16KB gzipped)
  • +
+ +
+ +
+
+
+
+ + + +
+
+ + + + diff --git a/blog/all.html b/blog/all.html index af61b0a9ab..deca1d584a 100644 --- a/blog/all.html +++ b/blog/all.html @@ -56,6 +56,8 @@

All Posts

+

React v0.8 on December 19, 2013 by Paul O'Shannessy

+

React v0.5.2, v0.4.2 on December 18, 2013 by Paul O'Shannessy

Community Round-up #11 on November 18, 2013 by Vjeux

diff --git a/blog/index.html b/blog/index.html index d2de2bb27d..a2692c98c4 100644 --- a/blog/index.html +++ b/blog/index.html @@ -58,6 +58,8 @@

Recent posts

@@ -85,6 +85,56 @@
+
+

React v0.8

+

December 19, 2013 by Paul O'Shannessy

+
+
+

I'll start by answering the obvious question:

+ +
+

What happened to 0.6 and 0.7?

+
+ +

It's become increasingly obvious since our launch in May that people want to use React on the server. With the server-side rendering abilities, that's a perfect fit. However using the same copy of React on the server and then packaging it up for the client is surprisingly a harder problem. People have been using our react-tools module which includes React, but when browserifying that ends up packaging all of esprima and some other dependencies that aren't needed on the client. So we wanted to make this whole experience better.

+ +

We talked with Jeff Barczewski who was the owner of the react module on npm. He was kind enough to transition ownership to us and release his package under a different name: autoflow. I encourage you to check it out if you're writing a lot of asynchronous code. In order to not break all of react's current users of 0.7.x, we decided to bump our version to 0.8 and skip the issue entirely. We're also including a warning if you use our react module like you would use the previous package.

+ +

In order to make the transition to 0.8 for our current users as painless as possible, we decided to make 0.8 primarily a bug fix release on top of 0.5. No public APIs were changed (even if they were already marked as deprecated). We haven't added any of the new features we have in master, though we did take the opportunity to pull in some improvements to internals.

+ +

We hope that by releasing react on npm, we will enable a new set of uses that have been otherwise difficult. All feedback is welcome!

+

Changelog #

React #

+
    +
  • Added support for more attributes: + +
      +
    • rows & cols for <textarea>
    • +
    • defer & async for <script>
    • +
    • loop for <audio> & <video>
    • +
    • autoCorrect for form fields (a non-standard attribute only supported by mobile WebKit)
    • +
  • +
  • Improved error messages
  • +
  • Fixed Selection events in IE11
  • +
  • Added onContextMenu events
  • +
+

React with Addons #

+
    +
  • Fixed bugs with TransitionGroup when children were undefined
  • +
  • Added support for onTransition
  • +
+

react-tools #

+
    +
  • Upgraded jstransform and esprima-fb
  • +
+

JSXTransformer #

+
    +
  • Added support for use in IE8
  • +
  • Upgraded browserify, which reduced file size by ~65KB (16KB gzipped)
  • +
+ +
+
+

React v0.5.2, v0.4.2

December 18, 2013 by Paul O'Shannessy

@@ -447,27 +497,6 @@ Is this some sort of template language? Specifically no. This might have been th
-
-

React v0.5.1

-

October 29, 2013 by Paul O'Shannessy

-
-
-

This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to Ben Alpert, Andrey Popp, and Laurence Rowe for their contributions!

-

Changelog #

React #

- -

React with Addons #

- - -
-
- @@ -85,6 +85,27 @@
+
+

React v0.5.1

+

October 29, 2013 by Paul O'Shannessy

+
+
+

This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to Ben Alpert, Andrey Popp, and Laurence Rowe for their contributions!

+

Changelog #

React #

+
    +
  • Fixed bug with <input type="range"> and selection events.
  • +
  • Fixed bug with selection and focus.
  • +
  • Made it possible to unmount components from the document root.
  • +
  • Fixed bug for disabled attribute handling on non-<input> elements.
  • +
+

React with Addons #

+
    +
  • Fixed bug with transition and animation event detection.
  • +
+ +
+
+

React v0.5

October 16, 2013 by Paul O'Shannessy

@@ -365,48 +386,6 @@
-
-

Use React and JSX in Python Applications

-

August 19, 2013 by Kunal Mehta

-
-
-

Today we're happy to announce the initial release of PyReact, which makes it easier to use React and JSX in your Python applications. It's designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files.

-

Usage #

-

Transform your JSX files via the provided jsx module:

-
from react import jsx
-
-# For multiple paths, use the JSXTransformer class.
-transformer = jsx.JSXTransformer()
-for jsx_path, js_path in my_paths:
-    transformer.transform(jsx_path, js_path)
-
-# For a single file, you can use a shortcut method.
-jsx.transform('path/to/input/file.jsx', 'path/to/output/file.js')
-
-

For full paths to React files, use the source module:

-
from react import source
-
-# path_for raises IOError if the file doesn't exist.
-react_js = source.path_for('react.min.js')
-

Django #

-

PyReact includes a JSX compiler for django-pipeline. Add it to your project's pipeline settings like this:

-
PIPELINE_COMPILERS = (
-  'react.utils.pipeline.JSXCompiler',
-)
-

Installation #

-

PyReact is hosted on PyPI, and can be installed with pip:

-
$ pip install PyReact
-
-

Alternatively, add it into your requirements file:

-
PyReact==0.1.1
-
-

Dependencies: PyReact uses PyExecJS to execute the bundled React code, which requires that a JS runtime environment is installed on your machine. We don't explicitly set a dependency on a runtime environment; Mac OS X comes bundled with one. If you're on a different platform, we recommend PyV8.

- -

For the initial release, we've only tested on Python 2.7. Look out for support for Python 3 in the future, and if you see anything that can be improved, we welcome your contributions!

- -
-
- @@ -85,6 +85,48 @@
+
+

Use React and JSX in Python Applications

+

August 19, 2013 by Kunal Mehta

+
+
+

Today we're happy to announce the initial release of PyReact, which makes it easier to use React and JSX in your Python applications. It's designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files.

+

Usage #

+

Transform your JSX files via the provided jsx module:

+
from react import jsx
+
+# For multiple paths, use the JSXTransformer class.
+transformer = jsx.JSXTransformer()
+for jsx_path, js_path in my_paths:
+    transformer.transform(jsx_path, js_path)
+
+# For a single file, you can use a shortcut method.
+jsx.transform('path/to/input/file.jsx', 'path/to/output/file.js')
+
+

For full paths to React files, use the source module:

+
from react import source
+
+# path_for raises IOError if the file doesn't exist.
+react_js = source.path_for('react.min.js')
+

Django #

+

PyReact includes a JSX compiler for django-pipeline. Add it to your project's pipeline settings like this:

+
PIPELINE_COMPILERS = (
+  'react.utils.pipeline.JSXCompiler',
+)
+

Installation #

+

PyReact is hosted on PyPI, and can be installed with pip:

+
$ pip install PyReact
+
+

Alternatively, add it into your requirements file:

+
PyReact==0.1.1
+
+

Dependencies: PyReact uses PyExecJS to execute the bundled React code, which requires that a JS runtime environment is installed on your machine. We don't explicitly set a dependency on a runtime environment; Mac OS X comes bundled with one. If you're on a different platform, we recommend PyV8.

+ +

For the initial release, we've only tested on Python 2.7. Look out for support for Python 3 in the future, and if you see anything that can be improved, we welcome your contributions!

+ +
+
+

Community Round-up #6

August 5, 2013 by Vjeux

@@ -317,47 +359,6 @@
-
-

React v0.4.0

-

July 17, 2013 by Paul O'Shannessy

-
-
-

Over the past 2 months we've been taking feedback and working hard to make React even better. We fixed some bugs, made some under-the-hood improvements, and added several features that we think will improve the experience developing with React. Today we're proud to announce the availability of React v0.4!

- -

This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the Google Group, and issues and pull requests on GitHub. We've had contributions ranging from documentation improvements to major changes to React's rendering. We've seen people integrate React into the tools they're using and the products they're building, and we're all very excited to see what our budding community builds next!

- -

React v0.4 has some big changes. We've also restructured the documentation to better communicate how to use React. We've summarized the changes below and linked to documentation where we think it will be especially useful.

- -

When you're ready, go download it!

-

React #

- -

JSX #

- -

react-tools #

- - -
-
- @@ -85,6 +85,47 @@
+
+

React v0.4.0

+

July 17, 2013 by Paul O'Shannessy

+
+
+

Over the past 2 months we've been taking feedback and working hard to make React even better. We fixed some bugs, made some under-the-hood improvements, and added several features that we think will improve the experience developing with React. Today we're proud to announce the availability of React v0.4!

+ +

This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the Google Group, and issues and pull requests on GitHub. We've had contributions ranging from documentation improvements to major changes to React's rendering. We've seen people integrate React into the tools they're using and the products they're building, and we're all very excited to see what our budding community builds next!

+ +

React v0.4 has some big changes. We've also restructured the documentation to better communicate how to use React. We've summarized the changes below and linked to documentation where we think it will be especially useful.

+ +

When you're ready, go download it!

+

React #

+
    +
  • Switch from using id attribute to data-reactid to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.
  • +
  • Support for more DOM elements and attributes (e.g., <canvas>)
  • +
  • Improved server-side rendering APIs. React.renderComponentToString(<component>, callback) allows you to use React on the server and generate markup which can be sent down to the browser.
  • +
  • prop improvements: validation and default values. Read our blog post for details...
  • +
  • Support for the key prop, which allows for finer control over reconciliation. Read the docs for details...
  • +
  • Removed React.autoBind. Read our blog post for details...
  • +
  • Improvements to forms. We've written wrappers around <input>, <textarea>, <option>, and <select> in order to standardize many inconsistencies in browser implementations. This includes support for defaultValue, and improved implementation of the onChange event, and circuit completion. Read the docs for details...
  • +
  • We've implemented an improved synthetic event system that conforms to the W3C spec.
  • +
  • Updates to your component are batched now, which may result in a significantly faster re-render of components. this.setState now takes an optional callback as its second parameter. If you were using onClick={this.setState.bind(this, state)} previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback.
  • +
+

JSX #

+
    +
  • Support for comment nodes <div>{/* this is a comment and won't be rendered */}</div>
  • +
  • Children are now transformed directly into arguments instead of being wrapped in an array +E.g. <div><Component1/><Component2/></div> is transformed into React.DOM.div(null, Component1(null), Component2(null)). +Previously this would be transformed into React.DOM.div(null, [Component1(null), Component2(null)]). +If you were using React without JSX previously, your code should still work.
  • +
+

react-tools #

+
    +
  • Fixed a number of bugs when transforming directories
  • +
  • No longer re-write require()s to be relative unless specified
  • +
+ +
+
+

New in React v0.4: Prop Validation and Default Values

July 11, 2013 by Paul O'Shannessy

@@ -328,30 +369,6 @@
-
-

React v0.3.3

-

June 21, 2013 by Paul O'Shannessy

-
-
-

We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use.

-

react-tools #

- -

React #

- -

JSXTransformer #

- - -
-
- @@ -85,6 +85,30 @@
+
+

React v0.3.3

+

June 21, 2013 by Paul O'Shannessy

+
+
+

We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use.

+

react-tools #

+
    +
  • Upgrade Commoner so require statements are no longer relativized when passing through the transformer. This was a feature needed when building React, but doesn't translate well for other consumers of bin/jsx.
  • +
  • Upgraded our dependencies on Commoner and Recast so they use a different directory for their cache.
  • +
  • Freeze our esprima dependency.
  • +
+

React #

+
    +
  • Allow reusing the same DOM node to render different components. e.g. React.renderComponent(<div/>, domNode); React.renderComponent(<span/>, domNode); will work now.
  • +
+

JSXTransformer #

+
    +
  • Improved the in-browser transformer so that transformed scripts will execute in the expected scope. The allows components to be defined and used from separate files.
  • +
+ +
+
+

Community Round-up #2

June 19, 2013 by Vjeux

diff --git a/docs/displaying-data.html b/docs/displaying-data.html index b8e7c58bd6..f23f68f1dd 100644 --- a/docs/displaying-data.html +++ b/docs/displaying-data.html @@ -330,8 +330,8 @@ <html> <head> <title>Hello React</title> - <script src="http://fb.me/react-0.5.2.min.js"></script> - <script src="http://fb.me/JSXTransformer-0.5.2.js"></script> + <script src="http://fb.me/react-0.8.0.min.js"></script> + <script src="http://fb.me/JSXTransformer-0.8.0.js"></script> </head> <body> <div id="example"></div> diff --git a/docs/getting-started.html b/docs/getting-started.html index 6140f20589..e677235c21 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -334,8 +334,8 @@

Download the starter kit to get started.

diff --git a/docs/tags-and-attributes.html b/docs/tags-and-attributes.html index 4de8dd6714..255a86c9c8 100644 --- a/docs/tags-and-attributes.html +++ b/docs/tags-and-attributes.html @@ -350,7 +350,7 @@ title tr track u ul var video wbr autoComplete autoFocus autoPlay cellPadding cellSpacing charSet checked className colSpan content contentEditable contextMenu controls data dateTime dir disabled draggable encType form frameBorder height hidden href htmlFor -httpEquiv icon id label lang list max maxLength method min multiple name +httpEquiv icon id label lang list loop max maxLength method min multiple name pattern placeholder poster preload radioGroup readOnly rel required role rowSpan scrollLeft scrollTop selected size spellCheck src step style tabIndex target title type value width wmode diff --git a/docs/tutorial.html b/docs/tutorial.html index cabfd9337e..f2594a0f0e 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -348,8 +348,8 @@ <html> <head> <title>Hello React</title> - <script src="http://fb.me/react-0.5.2.js"></script> - <script src="http://fb.me/JSXTransformer-0.5.2.js"></script> + <script src="http://fb.me/react-0.8.0.js"></script> + <script src="http://fb.me/JSXTransformer-0.8.0.js"></script> </head> <body> <div id="content"></div> @@ -489,8 +489,8 @@
<!-- template.html -->
 <head>
   <title>Hello React</title>
-  <script src="http://fb.me/react-0.5.2.js"></script>
-  <script src="http://fb.me/JSXTransformer-0.5.2.js"></script>
+  <script src="http://fb.me/react-0.8.0.js"></script>
+  <script src="http://fb.me/JSXTransformer-0.8.0.js"></script>
   <script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
 </head>
 
diff --git a/downloads.html b/downloads.html index 42c7a1914e..2a4db824c8 100644 --- a/downloads.html +++ b/downloads.html @@ -60,25 +60,25 @@ get started with React.

-

Individual Downloads #

React Core 0.5.2 (production) #

+

Individual Downloads #

React Core 0.8.0 (production) #

The compressed, production version of React core

-
<script src="http://fb.me/react-0.5.2.min.js"></script>
-

React Core 0.5.2 (development) #

+
<script src="http://fb.me/react-0.8.0.min.js"></script>
+

React Core 0.8.0 (development) #

The uncompressed, development version of React core with inline documentation.

-
<script src="http://fb.me/react-0.5.2.js"></script>
-

React With Add-Ons 0.5.2 (production) #

+
<script src="http://fb.me/react-0.8.0.js"></script>
+

React With Add-Ons 0.8.0 (production) #

The compressed, production version of React with add-ons.

-
<script src="http://fb.me/react-with-addons-0.5.2.min.js"></script>
-

React With Add-Ons 0.5.2 (development) #

+
<script src="http://fb.me/react-with-addons-0.8.0.min.js"></script>
+

React With Add-Ons 0.8.0 (development) #

The uncompressed, development version of React with add-ons.

-
<script src="http://fb.me/react-with-addons-0.5.2.js"></script>
-

JSX Transform #

+
<script src="http://fb.me/react-with-addons-0.8.0.js"></script>
+

JSX Transform #

The JSX transformer used to support XML syntax in JavaScript.

-
<script src="http://fb.me/JSXTransformer-0.5.2.js"></script>
+
<script src="http://fb.me/JSXTransformer-0.8.0.js"></script>
 

All scripts are also available via CDNJS.

Bower #

$ bower install --save react
diff --git a/downloads/react-0.8.0.zip b/downloads/react-0.8.0.zip
new file mode 100644
index 0000000000..12aac229d2
Binary files /dev/null and b/downloads/react-0.8.0.zip differ
diff --git a/feed.xml b/feed.xml
index 124d70ece9..99a5f0266a 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,6 +6,55 @@
 		http://facebook.github.io/react
 		
 		
+			
+				React v0.8
+				<p>I&#39;ll start by answering the obvious question:</p>
+
+<blockquote>
+<p>What happened to 0.6 and 0.7?</p>
+</blockquote>
+
+<p>It&#39;s become increasingly obvious since our launch in May that people want to use React on the server. With the server-side rendering abilities, that&#39;s a perfect fit. However using the same copy of React on the server and then packaging it up for the client is surprisingly a harder problem. People have been using our <code>react-tools</code> module which includes React, but when browserifying that ends up packaging all of <code>esprima</code> and some other dependencies that aren&#39;t needed on the client. So we wanted to make this whole experience better.</p>
+
+<p>We talked with <a href="https://github.com/jeffbski">Jeff Barczewski</a> who was the owner of the <code>react</code> module on npm. He was kind enough to transition ownership to us and release his package under a different name: <code>autoflow</code>. I encourage you to <a href="https://github.com/jeffbski/autoflow">check it out</a> if you&#39;re writing a lot of asynchronous code. In order to not break all of <code>react</code>&#39;s current users of 0.7.x, we decided to bump our version to 0.8 and skip the issue entirely. We&#39;re also including a warning if you use our <code>react</code> module like you would use the previous package.</p>
+
+<p>In order to make the transition to 0.8 for our current users as painless as possible, we decided to make 0.8 primarily a bug fix release on top of 0.5. No public APIs were changed (even if they were already marked as deprecated). We haven&#39;t added any of the new features we have in master, though we did take the opportunity to pull in some improvements to internals.</p>
+
+<p>We hope that by releasing <code>react</code> on npm, we will enable a new set of uses that have been otherwise difficult. All feedback is welcome!</p>
+<h2><a class="anchor" name="changelog"></a>Changelog <a class="hash-link" href="#changelog">#</a></h2><h3><a class="anchor" name="react"></a>React <a class="hash-link" href="#react">#</a></h3>
+<ul>
+<li>Added support for more attributes:
+
+<ul>
+<li><code>rows</code> &amp; <code>cols</code> for <code>&lt;textarea&gt;</code></li>
+<li><code>defer</code> &amp; <code>async</code> for <code>&lt;script&gt;</code></li>
+<li><code>loop</code> for <code>&lt;audio&gt;</code> &amp; <code>&lt;video&gt;</code></li>
+<li><code>autoCorrect</code> for form fields (a non-standard attribute only supported by mobile WebKit)</li>
+</ul></li>
+<li>Improved error messages</li>
+<li>Fixed Selection events in IE11</li>
+<li>Added <code>onContextMenu</code> events</li>
+</ul>
+<h3><a class="anchor" name="react-with-addons"></a>React with Addons <a class="hash-link" href="#react-with-addons">#</a></h3>
+<ul>
+<li>Fixed bugs with TransitionGroup when children were undefined</li>
+<li>Added support for <code>onTransition</code></li>
+</ul>
+<h3><a class="anchor" name="react-tools"></a>react-tools <a class="hash-link" href="#react-tools">#</a></h3>
+<ul>
+<li>Upgraded <code>jstransform</code> and <code>esprima-fb</code></li>
+</ul>
+<h3><a class="anchor" name="jsxtransformer"></a>JSXTransformer <a class="hash-link" href="#jsxtransformer">#</a></h3>
+<ul>
+<li>Added support for use in IE8</li>
+<li>Upgraded browserify, which reduced file size by ~65KB (16KB gzipped)</li>
+</ul>
+
+				2013-12-19T00:00:00-08:00
+				http://facebook.github.io/react/blog/2013/12/19/react-v0.8.0.html
+				http://facebook.github.io/react/blog/2013/12/19/react-v0.8.0.html
+			
+		
 			
 				React v0.5.2, v0.4.2
 				<p>Today we&#39;re releasing an update to address a potential XSS vulnerability that can    arise when using user data as a <code>key</code>. Typically &quot;safe&quot; data is used for a <code>key</code>, for example, an id from your database, or a unique hash. However there are cases where it may be reasonable to use user generated content. A carefully crafted piece of content could result in arbitrary JS execution. While we make a very concerted effort to ensure all text is escaped before inserting it into the DOM, we missed one case. Immediately following the discovery of this vulnerability, we performed an audit to ensure we this was the only such vulnerability.</p>
@@ -660,46 +709,5 @@ Is this some sort of template language? Specifically no. This might have been th
 				http://facebook.github.io/react/blog/2013/08/26/community-roundup-7.html
 			
 		
-			
-				Use React and JSX in Python Applications
-				<p>Today we&#39;re happy to announce the initial release of <a href="https://github.com/facebook/react-python">PyReact</a>, which makes it easier to use React and JSX in your Python applications. It&#39;s designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files.</p>
-<h2><a class="anchor" name="usage"></a>Usage <a class="hash-link" href="#usage">#</a></h2>
-<p>Transform your JSX files via the provided <code>jsx</code> module:</p>
-<div class="highlight"><pre><code class="python language-python" data-lang="python"><span class="kn">from</span> <span class="nn">react</span> <span class="kn">import</span> <span class="n">jsx</span>
-
-<span class="c"># For multiple paths, use the JSXTransformer class.</span>
-<span class="n">transformer</span> <span class="o">=</span> <span class="n">jsx</span><span class="o">.</span><span class="n">JSXTransformer</span><span class="p">()</span>
-<span class="k">for</span> <span class="n">jsx_path</span><span class="p">,</span> <span class="n">js_path</span> <span class="ow">in</span> <span class="n">my_paths</span><span class="p">:</span>
-    <span class="n">transformer</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">jsx_path</span><span class="p">,</span> <span class="n">js_path</span><span class="p">)</span>
-
-<span class="c"># For a single file, you can use a shortcut method.</span>
-<span class="n">jsx</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="s">&#39;path/to/input/file.jsx&#39;</span><span class="p">,</span> <span class="s">&#39;path/to/output/file.js&#39;</span><span class="p">)</span>
-</code></pre></div>
-<p>For full paths to React files, use the <code>source</code> module:</p>
-<div class="highlight"><pre><code class="python language-python" data-lang="python"><span class="kn">from</span> <span class="nn">react</span> <span class="kn">import</span> <span class="n">source</span>
-
-<span class="c"># path_for raises IOError if the file doesn&#39;t exist.</span>
-<span class="n">react_js</span> <span class="o">=</span> <span class="n">source</span><span class="o">.</span><span class="n">path_for</span><span class="p">(</span><span class="s">&#39;react.min.js&#39;</span><span class="p">)</span>
-</code></pre></div><h2><a class="anchor" name="django"></a>Django <a class="hash-link" href="#django">#</a></h2>
-<p>PyReact includes a JSX compiler for <a href="https://github.com/cyberdelia/django-pipeline">django-pipeline</a>. Add it to your project&#39;s pipeline settings like this:</p>
-<div class="highlight"><pre><code class="python language-python" data-lang="python"><span class="n">PIPELINE_COMPILERS</span> <span class="o">=</span> <span class="p">(</span>
-  <span class="s">&#39;react.utils.pipeline.JSXCompiler&#39;</span><span class="p">,</span>
-<span class="p">)</span>
-</code></pre></div><h2><a class="anchor" name="installation"></a>Installation <a class="hash-link" href="#installation">#</a></h2>
-<p>PyReact is hosted on PyPI, and can be installed with <code>pip</code>:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">$ pip install PyReact
-</code></pre></div>
-<p>Alternatively, add it into your <code>requirements</code> file:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">PyReact==0.1.1
-</code></pre></div>
-<p><strong>Dependencies</strong>: PyReact uses <a href="https://github.com/doloopwhile/PyExecJS">PyExecJS</a> to execute the bundled React code, which requires that a JS runtime environment is installed on your machine. We don&#39;t explicitly set a dependency on a runtime environment; Mac OS X comes bundled with one. If you&#39;re on a different platform, we recommend <a href="https://code.google.com/p/pyv8/">PyV8</a>.</p>
-
-<p>For the initial release, we&#39;ve only tested on Python 2.7. Look out for support for Python 3 in the future, and if you see anything that can be improved, we welcome your <a href="https://github.com/facebook/react-python/blob/master/CONTRIBUTING.md">contributions</a>!</p>
-
-				2013-08-19T00:00:00-07:00
-				http://facebook.github.io/react/blog/2013/08/19/use-react-and-jsx-in-python-applications.html
-				http://facebook.github.io/react/blog/2013/08/19/use-react-and-jsx-in-python-applications.html
-			
-		
 	
 
diff --git a/index.html b/index.html
index 89face1a4f..6f0868b290 100644
--- a/index.html
+++ b/index.html
@@ -60,7 +60,7 @@
 
         
       
@@ -148,7 +148,7 @@

diff --git a/js/JSXTransformer.js b/js/JSXTransformer.js index 2a16486fcb..07cc91f027 100644 --- a/js/JSXTransformer.js +++ b/js/JSXTransformer.js @@ -1,8 +1,7 @@ /** - * JSXTransformer v0.5.2 + * JSXTransformer v0.8.0 */ -!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.JSXTransformer=e():"undefined"!=typeof global?global.JSXTransformer=e():"undefined"!=typeof self&&(self.JSXTransformer=e())}(function(){var define,module,exports; -return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - shims.forEach(array, function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = shims.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = shims.getOwnPropertyNames(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - - shims.forEach(keys, function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = shims.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (shims.indexOf(ctx.seen, desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = shims.reduce(output, function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return shims.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -function isBuffer(arg) { - return arg instanceof Buffer; -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = function(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = shims.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); -}; - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = shims.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -},{"__browserify_Buffer":4,"_shims":1}],4:[function(require,module,exports){ -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 1, - nBits = -7, - i = isBE ? 0 : (nBytes - 1), - d = isBE ? 1 : -1, - s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity); - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); -}; - -exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) { - var e, m, c, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), - i = isBE ? (nBytes - 1) : 0, - d = isBE ? -1 : 1, - s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); - - buffer[offset + i - d] |= s * 128; -}; - -},{}],"q9TxCC":[function(require,module,exports){ -var assert; -exports.Buffer = Buffer; -exports.SlowBuffer = Buffer; -Buffer.poolSize = 8192; -exports.INSPECT_MAX_BYTES = 50; - -function stringtrim(str) { - if (str.trim) return str.trim(); - return str.replace(/^\s+|\s+$/g, ''); -} - -function Buffer(subject, encoding, offset) { - if(!assert) assert= require('assert'); - if (!(this instanceof Buffer)) { - return new Buffer(subject, encoding, offset); - } - this.parent = this; - this.offset = 0; - - // Work-around: node's base64 implementation - // allows for non-padded strings while base64-js - // does not.. - if (encoding == "base64" && typeof subject == "string") { - subject = stringtrim(subject); - while (subject.length % 4 != 0) { - subject = subject + "="; - } - } - - var type; - - // Are we slicing? - if (typeof offset === 'number') { - this.length = coerce(encoding); - // slicing works, with limitations (no parent tracking/update) - // check https://github.com/toots/buffer-browserify/issues/19 - for (var i = 0; i < this.length; i++) { - this[i] = subject.get(i+offset); - } - } else { - // Find the length - switch (type = typeof subject) { - case 'number': - this.length = coerce(subject); - break; - - case 'string': - this.length = Buffer.byteLength(subject, encoding); - break; - - case 'object': // Assume object is an array - this.length = coerce(subject.length); - break; - - default: - throw new Error('First argument needs to be a number, ' + - 'array or string.'); - } - - // Treat array-ish objects as a byte array. - if (isArrayIsh(subject)) { - for (var i = 0; i < this.length; i++) { - if (subject instanceof Buffer) { - this[i] = subject.readUInt8(i); - } - else { - this[i] = subject[i]; - } - } - } else if (type == 'string') { - // We are a string - this.length = this.write(subject, 0, encoding); - } else if (type === 'number') { - for (var i = 0; i < this.length; i++) { - this[i] = 0; - } - } - } -} - -Buffer.prototype.get = function get(i) { - if (i < 0 || i >= this.length) throw new Error('oob'); - return this[i]; -}; - -Buffer.prototype.set = function set(i, v) { - if (i < 0 || i >= this.length) throw new Error('oob'); - return this[i] = v; -}; - -Buffer.byteLength = function (str, encoding) { - switch (encoding || "utf8") { - case 'hex': - return str.length / 2; - - case 'utf8': - case 'utf-8': - return utf8ToBytes(str).length; - - case 'ascii': - case 'binary': - return str.length; - - case 'base64': - return base64ToBytes(str).length; - - default: - throw new Error('Unknown encoding'); - } -}; - -Buffer.prototype.utf8Write = function (string, offset, length) { - var bytes, pos; - return Buffer._charsWritten = blitBuffer(utf8ToBytes(string), this, offset, length); -}; - -Buffer.prototype.asciiWrite = function (string, offset, length) { - var bytes, pos; - return Buffer._charsWritten = blitBuffer(asciiToBytes(string), this, offset, length); -}; - -Buffer.prototype.binaryWrite = Buffer.prototype.asciiWrite; - -Buffer.prototype.base64Write = function (string, offset, length) { - var bytes, pos; - return Buffer._charsWritten = blitBuffer(base64ToBytes(string), this, offset, length); -}; - -Buffer.prototype.base64Slice = function (start, end) { - var bytes = Array.prototype.slice.apply(this, arguments) - return require("base64-js").fromByteArray(bytes); -}; - -Buffer.prototype.utf8Slice = function () { - var bytes = Array.prototype.slice.apply(this, arguments); - var res = ""; - var tmp = ""; - var i = 0; - while (i < bytes.length) { - if (bytes[i] <= 0x7F) { - res += decodeUtf8Char(tmp) + String.fromCharCode(bytes[i]); - tmp = ""; - } else - tmp += "%" + bytes[i].toString(16); - - i++; - } - - return res + decodeUtf8Char(tmp); -} - -Buffer.prototype.asciiSlice = function () { - var bytes = Array.prototype.slice.apply(this, arguments); - var ret = ""; - for (var i = 0; i < bytes.length; i++) - ret += String.fromCharCode(bytes[i]); - return ret; -} - -Buffer.prototype.binarySlice = Buffer.prototype.asciiSlice; - -Buffer.prototype.inspect = function() { - var out = [], - len = this.length; - for (var i = 0; i < len; i++) { - out[i] = toHex(this[i]); - if (i == exports.INSPECT_MAX_BYTES) { - out[i + 1] = '...'; - break; - } - } - return ''; -}; - - -Buffer.prototype.hexSlice = function(start, end) { - var len = this.length; - - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - - var out = ''; - for (var i = start; i < end; i++) { - out += toHex(this[i]); - } - return out; -}; - - -Buffer.prototype.toString = function(encoding, start, end) { - encoding = String(encoding || 'utf8').toLowerCase(); - start = +start || 0; - if (typeof end == 'undefined') end = this.length; - - // Fastpath empty strings - if (+end == start) { - return ''; - } - - switch (encoding) { - case 'hex': - return this.hexSlice(start, end); - - case 'utf8': - case 'utf-8': - return this.utf8Slice(start, end); - - case 'ascii': - return this.asciiSlice(start, end); - - case 'binary': - return this.binarySlice(start, end); - - case 'base64': - return this.base64Slice(start, end); - - case 'ucs2': - case 'ucs-2': - return this.ucs2Slice(start, end); - - default: - throw new Error('Unknown encoding'); - } -}; - - -Buffer.prototype.hexWrite = function(string, offset, length) { - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - - // must be an even number of digits - var strLen = string.length; - if (strLen % 2) { - throw new Error('Invalid hex string'); - } - if (length > strLen / 2) { - length = strLen / 2; - } - for (var i = 0; i < length; i++) { - var byte = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(byte)) throw new Error('Invalid hex string'); - this[offset + i] = byte; - } - Buffer._charsWritten = i * 2; - return i; -}; - - -Buffer.prototype.write = function(string, offset, length, encoding) { - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length; - length = undefined; - } - } else { // legacy - var swap = encoding; - encoding = offset; - offset = length; - length = swap; - } - - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - encoding = String(encoding || 'utf8').toLowerCase(); - - switch (encoding) { - case 'hex': - return this.hexWrite(string, offset, length); - - case 'utf8': - case 'utf-8': - return this.utf8Write(string, offset, length); - - case 'ascii': - return this.asciiWrite(string, offset, length); - - case 'binary': - return this.binaryWrite(string, offset, length); - - case 'base64': - return this.base64Write(string, offset, length); - - case 'ucs2': - case 'ucs-2': - return this.ucs2Write(string, offset, length); - - default: - throw new Error('Unknown encoding'); - } -}; - -// slice(start, end) -function clamp(index, len, defaultValue) { - if (typeof index !== 'number') return defaultValue; - index = ~~index; // Coerce to integer. - if (index >= len) return len; - if (index >= 0) return index; - index += len; - if (index >= 0) return index; - return 0; -} - -Buffer.prototype.slice = function(start, end) { - var len = this.length; - start = clamp(start, len, 0); - end = clamp(end, len, len); - return new Buffer(this, end - start, +start); -}; - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function(target, target_start, start, end) { - var source = this; - start || (start = 0); - if (end === undefined || isNaN(end)) { - end = this.length; - } - target_start || (target_start = 0); - - if (end < start) throw new Error('sourceEnd < sourceStart'); - - // Copy 0 bytes; we're done - if (end === start) return 0; - if (target.length == 0 || source.length == 0) return 0; - - if (target_start < 0 || target_start >= target.length) { - throw new Error('targetStart out of bounds'); - } - - if (start < 0 || start >= source.length) { - throw new Error('sourceStart out of bounds'); - } - - if (end < 0 || end > source.length) { - throw new Error('sourceEnd out of bounds'); - } - - // Are we oob? - if (end > this.length) { - end = this.length; - } - - if (target.length - target_start < end - start) { - end = target.length - target_start + start; - } - - var temp = []; - for (var i=start; i= this.length) { - throw new Error('start out of bounds'); - } - - if (end < 0 || end > this.length) { - throw new Error('end out of bounds'); - } - - for (var i = start; i < end; i++) { - this[i] = value; - } -} - -// Static methods -Buffer.isBuffer = function isBuffer(b) { - return b instanceof Buffer || b instanceof Buffer; -}; - -Buffer.concat = function (list, totalLength) { - if (!isArray(list)) { - throw new Error("Usage: Buffer.concat(list, [totalLength])\n \ - list should be an Array."); - } - - if (list.length === 0) { - return new Buffer(0); - } else if (list.length === 1) { - return list[0]; - } - - if (typeof totalLength !== 'number') { - totalLength = 0; - for (var i = 0; i < list.length; i++) { - var buf = list[i]; - totalLength += buf.length; - } - } - - var buffer = new Buffer(totalLength); - var pos = 0; - for (var i = 0; i < list.length; i++) { - var buf = list[i]; - buf.copy(buffer, pos); - pos += buf.length; - } - return buffer; -}; - -Buffer.isEncoding = function(encoding) { - switch ((encoding + '').toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - case 'raw': - return true; - - default: - return false; - } -}; - -// helpers - -function coerce(length) { - // Coerce length to a number (possibly NaN), round up - // in case it's fractional (e.g. 123.456) then do a - // double negate to coerce a NaN to 0. Easy, right? - length = ~~Math.ceil(+length); - return length < 0 ? 0 : length; -} - -function isArray(subject) { - return (Array.isArray || - function(subject){ - return {}.toString.apply(subject) == '[object Array]' - }) - (subject) -} - -function isArrayIsh(subject) { - return isArray(subject) || Buffer.isBuffer(subject) || - subject && typeof subject === 'object' && - typeof subject.length === 'number'; -} - -function toHex(n) { - if (n < 16) return '0' + n.toString(16); - return n.toString(16); -} - -function utf8ToBytes(str) { - var byteArray = []; - for (var i = 0; i < str.length; i++) - if (str.charCodeAt(i) <= 0x7F) - byteArray.push(str.charCodeAt(i)); - else { - var h = encodeURIComponent(str.charAt(i)).substr(1).split('%'); - for (var j = 0; j < h.length; j++) - byteArray.push(parseInt(h[j], 16)); - } - - return byteArray; -} - -function asciiToBytes(str) { - var byteArray = [] - for (var i = 0; i < str.length; i++ ) - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push( str.charCodeAt(i) & 0xFF ); - - return byteArray; -} - -function base64ToBytes(str) { - return require("base64-js").toByteArray(str); -} - -function blitBuffer(src, dst, offset, length) { - var pos, i = 0; - while (i < length) { - if ((i+offset >= dst.length) || (i >= src.length)) - break; - - dst[i + offset] = src[i]; - i++; - } - return i; -} - -function decodeUtf8Char(str) { - try { - return decodeURIComponent(str); - } catch (err) { - return String.fromCharCode(0xFFFD); // UTF 8 invalid char - } -} - -// read/write bit-twiddling - -Buffer.prototype.readUInt8 = function(offset, noAssert) { - var buffer = this; - - if (!noAssert) { - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return; - - return buffer[offset]; -}; - -function readUInt16(buffer, offset, isBigEndian, noAssert) { - var val = 0; - - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return 0; - - if (isBigEndian) { - val = buffer[offset] << 8; - if (offset + 1 < buffer.length) { - val |= buffer[offset + 1]; - } - } else { - val = buffer[offset]; - if (offset + 1 < buffer.length) { - val |= buffer[offset + 1] << 8; - } - } - - return val; -} - -Buffer.prototype.readUInt16LE = function(offset, noAssert) { - return readUInt16(this, offset, false, noAssert); -}; - -Buffer.prototype.readUInt16BE = function(offset, noAssert) { - return readUInt16(this, offset, true, noAssert); -}; - -function readUInt32(buffer, offset, isBigEndian, noAssert) { - var val = 0; - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return 0; - - if (isBigEndian) { - if (offset + 1 < buffer.length) - val = buffer[offset + 1] << 16; - if (offset + 2 < buffer.length) - val |= buffer[offset + 2] << 8; - if (offset + 3 < buffer.length) - val |= buffer[offset + 3]; - val = val + (buffer[offset] << 24 >>> 0); - } else { - if (offset + 2 < buffer.length) - val = buffer[offset + 2] << 16; - if (offset + 1 < buffer.length) - val |= buffer[offset + 1] << 8; - val |= buffer[offset]; - if (offset + 3 < buffer.length) - val = val + (buffer[offset + 3] << 24 >>> 0); - } - - return val; -} - -Buffer.prototype.readUInt32LE = function(offset, noAssert) { - return readUInt32(this, offset, false, noAssert); -}; - -Buffer.prototype.readUInt32BE = function(offset, noAssert) { - return readUInt32(this, offset, true, noAssert); -}; - - -/* - * Signed integer types, yay team! A reminder on how two's complement actually - * works. The first bit is the signed bit, i.e. tells us whether or not the - * number should be positive or negative. If the two's complement value is - * positive, then we're done, as it's equivalent to the unsigned representation. - * - * Now if the number is positive, you're pretty much done, you can just leverage - * the unsigned translations and return those. Unfortunately, negative numbers - * aren't quite that straightforward. - * - * At first glance, one might be inclined to use the traditional formula to - * translate binary numbers between the positive and negative values in two's - * complement. (Though it doesn't quite work for the most negative value) - * Mainly: - * - invert all the bits - * - add one to the result - * - * Of course, this doesn't quite work in Javascript. Take for example the value - * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of - * course, Javascript will do the following: - * - * > ~0xff80 - * -65409 - * - * Whoh there, Javascript, that's not quite right. But wait, according to - * Javascript that's perfectly correct. When Javascript ends up seeing the - * constant 0xff80, it has no notion that it is actually a signed number. It - * assumes that we've input the unsigned value 0xff80. Thus, when it does the - * binary negation, it casts it into a signed value, (positive 0xff80). Then - * when you perform binary negation on that, it turns it into a negative number. - * - * Instead, we're going to have to use the following general formula, that works - * in a rather Javascript friendly way. I'm glad we don't support this kind of - * weird numbering scheme in the kernel. - * - * (BIT-MAX - (unsigned)val + 1) * -1 - * - * The astute observer, may think that this doesn't make sense for 8-bit numbers - * (really it isn't necessary for them). However, when you get 16-bit numbers, - * you do. Let's go back to our prior example and see how this will look: - * - * (0xffff - 0xff80 + 1) * -1 - * (0x007f + 1) * -1 - * (0x0080) * -1 - */ -Buffer.prototype.readInt8 = function(offset, noAssert) { - var buffer = this; - var neg; - - if (!noAssert) { - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return; - - neg = buffer[offset] & 0x80; - if (!neg) { - return (buffer[offset]); - } - - return ((0xff - buffer[offset] + 1) * -1); -}; - -function readInt16(buffer, offset, isBigEndian, noAssert) { - var neg, val; - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'Trying to read beyond buffer length'); - } - - val = readUInt16(buffer, offset, isBigEndian, noAssert); - neg = val & 0x8000; - if (!neg) { - return val; - } - - return (0xffff - val + 1) * -1; -} - -Buffer.prototype.readInt16LE = function(offset, noAssert) { - return readInt16(this, offset, false, noAssert); -}; - -Buffer.prototype.readInt16BE = function(offset, noAssert) { - return readInt16(this, offset, true, noAssert); -}; - -function readInt32(buffer, offset, isBigEndian, noAssert) { - var neg, val; - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to read beyond buffer length'); - } - - val = readUInt32(buffer, offset, isBigEndian, noAssert); - neg = val & 0x80000000; - if (!neg) { - return (val); - } - - return (0xffffffff - val + 1) * -1; -} - -Buffer.prototype.readInt32LE = function(offset, noAssert) { - return readInt32(this, offset, false, noAssert); -}; - -Buffer.prototype.readInt32BE = function(offset, noAssert) { - return readInt32(this, offset, true, noAssert); -}; - -function readFloat(buffer, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to read beyond buffer length'); - } - - return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian, - 23, 4); -} - -Buffer.prototype.readFloatLE = function(offset, noAssert) { - return readFloat(this, offset, false, noAssert); -}; - -Buffer.prototype.readFloatBE = function(offset, noAssert) { - return readFloat(this, offset, true, noAssert); -}; - -function readDouble(buffer, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset + 7 < buffer.length, - 'Trying to read beyond buffer length'); - } - - return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian, - 52, 8); -} - -Buffer.prototype.readDoubleLE = function(offset, noAssert) { - return readDouble(this, offset, false, noAssert); -}; - -Buffer.prototype.readDoubleBE = function(offset, noAssert) { - return readDouble(this, offset, true, noAssert); -}; - - -/* - * We have to make sure that the value is a valid integer. This means that it is - * non-negative. It has no fractional component and that it does not exceed the - * maximum allowed value. - * - * value The number to check for validity - * - * max The maximum value - */ -function verifuint(value, max) { - assert.ok(typeof (value) == 'number', - 'cannot write a non-number as a number'); - - assert.ok(value >= 0, - 'specified a negative value for writing an unsigned value'); - - assert.ok(value <= max, 'value is larger than maximum value for type'); - - assert.ok(Math.floor(value) === value, 'value has a fractional component'); -} - -Buffer.prototype.writeUInt8 = function(value, offset, noAssert) { - var buffer = this; - - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'trying to write beyond buffer length'); - - verifuint(value, 0xff); - } - - if (offset < buffer.length) { - buffer[offset] = value; - } -}; - -function writeUInt16(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'trying to write beyond buffer length'); - - verifuint(value, 0xffff); - } - - for (var i = 0; i < Math.min(buffer.length - offset, 2); i++) { - buffer[offset + i] = - (value & (0xff << (8 * (isBigEndian ? 1 - i : i)))) >>> - (isBigEndian ? 1 - i : i) * 8; - } - -} - -Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) { - writeUInt16(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) { - writeUInt16(this, value, offset, true, noAssert); -}; - -function writeUInt32(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'trying to write beyond buffer length'); - - verifuint(value, 0xffffffff); - } - - for (var i = 0; i < Math.min(buffer.length - offset, 4); i++) { - buffer[offset + i] = - (value >>> (isBigEndian ? 3 - i : i) * 8) & 0xff; - } -} - -Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) { - writeUInt32(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) { - writeUInt32(this, value, offset, true, noAssert); -}; - - -/* - * We now move onto our friends in the signed number category. Unlike unsigned - * numbers, we're going to have to worry a bit more about how we put values into - * arrays. Since we are only worrying about signed 32-bit values, we're in - * slightly better shape. Unfortunately, we really can't do our favorite binary - * & in this system. It really seems to do the wrong thing. For example: - * - * > -32 & 0xff - * 224 - * - * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of - * this aren't treated as a signed number. Ultimately a bad thing. - * - * What we're going to want to do is basically create the unsigned equivalent of - * our representation and pass that off to the wuint* functions. To do that - * we're going to do the following: - * - * - if the value is positive - * we can pass it directly off to the equivalent wuint - * - if the value is negative - * we do the following computation: - * mb + val + 1, where - * mb is the maximum unsigned value in that byte size - * val is the Javascript negative integer - * - * - * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If - * you do out the computations: - * - * 0xffff - 128 + 1 - * 0xffff - 127 - * 0xff80 - * - * You can then encode this value as the signed version. This is really rather - * hacky, but it should work and get the job done which is our goal here. - */ - -/* - * A series of checks to make sure we actually have a signed 32-bit number - */ -function verifsint(value, max, min) { - assert.ok(typeof (value) == 'number', - 'cannot write a non-number as a number'); - - assert.ok(value <= max, 'value larger than maximum allowed value'); - - assert.ok(value >= min, 'value smaller than minimum allowed value'); - - assert.ok(Math.floor(value) === value, 'value has a fractional component'); -} - -function verifIEEE754(value, max, min) { - assert.ok(typeof (value) == 'number', - 'cannot write a non-number as a number'); - - assert.ok(value <= max, 'value larger than maximum allowed value'); - - assert.ok(value >= min, 'value smaller than minimum allowed value'); -} - -Buffer.prototype.writeInt8 = function(value, offset, noAssert) { - var buffer = this; - - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'Trying to write beyond buffer length'); - - verifsint(value, 0x7f, -0x80); - } - - if (value >= 0) { - buffer.writeUInt8(value, offset, noAssert); - } else { - buffer.writeUInt8(0xff + value + 1, offset, noAssert); - } -}; - -function writeInt16(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'Trying to write beyond buffer length'); - - verifsint(value, 0x7fff, -0x8000); - } - - if (value >= 0) { - writeUInt16(buffer, value, offset, isBigEndian, noAssert); - } else { - writeUInt16(buffer, 0xffff + value + 1, offset, isBigEndian, noAssert); - } -} - -Buffer.prototype.writeInt16LE = function(value, offset, noAssert) { - writeInt16(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeInt16BE = function(value, offset, noAssert) { - writeInt16(this, value, offset, true, noAssert); -}; - -function writeInt32(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to write beyond buffer length'); - - verifsint(value, 0x7fffffff, -0x80000000); - } - - if (value >= 0) { - writeUInt32(buffer, value, offset, isBigEndian, noAssert); - } else { - writeUInt32(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert); - } -} - -Buffer.prototype.writeInt32LE = function(value, offset, noAssert) { - writeInt32(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeInt32BE = function(value, offset, noAssert) { - writeInt32(this, value, offset, true, noAssert); -}; - -function writeFloat(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to write beyond buffer length'); - - verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38); - } - - require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian, - 23, 4); -} - -Buffer.prototype.writeFloatLE = function(value, offset, noAssert) { - writeFloat(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeFloatBE = function(value, offset, noAssert) { - writeFloat(this, value, offset, true, noAssert); -}; - -function writeDouble(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 7 < buffer.length, - 'Trying to write beyond buffer length'); - - verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308); - } - - require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian, - 52, 8); -} - -Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) { - writeDouble(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { - writeDouble(this, value, offset, true, noAssert); -}; - -},{"./buffer_ieee754":1,"assert":6,"base64-js":4}],"buffer-browserify":[function(require,module,exports){ -module.exports=require('q9TxCC'); -},{}],4:[function(require,module,exports){ -(function (exports) { - 'use strict'; - - var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - - function b64ToByteArray(b64) { - var i, j, l, tmp, placeHolders, arr; - - if (b64.length % 4 > 0) { - throw 'Invalid string. Length must be a multiple of 4'; - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - placeHolders = b64.indexOf('='); - placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0; - - // base64 is 4/3 + up to two characters of the original data - arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders); - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length; - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]); - arr.push((tmp & 0xFF0000) >> 16); - arr.push((tmp & 0xFF00) >> 8); - arr.push(tmp & 0xFF); - } - - if (placeHolders === 2) { - tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4); - arr.push(tmp & 0xFF); - } else if (placeHolders === 1) { - tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2); - arr.push((tmp >> 8) & 0xFF); - arr.push(tmp & 0xFF); - } - - return arr; - } - - function uint8ToBase64(uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length; - - function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; - }; - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output += tripletToBase64(temp); - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1]; - output += lookup[temp >> 2]; - output += lookup[(temp << 4) & 0x3F]; - output += '=='; - break; - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); - output += lookup[temp >> 10]; - output += lookup[(temp >> 4) & 0x3F]; - output += lookup[(temp << 2) & 0x3F]; - output += '='; - break; - } - - return output; - } - - module.exports.toByteArray = b64ToByteArray; - module.exports.fromByteArray = uint8ToBase64; -}()); - -},{}],5:[function(require,module,exports){ - - -// -// The shims in this file are not fully implemented shims for the ES5 -// features, but do work for the particular usecases there is in -// the other modules. -// - -var toString = Object.prototype.toString; -var hasOwnProperty = Object.prototype.hasOwnProperty; - -// Array.isArray is supported in IE9 -function isArray(xs) { - return toString.call(xs) === '[object Array]'; -} -exports.isArray = typeof Array.isArray === 'function' ? Array.isArray : isArray; - -// Array.prototype.indexOf is supported in IE9 -exports.indexOf = function indexOf(xs, x) { - if (xs.indexOf) return xs.indexOf(x); - for (var i = 0; i < xs.length; i++) { - if (x === xs[i]) return i; - } - return -1; -}; - -// Array.prototype.filter is supported in IE9 -exports.filter = function filter(xs, fn) { - if (xs.filter) return xs.filter(fn); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (fn(xs[i], i, xs)) res.push(xs[i]); - } - return res; -}; - -// Array.prototype.forEach is supported in IE9 -exports.forEach = function forEach(xs, fn, self) { - if (xs.forEach) return xs.forEach(fn, self); - for (var i = 0; i < xs.length; i++) { - fn.call(self, xs[i], i, xs); - } -}; - -// Array.prototype.map is supported in IE9 -exports.map = function map(xs, fn) { - if (xs.map) return xs.map(fn); - var out = new Array(xs.length); - for (var i = 0; i < xs.length; i++) { - out[i] = fn(xs[i], i, xs); - } - return out; -}; - -// Array.prototype.reduce is supported in IE9 -exports.reduce = function reduce(array, callback, opt_initialValue) { - if (array.reduce) return array.reduce(callback, opt_initialValue); - var value, isValueSet = false; - - if (2 < arguments.length) { - value = opt_initialValue; - isValueSet = true; - } - for (var i = 0, l = array.length; l > i; ++i) { - if (array.hasOwnProperty(i)) { - if (isValueSet) { - value = callback(value, array[i], i, array); - } - else { - value = array[i]; - isValueSet = true; - } - } - } - - return value; -}; - -// String.prototype.substr - negative index don't work in IE8 -if ('ab'.substr(-1) !== 'b') { - exports.substr = function (str, start, length) { - // did we get a negative start, calculate how much it is from the beginning of the string - if (start < 0) start = str.length + start; - - // call the original function - return str.substr(start, length); - }; -} else { - exports.substr = function (str, start, length) { - return str.substr(start, length); - }; -} - -// String.prototype.trim is supported in IE9 -exports.trim = function (str) { - if (str.trim) return str.trim(); - return str.replace(/^\s+|\s+$/g, ''); -}; - -// Function.prototype.bind is supported in IE9 -exports.bind = function () { - var args = Array.prototype.slice.call(arguments); - var fn = args.shift(); - if (fn.bind) return fn.bind.apply(fn, args); - var self = args.shift(); - return function () { - fn.apply(self, args.concat([Array.prototype.slice.call(arguments)])); - }; -}; - -// Object.create is supported in IE9 -function create(prototype, properties) { - var object; - if (prototype === null) { - object = { '__proto__' : null }; - } - else { - if (typeof prototype !== 'object') { - throw new TypeError( - 'typeof prototype[' + (typeof prototype) + '] != \'object\'' - ); - } - var Type = function () {}; - Type.prototype = prototype; - object = new Type(); - object.__proto__ = prototype; - } - if (typeof properties !== 'undefined' && Object.defineProperties) { - Object.defineProperties(object, properties); - } - return object; -} -exports.create = typeof Object.create === 'function' ? Object.create : create; - -// Object.keys and Object.getOwnPropertyNames is supported in IE9 however -// they do show a description and number property on Error objects -function notObject(object) { - return ((typeof object != "object" && typeof object != "function") || object === null); -} - -function keysShim(object) { - if (notObject(object)) { - throw new TypeError("Object.keys called on a non-object"); - } - - var result = []; - for (var name in object) { - if (hasOwnProperty.call(object, name)) { - result.push(name); - } - } - return result; -} - -// getOwnPropertyNames is almost the same as Object.keys one key feature -// is that it returns hidden properties, since that can't be implemented, -// this feature gets reduced so it just shows the length property on arrays -function propertyShim(object) { - if (notObject(object)) { - throw new TypeError("Object.getOwnPropertyNames called on a non-object"); - } - - var result = keysShim(object); - if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) { - result.push('length'); - } - return result; -} - -var keys = typeof Object.keys === 'function' ? Object.keys : keysShim; -var getOwnPropertyNames = typeof Object.getOwnPropertyNames === 'function' ? - Object.getOwnPropertyNames : propertyShim; - -if (new Error().hasOwnProperty('description')) { - var ERROR_PROPERTY_FILTER = function (obj, array) { - if (toString.call(obj) === '[object Error]') { - array = exports.filter(array, function (name) { - return name !== 'description' && name !== 'number' && name !== 'message'; - }); - } - return array; - }; - - exports.keys = function (object) { - return ERROR_PROPERTY_FILTER(object, keys(object)); - }; - exports.getOwnPropertyNames = function (object) { - return ERROR_PROPERTY_FILTER(object, getOwnPropertyNames(object)); - }; -} else { - exports.keys = keys; - exports.getOwnPropertyNames = getOwnPropertyNames; -} - -// Object.getOwnPropertyDescriptor - supported in IE8 but only on dom elements -function valueObject(value, key) { - return { value: value[key] }; -} - -if (typeof Object.getOwnPropertyDescriptor === 'function') { - try { - Object.getOwnPropertyDescriptor({'a': 1}, 'a'); - exports.getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - } catch (e) { - // IE8 dom element issue - use a try catch and default to valueObject - exports.getOwnPropertyDescriptor = function (value, key) { - try { - return Object.getOwnPropertyDescriptor(value, key); - } catch (e) { - return valueObject(value, key); - } - }; - } -} else { - exports.getOwnPropertyDescriptor = valueObject; -} - -},{}],6:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// UTILITY -var util = require('util'); -var shims = require('_shims'); -var pSlice = Array.prototype.slice; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - this.message = options.message || getMessage(this); -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try { - var ka = shims.keys(a), - kb = shims.keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; -},{"_shims":5,"util":7}],7:[function(require,module,exports){ +},{"__browserify_process":4,"_shims":1,"util":3}],3:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -3275,7 +897,11 @@ function isPrimitive(arg) { exports.isPrimitive = isPrimitive; function isBuffer(arg) { - return arg instanceof Buffer; + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.binarySlice === 'function' + ; } exports.isBuffer = isBuffer; @@ -3349,10 +975,7 @@ function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -},{"_shims":5}]},{},[]) -;;module.exports=require("buffer-browserify") - -},{}],5:[function(require,module,exports){ +},{"_shims":1}],4:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -3406,7 +1029,7 @@ process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; -},{}],6:[function(require,module,exports){ +},{}],5:[function(require,module,exports){ /* Copyright (C) 2013 Ariya Hidayat Copyright (C) 2013 Thaddee Tyl @@ -3454,6 +1077,7 @@ parseStatement: true, parseSourceElement: true, parseModuleBlock: true, parseCon advanceXJSChild: true, isXJSIdentifierStart: true, isXJSIdentifierPart: true, scanXJSStringLiteral: true, scanXJSIdentifier: true, parseXJSAttributeValue: true, parseXJSChild: true, parseXJSElement: true, parseXJSExpressionContainer: true, parseXJSEmptyExpression: true, +parseTypeAnnotation: true, parseTypeAnnotatableIdentifier: true, parseYieldExpression: true */ @@ -5096,61 +2720,63 @@ parseYieldExpression: true }, createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression, - returnTypeAnnotation) { + returnType) { return { type: Syntax.FunctionDeclaration, id: id, params: params, defaults: defaults, - returnType: returnTypeAnnotation, body: body, rest: rest, generator: generator, - expression: expression + expression: expression, + returnType: returnType }; }, createFunctionExpression: function (id, params, defaults, body, rest, generator, expression, - returnTypeAnnotation) { + returnType) { return { type: Syntax.FunctionExpression, id: id, params: params, defaults: defaults, - returnType: returnTypeAnnotation, body: body, rest: rest, generator: generator, - expression: expression + expression: expression, + returnType: returnType }; }, createIdentifier: function (name) { return { type: Syntax.Identifier, - name: name + name: name, + // Only here to initialize the shape of the object to ensure + // that the 'typeAnnotation' key is ordered before others that + // are added later (like 'loc' and 'range'). This just helps + // keep the shape of Identifier nodes consistent with everything + // else. + typeAnnotation: undefined }; }, - createTypeAnnotatedIdentifier: function (annotation, identifier) { - return { - type: Syntax.TypeAnnotatedIdentifier, - annotation: annotation, - identifier: identifier - }; - }, - - createTypeAnnotation: function (annotatedType, templateTypes, - paramTypes, returnType, unionType, - nullable) { + createTypeAnnotation: function (typeIdentifier, paramTypes, returnType, isNullable) { return { type: Syntax.TypeAnnotation, - annotatedType: annotatedType, - templateTypes: templateTypes, + id: typeIdentifier, paramTypes: paramTypes, returnType: returnType, - unionType: unionType, - nullable: nullable + isNullable: isNullable + }; + }, + + createTypeAnnotatedIdentifier: function (identifier, annotation) { + return { + type: Syntax.TypeAnnotatedIdentifier, + id: identifier, + annotation: annotation }; }, @@ -5481,11 +3107,10 @@ parseYieldExpression: true }; }, - createExportDeclaration: function (def, declaration, specifiers, source) { + createExportDeclaration: function (declaration, specifiers, source) { return { type: Syntax.ExportDeclaration, declaration: declaration, - default: def, specifiers: specifiers, source: source }; @@ -5879,7 +3504,7 @@ parseYieldExpression: true key = parseObjectPropertyKey(); expect('('); token = lookahead; - param = [ parseVariableIdentifier() ]; + param = [ parseTypeAnnotatableIdentifier() ]; expect(')'); return delegate.createProperty('set', key, parsePropertyFunction({ params: param, generator: false, name: token }), false, false); } @@ -6690,6 +4315,50 @@ parseYieldExpression: true // 12.2 Variable Statement + function parseTypeAnnotation(dontExpectColon) { + var typeIdentifier = null, paramTypes = null, returnType = null, + isNullable = false; + + if (!dontExpectColon) { + expect(':'); + } + + if (match('?')) { + lex(); + isNullable = true; + } + + if (lookahead.type === Token.Identifier) { + typeIdentifier = parseVariableIdentifier(); + } + + if (match('(')) { + lex(); + paramTypes = []; + while (lookahead.type === Token.Identifier || match('?')) { + paramTypes.push(parseTypeAnnotation(true)); + if (!match(')')) { + expect(','); + } + } + expect(')'); + expect('=>'); + + if (matchKeyword('void')) { + lex(); + } else { + returnType = parseTypeAnnotation(true); + } + } + + return delegate.createTypeAnnotation( + typeIdentifier, + paramTypes, + returnType, + isNullable + ); + } + function parseVariableIdentifier() { var token = lex(); @@ -6700,98 +4369,14 @@ parseYieldExpression: true return delegate.createIdentifier(token.value); } - function parseTypeAnnotation() { - var isNullable = false, paramTypes = null, returnType = null, - templateTypes = null, type, unionType = null; + function parseTypeAnnotatableIdentifier() { + var ident = parseVariableIdentifier(); - if (match('?')) { - lex(); - isNullable = true; + if (match(':')) { + return delegate.createTypeAnnotatedIdentifier(ident, parseTypeAnnotation()); } - type = parseVariableIdentifier(); - - if (match('<')) { - lex(); - templateTypes = []; - while (lookahead.type === Token.Identifier || match('?')) { - templateTypes.push(parseTypeAnnotation()); - if (!match('>')) { - expect(','); - } - } - expect('>'); - } - - if (match('(')) { - lex(); - paramTypes = []; - while (lookahead.type === Token.Identifier || match('?')) { - paramTypes.push(parseTypeAnnotation()); - if (!match(')')) { - expect(','); - } - } - expect(')'); - - if (match(':')) { - lex(); - returnType = parseTypeAnnotation(); - } - } - - if (match('|')) { - lex(); - unionType = parseTypeAnnotation(); - } - - return delegate.createTypeAnnotation( - type, - templateTypes, - paramTypes, - returnType, - unionType, - isNullable - ); - } - - function parseAnnotatableIdentifier() { - var annotation, annotationLookahead, annotationPresent, identifier, - matchesNullableToken; - - matchesNullableToken = match('?'); - - if (lookahead.type !== Token.Identifier && !matchesNullableToken) { - throwUnexpected(lookahead); - } - - if (!matchesNullableToken) { - annotationLookahead = lookahead2(); - } - - annotationPresent = - matchesNullableToken - - // function (number numVal) {} - || annotationLookahead.type === Token.Identifier - - // function (fn(number)|array param) {} - || (annotationLookahead.type === Token.Punctuator - && (annotationLookahead.value === '(' - || annotationLookahead.value === '<' - || annotationLookahead.value === '|')); - - if (!annotationPresent) { - return parseVariableIdentifier(); - } - - annotation = parseTypeAnnotation(); - identifier = parseVariableIdentifier(); - - return delegate.createTypeAnnotatedIdentifier( - annotation, - identifier - ); + return ident; } function parseVariableDeclaration(kind) { @@ -6804,11 +4389,7 @@ parseYieldExpression: true id = parseArrayInitialiser(); reinterpretAsAssignmentBindingPattern(id); } else { - if (state.allowDefault) { - id = matchKeyword('default') ? parseNonComputedProperty() : parseVariableIdentifier(); - } else { - id = parseVariableIdentifier(); - } + id = state.allowKeyword ? parseNonComputedProperty() : parseTypeAnnotatableIdentifier(); // 12.2.1 if (strict && isRestrictedWord(id.name)) { throwErrorTolerant({}, Messages.StrictVarName); @@ -6926,36 +4507,10 @@ parseYieldExpression: true } function parseExportDeclaration() { - var previousAllowDefault, decl, def, src, specifiers; + var previousAllowKeyword, decl, def, src, specifiers; expectKeyword('export'); - if (matchKeyword('default')) { - lex(); - if (match('=')) { - lex(); - def = parseAssignmentExpression(); - } else if (lookahead.type === Token.Keyword) { - switch (lookahead.value) { - case 'let': - case 'const': - case 'var': - case 'class': - def = parseSourceElement(); - break; - case 'function': - def = parseFunctionExpression(); - break; - default: - throwUnexpected(lex()); - } - } else { - def = parseAssignmentExpression(); - } - consumeSemicolon(); - return delegate.createExportDeclaration(true, def, null, null); - } - if (lookahead.type === Token.Keyword) { switch (lookahead.value) { case 'let': @@ -6963,13 +4518,16 @@ parseYieldExpression: true case 'var': case 'class': case 'function': - previousAllowDefault = state.allowDefault; - state.allowDefault = true; - decl = delegate.createExportDeclaration(false, parseSourceElement(), null, null); - state.allowDefault = previousAllowDefault; - return decl; + return delegate.createExportDeclaration(parseSourceElement(), null, null); } - throwUnexpected(lex()); + } + + if (isIdentifierName(lookahead)) { + previousAllowKeyword = state.allowKeyword; + state.allowKeyword = true; + decl = parseVariableDeclarationList('let'); + state.allowKeyword = previousAllowKeyword; + return delegate.createExportDeclaration(decl, null, null); } specifiers = []; @@ -6995,7 +4553,7 @@ parseYieldExpression: true consumeSemicolon(); - return delegate.createExportDeclaration(false, null, specifiers, src); + return delegate.createExportDeclaration(null, specifiers, src); } function parseImportDeclaration() { @@ -7733,12 +5291,10 @@ parseYieldExpression: true param = parseObjectInitialiser(); reinterpretAsDestructuredParameter(options, param); } else { - // We don't currently support typed rest params because doing so is - // a bit awkward. We may come back to this, but for now we'll punt - // on it. + // Typing rest params is awkward, so punting on that for now param = rest ? parseVariableIdentifier() - : parseAnnotatableIdentifier(); + : parseTypeAnnotatableIdentifier(); validateParam(options, token, token.value); if (match('=')) { if (rest) { @@ -7793,7 +5349,6 @@ parseYieldExpression: true } if (match(':')) { - lex(); options.returnTypeAnnotation = parseTypeAnnotation(); } @@ -7813,11 +5368,8 @@ parseYieldExpression: true token = lookahead; - if (state.allowDefault) { - id = matchKeyword('default') ? parseNonComputedProperty() : parseVariableIdentifier(); - } else { - id = parseVariableIdentifier(); - } + id = parseVariableIdentifier(); + if (strict) { if (isRestrictedWord(token.value)) { throwErrorTolerant(token, Messages.StrictFunctionName); @@ -8025,7 +5577,7 @@ parseYieldExpression: true expect('('); token = lookahead; - param = [ parseVariableIdentifier() ]; + param = [ parseTypeAnnotatableIdentifier() ]; expect(')'); return delegate.createMethodDefinition( propType, @@ -8109,11 +5661,7 @@ parseYieldExpression: true expectKeyword('class'); - if (state.allowDefault) { - id = matchKeyword('default') ? parseNonComputedProperty() : parseVariableIdentifier(); - } else { - id = parseVariableIdentifier(); - } + id = parseVariableIdentifier(); if (matchKeyword('extends')) { expectKeyword('extends'); @@ -9377,13 +6925,13 @@ parseYieldExpression: true extra.parseSpreadOrAssignmentExpression = parseSpreadOrAssignmentExpression; extra.parseTemplateElement = parseTemplateElement; extra.parseTemplateLiteral = parseTemplateLiteral; + extra.parseTypeAnnotatableIdentifier = parseTypeAnnotatableIdentifier; + extra.parseTypeAnnotation = parseTypeAnnotation; extra.parseStatement = parseStatement; extra.parseSwitchCase = parseSwitchCase; extra.parseUnaryExpression = parseUnaryExpression; extra.parseVariableDeclaration = parseVariableDeclaration; extra.parseVariableIdentifier = parseVariableIdentifier; - extra.parseAnnotatableIdentifier = parseAnnotatableIdentifier; - extra.parseTypeAnnotation = parseTypeAnnotation; extra.parseMethodDefinition = parseMethodDefinition; extra.parseClassDeclaration = parseClassDeclaration; extra.parseClassExpression = parseClassExpression; @@ -9429,14 +6977,14 @@ parseYieldExpression: true parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); parseTemplateElement = wrapTracking(extra.parseTemplateElement); parseTemplateLiteral = wrapTracking(extra.parseTemplateLiteral); + parseTypeAnnotatableIdentifier = wrapTracking(extra.parseTypeAnnotatableIdentifier); + parseTypeAnnotation = wrapTracking(extra.parseTypeAnnotation); parseSpreadOrAssignmentExpression = wrapTracking(extra.parseSpreadOrAssignmentExpression); parseStatement = wrapTracking(extra.parseStatement); parseSwitchCase = wrapTracking(extra.parseSwitchCase); parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); - parseAnnotatableIdentifier = wrapTracking(extra.parseAnnotatableIdentifier); - parseTypeAnnotation = wrapTracking(extra.parseTypeAnnotation); parseMethodDefinition = wrapTracking(extra.parseMethodDefinition); parseClassDeclaration = wrapTracking(extra.parseClassDeclaration); parseClassExpression = wrapTracking(extra.parseClassExpression); @@ -9499,14 +7047,14 @@ parseYieldExpression: true parsePropertyFunction = extra.parsePropertyFunction; parseTemplateElement = extra.parseTemplateElement; parseTemplateLiteral = extra.parseTemplateLiteral; + parseTypeAnnotatableIdentifier = extra.parseTypeAnnotatableIdentifier; + parseTypeAnnotation = extra.parseTypeAnnotation; parseSpreadOrAssignmentExpression = extra.parseSpreadOrAssignmentExpression; parseStatement = extra.parseStatement; parseSwitchCase = extra.parseSwitchCase; parseUnaryExpression = extra.parseUnaryExpression; parseVariableDeclaration = extra.parseVariableDeclaration; parseVariableIdentifier = extra.parseVariableIdentifier; - parseAnnotatableIdentifier = extra.parseAnnotatableIdentifier; - parseTypeAnnotation = extra.parseTypeAnnotation; parseMethodDefinition = extra.parseMethodDefinition; parseClassDeclaration = extra.parseClassDeclaration; parseClassExpression = extra.parseClassExpression; @@ -9566,7 +7114,7 @@ parseYieldExpression: true length = source.length; lookahead = null; state = { - allowDefault: true, + allowKeyword: true, allowIn: true, labelSet: {}, inFunctionBody: false, @@ -9667,7 +7215,7 @@ parseYieldExpression: true length = source.length; lookahead = null; state = { - allowDefault: false, + allowKeyword: false, allowIn: true, labelSet: {}, parenthesizedCount: 0, @@ -9772,7 +7320,7 @@ parseYieldExpression: true })); /* vim: set sw=4 ts=4 et tw=80 : */ -},{}],7:[function(require,module,exports){ +},{}],6:[function(require,module,exports){ var Base62 = (function (my) { my.chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] @@ -9800,7 +7348,7 @@ var Base62 = (function (my) { }({})); module.exports = Base62 -},{}],8:[function(require,module,exports){ +},{}],7:[function(require,module,exports){ /* * Copyright 2009-2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE.txt or: @@ -9810,7 +7358,7 @@ exports.SourceMapGenerator = require('./source-map/source-map-generator').Source exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; exports.SourceNode = require('./source-map/source-node').SourceNode; -},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(require,module,exports){ +},{"./source-map/source-map-consumer":12,"./source-map/source-map-generator":13,"./source-map/source-node":14}],8:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -9919,7 +7467,7 @@ define(function (require, exports, module) { }); -},{"amdefine":17}],10:[function(require,module,exports){ +},{"amdefine":16}],9:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -10065,7 +7613,7 @@ define(function (require, exports, module) { }); -},{"./base64":11,"amdefine":17}],11:[function(require,module,exports){ +},{"./base64":10,"amdefine":16}],10:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -10109,7 +7657,7 @@ define(function (require, exports, module) { }); -},{"amdefine":17}],12:[function(require,module,exports){ +},{"amdefine":16}],11:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -10192,7 +7740,7 @@ define(function (require, exports, module) { }); -},{"amdefine":17}],13:[function(require,module,exports){ +},{"amdefine":16}],12:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -10573,7 +8121,7 @@ define(function (require, exports, module) { }); -},{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,"amdefine":17}],14:[function(require,module,exports){ +},{"./array-set":8,"./base64-vlq":9,"./binary-search":11,"./util":15,"amdefine":16}],13:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -10777,7 +8325,7 @@ define(function (require, exports, module) { }); -},{"./array-set":9,"./base64-vlq":10,"./util":16,"amdefine":17}],15:[function(require,module,exports){ +},{"./array-set":8,"./base64-vlq":9,"./util":15,"amdefine":16}],14:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -10978,7 +8526,7 @@ define(function (require, exports, module) { }); -},{"./source-map-generator":14,"amdefine":17}],16:[function(require,module,exports){ +},{"./source-map-generator":13,"amdefine":16}],15:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -11020,7 +8568,7 @@ define(function (require, exports, module) { }); -},{"amdefine":17}],17:[function(require,module,exports){ +},{"amdefine":16}],16:[function(require,module,exports){ var process=require("__browserify_process"),__filename="/../node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js";/** vim: et:ts=4:sw=4:sts=4 * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. @@ -11321,7 +8869,7 @@ function amdefine(module, requireFn) { module.exports = amdefine; -},{"__browserify_process":5,"path":2}],18:[function(require,module,exports){ +},{"__browserify_process":4,"path":2}],17:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -11409,7 +8957,7 @@ exports.extract = extract; exports.parse = parse; exports.parseAsObject = parseAsObject; -},{}],19:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -11658,7 +9206,7 @@ function transform(visitors, source, options) { exports.transform = transform; -},{"./utils":20,"esprima-fb":6,"source-map":8}],20:[function(require,module,exports){ +},{"./utils":19,"esprima-fb":5,"source-map":7}],19:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -12139,7 +9687,7 @@ exports.updateIndent = updateIndent; exports.updateState = updateState; exports.analyzeAndTraverse = analyzeAndTraverse; -},{"./docblock":18}],21:[function(require,module,exports){ +},{"./docblock":17}],20:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -12619,7 +10167,7 @@ exports.visitorList = [ visitSuperMemberExpression ]; -},{"../src/utils":20,"base62":7,"esprima-fb":6}],22:[function(require,module,exports){ +},{"../src/utils":19,"base62":6,"esprima-fb":5}],21:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -12665,7 +10213,7 @@ var run = exports.run = function(code) { var functionBody = jsx ? transform(code).code : code; var scriptEl = document.createElement('script'); - scriptEl.innerHTML = functionBody; + scriptEl.text = functionBody; headEl.appendChild(scriptEl); }; @@ -12697,11 +10245,15 @@ var load = exports.load = function(url, callback) { runScripts = function() { var scripts = document.getElementsByTagName('script'); - scripts = Array.prototype.slice.call(scripts); - var jsxScripts = scripts.filter(function(script) { - return script.type === 'text/jsx'; - }); - + + // Array.prototype.slice cannot be used on NodeList on IE8 + var jsxScripts = []; + for (var i = 0; i < scripts.length; i++) { + if (scripts.item(i).type === 'text/jsx') { + jsxScripts.push(scripts.item(i)); + } + } + console.warn("You are using the in-browser JSX transformer. Be sure to precompile your JSX for production - http://facebook.github.io/react/docs/tooling-integration.html#jsx"); jsxScripts.forEach(function(script) { @@ -12719,7 +10271,7 @@ if (window.addEventListener) { window.attachEvent('onload', runScripts); } -},{"./fbtransform/visitors":26,"jstransform":19,"jstransform/src/docblock":18}],23:[function(require,module,exports){ +},{"./fbtransform/visitors":25,"jstransform":18,"jstransform/src/docblock":17}],22:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -12739,12 +10291,7 @@ if (window.addEventListener) { "use strict"; var Syntax = require('esprima-fb').Syntax; - -var catchup = require('jstransform/src/utils').catchup; -var catchupWhiteSpace = require('jstransform/src/utils').catchupWhiteSpace; -var append = require('jstransform/src/utils').append; -var move = require('jstransform/src/utils').move; -var getDocblock = require('jstransform/src/utils').getDocblock; +var utils = require('jstransform/src/utils'); var FALLBACK_TAGS = require('./xjs').knownTags; var renderXJSExpressionContainer = @@ -12778,9 +10325,9 @@ var JSX_ATTRIBUTE_TRANSFORMS = { }; function visitReactTag(traverse, object, path, state) { - var jsxObjIdent = getDocblock(state).jsx; + var jsxObjIdent = utils.getDocblock(state).jsx; - catchup(object.openingElement.range[0], state); + utils.catchup(object.openingElement.range[0], state); if (object.name.namespace) { throw new Error( @@ -12788,12 +10335,12 @@ function visitReactTag(traverse, object, path, state) { } var isFallbackTag = FALLBACK_TAGS[object.name.name]; - append( + utils.append( (isFallbackTag ? jsxObjIdent + '.' : '') + (object.name.name) + '(', state ); - move(object.name.range[1], state); + utils.move(object.name.range[1], state); var childrenToRender = object.children.filter(function(child) { return !(child.type === Syntax.Literal && !child.value.match(/\S/)); @@ -12801,12 +10348,12 @@ function visitReactTag(traverse, object, path, state) { // if we don't have any attributes, pass in null if (object.attributes.length === 0) { - append('null', state); + utils.append('null', state); } // write attributes object.attributes.forEach(function(attr, index) { - catchup(attr.range[0], state); + utils.catchup(attr.range[0], state); if (attr.name.namespace) { throw new Error( 'Namespace attributes are not supported. ReactJSX is not XML.'); @@ -12816,27 +10363,27 @@ function visitReactTag(traverse, object, path, state) { var isLast = index === object.attributes.length - 1; if (isFirst) { - append('{', state); + utils.append('{', state); } - append(quoteAttrName(name), state); - append(':', state); + utils.append(quoteAttrName(name), state); + utils.append(':', state); if (!attr.value) { state.g.buffer += 'true'; state.g.position = attr.name.range[1]; if (!isLast) { - append(',', state); + utils.append(',', state); } } else { - move(attr.name.range[1], state); + utils.move(attr.name.range[1], state); // Use catchupWhiteSpace to skip over the '=' in the attribute - catchupWhiteSpace(attr.value.range[0], state); + utils.catchupWhiteSpace(attr.value.range[0], state); if (JSX_ATTRIBUTE_TRANSFORMS[attr.name.name]) { - append(JSX_ATTRIBUTE_TRANSFORMS[attr.name.name](attr), state); - move(attr.value.range[1], state); + utils.append(JSX_ATTRIBUTE_TRANSFORMS[attr.name.name](attr), state); + utils.move(attr.value.range[1], state); if (!isLast) { - append(',', state); + utils.append(',', state); } } else if (attr.value.type === Syntax.Literal) { renderXJSLiteral(attr.value, isLast, state); @@ -12846,26 +10393,26 @@ function visitReactTag(traverse, object, path, state) { } if (isLast) { - append('}', state); + utils.append('}', state); } - catchup(attr.range[1], state); + utils.catchup(attr.range[1], state); }); if (!object.selfClosing) { - catchup(object.openingElement.range[1] - 1, state); - move(object.openingElement.range[1], state); + utils.catchup(object.openingElement.range[1] - 1, state); + utils.move(object.openingElement.range[1], state); } // filter out whitespace if (childrenToRender.length > 0) { - append(', ', state); + utils.append(', ', state); object.children.forEach(function(child) { if (child.type === Syntax.Literal && !child.value.match(/\S/)) { return; } - catchup(child.range[0], state); + utils.catchup(child.range[0], state); var isLast = child === childrenToRender[childrenToRender.length - 1]; @@ -12876,38 +10423,38 @@ function visitReactTag(traverse, object, path, state) { } else { traverse(child, path, state); if (!isLast) { - append(',', state); + utils.append(',', state); state.g.buffer = state.g.buffer.replace(/(\s*),$/, ',$1'); } } - catchup(child.range[1], state); + utils.catchup(child.range[1], state); }); } if (object.selfClosing) { // everything up to /> - catchup(object.openingElement.range[1] - 2, state); - move(object.openingElement.range[1], state); + utils.catchup(object.openingElement.range[1] - 2, state); + utils.move(object.openingElement.range[1], state); } else { // everything up to - catchup(object.closingElement.range[0], state); - move(object.closingElement.range[1], state); + utils.catchup(object.closingElement.range[0], state); + utils.move(object.closingElement.range[1], state); } - append(')', state); + utils.append(')', state); return false; } visitReactTag.test = function(object, path, state) { // only run react when react @jsx namespace is specified in docblock - var jsx = getDocblock(state).jsx; + var jsx = utils.getDocblock(state).jsx; return object.type === Syntax.XJSElement && jsx && jsx.length; }; exports.visitReactTag = visitReactTag; -},{"./xjs":25,"esprima-fb":6,"jstransform/src/utils":20}],24:[function(require,module,exports){ +},{"./xjs":24,"esprima-fb":5,"jstransform/src/utils":19}],23:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -12927,9 +10474,7 @@ exports.visitReactTag = visitReactTag; "use strict"; var Syntax = require('esprima-fb').Syntax; -var catchup = require('jstransform/src/utils').catchup; -var append = require('jstransform/src/utils').append; -var getDocblock = require('jstransform/src/utils').getDocblock; +var utils = require('jstransform/src/utils'); /** * Transforms the following: @@ -12958,8 +10503,8 @@ function visitReactDisplayName(traverse, object, path, state) { object.init['arguments'][0].type === Syntax.ObjectExpression) { var displayName = object.id.name; - catchup(object.init['arguments'][0].range[0] + 1, state); - append("displayName: '" + displayName + "',", state); + utils.catchup(object.init['arguments'][0].range[0] + 1, state); + utils.append("displayName: '" + displayName + "',", state); } } @@ -12967,12 +10512,12 @@ function visitReactDisplayName(traverse, object, path, state) { * Will only run on @jsx files for now. */ visitReactDisplayName.test = function(object, path, state) { - return object.type === Syntax.VariableDeclarator && !!getDocblock(state).jsx; + return object.type === Syntax.VariableDeclarator && !!utils.getDocblock(state).jsx; }; exports.visitReactDisplayName = visitReactDisplayName; -},{"esprima-fb":6,"jstransform/src/utils":20}],25:[function(require,module,exports){ +},{"esprima-fb":5,"jstransform/src/utils":19}],24:[function(require,module,exports){ /** * Copyright 2013 Facebook, Inc. * @@ -13266,7 +10811,7 @@ exports.renderXJSExpressionContainer = renderXJSExpressionContainer; exports.renderXJSLiteral = renderXJSLiteral; exports.quoteAttrName = quoteAttrName; -},{"esprima-fb":6,"jstransform/src/utils":20}],26:[function(require,module,exports){ +},{"esprima-fb":5,"jstransform/src/utils":19}],25:[function(require,module,exports){ /*global exports:true*/ var es6Classes = require('jstransform/visitors/es6-class-visitors').visitorList; var react = require('./transforms/react'); @@ -13311,7 +10856,7 @@ function getVisitorsList(excludes) { exports.getVisitorsList = getVisitorsList; exports.transformVisitors = transformVisitors; -},{"./transforms/react":23,"./transforms/reactDisplayName":24,"jstransform/visitors/es6-class-visitors":21}]},{},[22]) -(22) +},{"./transforms/react":22,"./transforms/reactDisplayName":23,"jstransform/visitors/es6-class-visitors":20}]},{},[21]) +(21) }); ; \ No newline at end of file diff --git a/js/react.min.js b/js/react.min.js index eca5159b54..f19440222b 100644 --- a/js/react.min.js +++ b/js/react.min.js @@ -1,5 +1,5 @@ /** - * React v0.5.2 + * React v0.8.0 * * Copyright 2013 Facebook, Inc. * @@ -15,6 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.React=t():"undefined"!=typeof global?global.React=t():"undefined"!=typeof self&&(self.React=t())}(function(){return function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return o(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a8));var O=!1;C.canUseDOM&&(O=M("input")&&(!("documentMode"in document)||document.documentMode>9));var S={get:function(){return x.get.call(this)},set:function(t){I=""+t,x.set.call(this,t)}},w={eventTypes:N,extractEvents:function(t,e,r,o){var i,u;if(n(e)?P?i=a:u=s:R(e)?O?i=p:(i=h,u=d):f(e)&&(i=m),i){var c=i(t,e,r);if(c){var l=E.getPooled(N.change,c,o);return y.accumulateTwoPhaseDispatches(l),l}}u&&u(t,e,r)}};e.exports=w},{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./SyntheticEvent":64,"./isEventSupported":95,"./isTextInputElement":97,"./keyOf":101}],6:[function(t,e){"use strict";function n(t){switch(t){case v.topCompositionStart:return y.compositionStart;case v.topCompositionEnd:return y.compositionEnd;case v.topCompositionUpdate:return y.compositionUpdate}}function r(t,e){return t===v.topKeyDown&&e.keyCode===f}function o(t,e){switch(t){case v.topKeyUp:return-1!==h.indexOf(e.keyCode);case v.topKeyDown:return e.keyCode!==f;case v.topKeyPress:case v.topMouseDown:case v.topBlur:return!0;default:return!1}}function i(t){this.root=t,this.startSelection=c.getSelection(t),this.startValue=this.getText()}var a=t("./EventConstants"),s=t("./EventPropagators"),u=t("./ExecutionEnvironment"),c=t("./ReactInputSelection"),l=t("./SyntheticCompositionEvent"),p=t("./getTextContentAccessor"),d=t("./keyOf"),h=[9,13,27,32],f=229,m=u.canUseDOM&&"CompositionEvent"in window,v=a.topLevelTypes,g=null,y={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})}},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})}},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})}}};i.prototype.getText=function(){return this.root.value||this.root[p()]},i.prototype.getData=function(){var t=this.getText(),e=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return t.substr(e,t.length-n-e)};var C={eventTypes:y,extractEvents:function(t,e,a,u){var c,p;if(m?c=n(t):g?o(t,u)&&(c=y.compositionEnd,p=g.getData(),g=null):r(t,u)&&(c=y.start,g=new i(e)),c){var d=l.getPooled(c,a,u);return p&&(d.data=p),s.accumulateTwoPhaseDispatches(d),d}}};e.exports=C},{"./EventConstants":14,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":45,"./SyntheticCompositionEvent":63,"./getTextContentAccessor":92,"./keyOf":101}],7:[function(t,e){"use strict";function n(t,e,n){var r=t.childNodes;r[n]!==e&&(e.parentNode===t&&t.removeChild(e),n>=r.length?t.appendChild(e):t.insertBefore(e,r[n]))}var r=t("./Danger"),o=t("./ReactMultiChildUpdateTypes"),i=t("./getTextContentAccessor"),a=i()||"NA",s={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,processUpdates:function(t,e){for(var i,s=null,u=null,c=0;i=t[c];c++)if(i.type===o.MOVE_EXISTING||i.type===o.REMOVE_NODE){var l=i.fromIndex,p=i.parentNode.childNodes[l],d=i.parentID;s=s||{},s[d]=s[d]||[],s[d][l]=p,u=u||[],u.push(p)}var h=r.dangerouslyRenderMarkup(e);if(u)for(var f=0;f]+)/,l="data-danger-index",p={dangerouslyRenderMarkup:function(t){s(r.canUseDOM);for(var e,u={},p=0;pu;u++){var l=a[u];if(l){var p=l.extractEvents(t,e,n,o);p&&(i=s(i,p))}}return i},enqueueEvents:function(t){t&&(l=s(l,t))},processEventQueue:function(){var t=l;l=null,u(t,p),c(!l)}};a.canUseDOM&&(window.EventPluginHub=d),e.exports=d},{"./CallbackRegistry":4,"./EventPluginRegistry":17,"./EventPluginUtils":18,"./EventPropagators":19,"./ExecutionEnvironment":20,"./accumulate":73,"./forEachAccumulated":85,"./invariant":94}],17:[function(t,e){"use strict";function n(){if(a)for(var t in s){var e=s[t],n=a.indexOf(t);if(i(n>-1),!u.plugins[n]){i(e.extractEvents),u.plugins[n]=e;var o=e.eventTypes;for(var c in o)i(r(o[c],e))}}}function r(t,e){var n=t.phasedRegistrationNames;if(n){for(var r in n)if(n.hasOwnProperty(r)){var i=n[r];o(i,e)}return!0}return t.registrationName?(o(t.registrationName,e),!0):!1}function o(t,e){i(!u.registrationNames[t]),u.registrationNames[t]=e,u.registrationNamesKeys.push(t)}var i=t("./invariant"),a=null,s={},u={plugins:[],registrationNames:{},registrationNamesKeys:[],injectEventPluginOrder:function(t){i(!a),a=Array.prototype.slice.call(t),n()},injectEventPluginsByName:function(t){var e=!1;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];s[r]!==o&&(i(!s[r]),s[r]=o,e=!0)}e&&n()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return u.registrationNames[e.registrationName]||null;for(var n in e.phasedRegistrationNames)if(e.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNames[e.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];u.plugins.length=0;var e=u.registrationNames;for(var n in e)e.hasOwnProperty(n)&&delete e[n];u.registrationNamesKeys.length=0}};e.exports=u},{"./invariant":94}],18:[function(t,e){"use strict";function n(t){return t===h.topMouseUp||t===h.topTouchEnd||t===h.topTouchCancel}function r(t){return t===h.topMouseMove||t===h.topTouchMove}function o(t){return t===h.topMouseDown||t===h.topTouchStart}function i(t,e){var n=t._dispatchListeners,r=t._dispatchIDs;if(Array.isArray(n))for(var o=0;o1){for(var o=Array(n),i=0;n>i;i++)o[i]=arguments[i+1];this.props.children=o}},mountComponent:function(t,e,n){a(!this.isMounted());var r=this.props;null!=r.ref&&o.addComponentAsRefTo(this,r.ref,r.__owner__),this._rootNodeID=t,this._lifeCycleState=c.MOUNTED,this._mountDepth=n},unmountComponent:function(){a(this.isMounted());var t=this.props;null!=t.ref&&o.removeComponentAsRefFrom(this,t.ref,t.__owner__),l.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=c.UNMOUNTED},receiveProps:function(t,e){a(this.isMounted()),this._pendingProps=t,this._performUpdateIfNecessary(e)},performUpdateIfNecessary:function(){var t=l.ReactReconcileTransaction.getPooled();t.perform(this._performUpdateIfNecessary,this,t),l.ReactReconcileTransaction.release(t)},_performUpdateIfNecessary:function(t){if(null!=this._pendingProps){var e=this.props;this.props=this._pendingProps,this._pendingProps=null,this.updateComponent(t,e)}},updateComponent:function(t,e){var n=this.props;(n.__owner__!==e.__owner__||n.ref!==e.ref)&&(null!=e.ref&&o.removeComponentAsRefFrom(this,e.ref,e.__owner__),null!=n.ref&&o.addComponentAsRefTo(this,n.ref,n.__owner__))},mountComponentIntoNode:function(t,e,n){var r=l.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,t,e,r,n),l.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(t,e,n,r){var o=this.mountComponent(t,n,0);l.mountImageIntoNode(o,e,r)},isOwnedBy:function(t){return this.props.__owner__===t},getSiblingByRef:function(t){var e=this.props.__owner__;return e&&e.refs?e.refs[t]:null}})};e.exports=l},{"./ReactComponentEnvironment":27,"./ReactCurrentOwner":29,"./ReactOwner":52,"./ReactUpdates":59,"./invariant":94,"./keyMirror":100,"./merge":103}],26:[function(t,e){"use strict";var n=t("./ReactDOMIDOperations"),r=t("./ReactMarkupChecksum"),o=t("./ReactMount"),i=t("./ReactReconcileTransaction"),a=t("./getReactRootElementInContainer"),s=t("./invariant"),u=t("./mutateHTMLNodeWithMarkup"),c=1,l=9,p={Mixin:{getDOMNode:function(){return s(this.isMounted()),o.getNode(this._rootNodeID)}},ReactReconcileTransaction:i,DOMIDOperations:n,unmountIDFromEnvironment:function(t){o.purgeID(t)},mountImageIntoNode:function(t,e,n){if(s(e&&(e.nodeType===c||e.nodeType===l&&o.allowFullPageRender)),!n||!r.canReuseMarkup(t,a(e))){if(e.nodeType===l)return u(e.documentElement,t),void 0;var i=e.parentNode;if(i){var p=e.nextSibling;i.removeChild(e),e.innerHTML=t,p?i.insertBefore(e,p):i.appendChild(e)}else e.innerHTML=t}}};e.exports=p},{"./ReactDOMIDOperations":34,"./ReactMarkupChecksum":47,"./ReactMount":48,"./ReactReconcileTransaction":56,"./getReactRootElementInContainer":91,"./invariant":94,"./mutateHTMLNodeWithMarkup":107}],27:[function(t,e){var n=t("./ReactComponentBrowserEnvironment"),r=n;e.exports=r},{"./ReactComponentBrowserEnvironment":26}],28:[function(t,e){"use strict";function n(t,e){var n=E[e];D.hasOwnProperty(e)&&f(n===C.OVERRIDE_BASE),t.hasOwnProperty(e)&&f(n===C.DEFINE_MANY||n===C.DEFINE_MANY_MERGED)}function r(t){var e=t._compositeLifeCycleState;f(t.isMounted()||e===R.MOUNTING),f(e!==R.RECEIVING_STATE&&e!==R.UNMOUNTING)}function o(t,e){var r=t.prototype;for(var o in e){var i=e[o];if(e.hasOwnProperty(o)&&i)if(n(r,o),M.hasOwnProperty(o))M[o](t,i);else{var u=o in E,c=o in r,l=i.__reactDontBind,p="function"==typeof i,d=p&&!u&&!c&&!l;d?(r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=i,r[o]=i):r[o]=c?E[o]===C.DEFINE_MANY_MERGED?a(r[o],i):s(r[o],i):i}}}function i(t,e){return f(t&&e&&"object"==typeof t&&"object"==typeof e),y(e,function(e,n){f(void 0===t[n]),t[n]=e}),t}function a(t,e){return function(){return i(t.apply(this,arguments),e.apply(this,arguments))}}function s(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}var u=t("./ReactComponent"),c=t("./ReactCurrentOwner"),l=t("./ReactOwner"),p=t("./ReactPerf"),d=t("./ReactPropTransferer"),h=t("./ReactUpdates"),f=t("./invariant"),m=t("./keyMirror"),v=t("./merge"),g=t("./mixInto"),y=t("./objMap"),C=m({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),E={mixins:C.DEFINE_MANY,propTypes:C.DEFINE_ONCE,getDefaultProps:C.DEFINE_MANY_MERGED,getInitialState:C.DEFINE_MANY_MERGED,render:C.DEFINE_ONCE,componentWillMount:C.DEFINE_MANY,componentDidMount:C.DEFINE_MANY,componentWillReceiveProps:C.DEFINE_MANY,shouldComponentUpdate:C.DEFINE_ONCE,componentWillUpdate:C.DEFINE_MANY,componentDidUpdate:C.DEFINE_MANY,componentWillUnmount:C.DEFINE_MANY,updateComponent:C.OVERRIDE_BASE},M={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n",this.tagName=t.toUpperCase()}var o=t("./CSSPropertyOperations"),i=t("./DOMProperty"),a=t("./DOMPropertyOperations"),s=t("./ReactComponent"),u=t("./ReactEventEmitter"),c=t("./ReactMultiChild"),l=t("./ReactMount"),p=t("./ReactPerf"),d=t("./escapeTextForBrowser"),h=t("./invariant"),f=t("./keyOf"),m=t("./merge"),v=t("./mixInto"),g=u.putListener,y=u.deleteListener,C=u.registrationNames,E={string:!0,number:!0},M=f({style:null});r.Mixin={mountComponent:p.measure("ReactDOMComponent","mountComponent",function(t,e,r){return s.Mixin.mountComponent.call(this,t,e,r),n(this.props),this._createOpenTagMarkup()+this._createContentMarkup(e)+this._tagClose}),_createOpenTagMarkup:function(){var t=this.props,e=this._tagOpen;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(null!=r)if(C[n])g(this._rootNodeID,n,r);else{n===M&&(r&&(r=t.style=m(t.style)),r=o.createMarkupForStyles(r));var i=a.createMarkupForProperty(n,r);i&&(e+=" "+i)}}var s=d(this._rootNodeID);return e+" "+l.ATTR_NAME+'="'+s+'">'},_createContentMarkup:function(t){var e=this.props.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html)return e.__html}else{var n=E[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return d(n);if(null!=r){var o=this.mountChildren(r,t);return o.join("")}}return""},receiveProps:function(t,e){n(t),s.Mixin.receiveProps.call(this,t,e)},updateComponent:p.measure("ReactDOMComponent","updateComponent",function(t,e){s.Mixin.updateComponent.call(this,t,e),this._updateDOMProperties(e),this._updateDOMChildren(e,t)}),_updateDOMProperties:function(t){var e,n,r,o=this.props;for(e in t)if(!o.hasOwnProperty(e)&&t.hasOwnProperty(e))if(e===M){var a=t[e];for(n in a)a.hasOwnProperty(n)&&(r=r||{},r[n]="")}else C[e]?y(this._rootNodeID,e):(i.isStandardName[e]||i.isCustomAttribute(e))&&s.DOMIDOperations.deletePropertyByID(this._rootNodeID,e);for(e in o){var u=o[e],c=t[e];if(o.hasOwnProperty(e)&&u!==c)if(e===M)if(u&&(u=o.style=m(u)),c){for(n in c)c.hasOwnProperty(n)&&!u.hasOwnProperty(n)&&(r=r||{},r[n]="");for(n in u)u.hasOwnProperty(n)&&c[n]!==u[n]&&(r=r||{},r[n]=u[n])}else r=u;else C[e]?g(this._rootNodeID,e,u):(i.isStandardName[e]||i.isCustomAttribute(e))&&s.DOMIDOperations.updatePropertyByID(this._rootNodeID,e,u)}r&&s.DOMIDOperations.updateStylesByID(this._rootNodeID,r)},_updateDOMChildren:function(t,e){var n=this.props,r=E[typeof t.children]?t.children:null,o=E[typeof n.children]?n.children:null,i=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,u=null!=r?null:t.children,c=null!=o?null:n.children,l=null!=r||null!=i,p=null!=o||null!=a;null!=u&&null==c?this.updateChildren(null,e):l&&!p&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?i!==a&&s.DOMIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=c&&this.updateChildren(c,e)},unmountComponent:function(){u.deleteAllListeners(this._rootNodeID),s.Mixin.unmountComponent.call(this),this.unmountChildren()}},v(r,s.Mixin),v(r,r.Mixin),v(r,c.Mixin),e.exports=r},{"./CSSPropertyOperations":3,"./DOMProperty":8,"./DOMPropertyOperations":9,"./ReactComponent":25,"./ReactEventEmitter":42,"./ReactMount":48,"./ReactMultiChild":50,"./ReactPerf":53,"./escapeTextForBrowser":81,"./invariant":94,"./keyOf":101,"./merge":103,"./mixInto":106}],33:[function(t,e){"use strict";var n=t("./ReactCompositeComponent"),r=t("./ReactDOM"),o=t("./ReactEventEmitter"),i=t("./EventConstants"),a=r.form,s=n.createClass({render:function(){return this.transferPropsTo(a(null,this.props.children))},componentDidMount:function(t){o.trapBubbledEvent(i.topLevelTypes.topSubmit,"submit",t)}});e.exports=s},{"./EventConstants":14,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactEventEmitter":42}],34:[function(t,e){"use strict";var n=t("./CSSPropertyOperations"),r=t("./DOMChildrenOperations"),o=t("./DOMPropertyOperations"),i=t("./ReactMount"),a=t("./getTextContentAccessor"),s=t("./invariant"),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c=a()||"NA",l=/^ /,p={updatePropertyByID:function(t,e,n){var r=i.getNode(t);s(!u.hasOwnProperty(e)),null!=n?o.setValueForProperty(r,e,n):o.deleteValueForProperty(r,e)},deletePropertyByID:function(t,e,n){var r=i.getNode(t);s(!u.hasOwnProperty(e)),o.deleteValueForProperty(r,e,n)},updatePropertiesByID:function(t,e){for(var n in e)e.hasOwnProperty(n)&&p.updatePropertiesByID(t,n,e[n])},updateStylesByID:function(t,e){var r=i.getNode(t);n.setValueForStyles(r,e)},updateInnerHTMLByID:function(t,e){var n=i.getNode(t);n.innerHTML=e.replace(l," ")},updateTextContentByID:function(t,e){var n=i.getNode(t);n[c]=e},dangerouslyReplaceNodeWithMarkupByID:function(t,e){var n=i.getNode(t);r.dangerouslyReplaceNodeWithMarkup(n,e)},dangerouslyProcessChildrenUpdates:function(t,e){for(var n=0;nu;u++){var p=i[u];if(p!==o&&"INPUT"===p.nodeName&&"radio"===p.type&&p.form===o.form){var d=a.getID(p);s(d);var h=l[d];s(h),h.setState({checked:!1})}}return e}});e.exports=p},{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactMount":48,"./invariant":94,"./merge":103}],36:[function(t,e){"use strict";var n=t("./ReactCompositeComponent"),r=t("./ReactDOM"),o=r.option,i=n.createClass({componentWillMount:function(){null!=this.props.selected},render:function(){return o(this.props,this.props.children)}});e.exports=i},{"./ReactCompositeComponent":28,"./ReactDOM":30}],37:[function(t,e){"use strict";function n(t,e){null!=t[e]&&(t.multiple?s(Array.isArray(t[e])):s(!Array.isArray(t[e])))}function r(){for(var t=this.getValue(),e=null!=t?t:this.state.value,n=this.getDOMNode().options,r=""+e,o=0,i=n.length;i>o;o++){var a=this.props.multiple?r.indexOf(n[o].value)>=0:a=n[o].value===r;a!==n[o].selected&&(n[o].selected=a)}}var o=t("./LinkedValueMixin"),i=t("./ReactCompositeComponent"),a=t("./ReactDOM"),s=t("./invariant"),u=t("./merge"),c=a.select,l=i.createClass({mixins:[o],propTypes:{defaultValue:n,value:n},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillReceiveProps:function(t){!this.props.multiple&&t.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!t.multiple&&this.setState({value:this.state.value[0]})},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var t=u(this.props);return t.onChange=this._handleChange,t.value=null,c(t,this.props.children)},componentDidMount:r,componentDidUpdate:r,_handleChange:function(t){var e,n=this.getOnChange();n&&(this._isChanging=!0,e=n(t),this._isChanging=!1);var r;if(this.props.multiple){r=[];for(var o=t.target.options,i=0,a=o.length;a>i;i++)o[i].selected&&r.push(o[i].value)}else r=t.target.value;return this.setState({value:r}),e}});e.exports=l},{"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":94,"./merge":103}],38:[function(t,e){"use strict";function n(t){var e=document.selection,n=e.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(t),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function r(t){var e=window.getSelection();if(0===e.rangeCount)return null;var n=e.anchorNode,r=e.anchorOffset,o=e.focusNode,i=e.focusOffset,a=e.getRangeAt(0),s=a.toString().length,u=a.cloneRange();u.selectNodeContents(t),u.setEnd(a.startContainer,a.startOffset);var c=u.toString().length,l=c+s,p=document.createRange();p.setStart(n,r),p.setEnd(o,i);var d=p.collapsed;return p.detach(),{start:d?l:c,end:d?c:l}}function o(t,e){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof e.end?(n=e.start,r=n):e.start>e.end?(n=e.end,r=e.start):(n=e.start,r=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function i(t,e){var n=window.getSelection(),r=t[s()].length,o=Math.min(e.start,r),i="undefined"==typeof e.end?o:Math.min(e.end,r),u=a(t,o),c=a(t,i);if(u&&c){var l=document.createRange();l.setStart(u.node,u.offset),n.removeAllRanges(),n.addRange(l),n.extend(c.node,c.offset),l.detach()}}var a=t("./getNodeForCharacterOffset"),s=t("./getTextContentAccessor"),u={getOffsets:function(t){var e=document.selection?n:r;return e(t)},setOffsets:function(t,e){var n=document.selection?o:i;n(t,e)}};e.exports=u},{"./getNodeForCharacterOffset":90,"./getTextContentAccessor":92}],39:[function(t,e){"use strict";var n=t("./DOMPropertyOperations"),r=t("./LinkedValueMixin"),o=t("./ReactCompositeComponent"),i=t("./ReactDOM"),a=t("./invariant"),s=t("./merge"),u=i.textarea,c=o.createClass({mixins:[r],getInitialState:function(){var t=this.props.defaultValue,e=this.props.children;null!=e&&(a(null==t),Array.isArray(e)&&(a(e.length<=1),e=e[0]),t=""+e),null==t&&(t="");var n=this.getValue();return{initialValue:""+(null!=n?n:t),value:t}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var t=s(this.props),e=this.getValue();return a(null==t.dangerouslySetInnerHTML),t.defaultValue=null,t.value=null!=e?e:this.state.value,t.onChange=this._handleChange,u(t,this.state.initialValue)},componentDidUpdate:function(t,e,r){var o=this.getValue();null!=o&&n.setValueForProperty(r,"value",""+o)},_handleChange:function(t){var e,n=this.getOnChange();return n&&(this._isChanging=!0,e=n(t),this._isChanging=!1),this.setState({value:t.target.value}),e}});e.exports=c},{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":94,"./merge":103}],40:[function(t,e){"use strict";function n(){this.reinitializeTransaction()}var r=t("./ReactUpdates"),o=t("./Transaction"),i=t("./emptyFunction"),a=t("./mixInto"),s={initialize:i,close:function(){p.isBatchingUpdates=!1}},u={initialize:i,close:r.flushBatchedUpdates.bind(r)},c=[u,s];a(n,o.Mixin),a(n,{getTransactionWrappers:function(){return c}});var l=new n,p={isBatchingUpdates:!1,batchedUpdates:function(t,e){var n=p.isBatchingUpdates;p.isBatchingUpdates=!0,n?t(e):l.perform(t,null,e)}};e.exports=p},{"./ReactUpdates":59,"./Transaction":71,"./emptyFunction":80,"./mixInto":106}],41:[function(t,e){"use strict";function n(){l.TopLevelCallbackCreator=p,y.injection.injectEventPluginOrder(v),y.injection.injectInstanceHandle(E),y.injection.injectEventPluginsByName({SimpleEventPlugin:R,EnterLeaveEventPlugin:g,ChangeEventPlugin:f,CompositionEventPlugin:m,MobileSafariClickEventPlugin:C,SelectEventPlugin:M}),r.injection.injectComponentClasses({button:o,form:i,input:a,option:s,select:u,textarea:c}),h.injection.injectDOMPropertyConfig(d),b.injection.injectBatchingStrategy(D)}var r=t("./ReactDOM"),o=t("./ReactDOMButton"),i=t("./ReactDOMForm"),a=t("./ReactDOMInput"),s=t("./ReactDOMOption"),u=t("./ReactDOMSelect"),c=t("./ReactDOMTextarea"),l=t("./ReactEventEmitter"),p=t("./ReactEventTopLevelCallback");t("./ReactPerf");var d=t("./DefaultDOMPropertyConfig"),h=t("./DOMProperty"),f=t("./ChangeEventPlugin"),m=t("./CompositionEventPlugin"),v=t("./DefaultEventPluginOrder"),g=t("./EnterLeaveEventPlugin"),y=t("./EventPluginHub"),C=t("./MobileSafariClickEventPlugin"),E=t("./ReactInstanceHandles"),M=t("./SelectEventPlugin"),R=t("./SimpleEventPlugin"),D=t("./ReactDefaultBatchingStrategy"),b=t("./ReactUpdates");e.exports={inject:n}},{"./ChangeEventPlugin":5,"./CompositionEventPlugin":6,"./DOMProperty":8,"./DefaultDOMPropertyConfig":11,"./DefaultEventPluginOrder":12,"./EnterLeaveEventPlugin":13,"./EventPluginHub":16,"./MobileSafariClickEventPlugin":22,"./ReactDOM":30,"./ReactDOMButton":31,"./ReactDOMForm":33,"./ReactDOMInput":35,"./ReactDOMOption":36,"./ReactDOMSelect":37,"./ReactDOMTextarea":39,"./ReactDefaultBatchingStrategy":40,"./ReactEventEmitter":42,"./ReactEventTopLevelCallback":44,"./ReactInstanceHandles":46,"./ReactPerf":53,"./ReactUpdates":59,"./SelectEventPlugin":60,"./SimpleEventPlugin":61}],42:[function(t,e){"use strict";function n(t,e,n){a.listen(n,e,f.TopLevelCallbackCreator.createTopLevelCallback(t))}function r(t,e,n){a.capture(n,e,f.TopLevelCallbackCreator.createTopLevelCallback(t))}function o(){var t=l.refreshScrollValues;a.listen(window,"scroll",t),a.listen(window,"resize",t)}var i=t("./EventConstants"),a=t("./EventListener"),s=t("./EventPluginHub"),u=t("./ExecutionEnvironment"),c=t("./ReactEventEmitterMixin"),l=t("./ViewportMetrics"),p=t("./invariant"),d=t("./isEventSupported"),h=t("./merge"),f=h(c,{TopLevelCallbackCreator:null,ensureListening:function(t,e){p(u.canUseDOM),p(f.TopLevelCallbackCreator),c.ensureListening.call(f,{touchNotMouse:t,contentDocument:e})},setEnabled:function(t){p(u.canUseDOM),f.TopLevelCallbackCreator&&f.TopLevelCallbackCreator.setEnabled(t)},isEnabled:function(){return!(!f.TopLevelCallbackCreator||!f.TopLevelCallbackCreator.isEnabled())},listenAtTopLevel:function(t,e){p(!e._isListening);var a=i.topLevelTypes,s=e;o(),n(a.topMouseOver,"mouseover",s),n(a.topMouseDown,"mousedown",s),n(a.topMouseUp,"mouseup",s),n(a.topMouseMove,"mousemove",s),n(a.topMouseOut,"mouseout",s),n(a.topClick,"click",s),n(a.topDoubleClick,"dblclick",s),t&&(n(a.topTouchStart,"touchstart",s),n(a.topTouchEnd,"touchend",s),n(a.topTouchMove,"touchmove",s),n(a.topTouchCancel,"touchcancel",s)),n(a.topKeyUp,"keyup",s),n(a.topKeyPress,"keypress",s),n(a.topKeyDown,"keydown",s),n(a.topInput,"input",s),n(a.topChange,"change",s),n(a.topSelectionChange,"selectionchange",s),n(a.topCompositionEnd,"compositionend",s),n(a.topCompositionStart,"compositionstart",s),n(a.topCompositionUpdate,"compositionupdate",s),d("drag")&&(n(a.topDrag,"drag",s),n(a.topDragEnd,"dragend",s),n(a.topDragEnter,"dragenter",s),n(a.topDragExit,"dragexit",s),n(a.topDragLeave,"dragleave",s),n(a.topDragOver,"dragover",s),n(a.topDragStart,"dragstart",s),n(a.topDrop,"drop",s)),d("wheel")?n(a.topWheel,"wheel",s):d("mousewheel")?n(a.topWheel,"mousewheel",s):n(a.topWheel,"DOMMouseScroll",s),d("scroll",!0)?r(a.topScroll,"scroll",s):n(a.topScroll,"scroll",window),d("focus",!0)?(r(a.topFocus,"focus",s),r(a.topBlur,"blur",s)):d("focusin")&&(n(a.topFocus,"focusin",s),n(a.topBlur,"focusout",s)),d("copy")&&(n(a.topCopy,"copy",s),n(a.topCut,"cut",s),n(a.topPaste,"paste",s))},registrationNames:s.registrationNames,putListener:s.putListener,getListener:s.getListener,deleteListener:s.deleteListener,deleteAllListeners:s.deleteAllListeners,trapBubbledEvent:n,trapCapturedEvent:r});e.exports=f},{"./EventConstants":14,"./EventListener":15,"./EventPluginHub":16,"./ExecutionEnvironment":20,"./ReactEventEmitterMixin":43,"./ViewportMetrics":72,"./invariant":94,"./isEventSupported":95,"./merge":103}],43:[function(t,e){"use strict";function n(t){r.enqueueEvents(t),r.processEventQueue()}var r=t("./EventPluginHub"),o=t("./ReactUpdates"),i={_isListening:!1,ensureListening:function(t){t.contentDocument._reactIsListening||(this.listenAtTopLevel(t.touchNotMouse,t.contentDocument),t.contentDocument._reactIsListening=!0)},handleTopLevel:function(t,e,i,a){var s=r.extractEvents(t,e,i,a);o.batchedUpdates(n,s)}};e.exports=i},{"./EventPluginHub":16,"./ReactUpdates":59}],44:[function(t,e){"use strict";var n=t("./ReactEventEmitter"),r=t("./ReactMount"),o=t("./getEventTarget"),i=!0,a={setEnabled:function(t){i=!!t},isEnabled:function(){return i},createTopLevelCallback:function(t){return function(e){if(i){e.srcElement&&e.srcElement!==e.target&&(e.target=e.srcElement);var a=r.getFirstReactDOM(o(e))||window,s=r.getID(a)||"";n.handleTopLevel(t,a,s,e)}}}};e.exports=a},{"./ReactEventEmitter":42,"./ReactMount":48,"./getEventTarget":88}],45:[function(t,e){"use strict";function n(t){return i(document.documentElement,t)}var r=t("./ReactDOMSelection"),o=t("./getActiveElement"),i=t("./nodeContains"),a={hasSelectionCapabilities:function(t){return t&&("INPUT"===t.nodeName&&"text"===t.type||"TEXTAREA"===t.nodeName||"true"===t.contentEditable)},getSelectionInformation:function(){var t=o();return{focusedElem:t,selectionRange:a.hasSelectionCapabilities(t)?a.getSelection(t):null}},restoreSelection:function(t){var e=o(),r=t.focusedElem,i=t.selectionRange;e!==r&&n(r)&&(a.hasSelectionCapabilities(r)&&a.setSelection(r,i),r.focus())},getSelection:function(t){var e;if("selectionStart"in t)e={start:t.selectionStart,end:t.selectionEnd};else if(document.selection&&"INPUT"===t.nodeName){var n=document.selection.createRange();n.parentElement()===t&&(e={start:-n.moveStart("character",-t.value.length),end:-n.moveEnd("character",-t.value.length)})}else e=r.getOffsets(t);return e||{start:0,end:0}},setSelection:function(t,e){var n=e.start,o=e.end;if("undefined"==typeof o&&(o=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(o,t.value.length);else if(document.selection&&"INPUT"===t.nodeName){var i=t.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(t,e)}};e.exports=a},{"./ReactDOMSelection":38,"./getActiveElement":87,"./nodeContains":108}],46:[function(t,e){"use strict";function n(t){return p+"r["+t.toString(36)+"]"}function r(t,e){return t.charAt(e)===p||e===t.length}function o(t){return""===t||t.charAt(0)===p&&t.charAt(t.length-1)!==p}function i(t,e){return 0===e.indexOf(t)&&r(e,t.length)}function a(t){return t?t.substr(0,t.lastIndexOf(p)):""}function s(t,e){if(l(o(t)&&o(e)),l(i(t,e)),t===e)return t;for(var n=t.length+d,a=n;a=a;a++)if(r(t,a)&&r(e,a))i=a;else if(t.charAt(a)!==e.charAt(a))break;var s=t.substr(0,i);return l(o(s)),s}function c(t,e,n,r,o,u){t=t||"",e=e||"",l(t!==e);var c=i(e,t);l(c||i(t,e));for(var p=0,d=c?a:s,f=t;o&&f===t||u&&f===e||n(f,c,r),f!==e;f=d(f,e))l(p++"," "+r.CHECKSUM_ATTR_NAME+'="'+e+'">')},canReuseMarkup:function(t,e){var o=e.getAttribute(r.CHECKSUM_ATTR_NAME);o=o&&parseInt(o,10);var i=n(t);return i===o}};e.exports=r},{"./adler32":74}],48:[function(t,e){"use strict";function n(t){var e=d(t);return e&&R.getID(e)}function r(t){var e=o(t);if(e)if(g.hasOwnProperty(e)){var n=g[e];n!==t&&(h(!s(n,e)),g[e]=t)}else g[e]=t;return e}function o(t){return t&&t.getAttribute&&t.getAttribute(v)||""}function i(t,e){var n=o(t);n!==e&&delete g[n],t.setAttribute(v,e),g[e]=t}function a(t){return g.hasOwnProperty(t)&&s(g[t],t)||(g[t]=R.findReactNodeByID(t)),g[t]}function s(t,e){if(t){h(o(t)===e);var n=R.findReactContainerForID(e);if(n&&f(n,t))return!0}return!1}function u(t){delete g[t]}var c=t("./ReactEventEmitter"),l=t("./ReactInstanceHandles"),p=t("./$"),d=t("./getReactRootElementInContainer"),h=t("./invariant"),f=t("./nodeContains"),m=l.SEPARATOR,v="data-reactid",g={},y=1,C=9,E={},M={},R={allowFullPageRender:!1,totalInstantiationTime:0,totalInjectionTime:0,useTouchEvents:!1,_instancesByReactRootID:E,scrollMonitor:function(t,e){e()},prepareEnvironmentForDOM:function(t){h(t&&(t.nodeType===y||t.nodeType===C));var e=t.nodeType===y?t.ownerDocument:t;c.ensureListening(R.useTouchEvents,e)},_updateRootComponent:function(t,e,n,r){var o=e.props;return R.scrollMonitor(n,function(){t.replaceProps(o,r)}),t},_registerComponent:function(t,e){R.prepareEnvironmentForDOM(e);var n=R.registerContainer(e);return E[n]=t,n},_renderNewRootComponent:function(t,e,n){var r=R._registerComponent(t,e);return t.mountComponentIntoNode(r,e,n),t},renderComponent:function(t,e,r){var o=E[n(e)];if(o){if(o.constructor===t.constructor)return R._updateRootComponent(o,t,e,r);R.unmountComponentAtNode(e)}var i=d(e),a=i&&R.isRenderedByReact(i),s=a&&!o,u=R._renderNewRootComponent(t,e,s);return r&&r(),u},constructAndRenderComponent:function(t,e,n){return R.renderComponent(t(e),n)},constructAndRenderComponentByID:function(t,e,n){return R.constructAndRenderComponent(t,e,p(n))},registerContainer:function(t){var e=n(t);return e&&(e=l.getReactRootIDFromNodeID(e)),e||(e=l.createReactRootID()),M[e]=t,e},unmountComponentAtNode:function(t){var e=n(t),r=E[e];return r?(R.unmountComponentFromNode(r,t),delete E[e],delete M[e],!0):!1},unmountAndReleaseReactRootNode:function(){return R.unmountComponentAtNode.apply(this,arguments)},unmountComponentFromNode:function(t,e){for(t.unmountComponent(),e.nodeType===C&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)},findReactContainerForID:function(t){var e=l.getReactRootIDFromNodeID(t),n=M[e];return n},findReactNodeByID:function(t){var e=R.findReactContainerForID(t);return R.findComponentRoot(e,t)},isRenderedByReact:function(t){if(1!==t.nodeType)return!1;var e=R.getID(t);return e?e.charAt(0)===m:!1},getFirstReactDOM:function(t){for(var e=t;e&&e.parentNode!==e;){if(R.isRenderedByReact(e))return e;e=e.parentNode}return null},findComponentRoot:function(t,e){for(var n=[t.firstChild],r=0;re;e++){var r=t[e].component,o=t[e].callback;o.call(r,r.getDOMNode())}t.length=0}},reset:function(){this._queue=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),e.exports=n},{"./PooledClass":23,"./mixInto":106}],50:[function(t,e){"use strict";function n(t,e){return t&&e&&t.constructor===e.constructor}function r(t,e,n){h.push({parentID:t,parentNode:null,type:l.INSERT_MARKUP,markupIndex:f.push(e)-1,fromIndex:null,textContent:null,toIndex:n})}function o(t,e,n){h.push({parentID:t,parentNode:null,type:l.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:e,toIndex:n})}function i(t,e){h.push({parentID:t,parentNode:null,type:l.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:e,toIndex:null})}function a(t,e){h.push({parentID:t,parentNode:null,type:l.TEXT_CONTENT,markupIndex:null,textContent:e,fromIndex:null,toIndex:null})}function s(){h.length&&(c.DOMIDOperations.dangerouslyProcessChildrenUpdates(h,f),u())}function u(){h.length=0,f.length=0}var c=t("./ReactComponent"),l=t("./ReactMultiChildUpdateTypes"),p=t("./flattenChildren"),d=0,h=[],f=[],m={Mixin:{mountChildren:function(t,e){var n=p(t),r=[],o=0;this._renderedChildren=n;for(var i in n){var a=n[i];if(n.hasOwnProperty(i)&&a){var s=this._rootNodeID+"."+i,u=a.mountComponent(s,e,this._mountDepth+1);a._mountImage=u,a._mountIndex=o,r.push(u),o++}}return r},updateTextContent:function(t){d++;try{var e=this._renderedChildren;for(var n in e)e.hasOwnProperty(n)&&e[n]&&this._unmountChildByName(e[n],n);this.setTextContent(t)}catch(r){throw d--,d||u(),r}d--,d||s()},updateChildren:function(t,e){d++;try{this._updateChildren(t,e)}catch(n){throw d--,d||u(),n}d--,d||s()},_updateChildren:function(t,e){var r=p(t),o=this._renderedChildren;if(r||o){var i,a=0,s=0;for(i in r)if(r.hasOwnProperty(i)){var u=o&&o[i],c=r[i];n(u,c)?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u.receiveProps(c.props,e),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChildByName(u,i)),c&&this._mountChildByNameAtIndex(c,i,s,e)),c&&s++}for(i in o)!o.hasOwnProperty(i)||!o[i]||r&&r[i]||this._unmountChildByName(o[i],i)}},unmountChildren:function(){var t=this._renderedChildren;for(var e in t){var n=t[e];n&&n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(t,e,n){t._mountIndex>";e.exports=u},{"./createObjectFrom":78,"./invariant":94}],56:[function(t,e){"use strict";function n(){this.reinitializeTransaction(),this.reactMountReady=s.getPooled(null)}var r=t("./ExecutionEnvironment"),o=t("./PooledClass"),i=t("./ReactEventEmitter"),a=t("./ReactInputSelection"),s=t("./ReactMountReady"),u=t("./Transaction"),c=t("./mixInto"),l={initialize:a.getSelectionInformation,close:a.restoreSelection},p={initialize:function(){var t=i.isEnabled();return i.setEnabled(!1),t},close:function(t){i.setEnabled(t)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[l,p,d],f={getTransactionWrappers:function(){return r.canUseDOM?h:[]},getReactMountReady:function(){return this.reactMountReady},destructor:function(){s.release(this.reactMountReady),this.reactMountReady=null}};c(n,u.Mixin),c(n,f),o.addPoolingTo(n),e.exports=n},{"./ExecutionEnvironment":20,"./PooledClass":23,"./ReactEventEmitter":42,"./ReactInputSelection":45,"./ReactMountReady":49,"./Transaction":71,"./mixInto":106}],57:[function(t,e){"use strict";function n(t,e){var n=i.createReactRootID(),a=o.getPooled();a.reinitializeTransaction();try{a.perform(function(){var o=t.mountComponent(n,a,0);o=r.addChecksumToMarkup(o),e(o)},null)}finally{o.release(a)}}var r=t("./ReactMarkupChecksum"),o=t("./ReactReconcileTransaction"),i=t("./ReactInstanceHandles");e.exports={renderComponentToString:n}},{"./ReactInstanceHandles":46,"./ReactMarkupChecksum":47,"./ReactReconcileTransaction":56}],58:[function(t,e){"use strict";var n=t("./ReactComponent"),r=t("./ReactMount"),o=t("./escapeTextForBrowser"),i=t("./mixInto"),a=function(t){this.construct({text:t})};i(a,n.Mixin),i(a,{mountComponent:function(t,e,i){return n.Mixin.mountComponent.call(this,t,e,i),"'+o(this.props.text)+""},receiveProps:function(t){t.text!==this.props.text&&(this.props.text=t.text,n.DOMIDOperations.updateTextContentByID(this._rootNodeID,t.text))}}),e.exports=a},{"./ReactComponent":25,"./ReactMount":48,"./escapeTextForBrowser":81,"./mixInto":106}],59:[function(t,e){"use strict";function n(){c(p)}function r(t,e){n(),p.batchedUpdates(t,e)}function o(t,e){return t._mountDepth-e._mountDepth}function i(){l.sort(o);for(var t=0;t":">","<":"<",'"':""","'":"'","/":"/"},i=/[&><"'\/]/g;e.exports=r},{}],82:[function(t,e){var n=function(t){var e=Array.prototype.slice.call(arguments).map(function(t){return String(t)}),r=t.split("%s").length-1;return r!==e.length-1?n("ex args number mismatch: %s",JSON.stringify(e)):n._prefix+JSON.stringify(e)+n._suffix};n._prefix="",e.exports=n},{}],83:[function(t,e){"use strict";function n(t,e,n){for(var r=t.attributes,o=r.length,i=[],a=0;o>a;a++){var s=r.item(a);e.call(n,s)&&i.push(s)}return i}e.exports=n},{}],84:[function(t,e){"use strict";function n(t,e,n){var r=t;o(!r.hasOwnProperty(n)),r[n]=e}function r(t){if(null==t)return t;var e={};return i(t,n,e),e}var o=t("./invariant"),i=t("./traverseAllChildren");e.exports=r},{"./invariant":94,"./traverseAllChildren":112}],85:[function(t,e){"use strict";var n=function(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)};e.exports=n},{}],86:[function(t,e){function n(t,e,n){return"string"!=typeof t?t:e?r(t,e,n):document.getElementById(t)}function r(t,e,n){var i,a,s;if(o(e)==t)return e;if(e.getElementsByTagName){for(a=e.getElementsByTagName(n||"*"),s=0;s":"<"+t+">",a[t]=!i.firstChild),a[t]?p[t]:null}var r=t("./ExecutionEnvironment"),o=t("./invariant"),i=r.canUseDOM?document.createElement("div"):null,a={circle:!0,g:!0,line:!0,path:!0,polyline:!0,rect:!0,text:!0},s=[1,'"],u=[1,"","
"],c=[3,"","
"],l=[1,"",""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c,circle:l,g:l,line:l,path:l,polyline:l,rect:l,text:l};e.exports=n},{"./ExecutionEnvironment":20,"./invariant":94}],90:[function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function r(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=n(t),i=0,a=0;o;){if(3==o.nodeType){if(a=i+o.textContent.length,e>=i&&a>=e)return{node:o,offset:e-i};i=a}o=n(r(o))}}e.exports=o},{}],91:[function(t,e){"use strict";function n(t){return t?t.nodeType===r?t.documentElement:t.firstChild:null}var r=9;e.exports=n},{}],92:[function(t,e){"use strict";function n(){return!o&&r.canUseDOM&&(o="innerText"in document.createElement("div")?"innerText":"textContent"),o}var r=t("./ExecutionEnvironment"),o=null;e.exports=n},{"./ExecutionEnvironment":20}],93:[function(t,e){function n(t){return t.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},{}],94:[function(t,e){function n(t){if(!t)throw new Error("Invariant Violation")}e.exports=n},{}],95:[function(t,e){"use strict";function n(t,e){if(!r||e&&!r.addEventListener)return!1;var n=document.createElement("div"),i="on"+t,a=i in n;return a||(n.setAttribute(i,"return;"),a="function"==typeof n[i],"undefined"!=typeof n[i]&&(n[i]=void 0),n.removeAttribute(i)),!a&&o&&"wheel"===t&&(a=document.implementation.hasFeature("Events.wheel","3.0")),n=null,a}var r,o,i=t("./ExecutionEnvironment");i.canUseDOM&&(r=document.createElement("div"),o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=n},{"./ExecutionEnvironment":20}],96:[function(t,e){function n(t){return!(!t||!("undefined"!=typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}e.exports=n},{}],97:[function(t,e){"use strict";function n(t){return t&&("INPUT"===t.nodeName&&r[t.type]||"TEXTAREA"===t.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},{}],98:[function(t,e){function n(t){return r(t)&&3==t.nodeType}var r=t("./isNode");e.exports=n},{"./isNode":96}],99:[function(t,e){"use strict";function n(t){t||(t="");var e,n=arguments.length;if(n>1)for(var r=1;n>r;r++)e=arguments[r],e&&(t+=" "+e);return t}e.exports=n},{}],100:[function(t,e){"use strict";var n=t("./invariant"),r=function(t){var e,r={};n(t instanceof Object&&!Array.isArray(t));for(e in t)t.hasOwnProperty(e)&&(r[e]=e);return r};e.exports=r},{"./invariant":94}],101:[function(t,e){var n=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return e;return null};e.exports=n},{}],102:[function(t,e){"use strict";function n(t){var e={};return function(n){return e.hasOwnProperty(n)?e[n]:e[n]=t.call(this,n)}}e.exports=n},{}],103:[function(t,e){"use strict";var n=t("./mergeInto"),r=function(t,e){var r={};return n(r,t),n(r,e),r};e.exports=r},{"./mergeInto":105}],104:[function(t,e){"use strict";var n=t("./invariant"),r=t("./keyMirror"),o=36,i=function(t){return"object"!=typeof t||null===t},a={MAX_MERGE_DEPTH:o,isTerminal:i,normalizeMergeArg:function(t){return void 0===t||null===t?{}:t},checkMergeArrayArgs:function(t,e){n(Array.isArray(t)&&Array.isArray(e))},checkMergeObjectArgs:function(t,e){a.checkMergeObjectArg(t),a.checkMergeObjectArg(e)},checkMergeObjectArg:function(t){n(!i(t)&&!Array.isArray(t))},checkMergeLevel:function(t){n(o>t)},checkArrayStrategy:function(t){n(void 0===t||t in a.ArrayStrategies)},ArrayStrategies:r({Clobber:!0,IndexByIndex:!0})};e.exports=a},{"./invariant":94,"./keyMirror":100}],105:[function(t,e){"use strict";function n(t,e){if(o(t),null!=e){o(e);for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}}var r=t("./mergeHelpers"),o=r.checkMergeObjectArg;e.exports=n},{"./mergeHelpers":104}],106:[function(t,e){"use strict";var n=function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&(t.prototype[n]=e[n])};e.exports=n},{}],107:[function(t,e){"use strict";function n(t,e){i("html"===t.tagName.toLowerCase()),e=e.trim(),i(0===e.toLowerCase().indexOf("")+1,a=e.lastIndexOf("<"),s=e.substring(0,n),u=e.substring(n,a),c=s.indexOf(" ")>-1,l=null;if(c){l=r(s.replace("html ","span ")+"")[0];var p=o(l,function(e){return t.getAttributeNS(e.namespaceURI,e.name)!==e.value});p.forEach(function(e){t.setAttributeNS(e.namespaceURI,e.name,e.value)})}var d=o(t,function(t){return!(l&&l.hasAttributeNS(t.namespaceURI,t.name))});d.forEach(function(e){t.removeAttributeNS(e.namespaceURI,e.name)}),t.innerHTML=u}var r=t("./createNodesFromMarkup"),o=t("./filterAttributes"),i=t("./invariant");e.exports=n},{"./createNodesFromMarkup":77,"./filterAttributes":83,"./invariant":94}],108:[function(t,e){function n(t,e){return t&&e?t===e?!0:r(t)?!1:r(e)?n(t,e.parentNode):t.contains?t.contains(e):t.compareDocumentPosition?!!(16&t.compareDocumentPosition(e)):!1:!1}var r=t("./isTextNode");e.exports=n},{"./isTextNode":98}],109:[function(t,e){"use strict";function n(t,e,n){if(!t)return null;var r=0,o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=e.call(n,t[i],i,r++));return o}e.exports=n},{}],110:[function(t,e){"use strict";function n(t,e,n){if(!t)return null;var r=0,o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=e.call(n,i,t[i],r++));return o}e.exports=n},{}],111:[function(t,e){"use strict";function n(t,e){if(t===e)return!0;var n;for(n in t)if(t.hasOwnProperty(n)&&(!e.hasOwnProperty(n)||t[n]!==e[n]))return!1;for(n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}e.exports=n},{}],112:[function(t,e){"use strict";function n(t,e,n){null!==t&&void 0!==t&&a(t,"",0,e,n)}var r=t("./ReactComponent"),o=t("./ReactTextComponent"),i=t("./invariant"),a=function(t,e,n,s,u){var c=0;if(Array.isArray(t))for(var l=0;l8));var O=!1;y.canUseDOM&&(O=M("input")&&(!("documentMode"in document)||document.documentMode>9));var S={get:function(){return T.get.call(this)},set:function(e){I=""+e,T.set.call(this,e)}},w={eventTypes:x,extractEvents:function(e,t,o,r){var i,u;if(n(t)?P?i=a:u=s:R(t)?O?i=p:(i=f,u=d):h(t)&&(i=m),i){var c=i(e,t,o);if(c){var l=E.getPooled(x.change,c,r);return C.accumulateTwoPhaseDispatches(l),l}}u&&u(e,t,o)}};t.exports=w},{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./SyntheticEvent":66,"./isEventSupported":99,"./isTextInputElement":101,"./keyOf":105}],6:[function(e,t){"use strict";function n(e){switch(e){case v.topCompositionStart:return C.compositionStart;case v.topCompositionEnd:return C.compositionEnd;case v.topCompositionUpdate:return C.compositionUpdate}}function o(e,t){return e===v.topKeyDown&&t.keyCode===h}function r(e,t){switch(e){case v.topKeyUp:return-1!==f.indexOf(t.keyCode);case v.topKeyDown:return t.keyCode!==h;case v.topKeyPress:case v.topMouseDown:case v.topBlur:return!0;default:return!1}}function i(e){this.root=e,this.startSelection=c.getSelection(e),this.startValue=this.getText()}var a=e("./EventConstants"),s=e("./EventPropagators"),u=e("./ExecutionEnvironment"),c=e("./ReactInputSelection"),l=e("./SyntheticCompositionEvent"),p=e("./getTextContentAccessor"),d=e("./keyOf"),f=[9,13,27,32],h=229,m=u.canUseDOM&&"CompositionEvent"in window,v=a.topLevelTypes,g=null,C={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})}},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})}},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})}}};i.prototype.getText=function(){return this.root.value||this.root[p()]},i.prototype.getData=function(){var e=this.getText(),t=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return e.substr(t,e.length-n-t)};var y={eventTypes:C,extractEvents:function(e,t,a,u){var c,p;if(m?c=n(e):g?r(e,u)&&(c=C.compositionEnd,p=g.getData(),g=null):o(e,u)&&(c=C.start,g=new i(t)),c){var d=l.getPooled(c,a,u);return p&&(d.data=p),s.accumulateTwoPhaseDispatches(d),d}}};t.exports=y},{"./EventConstants":14,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":47,"./SyntheticCompositionEvent":65,"./getTextContentAccessor":95,"./keyOf":105}],7:[function(e,t){"use strict";function n(e,t,n){var o=e.childNodes;o[n]!==t&&(t.parentNode===e&&e.removeChild(t),n>=o.length?e.appendChild(t):e.insertBefore(t,o[n]))}var o=e("./Danger"),r=e("./ReactMultiChildUpdateTypes"),i=e("./getTextContentAccessor"),a=i()||"NA",s={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,processUpdates:function(e,t){for(var i,s=null,u=null,c=0;i=e[c];c++)if(i.type===r.MOVE_EXISTING||i.type===r.REMOVE_NODE){var l=i.fromIndex,p=i.parentNode.childNodes[l],d=i.parentID;s=s||{},s[d]=s[d]||[],s[d][l]=p,u=u||[],u.push(p)}var f=o.dangerouslyRenderMarkup(t);if(u)for(var h=0;ht)}var o=e("./DOMProperty"),r=e("./escapeTextForBrowser"),i=e("./memoizeStringOnly"),a=i(function(e){return r(e)+'="'}),s={createMarkupForProperty:function(e,t){if(o.isStandardName[e]){if(n(e,t))return"";var i=o.getAttributeName[e];return a(i)+r(t)+'"'}return o.isCustomAttribute(e)?null==t?"":a(e)+r(t)+'"':null},setValueForProperty:function(e,t,r){if(o.isStandardName[t]){var i=o.getMutationMethod[t];if(i)i(e,r);else if(n(t,r))this.deleteValueForProperty(e,t);else if(o.mustUseAttribute[t])e.setAttribute(o.getAttributeName[t],""+r);else{var a=o.getPropertyName[t];o.hasSideEffects[t]&&e[a]===r||(e[a]=r)}}else o.isCustomAttribute(t)&&(null==r?e.removeAttribute(o.getAttributeName[t]):e.setAttribute(t,""+r))},deleteValueForProperty:function(e,t){if(o.isStandardName[t]){var n=o.getMutationMethod[t];if(n)n(e,void 0);else if(o.mustUseAttribute[t])e.removeAttribute(o.getAttributeName[t]);else{var r=o.getPropertyName[t],i=o.getDefaultValueForProperty(e.nodeName,t);o.hasSideEffects[t]&&e[r]===i||(e[r]=i)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=s},{"./DOMProperty":8,"./escapeTextForBrowser":84,"./memoizeStringOnly":106}],10:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var o=e("./ExecutionEnvironment"),r=e("./createNodesFromMarkup"),i=e("./emptyFunction"),a=e("./getMarkupWrap"),s=e("./invariant"),u=e("./mutateHTMLNodeWithMarkup"),c=/^(<[^ \/>]+)/,l="data-danger-index",p={dangerouslyRenderMarkup:function(e){s(o.canUseDOM);for(var t,u={},p=0;pu;u++){var l=a[u];if(l){var p=l.extractEvents(e,t,n,r);p&&(i=s(i,p))}}return i},enqueueEvents:function(e){e&&(l=s(l,e))},processEventQueue:function(){var e=l;l=null,u(e,p),c(!l)}};a.canUseDOM&&(window.EventPluginHub=d),t.exports=d},{"./CallbackRegistry":4,"./EventPluginRegistry":17,"./EventPluginUtils":18,"./EventPropagators":19,"./ExecutionEnvironment":20,"./accumulate":75,"./forEachAccumulated":88,"./invariant":98}],17:[function(e,t){"use strict";function n(){if(a)for(var e in s){var t=s[e],n=a.indexOf(e);if(i(n>-1),!u.plugins[n]){i(t.extractEvents),u.plugins[n]=t;var r=t.eventTypes;for(var c in r)i(o(r[c],t))}}}function o(e,t){var n=e.phasedRegistrationNames;if(n){for(var o in n)if(n.hasOwnProperty(o)){var i=n[o];r(i,t)}return!0}return e.registrationName?(r(e.registrationName,t),!0):!1}function r(e,t){i(!u.registrationNames[e]),u.registrationNames[e]=t}var i=e("./invariant"),a=null,s={},u={plugins:[],registrationNames:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];s[o]!==r&&(i(!s[o]),s[o]=r,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNames[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var o=u.registrationNames[t.phasedRegistrationNames[n]];if(o)return o}return null},_resetEventPlugins:function(){a=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.registrationNames;for(var n in t)t.hasOwnProperty(n)&&delete t[n]}};t.exports=u},{"./invariant":98}],18:[function(e,t){"use strict";function n(e){return e===f.topMouseUp||e===f.topTouchEnd||e===f.topTouchCancel}function o(e){return e===f.topMouseMove||e===f.topTouchMove}function r(e){return e===f.topMouseDown||e===f.topTouchStart}function i(e,t){var n=e._dispatchListeners,o=e._dispatchIDs;if(Array.isArray(n))for(var r=0;r1){for(var r=Array(n),i=0;n>i;i++)r[i]=arguments[i+1];this.props.children=r}},mountComponent:function(e,t,n){a(!this.isMounted());var o=this.props;null!=o.ref&&r.addComponentAsRefTo(this,o.ref,o.__owner__),this._rootNodeID=e,this._lifeCycleState=c.MOUNTED,this._mountDepth=n},unmountComponent:function(){a(this.isMounted());var e=this.props;null!=e.ref&&r.removeComponentAsRefFrom(this,e.ref,e.__owner__),l.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=c.UNMOUNTED},receiveComponent:function(e,t){a(this.isMounted()),this._pendingProps=e.props,this._performUpdateIfNecessary(t)},performUpdateIfNecessary:function(){var e=l.ReactReconcileTransaction.getPooled();e.perform(this._performUpdateIfNecessary,this,e),l.ReactReconcileTransaction.release(e)},_performUpdateIfNecessary:function(e){if(null!=this._pendingProps){var t=this.props;this.props=this._pendingProps,this._pendingProps=null,this.updateComponent(e,t)}},updateComponent:function(e,t){var n=this.props;(n.__owner__!==t.__owner__||n.ref!==t.ref)&&(null!=t.ref&&r.removeComponentAsRefFrom(this,t.ref,t.__owner__),null!=n.ref&&r.addComponentAsRefTo(this,n.ref,n.__owner__))},mountComponentIntoNode:function(e,t,n){var o=l.ReactReconcileTransaction.getPooled();o.perform(this._mountComponentIntoNode,this,e,t,o,n),l.ReactReconcileTransaction.release(o)},_mountComponentIntoNode:function(e,t,n,o){var r=this.mountComponent(e,n,0);l.mountImageIntoNode(r,t,o)},isOwnedBy:function(e){return this.props.__owner__===e},getSiblingByRef:function(e){var t=this.props.__owner__;return t&&t.refs?t.refs[e]:null}})};t.exports=l},{"./ReactComponentEnvironment":27,"./ReactCurrentOwner":29,"./ReactOwner":54,"./ReactUpdates":61,"./invariant":98,"./keyMirror":104,"./merge":107}],26:[function(e,t){"use strict";var n=e("./ReactDOMIDOperations"),o=e("./ReactMarkupChecksum"),r=e("./ReactMount"),i=e("./ReactReconcileTransaction"),a=e("./getReactRootElementInContainer"),s=e("./invariant"),u=e("./mutateHTMLNodeWithMarkup"),c=1,l=9,p={Mixin:{getDOMNode:function(){return s(this.isMounted()),r.getNode(this._rootNodeID)}},ReactReconcileTransaction:i,DOMIDOperations:n,unmountIDFromEnvironment:function(e){r.purgeID(e)},mountImageIntoNode:function(e,t,n){if(s(t&&(t.nodeType===c||t.nodeType===l&&r.allowFullPageRender)),!n||!o.canReuseMarkup(e,a(t))){if(t.nodeType===l)return u(t.documentElement,e),void 0;var i=t.parentNode;if(i){var p=t.nextSibling;i.removeChild(t),t.innerHTML=e,p?i.insertBefore(t,p):i.appendChild(t)}else t.innerHTML=e}}};t.exports=p},{"./ReactDOMIDOperations":34,"./ReactMarkupChecksum":49,"./ReactMount":50,"./ReactReconcileTransaction":58,"./getReactRootElementInContainer":94,"./invariant":98,"./mutateHTMLNodeWithMarkup":111}],27:[function(e,t){var n=e("./ReactComponentBrowserEnvironment"),o=n;t.exports=o},{"./ReactComponentBrowserEnvironment":26}],28:[function(e,t){"use strict";function n(e,t){var n=M[t];b.hasOwnProperty(t)&&m(n===E.OVERRIDE_BASE),e.hasOwnProperty(t)&&m(n===E.DEFINE_MANY||n===E.DEFINE_MANY_MERGED)}function o(e){var t=e._compositeLifeCycleState;m(e.isMounted()||t===D.MOUNTING),m(t!==D.RECEIVING_STATE),m(t!==D.UNMOUNTING)}function r(e,t){var o=e.prototype;for(var r in t){var i=t[r];if(t.hasOwnProperty(r)&&i)if(n(o,r),R.hasOwnProperty(r))R[r](e,i);else{var u=r in M,c=r in o,l=i.__reactDontBind,p="function"==typeof i,d=p&&!u&&!c&&!l;d?(o.__reactAutoBindMap||(o.__reactAutoBindMap={}),o.__reactAutoBindMap[r]=i,o[r]=i):o[r]=c?M[r]===E.DEFINE_MANY_MERGED?a(o[r],i):s(o[r],i):i}}}function i(e,t){return m(e&&t&&"object"==typeof e&&"object"==typeof t),y(t,function(t,n){m(void 0===e[n]),e[n]=t}),e}function a(e,t){return function(){return i(e.apply(this,arguments),t.apply(this,arguments))}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}var u=e("./ReactComponent"),c=e("./ReactCurrentOwner"),l=e("./ReactErrorUtils"),p=e("./ReactOwner"),d=e("./ReactPerf"),f=e("./ReactPropTransferer"),h=e("./ReactUpdates"),m=e("./invariant"),v=e("./keyMirror"),g=e("./merge"),C=e("./mixInto"),y=e("./objMap"),E=v({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),M={mixins:E.DEFINE_MANY,propTypes:E.DEFINE_ONCE,getDefaultProps:E.DEFINE_MANY_MERGED,getInitialState:E.DEFINE_MANY_MERGED,render:E.DEFINE_ONCE,componentWillMount:E.DEFINE_MANY,componentDidMount:E.DEFINE_MANY,componentWillReceiveProps:E.DEFINE_MANY,shouldComponentUpdate:E.DEFINE_ONCE,componentWillUpdate:E.DEFINE_MANY,componentDidUpdate:E.DEFINE_MANY,componentWillUnmount:E.DEFINE_MANY,updateComponent:E.OVERRIDE_BASE},R={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n",this.tagName=e.toUpperCase()}var r=e("./CSSPropertyOperations"),i=e("./DOMProperty"),a=e("./DOMPropertyOperations"),s=e("./ReactComponent"),u=e("./ReactEventEmitter"),c=e("./ReactMultiChild"),l=e("./ReactMount"),p=e("./ReactPerf"),d=e("./escapeTextForBrowser"),f=e("./invariant"),h=e("./keyOf"),m=e("./merge"),v=e("./mixInto"),g=u.putListener,C=u.deleteListener,y=u.registrationNames,E={string:!0,number:!0},M=h({style:null});o.Mixin={mountComponent:p.measure("ReactDOMComponent","mountComponent",function(e,t,o){return s.Mixin.mountComponent.call(this,e,t,o),n(this.props),this._createOpenTagMarkup()+this._createContentMarkup(t)+this._tagClose}),_createOpenTagMarkup:function(){var e=this.props,t=this._tagOpen;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(y[n])g(this._rootNodeID,n,o);else{n===M&&(o&&(o=e.style=m(e.style)),o=r.createMarkupForStyles(o));var i=a.createMarkupForProperty(n,o);i&&(t+=" "+i)}}var s=d(this._rootNodeID);return t+" "+l.ATTR_NAME+'="'+s+'">'},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=E[typeof this.props.children]?this.props.children:null,o=null!=n?null:this.props.children;if(null!=n)return d(n);if(null!=o){var r=this.mountChildren(o,e);return r.join("")}}return""},receiveComponent:function(e,t){n(e.props),s.Mixin.receiveComponent.call(this,e,t)},updateComponent:p.measure("ReactDOMComponent","updateComponent",function(e,t){s.Mixin.updateComponent.call(this,e,t),this._updateDOMProperties(t),this._updateDOMChildren(t,e)}),_updateDOMProperties:function(e){var t,n,o,r=this.props;for(t in e)if(!r.hasOwnProperty(t)&&e.hasOwnProperty(t))if(t===M){var a=e[t];for(n in a)a.hasOwnProperty(n)&&(o=o||{},o[n]="")}else y[t]?C(this._rootNodeID,t):(i.isStandardName[t]||i.isCustomAttribute(t))&&s.DOMIDOperations.deletePropertyByID(this._rootNodeID,t);for(t in r){var u=r[t],c=e[t];if(r.hasOwnProperty(t)&&u!==c)if(t===M)if(u&&(u=r.style=m(u)),c){for(n in c)c.hasOwnProperty(n)&&!u.hasOwnProperty(n)&&(o=o||{},o[n]="");for(n in u)u.hasOwnProperty(n)&&c[n]!==u[n]&&(o=o||{},o[n]=u[n])}else o=u;else y[t]?g(this._rootNodeID,t,u):(i.isStandardName[t]||i.isCustomAttribute(t))&&s.DOMIDOperations.updatePropertyByID(this._rootNodeID,t,u)}o&&s.DOMIDOperations.updateStylesByID(this._rootNodeID,o)},_updateDOMChildren:function(e,t){var n=this.props,o=E[typeof e.children]?e.children:null,r=E[typeof n.children]?n.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,c=null!=r?null:n.children,l=null!=o||null!=i,p=null!=r||null!=a;null!=u&&null==c?this.updateChildren(null,t):l&&!p&&this.updateTextContent(""),null!=r?o!==r&&this.updateTextContent(""+r):null!=a?i!==a&&s.DOMIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=c&&this.updateChildren(c,t)},unmountComponent:function(){u.deleteAllListeners(this._rootNodeID),s.Mixin.unmountComponent.call(this),this.unmountChildren()}},v(o,s.Mixin),v(o,o.Mixin),v(o,c.Mixin),t.exports=o},{"./CSSPropertyOperations":3,"./DOMProperty":8,"./DOMPropertyOperations":9,"./ReactComponent":25,"./ReactEventEmitter":44,"./ReactMount":50,"./ReactMultiChild":52,"./ReactPerf":55,"./escapeTextForBrowser":84,"./invariant":98,"./keyOf":105,"./merge":107,"./mixInto":110}],33:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactDOM"),r=e("./ReactEventEmitter"),i=e("./EventConstants"),a=o.form,s=n.createClass({render:function(){return this.transferPropsTo(a(null,this.props.children))},componentDidMount:function(e){r.trapBubbledEvent(i.topLevelTypes.topSubmit,"submit",e)}});t.exports=s},{"./EventConstants":14,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactEventEmitter":44}],34:[function(e,t){"use strict";var n=e("./CSSPropertyOperations"),o=e("./DOMChildrenOperations"),r=e("./DOMPropertyOperations"),i=e("./ReactMount"),a=e("./getTextContentAccessor"),s=e("./invariant"),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c=a()||"NA",l=/^ /,p={updatePropertyByID:function(e,t,n){var o=i.getNode(e);s(!u.hasOwnProperty(t)),null!=n?r.setValueForProperty(o,t,n):r.deleteValueForProperty(o,t)},deletePropertyByID:function(e,t,n){var o=i.getNode(e);s(!u.hasOwnProperty(t)),r.deleteValueForProperty(o,t,n)},updateStylesByID:function(e,t){var o=i.getNode(e);n.setValueForStyles(o,t)},updateInnerHTMLByID:function(e,t){var n=i.getNode(e);n.innerHTML=t.replace(l," ")},updateTextContentByID:function(e,t){var n=i.getNode(e);n[c]=t},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=i.getNode(e);o.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;nu;u++){var p=i[u];if(p!==r&&"INPUT"===p.nodeName&&"radio"===p.type&&p.form===r.form){var d=a.getID(p);s(d);var f=l[d];s(f),f.setState({checked:!1})}}return t}});t.exports=p},{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactMount":50,"./invariant":98,"./merge":107}],36:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactDOM"),r=o.option,i=n.createClass({componentWillMount:function(){null!=this.props.selected},render:function(){return r(this.props,this.props.children)}});t.exports=i},{"./ReactCompositeComponent":28,"./ReactDOM":30}],37:[function(e,t){"use strict";function n(e,t){null!=e[t]&&(e.multiple?s(Array.isArray(e[t])):s(!Array.isArray(e[t])))}function o(){for(var e=this.getValue(),t=null!=e?e:this.state.value,n=this.getDOMNode().options,o=""+t,r=0,i=n.length;i>r;r++){var a=this.props.multiple?o.indexOf(n[r].value)>=0:a=n[r].value===o;a!==n[r].selected&&(n[r].selected=a)}}var r=e("./LinkedValueMixin"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=e("./invariant"),u=e("./merge"),c=a.select,l=i.createClass({mixins:[r],propTypes:{defaultValue:n,value:n},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillReceiveProps:function(e){!this.props.multiple&&e.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!e.multiple&&this.setState({value:this.state.value[0]})},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=u(this.props);return e.onChange=this._handleChange,e.value=null,c(e,this.props.children)},componentDidMount:o,componentDidUpdate:o,_handleChange:function(e){var t,n=this.getOnChange();n&&(this._isChanging=!0,t=n(e),this._isChanging=!1);var o;if(this.props.multiple){o=[];for(var r=e.target.options,i=0,a=r.length;a>i;i++)r[i].selected&&o.push(r[i].value)}else o=e.target.value;return this.setState({value:o}),t}});t.exports=l},{"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":98,"./merge":107}],38:[function(e,t){"use strict";function n(e){var t=document.selection,n=t.createRange(),o=n.text.length,r=n.duplicate();r.moveToElementText(e),r.setEndPoint("EndToStart",n);var i=r.text.length,a=i+o;return{start:i,end:a}}function o(e){var t=window.getSelection();if(0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,r=t.focusNode,i=t.focusOffset,a=t.getRangeAt(0),s=a.toString().length,u=a.cloneRange();u.selectNodeContents(e),u.setEnd(a.startContainer,a.startOffset);var c=u.toString().length,l=c+s,p=document.createRange();p.setStart(n,o),p.setEnd(r,i);var d=p.collapsed;return p.detach(),{start:d?l:c,end:d?c:l}}function r(e,t){var n,o,r=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,o=n):t.start>t.end?(n=t.end,o=t.start):(n=t.start,o=t.end),r.moveToElementText(e),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",o-n),r.select()}function i(e,t){var n=window.getSelection(),o=e[s()].length,r=Math.min(t.start,o),i="undefined"==typeof t.end?r:Math.min(t.end,o);if(!n.extend&&r>i){var u=i;i=r,r=u}var c=a(e,r),l=a(e,i);if(c&&l){var p=document.createRange();p.setStart(c.node,c.offset),n.removeAllRanges(),r>i?(n.addRange(p),n.extend(l.node,l.offset)):(p.setEnd(l.node,l.offset),n.addRange(p)),p.detach()}}var a=e("./getNodeForCharacterOffset"),s=e("./getTextContentAccessor"),u={getOffsets:function(e){var t=document.selection?n:o;return t(e)},setOffsets:function(e,t){var n=document.selection?r:i;n(e,t)}};t.exports=u},{"./getNodeForCharacterOffset":93,"./getTextContentAccessor":95}],39:[function(e,t){"use strict";var n=e("./DOMPropertyOperations"),o=e("./LinkedValueMixin"),r=e("./ReactCompositeComponent"),i=e("./ReactDOM"),a=e("./invariant"),s=e("./merge"),u=i.textarea,c=r.createClass({mixins:[o],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(a(null==e),Array.isArray(t)&&(a(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=this.getValue();return{initialValue:""+(null!=n?n:e),value:e}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=s(this.props),t=this.getValue();return a(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null!=t?t:this.state.value,e.onChange=this._handleChange,u(e,this.state.initialValue)},componentDidUpdate:function(e,t,o){var r=this.getValue();null!=r&&n.setValueForProperty(o,"value",""+r)},_handleChange:function(e){var t,n=this.getOnChange();return n&&(this._isChanging=!0,t=n(e),this._isChanging=!1),this.setState({value:e.target.value}),t}});t.exports=c},{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":98,"./merge":107}],40:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var o=e("./ReactUpdates"),r=e("./Transaction"),i=e("./emptyFunction"),a=e("./mixInto"),s={initialize:i,close:function(){p.isBatchingUpdates=!1}},u={initialize:i,close:o.flushBatchedUpdates.bind(o)},c=[u,s];a(n,r.Mixin),a(n,{getTransactionWrappers:function(){return c}});var l=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t){var n=p.isBatchingUpdates;p.isBatchingUpdates=!0,n?e(t):l.perform(e,null,t)}};t.exports=p},{"./ReactUpdates":61,"./Transaction":73,"./emptyFunction":83,"./mixInto":110}],41:[function(e,t){"use strict";function n(){l.TopLevelCallbackCreator=p,C.injection.injectEventPluginOrder(v),C.injection.injectInstanceHandle(E),C.injection.injectEventPluginsByName({SimpleEventPlugin:R,EnterLeaveEventPlugin:g,ChangeEventPlugin:h,CompositionEventPlugin:m,MobileSafariClickEventPlugin:y,SelectEventPlugin:M}),o.injection.injectComponentClasses({button:r,form:i,input:a,option:s,select:u,textarea:c}),f.injection.injectDOMPropertyConfig(d),b.injection.injectBatchingStrategy(D)}var o=e("./ReactDOM"),r=e("./ReactDOMButton"),i=e("./ReactDOMForm"),a=e("./ReactDOMInput"),s=e("./ReactDOMOption"),u=e("./ReactDOMSelect"),c=e("./ReactDOMTextarea"),l=e("./ReactEventEmitter"),p=e("./ReactEventTopLevelCallback"),d=(e("./ReactPerf"),e("./DefaultDOMPropertyConfig")),f=e("./DOMProperty"),h=e("./ChangeEventPlugin"),m=e("./CompositionEventPlugin"),v=e("./DefaultEventPluginOrder"),g=e("./EnterLeaveEventPlugin"),C=e("./EventPluginHub"),y=e("./MobileSafariClickEventPlugin"),E=e("./ReactInstanceHandles"),M=e("./SelectEventPlugin"),R=e("./SimpleEventPlugin"),D=e("./ReactDefaultBatchingStrategy"),b=e("./ReactUpdates");t.exports={inject:n}},{"./ChangeEventPlugin":5,"./CompositionEventPlugin":6,"./DOMProperty":8,"./DefaultDOMPropertyConfig":11,"./DefaultEventPluginOrder":12,"./EnterLeaveEventPlugin":13,"./EventPluginHub":16,"./MobileSafariClickEventPlugin":22,"./ReactDOM":30,"./ReactDOMButton":31,"./ReactDOMForm":33,"./ReactDOMInput":35,"./ReactDOMOption":36,"./ReactDOMSelect":37,"./ReactDOMTextarea":39,"./ReactDefaultBatchingStrategy":40,"./ReactDefaultPerf":42,"./ReactEventEmitter":44,"./ReactEventTopLevelCallback":46,"./ReactInstanceHandles":48,"./ReactPerf":55,"./ReactUpdates":61,"./SelectEventPlugin":62,"./SimpleEventPlugin":63}],42:[function(e,t){"use strict";var n=(e("./performanceNow"),{});t.exports=n},{"./performanceNow":114}],43:[function(e,t){var n={guard:function(e,t){return e}};t.exports=n},{}],44:[function(e,t){"use strict";function n(e,t,n){a.listen(n,t,h.TopLevelCallbackCreator.createTopLevelCallback(e))}function o(e,t,n){a.capture(n,t,h.TopLevelCallbackCreator.createTopLevelCallback(e))}function r(){var e=l.refreshScrollValues;a.listen(window,"scroll",e),a.listen(window,"resize",e)}var i=e("./EventConstants"),a=e("./EventListener"),s=e("./EventPluginHub"),u=e("./ExecutionEnvironment"),c=e("./ReactEventEmitterMixin"),l=e("./ViewportMetrics"),p=e("./invariant"),d=e("./isEventSupported"),f=e("./merge"),h=f(c,{TopLevelCallbackCreator:null,ensureListening:function(e,t){p(u.canUseDOM),p(h.TopLevelCallbackCreator),c.ensureListening.call(h,{touchNotMouse:e,contentDocument:t})},setEnabled:function(e){p(u.canUseDOM),h.TopLevelCallbackCreator&&h.TopLevelCallbackCreator.setEnabled(e)},isEnabled:function(){return!(!h.TopLevelCallbackCreator||!h.TopLevelCallbackCreator.isEnabled())},listenAtTopLevel:function(e,t){p(!t._isListening);var a=i.topLevelTypes,s=t;r(),n(a.topMouseOver,"mouseover",s),n(a.topMouseDown,"mousedown",s),n(a.topMouseUp,"mouseup",s),n(a.topMouseMove,"mousemove",s),n(a.topMouseOut,"mouseout",s),n(a.topClick,"click",s),n(a.topDoubleClick,"dblclick",s),n(a.topContextMenu,"contextmenu",s),e&&(n(a.topTouchStart,"touchstart",s),n(a.topTouchEnd,"touchend",s),n(a.topTouchMove,"touchmove",s),n(a.topTouchCancel,"touchcancel",s)),n(a.topKeyUp,"keyup",s),n(a.topKeyPress,"keypress",s),n(a.topKeyDown,"keydown",s),n(a.topInput,"input",s),n(a.topChange,"change",s),n(a.topSelectionChange,"selectionchange",s),n(a.topCompositionEnd,"compositionend",s),n(a.topCompositionStart,"compositionstart",s),n(a.topCompositionUpdate,"compositionupdate",s),d("drag")&&(n(a.topDrag,"drag",s),n(a.topDragEnd,"dragend",s),n(a.topDragEnter,"dragenter",s),n(a.topDragExit,"dragexit",s),n(a.topDragLeave,"dragleave",s),n(a.topDragOver,"dragover",s),n(a.topDragStart,"dragstart",s),n(a.topDrop,"drop",s)),d("wheel")?n(a.topWheel,"wheel",s):d("mousewheel")?n(a.topWheel,"mousewheel",s):n(a.topWheel,"DOMMouseScroll",s),d("scroll",!0)?o(a.topScroll,"scroll",s):n(a.topScroll,"scroll",window),d("focus",!0)?(o(a.topFocus,"focus",s),o(a.topBlur,"blur",s)):d("focusin")&&(n(a.topFocus,"focusin",s),n(a.topBlur,"focusout",s)),d("copy")&&(n(a.topCopy,"copy",s),n(a.topCut,"cut",s),n(a.topPaste,"paste",s))},registrationNames:s.registrationNames,putListener:s.putListener,getListener:s.getListener,deleteListener:s.deleteListener,deleteAllListeners:s.deleteAllListeners,trapBubbledEvent:n,trapCapturedEvent:o});t.exports=h},{"./EventConstants":14,"./EventListener":15,"./EventPluginHub":16,"./ExecutionEnvironment":20,"./ReactEventEmitterMixin":45,"./ViewportMetrics":74,"./invariant":98,"./isEventSupported":99,"./merge":107}],45:[function(e,t){"use strict";function n(e){o.enqueueEvents(e),o.processEventQueue()}var o=e("./EventPluginHub"),r=e("./ReactUpdates"),i={_isListening:!1,ensureListening:function(e){e.contentDocument._reactIsListening||(this.listenAtTopLevel(e.touchNotMouse,e.contentDocument),e.contentDocument._reactIsListening=!0)},handleTopLevel:function(e,t,i,a){var s=o.extractEvents(e,t,i,a);r.batchedUpdates(n,s)}};t.exports=i},{"./EventPluginHub":16,"./ReactUpdates":61}],46:[function(e,t){"use strict";var n=e("./ReactEventEmitter"),o=e("./ReactMount"),r=e("./getEventTarget"),i=!0,a={setEnabled:function(e){i=!!e},isEnabled:function(){return i},createTopLevelCallback:function(e){return function(t){if(i){t.srcElement&&t.srcElement!==t.target&&(t.target=t.srcElement);var a=o.getFirstReactDOM(r(t))||window,s=o.getID(a)||"";n.handleTopLevel(e,a,s,t)}}}};t.exports=a},{"./ReactEventEmitter":44,"./ReactMount":50,"./getEventTarget":91}],47:[function(e,t){"use strict";function n(e){return r(document.documentElement,e)}var o=e("./ReactDOMSelection"),r=e("./containsNode"),i=e("./getActiveElement"),a={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=i();return{focusedElem:e,selectionRange:a.hasSelectionCapabilities(e)?a.getSelection(e):null}},restoreSelection:function(e){var t=i(),o=e.focusedElem,r=e.selectionRange;t!==o&&n(o)&&(a.hasSelectionCapabilities(o)&&a.setSelection(o,r),o.focus())},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};t.exports=a},{"./ReactDOMSelection":38,"./containsNode":77,"./getActiveElement":90}],48:[function(e,t){"use strict";function n(e){return p+"r["+e.toString(36)+"]"}function o(e,t){return e.charAt(t)===p||t===e.length}function r(e){return""===e||e.charAt(0)===p&&e.charAt(e.length-1)!==p}function i(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(p)):""}function s(e,t){if(l(r(e)&&r(t)),l(i(e,t)),e===t)return e;for(var n=e.length+d,a=n;a=a;a++)if(o(e,a)&&o(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,i);return l(r(s)),s}function c(e,t,n,o,r,u){e=e||"",t=t||"",l(e!==t);var c=i(t,e);l(c||i(e,t));for(var p=0,d=c?a:s,h=e;r&&h===e||u&&h===t||n(h,c,o),h!==t;h=d(h,t))l(p++"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var r=t.getAttribute(o.CHECKSUM_ATTR_NAME);r=r&&parseInt(r,10);var i=n(e);return i===r}};t.exports=o},{"./adler32":76}],50:[function(e,t){"use strict";function n(e){var t=f(e);return t&&R.getID(t)}function o(e){var t=r(e);if(t)if(g.hasOwnProperty(t)){var n=g[t];n!==e&&(h(!s(n,t)),g[t]=e)}else g[t]=e;return t}function r(e){return e&&e.getAttribute&&e.getAttribute(v)||""}function i(e,t){var n=r(e);n!==t&&delete g[n],e.setAttribute(v,t),g[t]=e}function a(e){return g.hasOwnProperty(e)&&s(g[e],e)||(g[e]=R.findReactNodeByID(e)),g[e]}function s(e,t){if(e){h(r(e)===t);var n=R.findReactContainerForID(t);if(n&&d(n,e))return!0}return!1}function u(e){delete g[e]}var c=e("./ReactEventEmitter"),l=e("./ReactInstanceHandles"),p=e("./$"),d=e("./containsNode"),f=e("./getReactRootElementInContainer"),h=e("./invariant"),m=l.SEPARATOR,v="data-reactid",g={},C=1,y=9,E={},M={},R={allowFullPageRender:!1,totalInstantiationTime:0,totalInjectionTime:0,useTouchEvents:!1,_instancesByReactRootID:E,scrollMonitor:function(e,t){t()},prepareEnvironmentForDOM:function(e){h(e&&(e.nodeType===C||e.nodeType===y));var t=e.nodeType===C?e.ownerDocument:e;c.ensureListening(R.useTouchEvents,t)},_updateRootComponent:function(e,t,n,o){var r=t.props;return R.scrollMonitor(n,function(){e.replaceProps(r,o)}),e},_registerComponent:function(e,t){R.prepareEnvironmentForDOM(t);var n=R.registerContainer(t);return E[n]=e,n},_renderNewRootComponent:function(e,t,n){var o=R._registerComponent(e,t);return e.mountComponentIntoNode(o,t,n),e},renderComponent:function(e,t,o){var r=E[n(t)];if(r){if(r.constructor===e.constructor)return R._updateRootComponent(r,e,t,o);R.unmountComponentAtNode(t)}var i=f(t),a=i&&R.isRenderedByReact(i),s=a&&!r,u=R._renderNewRootComponent(e,t,s);return o&&o(),u},constructAndRenderComponent:function(e,t,n){return R.renderComponent(e(t),n)},constructAndRenderComponentByID:function(e,t,n){return R.constructAndRenderComponent(e,t,p(n))},registerContainer:function(e){var t=n(e);return t&&(t=l.getReactRootIDFromNodeID(t)),t||(t=l.createReactRootID()),M[t]=e,t},unmountComponentAtNode:function(e){var t=n(e),o=E[t];return o?(R.unmountComponentFromNode(o,e),delete E[t],delete M[t],!0):!1},unmountAndReleaseReactRootNode:function(){return R.unmountComponentAtNode.apply(this,arguments)},unmountComponentFromNode:function(e,t){for(e.unmountComponent(),t.nodeType===y&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=l.getReactRootIDFromNodeID(e),n=M[t];return n},findReactNodeByID:function(e){var t=R.findReactContainerForID(e);return R.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=R.getID(e);return t?t.charAt(0)===m:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(R.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){for(var n=[e.firstChild],o=0;ot;t++){var o=e[t].component,r=e[t].callback;r.call(o,o.getDOMNode())}e.length=0}},reset:function(){this._queue=null},destructor:function(){this.reset()}}),o.addPoolingTo(n),t.exports=n},{"./PooledClass":23,"./mixInto":110}],52:[function(e,t){"use strict";function n(e,t){return e&&t&&e.constructor===t.constructor}function o(e,t,n){f.push({parentID:e,parentNode:null,type:l.INSERT_MARKUP,markupIndex:h.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function r(e,t,n){f.push({parentID:e,parentNode:null,type:l.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){f.push({parentID:e,parentNode:null,type:l.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){f.push({parentID:e,parentNode:null,type:l.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function s(){f.length&&(c.DOMIDOperations.dangerouslyProcessChildrenUpdates(f,h),u())}function u(){f.length=0,h.length=0}var c=e("./ReactComponent"),l=e("./ReactMultiChildUpdateTypes"),p=e("./flattenChildren"),d=0,f=[],h=[],m={Mixin:{mountChildren:function(e,t){var n=p(e),o=[],r=0;this._renderedChildren=n;for(var i in n){var a=n[i];if(n.hasOwnProperty(i)&&a){var s=this._rootNodeID+"."+i,u=a.mountComponent(s,t,this._mountDepth+1);a._mountImage=u,a._mountIndex=r,o.push(u),r++}}return o},updateTextContent:function(e){d++;try{var t=this._renderedChildren;for(var n in t)t.hasOwnProperty(n)&&t[n]&&this._unmountChildByName(t[n],n);this.setTextContent(e)}catch(o){throw d--,d||u(),o}d--,d||s()},updateChildren:function(e,t){d++;try{this._updateChildren(e,t)}catch(n){throw d--,d||u(),n}d--,d||s()},_updateChildren:function(e,t){var o=p(e),r=this._renderedChildren;if(o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],c=o[i];n(u,c)?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u.receiveComponent(c,t),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChildByName(u,i)),c&&this._mountChildByNameAtIndex(c,i,s,t)),c&&s++}for(i in r)!r.hasOwnProperty(i)||!r[i]||o&&o[i]||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;for(var t in e){var n=e[t];n&&n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex>";t.exports=u},{"./createObjectFrom":81,"./invariant":98}],58:[function(e,t){"use strict";function n(){this.reinitializeTransaction(),this.reactMountReady=s.getPooled(null)}var o=e("./ExecutionEnvironment"),r=e("./PooledClass"),i=e("./ReactEventEmitter"),a=e("./ReactInputSelection"),s=e("./ReactMountReady"),u=e("./Transaction"),c=e("./mixInto"),l={initialize:a.getSelectionInformation,close:a.restoreSelection},p={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f=[l,p,d],h={getTransactionWrappers:function(){return o.canUseDOM?f:[]},getReactMountReady:function(){return this.reactMountReady},destructor:function(){s.release(this.reactMountReady),this.reactMountReady=null}};c(n,u.Mixin),c(n,h),r.addPoolingTo(n),t.exports=n},{"./ExecutionEnvironment":20,"./PooledClass":23,"./ReactEventEmitter":44,"./ReactInputSelection":47,"./ReactMountReady":51,"./Transaction":73,"./mixInto":110}],59:[function(e,t){"use strict";function n(e,t){s(o.isValidComponent(e)),s("function"==typeof t);var n=r.createReactRootID(),u=a.getPooled();u.reinitializeTransaction();try{u.perform(function(){var o=e.mountComponent(n,u,0);o=i.addChecksumToMarkup(o),t(o)},null)}finally{a.release(u)}}var o=e("./ReactComponent"),r=e("./ReactInstanceHandles"),i=e("./ReactMarkupChecksum"),a=e("./ReactReconcileTransaction"),s=e("./invariant");t.exports={renderComponentToString:n}},{"./ReactComponent":25,"./ReactInstanceHandles":48,"./ReactMarkupChecksum":49,"./ReactReconcileTransaction":58,"./invariant":98}],60:[function(e,t){"use strict";var n=e("./ReactComponent"),o=e("./ReactMount"),r=e("./escapeTextForBrowser"),i=e("./mixInto"),a=function(e){this.construct({text:e})};i(a,n.Mixin),i(a,{mountComponent:function(e,t,i){return n.Mixin.mountComponent.call(this,e,t,i),"'+r(this.props.text)+""},receiveComponent:function(e){var t=e.props;t.text!==this.props.text&&(this.props.text=t.text,n.DOMIDOperations.updateTextContentByID(this._rootNodeID,t.text))}}),t.exports=a},{"./ReactComponent":25,"./ReactMount":50,"./escapeTextForBrowser":84,"./mixInto":110}],61:[function(e,t){"use strict";function n(){c(p)}function o(e,t){n(),p.batchedUpdates(e,t)}function r(e,t){return e._mountDepth-t._mountDepth}function i(){l.sort(r);for(var e=0;e":">","<":"<",'"':""","'":"'","/":"/"},i=/[&><"'\/]/g;t.exports=o},{}],85:[function(e,t){var n=function(e){var t=Array.prototype.slice.call(arguments).map(function(e){return String(e)}),o=e.split("%s").length-1;return o!==t.length-1?n("ex args number mismatch: %s",JSON.stringify(t)):n._prefix+JSON.stringify(t)+n._suffix};n._prefix="",t.exports=n},{}],86:[function(e,t){"use strict";function n(e,t,n){for(var o=e.attributes,r=o.length,i=[],a=0;r>a;a++){var s=o.item(a);t.call(n,s)&&i.push(s)}return i}t.exports=n},{}],87:[function(e,t){"use strict";function n(e,t,n){var o=e;r(!o.hasOwnProperty(n)),o[n]=t}function o(e){if(null==e)return e;var t={};return i(e,n,t),t}var r=e("./invariant"),i=e("./traverseAllChildren");t.exports=o},{"./invariant":98,"./traverseAllChildren":116}],88:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],89:[function(e,t){function n(e,t,n){return"string"!=typeof e?e:t?o(e,t,n):document.getElementById(e)}function o(e,t,n){var i,a,s;if(r(t)==e)return t;if(t.getElementsByTagName){for(a=t.getElementsByTagName(n||"*"),s=0;s":"<"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var o=e("./ExecutionEnvironment"),r=e("./invariant"),i=o.canUseDOM?document.createElement("div"):null,a={circle:!0,g:!0,line:!0,path:!0,polyline:!0,rect:!0,text:!0},s=[1,'"],u=[1,"","
"],c=[3,"","
"],l=[1,"",""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c,circle:l,g:l,line:l,path:l,polyline:l,rect:l,text:l};t.exports=n},{"./ExecutionEnvironment":20,"./invariant":98}],93:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,t){for(var r=n(e),i=0,a=0;r;){if(3==r.nodeType){if(a=i+r.textContent.length,t>=i&&a>=t)return{node:r,offset:t-i};i=a}r=n(o(r))}}t.exports=r},{}],94:[function(e,t){"use strict";function n(e){return e?e.nodeType===o?e.documentElement:e.firstChild:null}var o=9;t.exports=n},{}],95:[function(e,t){"use strict";function n(){return!r&&o.canUseDOM&&(r="innerText"in document.createElement("div")?"innerText":"textContent"),r}var o=e("./ExecutionEnvironment"),r=null;t.exports=n},{"./ExecutionEnvironment":20}],96:[function(e,t){"use strict";function n(e){return e===window?{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],97:[function(e,t){function n(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=n},{}],98:[function(e,t){function n(e){if(!e)throw new Error("Invariant Violation")}t.exports=n},{}],99:[function(e,t){"use strict";function n(e,t){if(!o||t&&!o.addEventListener)return!1;var n=document.createElement("div"),i="on"+e,a=i in n;return a||(n.setAttribute(i,"return;"),a="function"==typeof n[i],"undefined"!=typeof n[i]&&(n[i]=void 0),n.removeAttribute(i)),!a&&r&&"wheel"===e&&(a=document.implementation.hasFeature("Events.wheel","3.0")),n=null,a}var o,r,i=e("./ExecutionEnvironment");i.canUseDOM&&(o=document.createElement("div"),r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{"./ExecutionEnvironment":20}],100:[function(e,t){function n(e){return!(!e||!("undefined"!=typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],101:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&o[e.type]||"TEXTAREA"===e.nodeName)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],102:[function(e,t){function n(e){return o(e)&&3==e.nodeType}var o=e("./isNode");t.exports=n},{"./isNode":100}],103:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var o=1;n>o;o++)t=arguments[o],t&&(e+=" "+t);return e}t.exports=n},{}],104:[function(e,t){"use strict";var n=e("./invariant"),o=function(e){var t,o={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(o[t]=t);return o};t.exports=o},{"./invariant":98}],105:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],106:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}t.exports=n},{}],107:[function(e,t){"use strict";var n=e("./mergeInto"),o=function(e,t){var o={};return n(o,e),n(o,t),o};t.exports=o},{"./mergeInto":109}],108:[function(e,t){"use strict";var n=e("./invariant"),o=e("./keyMirror"),r=36,i=function(e){return"object"!=typeof e||null===e},a={MAX_MERGE_DEPTH:r,isTerminal:i,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){n(Array.isArray(e)&&Array.isArray(t))},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){n(!i(e)&&!Array.isArray(e))},checkMergeLevel:function(e){n(r>e)},checkArrayStrategy:function(e){n(void 0===e||e in a.ArrayStrategies)},ArrayStrategies:o({Clobber:!0,IndexByIndex:!0})};t.exports=a},{"./invariant":98,"./keyMirror":104}],109:[function(e,t){"use strict";function n(e,t){if(r(e),null!=t){r(t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}var o=e("./mergeHelpers"),r=o.checkMergeObjectArg;t.exports=n},{"./mergeHelpers":108}],110:[function(e,t){"use strict";var n=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n])};t.exports=n},{}],111:[function(e,t){"use strict";function n(e,t){i("html"===e.tagName.toLowerCase()),t=t.trim(),i(0===t.toLowerCase().indexOf("")+1,a=t.lastIndexOf("<"),s=t.substring(0,n),u=t.substring(n,a),c=s.indexOf(" ")>-1,l=null;if(c){l=o(s.replace("html ","span ")+"")[0];var p=r(l,function(t){return e.getAttributeNS(t.namespaceURI,t.name)!==t.value});p.forEach(function(t){e.setAttributeNS(t.namespaceURI,t.name,t.value)})}var d=r(e,function(e){return!(l&&l.hasAttributeNS(e.namespaceURI,e.name))});d.forEach(function(t){e.removeAttributeNS(t.namespaceURI,t.name)}),e.innerHTML=u}var o=e("./createNodesFromMarkup"),r=e("./filterAttributes"),i=e("./invariant");t.exports=n},{"./createNodesFromMarkup":80,"./filterAttributes":86,"./invariant":98}],112:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o=0,r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.call(n,e[i],i,o++));return r}t.exports=n},{}],113:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o=0,r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.call(n,i,e[i],o++));return r}t.exports=n},{}],114:[function(e,t){"use strict";var n=e("./ExecutionEnvironment"),o=null;n.canUseDOM&&(o=window.performance||window.webkitPerformance),o&&o.now||(o=Date);var r=o.now.bind(o);t.exports=r},{"./ExecutionEnvironment":20}],115:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],116:[function(e,t){"use strict";function n(e,t,n){null!==e&&void 0!==e&&a(e,"",0,t,n)}var o=e("./ReactComponent"),r=e("./ReactTextComponent"),i=e("./invariant"),a=function(e,t,n,s,u){var c=0;if(Array.isArray(e))for(var l=0;l