From e72ba79930464aac319d878a10620f59d851ca4a Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Thu, 24 Oct 2019 13:01:23 -0700 Subject: [PATCH 01/50] inital pass at function components --- dart_test.yaml | 3 + example/test/function_component_test.dart | 15 ++++ example/test/function_component_test.html | 17 ++++ example/test/react_test_components.dart | 6 ++ lib/react.dart | 16 +++- lib/react_client.dart | 60 ++++++++++++- lib/react_client/react_interop.dart | 6 +- test/factory/common_factory_tests.dart | 7 +- test/factory/dart_function_factory_test.dart | 94 ++++++++++++++++++++ test/factory/dart_function_factory_test.html | 14 +++ test/lifecycle_test.dart | 69 +++++++++++++- test/lifecycle_test/function_component.dart | 16 ++++ 12 files changed, 313 insertions(+), 10 deletions(-) create mode 100644 dart_test.yaml create mode 100644 example/test/function_component_test.dart create mode 100644 example/test/function_component_test.html create mode 100644 test/factory/dart_function_factory_test.dart create mode 100644 test/factory/dart_function_factory_test.html create mode 100644 test/lifecycle_test/function_component.dart diff --git a/dart_test.yaml b/dart_test.yaml new file mode 100644 index 00000000..dc8f8074 --- /dev/null +++ b/dart_test.yaml @@ -0,0 +1,3 @@ +tags: + # Tags for functional components + functionComponent: diff --git a/example/test/function_component_test.dart b/example/test/function_component_test.dart new file mode 100644 index 00000000..2c328209 --- /dev/null +++ b/example/test/function_component_test.dart @@ -0,0 +1,15 @@ +import 'dart:html'; + +import 'package:react/react.dart' as react; +import 'package:react/react_dom.dart' as react_dom; +import 'package:react/react_client.dart'; + +import 'react_test_components.dart'; + +void main() { + setClientConfiguration(); + + react_dom.render( + functionComponent({},'Hello World!'), + querySelector('#content')); +} diff --git a/example/test/function_component_test.html b/example/test/function_component_test.html new file mode 100644 index 00000000..224e93f5 --- /dev/null +++ b/example/test/function_component_test.html @@ -0,0 +1,17 @@ + + + + + + + + + React Dart Examples: function component test + + +
+ + + + + diff --git a/example/test/react_test_components.dart b/example/test/react_test_components.dart index 7bf44389..faf55478 100644 --- a/example/test/react_test_components.dart +++ b/example/test/react_test_components.dart @@ -392,6 +392,12 @@ class _NewContextTypeConsumerComponent extends react.Component2 { } } +var functionComponent = react.registerFunctionComponent(HelloGreg); + +HelloGreg(Map props) { + return react.div({}, props['children'] ?? 'Hello Greg'); +} + class _Component2TestComponent extends react.Component2 with react.TypedSnapshot { get defaultProps => {'defaultProp': true}; diff --git a/lib/react.dart b/lib/react.dart index 32073cf7..1ed41459 100644 --- a/lib/react.dart +++ b/lib/react.dart @@ -20,6 +20,7 @@ export 'package:react/react_client/react_interop.dart' show forwardRef, createRe typedef Error PropValidator( TProps props, String propName, String componentName, String location, String propFullName); +typedef FunctionComponent = dynamic Function(Map props); typedef T ComponentFactory(); typedef ReactComponentFactoryProxy ComponentRegistrar(ComponentFactory componentFactory, [Iterable skipMethods]); @@ -30,6 +31,8 @@ typedef ReactDartComponentFactoryProxy2 ComponentRegistrar2( Component2BridgeFactory bridgeFactory, }); +typedef ReactDartFunctionComponentFactoryProxy FunctionComponentRegistrar(FunctionComponent componentFactory, {String componentName}); + /// Fragment component that allows the wrapping of children without the necessity of using /// an element that adds an additional layer to the DOM (div, span, etc). /// @@ -1186,6 +1189,9 @@ mixin TypedSnapshot { /// Creates a ReactJS virtual DOM instance (`ReactElement` on the client). abstract class ReactComponentFactoryProxy implements Function { + /// The JS component factory used by this factory to build [ReactElement]s. + ReactJsComponentFactory reactComponentFactory; + /// The type of component created by this factory. get type; @@ -1766,6 +1772,10 @@ ComponentRegistrar2 registerComponent2 = ( throw new Exception('setClientConfiguration must be called before registerComponent.'); }; +/// Registers [componentFactory] on both client and server. +FunctionComponentRegistrar registerFunctionComponent = (FunctionComponent componentFactory, {String componentName}) { + throw new Exception('setClientConfiguration must be called before registerComponent.'); +}; /// The HTML `` [AnchorElement]. var a; @@ -2570,9 +2580,13 @@ _createDOMComponents(creator) { /// /// The arguments are assigned to global variables, and React DOM `Component`s are created by calling /// [_createDOMComponents] with [domCreator]. -void setReactConfiguration(domCreator, customRegisterComponent, {ComponentRegistrar2 customRegisterComponent2}) { +void setReactConfiguration(domCreator, customRegisterComponent, { + ComponentRegistrar2 customRegisterComponent2, + FunctionComponentRegistrar customRegisterFunctionComponent, +}) { registerComponent = customRegisterComponent; registerComponent2 = customRegisterComponent2; + registerFunctionComponent = customRegisterFunctionComponent; // HTML Elements _createDOMComponents(domCreator); } diff --git a/lib/react_client.dart b/lib/react_client.dart index 1384feeb..ec138f87 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -11,6 +11,7 @@ import "dart:collection"; import "dart:html"; import 'dart:js'; import 'dart:js_util'; +import 'dart:js_util' as js_util; import "package:js/js.dart"; @@ -35,6 +36,12 @@ export 'package:react/react.dart' show ReactComponentFactoryProxy, ComponentFact /// See: typedef _CallbackRef(T componentOrDomNode); +/// A React component declared using a function that takes in [props] and returns rendered output. +/// +/// See . +typedef DartFunctionComponent = dynamic Function(Map props); +typedef JsFunctionComponent = dynamic Function(JsMap props); + /// Prepares [children] to be passed to the ReactJS [React.createElement] and /// the Dart [react.Component]. /// @@ -134,7 +141,7 @@ class ReactDartComponentFactoryProxy extends React } /// Creates ReactJS [Component2] instances for Dart components. -class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy +class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy with JsBackedMapsComponentFactoryBuilder implements ReactDartComponentFactoryProxy { /// The ReactJS class used as the type for all [ReactElement]s built by /// this factory. @@ -148,10 +155,12 @@ class ReactDartComponentFactoryProxy2 extends Rea ReactDartComponentFactoryProxy2(ReactClass reactClass) : this.reactClass = reactClass, this.reactComponentFactory = React.createFactory(reactClass), - this.defaultProps = new JsBackedMap.fromJs(reactClass.defaultProps); + this.defaultProps = new JsBackedMap.fromJs(reactClass?.defaultProps); ReactClass get type => reactClass; +} +mixin JsBackedMapsComponentFactoryBuilder on ReactComponentFactoryProxy { ReactElement build(Map props, [List childrenArgs = const []]) { // TODO 3.1.0-wip if we don't pass in a list into React, we don't get a list back in Dart... @@ -181,6 +190,8 @@ class ReactDartComponentFactoryProxy2 extends Rea /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for /// consumption by the [react] library internals. static JsMap generateExtendedJsProps(Map props) { + if (props == null) return newObject(); + final propsForJs = new JsBackedMap.from(props); final ref = propsForJs['ref']; @@ -734,8 +745,49 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { } } +class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy with JsBackedMapsComponentFactoryBuilder { + /// The ReactJS function used as the type for all [ReactElement]s built by + /// this factory. + final Function reactFunction; + + /// The name of this function. + final String componentName; + + /// The JS component factory used by this factory to build [ReactElement]s. + final ReactJsComponentFactory reactComponentFactory; + + ReactDartFunctionComponentFactoryProxy(reactFunction, [String componentName]) + : this.reactFunction = reactFunction, + this.componentName = componentName, + this.reactComponentFactory = React.createFactory(reactFunction); + + get type => reactFunction; +} +/// Creates a function component from the given [dartFunctionComponent] that can be used with React. +JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionComponent, {String componentName}) { + assert(() { + componentName ??= getProperty(dartFunctionComponent, 'name'); + return true; + }()); + jsFunctionComponent(JsMap jsProps) => dartFunctionComponent(jsProps != null ? JsBackedMap.backedBy(jsProps) : JsBackedMap()); + var interopFunction = allowInterop(jsFunctionComponent); + if (componentName != null){ + // This is a work-around to display the correct name in the React DevTools. + callMethod(getProperty(window, 'Object'), 'defineProperty', [interopFunction, 'name', jsify({'value': componentName})]); + } + // ignore: invalid_use_of_protected_member + setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); + return interopFunction; +} + +/// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [dartFunctionComponent] +/// which produces a new `JsFunctionComponent`. +ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, {String componentName}) => + new ReactDartFunctionComponentFactoryProxy(_wrapFunctionComponent(dartFunctionComponent, componentName: componentName)); + + /// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] -/// which produces a new JS [`ReactClass` component class](https://facebook.github.io/react/docs/top-level-api.html#react.createclass). +/// which produces a new JS [`ReactClass` component class]. ReactDartComponentFactoryProxy2 _registerComponent2( ComponentFactory componentFactory, { Iterable skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'], @@ -1202,7 +1254,7 @@ void setClientConfiguration() { throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); } - setReactConfiguration(_reactDom, _registerComponent, customRegisterComponent2: _registerComponent2); + setReactConfiguration(_reactDom, _registerComponent, customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. if (context['ReactDOMServer'] != null) { diff --git a/lib/react_client/react_interop.dart b/lib/react_client/react_interop.dart index 53f19a82..b02e59d3 100644 --- a/lib/react_client/react_interop.dart +++ b/lib/react_client/react_interop.dart @@ -7,6 +7,7 @@ library react_client.react_interop; import 'dart:html'; +import 'package:js/js_util.dart'; import 'package:meta/meta.dart'; import 'package:js/js.dart'; import 'package:react/react.dart'; @@ -218,10 +219,13 @@ abstract class ReactDartComponentVersion { @protected static String fromType(dynamic type) { // This check doesn't do much since ReactClass is an anonymous JS object, - // but it lets us safely cast to ReactClass. + // but it lets us safely cast to ReactClass if (type is ReactClass) { return type.dartComponentVersion; } + if (type is Function) { + return getProperty(type, 'dartComponentVersion'); + } return null; } diff --git a/test/factory/common_factory_tests.dart b/test/factory/common_factory_tests.dart index 8c8e9a84..063e9038 100644 --- a/test/factory/common_factory_tests.dart +++ b/test/factory/common_factory_tests.dart @@ -16,10 +16,10 @@ import 'package:react/react_client/react_interop.dart'; import '../util.dart'; -void commonFactoryTests(ReactComponentFactoryProxy factory, {bool isComponent2 = false}) { +void commonFactoryTests(ReactComponentFactoryProxy factory, {bool isComponent2 = false, bool isFunctionComponent = false}) { _childKeyWarningTests( factory, - renderWithUniqueOwnerName: isComponent2 ? _renderWithUniqueOwnerName2 : _renderWithUniqueOwnerName, + renderWithUniqueOwnerName: (isComponent2 || isFunctionComponent) ? _renderWithUniqueOwnerName2 : _renderWithUniqueOwnerName, ); test('renders an instance with the corresponding `type`', () { @@ -97,7 +97,8 @@ void commonFactoryTests(ReactComponentFactoryProxy factory, {bool isComponent2 = shouldAlwaysBeList: isDartComponent2(factory({}))); }); - if (isDartComponent(factory({}))) { + // Skipped for Function Components because they dont have instance memebers ... they are functions. + if (isDartComponent(factory({})) && !isFunctionComponent) { group('passes children to the Dart component when specified as', () { dynamic getDartChildren(ReactElement instance) { // Actually render the component to provide full end-to-end coverage diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart new file mode 100644 index 00000000..e74f5a97 --- /dev/null +++ b/test/factory/dart_function_factory_test.dart @@ -0,0 +1,94 @@ +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: invalid_use_of_protected_member +@TestOn('browser') +import 'dart:js'; + +import 'package:test/test.dart'; + +import 'package:react/react.dart' as react; +import 'package:react/react_client.dart'; +import 'package:react/react_client/react_interop.dart'; + +import '../util.dart'; +import 'common_factory_tests.dart'; + +main() { + setClientConfiguration(); + + group('ReactDartFunctionComponentFactoryProxy', () { + test('has a type corresponding to the backing JS Function', () { + expect(FunctionFoo.type, equals(FunctionFoo.reactFunction)); + }); + + group('- common factory behavior -', () { + group('Function Component -', () { + group('- common factory behavior -', () { + commonFactoryTests(FunctionFoo, isFunctionComponent: true); + }); + }); + + + group('utils', () { + test('ReactDartComponentVersion.fromType', () { + expect(ReactDartComponentVersion.fromType(react.div({}).type), isNull); + expect(ReactDartComponentVersion.fromType(JsFoo({}).type), isNull); + expect(ReactDartComponentVersion.fromType(FunctionFoo({}).type), ReactDartComponentVersion.component2); + expect(ReactDartComponentVersion.fromType(Foo({}).type), ReactDartComponentVersion.component); + expect(ReactDartComponentVersion.fromType(Foo2({}).type), ReactDartComponentVersion.component2); + }); + }); + + group('test utils', () { + // todo move somewhere else + test('isDartComponent2', () { + expect(isDartComponent2(react.div({})), isFalse); + expect(isDartComponent2(JsFoo({})), isFalse); + expect(isDartComponent2(FunctionFoo({})), isTrue); + expect(isDartComponent2(Foo({})), isFalse); + expect(isDartComponent2(Foo2({})), isTrue); + }); + + test('isDartComponent1', () { + expect(isDartComponent1(react.div({})), isFalse); + expect(isDartComponent1(JsFoo({})), isFalse); + expect(isDartComponent1(FunctionFoo({})), isFalse); + expect(isDartComponent1(Foo({})), isTrue); + expect(isDartComponent1(Foo2({})), isFalse); + }); + + test('isDartComponent', () { + expect(isDartComponent(react.div({})), isFalse); + expect(isDartComponent(JsFoo({})), isFalse); + expect(isDartComponent(FunctionFoo({})), isTrue); + expect(isDartComponent(Foo({})), isTrue); + expect(isDartComponent(Foo2({})), isTrue); + }); + }); + }); + }); +} + +final FunctionFoo = react.registerFunctionComponent(_FunctionFoo); + +_FunctionFoo(Map props) { + return react.div({}); +} + +final Foo = react.registerComponent(() => new _Foo()) as ReactDartComponentFactoryProxy; + +class _Foo extends react.Component { + @override + render() => react.div({}); +} + +final Foo2 = react.registerComponent(() => new _Foo2()) as ReactDartComponentFactoryProxy2; + +class _Foo2 extends react.Component2 { + @override + render() => react.div({}); +} + +final JsFoo = ReactJsComponentFactoryProxy(React.createClass(ReactClassConfig( + displayName: 'JsFoo', + render: allowInterop(() => react.div({})), +))); diff --git a/test/factory/dart_function_factory_test.html b/test/factory/dart_function_factory_test.html new file mode 100644 index 00000000..ac8d4d60 --- /dev/null +++ b/test/factory/dart_function_factory_test.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/test/lifecycle_test.dart b/test/lifecycle_test.dart index 87c57f76..8e185b32 100644 --- a/test/lifecycle_test.dart +++ b/test/lifecycle_test.dart @@ -20,6 +20,7 @@ import 'package:test/test.dart'; import 'lifecycle_test/component.dart' as components; import 'lifecycle_test/component2.dart' as components2; +import 'lifecycle_test/function_component.dart' as function_components; import 'lifecycle_test/util.dart'; import 'shared_type_tester.dart'; import 'util.dart'; @@ -27,7 +28,7 @@ import 'util.dart'; main() { setClientConfiguration(); - group('React component lifecycle:', () { + group('React Component lifecycle:', () { setUp(() => LifecycleTestHelper.staticLifecycleCalls = []); group('Component', () { sharedLifecycleTests( @@ -429,6 +430,72 @@ main() { }, throwsA(anything)); }); }); + + group('Function Component', () { + test('renders correctly', () { + var testProps = {'testProp': 'test'}; + var mountNode = new DivElement(); + react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); + expect(mountNode.innerHtml, 'testChild'); + }); + + test('updates on rerender with new props', () { + var testProps = {'testProp': 'test'}; + var updatedProps = {'testProp': 'test2'}; + var mountNode = new DivElement(); + react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); + expect(mountNode.innerHtml, 'testChild'); + react_dom.render(function_components.PropsTest(updatedProps, ['Child']), mountNode); + expect(mountNode.innerHtml, 'test2Child'); + }); + + group('recieves a JsBackedMap from the props argument', () { + test('when provided with an empty dart map', (){ + Element mountNode = DivElement(); + _PropsArgTypeTest(Map props) { + expect(props, isA()); + return null; + } + ReactDartFunctionComponentFactoryProxy PropsArgTypeTest = react.registerFunctionComponent(_PropsArgTypeTest); + react_dom.render(PropsArgTypeTest({}), mountNode); + }); + + test('when provided null', (){ + Element mountNode = DivElement(); + _PropsArgTypeTest(Map props) { + expect(props, isA()); + return null; + } + ReactDartFunctionComponentFactoryProxy PropsArgTypeTest = react.registerFunctionComponent(_PropsArgTypeTest); + react_dom.render(PropsArgTypeTest(null), mountNode); + }); + }); + + group('props are recieved correctly without interop interfering with the values:', () { + void testTypeValue(dynamic testValue) { + var retrievedValue; + Element mountNode = DivElement(); + _PropsTypeTest(Map props) { + expect(props, isA()); + retrievedValue = props['testValue']; + return null; + } + ReactDartFunctionComponentFactoryProxy PropsTypeTest = react.registerFunctionComponent(_PropsTypeTest); + react_dom.render(PropsTypeTest({'testValue': testValue}), mountNode); + expect(retrievedValue, same(testValue)); + } + + sharedTypeTests(testTypeValue); + }); + + test('recieves an empty JsBackedMap if no props are provided', () { + var testProps = {'testProp': 'test'}; + var mountNode = new DivElement(); + react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); + expect(mountNode.outerHtml, contains('testChild')); + }); + + }, tags: ['functionComponent']); }); } diff --git a/test/lifecycle_test/function_component.dart b/test/lifecycle_test/function_component.dart new file mode 100644 index 00000000..f33ff056 --- /dev/null +++ b/test/lifecycle_test/function_component.dart @@ -0,0 +1,16 @@ +// ignore_for_file: deprecated_member_use_from_same_package +@JS() +library react.lifecycle_test.function_component; + +import "package:js/js.dart"; +import 'package:react/react.dart' as react; +import 'package:react/react_client.dart'; +import 'package:react/react_client/react_interop.dart'; + +import 'util.dart'; + +ReactDartFunctionComponentFactoryProxy PropsTest = react.registerFunctionComponent(_PropsTest); + +_PropsTest(Map props) { + return [props['testProp'], props['children']]; +} From d5c2768fa3939aa90ba9ac36818bd0edab7237d4 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Thu, 24 Oct 2019 13:08:07 -0700 Subject: [PATCH 02/50] format --- example/test/function_component_test.dart | 4 +- lib/react.dart | 12 ++- lib/react_client.dart | 30 ++++-- test/factory/common_factory_tests.dart | 6 +- test/factory/dart_function_factory_test.dart | 1 - test/lifecycle_test.dart | 108 ++++++++++--------- 6 files changed, 88 insertions(+), 73 deletions(-) diff --git a/example/test/function_component_test.dart b/example/test/function_component_test.dart index 2c328209..40fb59cb 100644 --- a/example/test/function_component_test.dart +++ b/example/test/function_component_test.dart @@ -9,7 +9,5 @@ import 'react_test_components.dart'; void main() { setClientConfiguration(); - react_dom.render( - functionComponent({},'Hello World!'), - querySelector('#content')); + react_dom.render(functionComponent({}, 'Hello World!'), querySelector('#content')); } diff --git a/lib/react.dart b/lib/react.dart index 1ed41459..08d795f2 100644 --- a/lib/react.dart +++ b/lib/react.dart @@ -31,7 +31,8 @@ typedef ReactDartComponentFactoryProxy2 ComponentRegistrar2( Component2BridgeFactory bridgeFactory, }); -typedef ReactDartFunctionComponentFactoryProxy FunctionComponentRegistrar(FunctionComponent componentFactory, {String componentName}); +typedef ReactDartFunctionComponentFactoryProxy FunctionComponentRegistrar(FunctionComponent componentFactory, + {String componentName}); /// Fragment component that allows the wrapping of children without the necessity of using /// an element that adds an additional layer to the DOM (div, span, etc). @@ -1776,6 +1777,7 @@ ComponentRegistrar2 registerComponent2 = ( FunctionComponentRegistrar registerFunctionComponent = (FunctionComponent componentFactory, {String componentName}) { throw new Exception('setClientConfiguration must be called before registerComponent.'); }; + /// The HTML `` [AnchorElement]. var a; @@ -2580,9 +2582,11 @@ _createDOMComponents(creator) { /// /// The arguments are assigned to global variables, and React DOM `Component`s are created by calling /// [_createDOMComponents] with [domCreator]. -void setReactConfiguration(domCreator, customRegisterComponent, { - ComponentRegistrar2 customRegisterComponent2, - FunctionComponentRegistrar customRegisterFunctionComponent, +void setReactConfiguration( + domCreator, + customRegisterComponent, { + ComponentRegistrar2 customRegisterComponent2, + FunctionComponentRegistrar customRegisterFunctionComponent, }) { registerComponent = customRegisterComponent; registerComponent2 = customRegisterComponent2; diff --git a/lib/react_client.dart b/lib/react_client.dart index ec138f87..0ee3ab4c 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -141,7 +141,8 @@ class ReactDartComponentFactoryProxy extends React } /// Creates ReactJS [Component2] instances for Dart components. -class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy with JsBackedMapsComponentFactoryBuilder +class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy + with JsBackedMapsComponentFactoryBuilder implements ReactDartComponentFactoryProxy { /// The ReactJS class used as the type for all [ReactElement]s built by /// this factory. @@ -191,7 +192,7 @@ mixin JsBackedMapsComponentFactoryBuilder on ReactComponentFactoryProxy { /// consumption by the [react] library internals. static JsMap generateExtendedJsProps(Map props) { if (props == null) return newObject(); - + final propsForJs = new JsBackedMap.from(props); final ref = propsForJs['ref']; @@ -745,7 +746,8 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { } } -class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy with JsBackedMapsComponentFactoryBuilder { +class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy + with JsBackedMapsComponentFactoryBuilder { /// The ReactJS function used as the type for all [ReactElement]s built by /// this factory. final Function reactFunction; @@ -763,17 +765,23 @@ class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy get type => reactFunction; } + /// Creates a function component from the given [dartFunctionComponent] that can be used with React. JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionComponent, {String componentName}) { assert(() { componentName ??= getProperty(dartFunctionComponent, 'name'); return true; }()); - jsFunctionComponent(JsMap jsProps) => dartFunctionComponent(jsProps != null ? JsBackedMap.backedBy(jsProps) : JsBackedMap()); + jsFunctionComponent(JsMap jsProps) => + dartFunctionComponent(jsProps != null ? JsBackedMap.backedBy(jsProps) : JsBackedMap()); var interopFunction = allowInterop(jsFunctionComponent); - if (componentName != null){ + if (componentName != null) { // This is a work-around to display the correct name in the React DevTools. - callMethod(getProperty(window, 'Object'), 'defineProperty', [interopFunction, 'name', jsify({'value': componentName})]); + callMethod(getProperty(window, 'Object'), 'defineProperty', [ + interopFunction, + 'name', + jsify({'value': componentName}) + ]); } // ignore: invalid_use_of_protected_member setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); @@ -782,9 +790,10 @@ JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionCom /// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [dartFunctionComponent] /// which produces a new `JsFunctionComponent`. -ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, {String componentName}) => - new ReactDartFunctionComponentFactoryProxy(_wrapFunctionComponent(dartFunctionComponent, componentName: componentName)); - +ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, + {String componentName}) => + new ReactDartFunctionComponentFactoryProxy( + _wrapFunctionComponent(dartFunctionComponent, componentName: componentName)); /// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] /// which produces a new JS [`ReactClass` component class]. @@ -1254,7 +1263,8 @@ void setClientConfiguration() { throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); } - setReactConfiguration(_reactDom, _registerComponent, customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); + setReactConfiguration(_reactDom, _registerComponent, + customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. if (context['ReactDOMServer'] != null) { diff --git a/test/factory/common_factory_tests.dart b/test/factory/common_factory_tests.dart index 063e9038..70749452 100644 --- a/test/factory/common_factory_tests.dart +++ b/test/factory/common_factory_tests.dart @@ -16,10 +16,12 @@ import 'package:react/react_client/react_interop.dart'; import '../util.dart'; -void commonFactoryTests(ReactComponentFactoryProxy factory, {bool isComponent2 = false, bool isFunctionComponent = false}) { +void commonFactoryTests(ReactComponentFactoryProxy factory, + {bool isComponent2 = false, bool isFunctionComponent = false}) { _childKeyWarningTests( factory, - renderWithUniqueOwnerName: (isComponent2 || isFunctionComponent) ? _renderWithUniqueOwnerName2 : _renderWithUniqueOwnerName, + renderWithUniqueOwnerName: + (isComponent2 || isFunctionComponent) ? _renderWithUniqueOwnerName2 : _renderWithUniqueOwnerName, ); test('renders an instance with the corresponding `type`', () { diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index e74f5a97..310c5879 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -27,7 +27,6 @@ main() { }); }); - group('utils', () { test('ReactDartComponentVersion.fromType', () { expect(ReactDartComponentVersion.fromType(react.div({}).type), isNull); diff --git a/test/lifecycle_test.dart b/test/lifecycle_test.dart index 8e185b32..7d8ea559 100644 --- a/test/lifecycle_test.dart +++ b/test/lifecycle_test.dart @@ -432,69 +432,71 @@ main() { }); group('Function Component', () { - test('renders correctly', () { - var testProps = {'testProp': 'test'}; - var mountNode = new DivElement(); - react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); - expect(mountNode.innerHtml, 'testChild'); - }); + test('renders correctly', () { + var testProps = {'testProp': 'test'}; + var mountNode = new DivElement(); + react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); + expect(mountNode.innerHtml, 'testChild'); + }); - test('updates on rerender with new props', () { - var testProps = {'testProp': 'test'}; - var updatedProps = {'testProp': 'test2'}; - var mountNode = new DivElement(); - react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); - expect(mountNode.innerHtml, 'testChild'); - react_dom.render(function_components.PropsTest(updatedProps, ['Child']), mountNode); - expect(mountNode.innerHtml, 'test2Child'); - }); + test('updates on rerender with new props', () { + var testProps = {'testProp': 'test'}; + var updatedProps = {'testProp': 'test2'}; + var mountNode = new DivElement(); + react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); + expect(mountNode.innerHtml, 'testChild'); + react_dom.render(function_components.PropsTest(updatedProps, ['Child']), mountNode); + expect(mountNode.innerHtml, 'test2Child'); + }); - group('recieves a JsBackedMap from the props argument', () { - test('when provided with an empty dart map', (){ - Element mountNode = DivElement(); - _PropsArgTypeTest(Map props) { - expect(props, isA()); - return null; - } - ReactDartFunctionComponentFactoryProxy PropsArgTypeTest = react.registerFunctionComponent(_PropsArgTypeTest); - react_dom.render(PropsArgTypeTest({}), mountNode); - }); + group('recieves a JsBackedMap from the props argument', () { + test('when provided with an empty dart map', () { + Element mountNode = DivElement(); + _PropsArgTypeTest(Map props) { + expect(props, isA()); + return null; + } - test('when provided null', (){ - Element mountNode = DivElement(); - _PropsArgTypeTest(Map props) { - expect(props, isA()); - return null; - } - ReactDartFunctionComponentFactoryProxy PropsArgTypeTest = react.registerFunctionComponent(_PropsArgTypeTest); - react_dom.render(PropsArgTypeTest(null), mountNode); - }); + ReactDartFunctionComponentFactoryProxy PropsArgTypeTest = react.registerFunctionComponent(_PropsArgTypeTest); + react_dom.render(PropsArgTypeTest({}), mountNode); }); - group('props are recieved correctly without interop interfering with the values:', () { - void testTypeValue(dynamic testValue) { - var retrievedValue; - Element mountNode = DivElement(); - _PropsTypeTest(Map props) { - expect(props, isA()); - retrievedValue = props['testValue']; - return null; - } - ReactDartFunctionComponentFactoryProxy PropsTypeTest = react.registerFunctionComponent(_PropsTypeTest); - react_dom.render(PropsTypeTest({'testValue': testValue}), mountNode); - expect(retrievedValue, same(testValue)); + test('when provided null', () { + Element mountNode = DivElement(); + _PropsArgTypeTest(Map props) { + expect(props, isA()); + return null; } - sharedTypeTests(testTypeValue); + ReactDartFunctionComponentFactoryProxy PropsArgTypeTest = react.registerFunctionComponent(_PropsArgTypeTest); + react_dom.render(PropsArgTypeTest(null), mountNode); }); + }); - test('recieves an empty JsBackedMap if no props are provided', () { - var testProps = {'testProp': 'test'}; - var mountNode = new DivElement(); - react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); - expect(mountNode.outerHtml, contains('testChild')); - }); + group('props are recieved correctly without interop interfering with the values:', () { + void testTypeValue(dynamic testValue) { + var retrievedValue; + Element mountNode = DivElement(); + _PropsTypeTest(Map props) { + expect(props, isA()); + retrievedValue = props['testValue']; + return null; + } + + ReactDartFunctionComponentFactoryProxy PropsTypeTest = react.registerFunctionComponent(_PropsTypeTest); + react_dom.render(PropsTypeTest({'testValue': testValue}), mountNode); + expect(retrievedValue, same(testValue)); + } + + sharedTypeTests(testTypeValue); + }); + test('recieves an empty JsBackedMap if no props are provided', () { + var testProps = {'testProp': 'test'}; + var mountNode = new DivElement(); + react_dom.render(function_components.PropsTest(testProps, ['Child']), mountNode); + expect(mountNode.outerHtml, contains('testChild')); + }); }, tags: ['functionComponent']); }); } From e1f4046d6a35900dd0dc7b8ab2e1c46a4c07de5a Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Thu, 24 Oct 2019 13:44:06 -0700 Subject: [PATCH 03/50] fix JsFunctionComponent type signature - required additional arg for legacy context --- lib/react_client.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 0ee3ab4c..986be8a3 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -40,7 +40,11 @@ typedef _CallbackRef(T componentOrDomNode); /// /// See . typedef DartFunctionComponent = dynamic Function(Map props); -typedef JsFunctionComponent = dynamic Function(JsMap props); +/// The ReactJS function signature. +/// [props] will always be supplied as the first argument +/// [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary +/// to match darts generated call signature based on the number of args react provides. +typedef JsFunctionComponent = dynamic Function(JsMap props, [JsMap legacyContext]); /// Prepares [children] to be passed to the ReactJS [React.createElement] and /// the Dart [react.Component]. @@ -772,7 +776,7 @@ JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionCom componentName ??= getProperty(dartFunctionComponent, 'name'); return true; }()); - jsFunctionComponent(JsMap jsProps) => + jsFunctionComponent(JsMap jsProps, JsMap _legacyContext) => dartFunctionComponent(jsProps != null ? JsBackedMap.backedBy(jsProps) : JsBackedMap()); var interopFunction = allowInterop(jsFunctionComponent); if (componentName != null) { From 7a470c928d4039fadd391a02ee3d30cf68d313c6 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Thu, 24 Oct 2019 13:44:20 -0700 Subject: [PATCH 04/50] format --- lib/react_client.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/react_client.dart b/lib/react_client.dart index 986be8a3..51785c36 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -40,6 +40,7 @@ typedef _CallbackRef(T componentOrDomNode); /// /// See . typedef DartFunctionComponent = dynamic Function(Map props); + /// The ReactJS function signature. /// [props] will always be supplied as the first argument /// [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary From f1bf6ea3257f30f317db9c2f6b51532a52c503e7 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Thu, 24 Oct 2019 15:55:59 -0700 Subject: [PATCH 05/50] add interop for js null - used to force null returns to be javascript null, dart2js sometimes converts null to undefined and react doesn't like that, not one tiny bit. --- js_src/_dart_helpers.js | 7 ++++- lib/react.js | 9 ++++-- lib/react.js.map | 2 +- lib/react_client.dart | 8 +++--- lib/react_client/react_interop.dart | 5 ++++ lib/react_prod.js | 6 ++-- lib/react_prod.js.map | 2 +- lib/react_with_addons.js | 9 ++++-- lib/react_with_addons.js.map | 2 +- lib/react_with_react_dom_prod.js | 2 +- lib/react_with_react_dom_prod.js.map | 2 +- package-lock.json | 43 ++++++++++++++++++++-------- 12 files changed, 68 insertions(+), 29 deletions(-) diff --git a/js_src/_dart_helpers.js b/js_src/_dart_helpers.js index 6e605479..b5d7550f 100644 --- a/js_src/_dart_helpers.js +++ b/js_src/_dart_helpers.js @@ -10,10 +10,14 @@ var _reactDartContextSymbol = Symbol(_reactDartSymbolPrefix+'context'); /// A JS side function to allow Dart to throw an error from JS in order to catch it Dart side. /// Used within Component2 error boundry methods to dartify the error argument. /// See: https://github.com/dart-lang/sdk/issues/36363 -function _throwErrorFromJS(error){ +function _throwErrorFromJS(error) { throw error; } +/// A JS variable that can be used with dart interop in order to force returning a +/// javascript `null`. This prevents dart2js from possibly converting dart `null` into `undefined`. +var _jsNull = null; + function _createReactDartComponentClass(dartInteropStatics, componentStatics, jsConfig) { class ReactDartComponent extends React.Component { constructor(props, context) { @@ -165,4 +169,5 @@ export default { _createReactDartComponentClass2, _markChildValidated, _throwErrorFromJS, + _jsNull, } diff --git a/lib/react.js b/lib/react.js index c9848303..7baab4a9 100644 --- a/lib/react.js +++ b/lib/react.js @@ -155,7 +155,11 @@ var _reactDartContextSymbol = Symbol(_reactDartSymbolPrefix + 'context'); /// A function _throwErrorFromJS(error) { throw error; -} +} /// A JS variable that can be used with dart interop in order to force returning a +/// javascript `null`. This prevents dart2js from possibly converting dart `null` into `undefined`. + + +var _jsNull = null; function _createReactDartComponentClass(dartInteropStatics, componentStatics, jsConfig) { var ReactDartComponent = @@ -371,7 +375,8 @@ function _markChildValidated(child) { _createReactDartComponentClass: _createReactDartComponentClass, _createReactDartComponentClass2: _createReactDartComponentClass2, _markChildValidated: _markChildValidated, - _throwErrorFromJS: _throwErrorFromJS + _throwErrorFromJS: _throwErrorFromJS, + _jsNull: _jsNull }); /***/ }), diff --git a/lib/react.js.map b/lib/react.js.map index 3319607c..16aafdc2 100644 --- a/lib/react.js.map +++ b/lib/react.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js_src/_dart_helpers.js","webpack:///./js_src/dart_env_dev.js","webpack:///./js_src/react.js","webpack:///./node_modules/core-js/es/map/index.js","webpack:///./node_modules/core-js/es/object/assign.js","webpack:///./node_modules/core-js/es/reflect/delete-property.js","webpack:///./node_modules/core-js/es/set/index.js","webpack:///./node_modules/core-js/internals/a-function.js","webpack:///./node_modules/core-js/internals/a-possible-prototype.js","webpack:///./node_modules/core-js/internals/add-to-unscopables.js","webpack:///./node_modules/core-js/internals/an-instance.js","webpack:///./node_modules/core-js/internals/an-object.js","webpack:///./node_modules/core-js/internals/array-for-each.js","webpack:///./node_modules/core-js/internals/array-includes.js","webpack:///./node_modules/core-js/internals/array-iteration.js","webpack:///./node_modules/core-js/internals/array-species-create.js","webpack:///./node_modules/core-js/internals/bind-context.js","webpack:///./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack:///./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack:///./node_modules/core-js/internals/classof-raw.js","webpack:///./node_modules/core-js/internals/classof.js","webpack:///./node_modules/core-js/internals/collection-strong.js","webpack:///./node_modules/core-js/internals/collection.js","webpack:///./node_modules/core-js/internals/copy-constructor-properties.js","webpack:///./node_modules/core-js/internals/correct-prototype-getter.js","webpack:///./node_modules/core-js/internals/create-iterator-constructor.js","webpack:///./node_modules/core-js/internals/create-property-descriptor.js","webpack:///./node_modules/core-js/internals/define-iterator.js","webpack:///./node_modules/core-js/internals/define-well-known-symbol.js","webpack:///./node_modules/core-js/internals/descriptors.js","webpack:///./node_modules/core-js/internals/document-create-element.js","webpack:///./node_modules/core-js/internals/dom-iterables.js","webpack:///./node_modules/core-js/internals/enum-bug-keys.js","webpack:///./node_modules/core-js/internals/export.js","webpack:///./node_modules/core-js/internals/fails.js","webpack:///./node_modules/core-js/internals/freezing.js","webpack:///./node_modules/core-js/internals/function-to-string.js","webpack:///./node_modules/core-js/internals/get-built-in.js","webpack:///./node_modules/core-js/internals/get-iterator-method.js","webpack:///./node_modules/core-js/internals/global.js","webpack:///./node_modules/core-js/internals/has.js","webpack:///./node_modules/core-js/internals/hidden-keys.js","webpack:///./node_modules/core-js/internals/hide.js","webpack:///./node_modules/core-js/internals/html.js","webpack:///./node_modules/core-js/internals/ie8-dom-define.js","webpack:///./node_modules/core-js/internals/indexed-object.js","webpack:///./node_modules/core-js/internals/inherit-if-required.js","webpack:///./node_modules/core-js/internals/internal-metadata.js","webpack:///./node_modules/core-js/internals/internal-state.js","webpack:///./node_modules/core-js/internals/is-array-iterator-method.js","webpack:///./node_modules/core-js/internals/is-array.js","webpack:///./node_modules/core-js/internals/is-forced.js","webpack:///./node_modules/core-js/internals/is-object.js","webpack:///./node_modules/core-js/internals/is-pure.js","webpack:///./node_modules/core-js/internals/iterate.js","webpack:///./node_modules/core-js/internals/iterators-core.js","webpack:///./node_modules/core-js/internals/iterators.js","webpack:///./node_modules/core-js/internals/native-symbol.js","webpack:///./node_modules/core-js/internals/native-weak-map.js","webpack:///./node_modules/core-js/internals/object-assign.js","webpack:///./node_modules/core-js/internals/object-create.js","webpack:///./node_modules/core-js/internals/object-define-properties.js","webpack:///./node_modules/core-js/internals/object-define-property.js","webpack:///./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names-external.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names.js","webpack:///./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:///./node_modules/core-js/internals/object-get-prototype-of.js","webpack:///./node_modules/core-js/internals/object-keys-internal.js","webpack:///./node_modules/core-js/internals/object-keys.js","webpack:///./node_modules/core-js/internals/object-property-is-enumerable.js","webpack:///./node_modules/core-js/internals/object-set-prototype-of.js","webpack:///./node_modules/core-js/internals/object-to-string.js","webpack:///./node_modules/core-js/internals/own-keys.js","webpack:///./node_modules/core-js/internals/path.js","webpack:///./node_modules/core-js/internals/redefine-all.js","webpack:///./node_modules/core-js/internals/redefine.js","webpack:///./node_modules/core-js/internals/require-object-coercible.js","webpack:///./node_modules/core-js/internals/set-global.js","webpack:///./node_modules/core-js/internals/set-species.js","webpack:///./node_modules/core-js/internals/set-to-string-tag.js","webpack:///./node_modules/core-js/internals/shared-key.js","webpack:///./node_modules/core-js/internals/shared.js","webpack:///./node_modules/core-js/internals/sloppy-array-method.js","webpack:///./node_modules/core-js/internals/string-multibyte.js","webpack:///./node_modules/core-js/internals/to-absolute-index.js","webpack:///./node_modules/core-js/internals/to-indexed-object.js","webpack:///./node_modules/core-js/internals/to-integer.js","webpack:///./node_modules/core-js/internals/to-length.js","webpack:///./node_modules/core-js/internals/to-object.js","webpack:///./node_modules/core-js/internals/to-primitive.js","webpack:///./node_modules/core-js/internals/uid.js","webpack:///./node_modules/core-js/internals/well-known-symbol.js","webpack:///./node_modules/core-js/internals/wrapped-well-known-symbol.js","webpack:///./node_modules/core-js/modules/es.array.iterator.js","webpack:///./node_modules/core-js/modules/es.map.js","webpack:///./node_modules/core-js/modules/es.object.assign.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.object.to-string.js","webpack:///./node_modules/core-js/modules/es.reflect.delete-property.js","webpack:///./node_modules/core-js/modules/es.set.js","webpack:///./node_modules/core-js/modules/es.string.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.description.js","webpack:///./node_modules/core-js/modules/es.symbol.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.js","webpack:///./node_modules/core-js/modules/web.dom-collections.for-each.js","webpack:///./node_modules/core-js/modules/web.dom-collections.iterator.js","webpack:///./node_modules/core-js/stable/object/assign.js","webpack:///./node_modules/core-js/stable/reflect/delete-property.js","webpack:///./node_modules/create-react-class/factory.js","webpack:///./node_modules/create-react-class/index.js","webpack:///./node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/fbjs/lib/emptyObject.js","webpack:///./node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/fbjs/lib/warning.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-is/cjs/react-is.development.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react/cjs/react.development.js","webpack:///./node_modules/react/index.js","webpack:///(webpack)/buildin/global.js"],"names":["_reactDartSymbolPrefix","_reactDartContextSymbol","Symbol","_throwErrorFromJS","error","_createReactDartComponentClass","dartInteropStatics","componentStatics","jsConfig","ReactDartComponent","props","context","dartComponent","initComponent","internal","handleComponentWillMount","handleComponentDidMount","nextProps","nextContext","handleComponentWillReceiveProps","nextState","handleShouldComponentUpdate","handleComponentWillUpdate","prevProps","prevState","handleComponentDidUpdate","handleComponentWillUnmount","result","handleRender","React","Component","childContextKeys","contextKeys","length","childContextTypes","i","PropTypes","object","prototype","handleGetChildContext","contextTypes","_createReactDartComponentClass2","ReactDartComponent2","snapshot","handleGetSnapshotBeforeUpdate","info","handleComponentDidCatch","state","derivedState","handleGetDerivedStateFromProps","handleGetDerivedStateFromError","skipMethods","forEach","method","contextType","defaultProps","propTypes","_markChildValidated","child","store","_store","validated","__isDevelopment","require","CreateReactClass","window","Object","assign","DartHelpers","createClass","process"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;ACjFA,eAAe,mBAAO,CAAC,6EAAwB;;AAE/C,cAAc,mBAAO,CAAC,2EAAuB;;AAE7C,sBAAsB,mBAAO,CAAC,6FAAgC;;AAE9D,yCAAyC;AACzC;;AAEA;AACA;;AAEA;AACA,kCAAkC;;AAElC,uFAAuF;AACvF;AACA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;ACtBA,gBAAgB,mBAAO,CAAC,+EAAyB,EAAE;;;AAGnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;AClCA,eAAe,mBAAO,CAAC,6EAAwB,EAAE;;;AAGjD;AACA;AACA,kEAAkE;AAClE,GAAG;AACH;AACA;AACA;AACA;AACA,E;;;;;;;;;;;ACXA,sBAAsB,mBAAO,CAAC,6FAAgC;;AAE9D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA,E;;;;;;;;;;;ACrDA,iBAAiB;;AAEjB;AACA;AACA,E;;;;;;;;;;;ACJA,iBAAiB,mBAAO,CAAC,iFAA0B;;AAEnD,sBAAsB,mBAAO,CAAC,6FAAgC;;AAE9D,mDAAmD;;AAEnD;AACA;AACA,CAAC,mBAAmB;;AAEpB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;ACzBa;;AAEb,qBAAqB,mBAAO,CAAC,uGAAqC;;AAElE,aAAa,mBAAO,CAAC,qFAA4B;;AAEjD,kBAAkB,mBAAO,CAAC,mFAA2B;;AAErD,WAAW,mBAAO,CAAC,mFAA2B;;AAE9C,iBAAiB,mBAAO,CAAC,iFAA0B;;AAEnD,cAAc,mBAAO,CAAC,yEAAsB;;AAE5C,qBAAqB,mBAAO,CAAC,yFAA8B;;AAE3D,iBAAiB,mBAAO,CAAC,iFAA0B;;AAEnD,kBAAkB,mBAAO,CAAC,iFAA0B;;AAEpD,cAAc,mBAAO,CAAC,6FAAgC;;AAEtD,0BAA0B,mBAAO,CAAC,uFAA6B;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;;AAEvD;AACA;;AAEA;AACA;;AAEA;AACA,yCAAyC;;AAEzC;AACA;AACA,mDAAmD;;AAEnD,+BAA+B,OAAO;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;AACxC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sDAAsD;;AAEtD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AAC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AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA,GAAG,eAAe,mBAAmB;;;AAGrC;AACA;;AAEA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,E;;;;;;;;;;;AC5HA,WAAW,mBAAO,CAAC,mEAAmB;;AAEtC,UAAU,mBAAO,CAAC,iEAAkB;;AAEpC,mCAAmC,mBAAO,CAAC,6GAAwC;;AAEnF,qBAAqB,mBAAO,CAAC,uGAAqC;;AAElE;AACA,+CAA+C;AAC/C;AACA;AACA,GAAG;AACH,E;;;;;;;;;;;ACbA,YAAY,mBAAO,CAAC,qEAAoB,EAAE;;;AAG1C;AACA,iCAAiC;AACjC;AACA;AACA;AACA,GAAG;AACH,CAAC,E;;;;;;;;;;;ACTD,aAAa,mBAAO,CAAC,uEAAqB;;AAE1C,eAAe,mBAAO,CAAC,6EAAwB;;AAE/C,+BAA+B;;AAE/B;;AAEA;AACA;AACA,E;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;AClCA;AACA,qI;;;;;;;;;;;ACDA,aAAa,mBAAO,CAAC,uEAAqB;;AAE1C,+BAA+B,mBAAO,CAAC,+HAAiD;;AAExF,WAAW,mBAAO,CAAC,mEAAmB;;A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A;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,EAAE;AACF;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA,CAAC,EAAE;AACH;;AAEA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA,KAAK,QAAQ;AACb,iDAAiD;AACjD,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;AACH;;AAEA,0GAA0G;AAC1G;;AAEA;AACA,0B;;;;;;;;;;;AC3XA,aAAa,mBAAO,CAAC,uEAAqB;;AAE1C,mBAAmB,mBAAO,CAAC,qFAA4B;;AAEvD,cAAc,mBAAO,CAAC,uFAA6B;;AAE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AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,0BAA0B;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,WAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA,KAAK;AACL;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,gDAAgD;AAChD,KAAK;AACL;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,2CAA2C;AAC3C,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,wCAAwC;AACxC,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,IAAqC;AACjD,wFAAwF;AACxF;AACA;AACA;AACA;;AAEA;AACA,iGAAiG;;AAEjG;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,YAAY,IAAqC;AACjD;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,uDAAuD;;AAEvD,+NAA+N;AAC/N;;;AAGA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;;AAEA,gBAAgB,IAAqC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,gMAAgM;;AAEhM;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;;;AAGA;AACA;;AAEA;AACA;AACA,8KAA8K;;AAE9K;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;;;AAGA;AACA;;AAEA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,aAAa;AACvG;AACA,SAAS,iDAAiD;AAC1D;AACA;;;AAGA;AACA,cAAc,IAAqC;AACnD;AACA;AACA,SAAS;AACT,cAAc,IAAqC;AACnD;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;;AAGA;AACA;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA,OAAO;;;AAGP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;;AAEA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;;AAE1D;AACA;AACA;;AAEA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;;;;;;;AC1xBA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,YAAY,mBAAO,CAAC,4CAAO;;AAE3B,cAAc,mBAAO,CAAC,+DAAW;;AAEjC;AACA;AACA,CAAC;;;AAGD;AACA,sF;;;;;;;;;;;;ACnBa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+B;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;;AAEA,IAAI,IAAqC;AACzC;AACA;;AAEA,6B;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qDAAqD;AACrD,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA,0BAA0B;;AAE1B;AACA;AACA;;AAEA,2B;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,oBAAoB,mBAAO,CAAC,iEAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,IAAI,IAAqC;AACzC;AACA,sFAAsF,aAAa;AACnG;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA,4FAA4F,eAAe;AAC3G;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yB;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA,kCAAkC;;AAElC;;AAEA;AACA;AACA,KAAK;;;AAGL;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA,KAAK;;AAEL,oCAAoC;AACpC;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;;AAEjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;;;AAGA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA,0HAA0H;AAC1H;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,sIAAsI;AACtI;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA,gC;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,cAAc,mBAAO,CAAC,kDAAU;;AAEhC,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;;AAE/D,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;;AAEA;;AAEA,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B;AAC7B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;;AAGA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAG;;;AAGH;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,KAAqC;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,sBAAsB;AAC3C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,SAAM;AAC7I;AACA;;AAEA,mBAAmB,gCAAgC;AACnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gCAAgC;AACrD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;;AAGA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;;;AAGL;AACA;AACA;;AAEA;AACA,GAAG;;;AAGH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;ACloBA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,kDAAU,EAAE;AACpC;;;AAGA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,CAAC,MAAM,E;;;;;;;;;;;;ACbP;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;AACA,sC;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA,KAAK,EAAE;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA,0FAA0F,aAAa;AACvG;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA,gGAAgG,eAAe;AAC/G;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;AC/Oa;;AAEb,IAAI,KAAqC,EAAE,EAE1C;AACD,mBAAmB,mBAAO,CAAC,0FAA+B;AAC1D,C;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA,kBAAkB,mBAAO,CAAC,4DAAe;;AAEzC,yBAAyB,mBAAO,CAAC,8EAA2B,EAAE;;;AAG9D,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA,8FAA8F,aAAa;AAC3G;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oGAAoG,eAAe;AACnH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8FAA8F,aAAa;AAC3G;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,uDAAuD;AACvD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yOAAyO;AACzO;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,UAAU;AAC3B,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,OAAO;AACxB,iBAAiB,UAAU;AAC3B,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,OAAO;AACxB,iBAAiB,UAAU;AAC3B,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;;AAE7B,8BAA8B;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;;AAEA;AACA,uDAAuD;;AAEvD;;AAEA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,SAAS;;;AAGT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D;;AAE9D,8FAA8F,aAAa;AAC3G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,eAAe,cAAc;AAC7B,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;;AAEX;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;;AAEA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;;;AAGA;AACA,mBAAmB;;AAEnB;AACA;AACA,qBAAqB;AACrB,6DAA6D,SAAS;AACtE,2BAA2B,SAAS;AACpC;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP,mBAAmB;;AAEnB,4BAA4B,iBAAiB;;;AAG7C;AACA,4BAA4B;;AAE5B,+BAA+B;AAC/B;AACA;;AAEA,mCAAmC;;AAEnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;;AAGT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB,eAAe,GAAG;AAClB;AACA,gBAAgB,QAAQ;AACxB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sJAAsJ,yCAAyC;AAC/L;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,UAAU;AACzB,eAAe,GAAG;AAClB,gBAAgB,QAAQ;AACxB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,gBAAgB;AAChB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,gBAAgB,OAAO;AACvB;;;AAGA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,aAAa;AAC7B;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,EAAE;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA,eAAe;AACf;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA,eAAe;AACf;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,8bAA8b;;AAE9b;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,EAAE;AACjB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,8DAA8D;AAC9D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,EAAE;AACjB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;;AAGA;AACA;AACA;;AAEA,qBAAqB,iBAAiB;AACtC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,+CAA+C;AAC/C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA,2DAA2D;AAC3D;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,qBAAqB;AAClD;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,kLAAkL,SAAS,MAAM,IAAI;AACrM;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+CAA+C;AAC/C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA,yDAAyD;AACzD;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,sBAAsB;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2CAA2C;AAC3C;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,KAAI;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,UAAU,KAAI;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,+BAA+B;;AAE/B,qCAAqC;;AAErC,+BAA+B;;AAE/B,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,8CAA8C;AAC9C;;AAEA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;ACluEa;;AAEb,IAAI,KAAqC,EAAE,EAE1C;AACD,mBAAmB,mBAAO,CAAC,iFAA4B;AACvD,C;;;;;;;;;;;ACNA,MAAM;;AAEN;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,4CAA4C;;;AAG5C,mB","file":"react.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js_src/react.js\");\n","/**\n * react-dart JS interop helpers (used by react_client.dart and react_client/js_interop_helpers.dart)\n */\n/// Prefix to namespace react-dart symbols\nvar _reactDartSymbolPrefix = 'react-dart.';\n/// A global symbol to identify javascript objects owned by react-dart context,\n/// in order to jsify and unjsify context objects correctly.\nvar _reactDartContextSymbol = Symbol(_reactDartSymbolPrefix+'context');\n\n/// A JS side function to allow Dart to throw an error from JS in order to catch it Dart side.\n/// Used within Component2 error boundry methods to dartify the error argument.\n/// See: https://github.com/dart-lang/sdk/issues/36363\nfunction _throwErrorFromJS(error){\n throw error;\n}\n\nfunction _createReactDartComponentClass(dartInteropStatics, componentStatics, jsConfig) {\n class ReactDartComponent extends React.Component {\n constructor(props, context) {\n super(props, context);\n this.dartComponent = dartInteropStatics.initComponent(this, this.props.internal, this.context, componentStatics);\n }\n UNSAFE_componentWillMount() {\n dartInteropStatics.handleComponentWillMount(this.dartComponent);\n }\n componentDidMount() {\n dartInteropStatics.handleComponentDidMount(this.dartComponent);\n }\n /*\n /// This cannot be used with UNSAFE_ lifecycle methods.\n getDerivedStateFromProps(nextProps, prevState) {\n return dartInteropStatics.handleGetDerivedStateFromProps(this.props.internal, nextProps.internal);\n }\n */\n UNSAFE_componentWillReceiveProps(nextProps, nextContext) {\n dartInteropStatics.handleComponentWillReceiveProps(this.dartComponent, nextProps.internal, nextContext);\n }\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n return dartInteropStatics.handleShouldComponentUpdate(this.dartComponent, nextContext);\n }\n /*\n /// This cannot be used with UNSAFE_ lifecycle methods.\n getSnapshotBeforeUpdate() {\n return dartInteropStatics.handleGetSnapshotBeforeUpdate(this.props.internal, prevProps.internal);\n }\n */\n UNSAFE_componentWillUpdate(nextProps, nextState, nextContext) {\n dartInteropStatics.handleComponentWillUpdate(this.dartComponent, nextContext);\n }\n componentDidUpdate(prevProps, prevState) {\n dartInteropStatics.handleComponentDidUpdate(this.dartComponent, prevProps.internal);\n }\n componentWillUnmount() {\n dartInteropStatics.handleComponentWillUnmount(this.dartComponent);\n }\n render() {\n var result = dartInteropStatics.handleRender(this.dartComponent);\n if (typeof result === 'undefined') result = null;\n return result;\n }\n }\n\n // React limits the accessible context entries\n // to the keys specified in childContextTypes/contextTypes.\n var childContextKeys = jsConfig && jsConfig.childContextKeys;\n var contextKeys = jsConfig && jsConfig.contextKeys;\n\n if (childContextKeys && childContextKeys.length !== 0) {\n ReactDartComponent.childContextTypes = {};\n for (var i = 0; i < childContextKeys.length; i++) {\n ReactDartComponent.childContextTypes[childContextKeys[i]] = React.PropTypes.object;\n }\n // Only declare this when `childContextKeys` is non-empty to avoid unnecessarily\n // creating interop context objects for components that won't use it.\n ReactDartComponent.prototype['getChildContext'] = function() {\n return dartInteropStatics.handleGetChildContext(this.dartComponent);\n };\n }\n\n if (contextKeys && contextKeys.length !== 0) {\n ReactDartComponent.contextTypes = {};\n for (var i = 0; i < contextKeys.length; i++) {\n ReactDartComponent.contextTypes[contextKeys[i]] = React.PropTypes.object;\n }\n }\n\n return ReactDartComponent;\n}\n\nfunction _createReactDartComponentClass2(dartInteropStatics, componentStatics, jsConfig) {\n class ReactDartComponent2 extends React.Component {\n constructor(props, context) {\n super(props, context);\n // TODO combine these two calls into one\n this.dartComponent = dartInteropStatics.initComponent(this, componentStatics);\n }\n\n componentDidMount() {\n dartInteropStatics.handleComponentDidMount(this.dartComponent);\n }\n shouldComponentUpdate(nextProps, nextState) {\n return dartInteropStatics.handleShouldComponentUpdate(this.dartComponent, nextProps, nextState);\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n let derivedState = dartInteropStatics.handleGetDerivedStateFromProps(componentStatics, nextProps, prevState);\n return typeof derivedState !== 'undefined' ? derivedState : null;\n }\n\n getSnapshotBeforeUpdate(prevProps, prevState) {\n let snapshot = dartInteropStatics.handleGetSnapshotBeforeUpdate(this.dartComponent, prevProps, prevState);\n return typeof snapshot !== 'undefined' ? snapshot : null;\n }\n componentDidUpdate(prevProps, prevState, snapshot) {\n dartInteropStatics.handleComponentDidUpdate(this.dartComponent, this, prevProps, prevState, snapshot);\n }\n componentWillUnmount() {\n dartInteropStatics.handleComponentWillUnmount(this.dartComponent);\n }\n componentDidCatch(error, info) {\n dartInteropStatics.handleComponentDidCatch(this.dartComponent, error, info);\n }\n static getDerivedStateFromError(error) {\n return dartInteropStatics.handleGetDerivedStateFromError(componentStatics, error);\n }\n render() {\n var result = dartInteropStatics.handleRender(this.dartComponent, this.props, this.state, this.context);\n if (typeof result === 'undefined') result = null;\n return result;\n }\n }\n\n // Delete methods that the user does not want to include (such as error boundary event).\n jsConfig.skipMethods.forEach((method) => {\n if (ReactDartComponent2[method]) {\n delete ReactDartComponent2[method];\n } else {\n delete ReactDartComponent2.prototype[method];\n }\n });\n\n if (jsConfig) {\n if (jsConfig.contextType) {\n ReactDartComponent2.contextType = jsConfig.contextType;\n }\n if (jsConfig.defaultProps) {\n ReactDartComponent2.defaultProps = jsConfig.defaultProps;\n }\n if (jsConfig.propTypes) {\n ReactDartComponent2.propTypes = jsConfig.propTypes;\n }\n }\n\n return ReactDartComponent2;\n}\n\nfunction _markChildValidated(child) {\n const store = child._store;\n if (store) store.validated = true;\n}\n\nexport default {\n _reactDartContextSymbol,\n _createReactDartComponentClass,\n _createReactDartComponentClass2,\n _markChildValidated,\n _throwErrorFromJS,\n}\n","React.__isDevelopment = true;\n","// React 16 Polyfill requirements: https://reactjs.org/docs/javascript-environment-requirements.html\nimport 'core-js/es/map';\nimport 'core-js/es/set';\n\n// Know required Polyfill's for dart side usage\nimport 'core-js/stable/reflect/delete-property';\nimport 'core-js/stable/object/assign';\n\n// Additional polyfills are included by core-js based on 'usage' and browser requirements\n\n// Custom dart side methods\nimport DartHelpers from './_dart_helpers';\n\nconst React = require('react');\nconst PropTypes = require('prop-types');\nconst CreateReactClass = require('create-react-class');\n\nwindow.React = React;\nObject.assign(window, DartHelpers);\n\nReact.createClass = CreateReactClass; // TODO: Remove this once over_react_test doesnt rely on createClass.\nReact.PropTypes = PropTypes; // Only needed to support legacy context until we update. lol jk we need it for prop validation now.\n\nif (process.env.NODE_ENV == 'production') {\n require('./dart_env_prod');\n} else {\n require('./dart_env_dev');\n}\n","require('../../modules/es.map');\n\nrequire('../../modules/es.object.to-string');\n\nrequire('../../modules/es.string.iterator');\n\nrequire('../../modules/web.dom-collections.iterator');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Map;","require('../../modules/es.object.assign');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.assign;","require('../../modules/es.reflect.delete-property');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Reflect.deleteProperty;","require('../../modules/es.set');\n\nrequire('../../modules/es.object.to-string');\n\nrequire('../../modules/es.string.iterator');\n\nrequire('../../modules/web.dom-collections.iterator');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Set;","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n }\n\n return it;\n};","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n }\n\n return it;\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar create = require('../internals/object-create');\n\nvar hide = require('../internals/hide');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n hide(ArrayPrototype, UNSCOPABLES, create(null));\n} // add a key to Array.prototype[@@unscopables]\n\n\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n }\n\n return it;\n};","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n }\n\n return it;\n};","'use strict';\n\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar sloppyArrayMethod = require('../internals/sloppy-array-method'); // `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n\n\nmodule.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn\n/* , thisArg */\n) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;","var toIndexedObject = require('../internals/to-indexed-object');\n\nvar toLength = require('../internals/to-length');\n\nvar toAbsoluteIndex = require('../internals/to-absolute-index'); // `Array.prototype.{ indexOf, includes }` methods implementation\n\n\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};","var bind = require('../internals/bind-context');\n\nvar IndexedObject = require('../internals/indexed-object');\n\nvar toObject = require('../internals/to-object');\n\nvar toLength = require('../internals/to-length');\n\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\n\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n\n for (; length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3:\n return true;\n // some\n\n case 5:\n return value;\n // find\n\n case 6:\n return index;\n // findIndex\n\n case 2:\n push.call(target, value);\n // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6)\n};","var isObject = require('../internals/is-object');\n\nvar isArray = require('../internals/is-array');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\n\nmodule.exports = function (originalArray, length) {\n var C;\n\n if (isArray(originalArray)) {\n C = originalArray.constructor; // cross-realm fallback\n\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n }\n\n return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};","var aFunction = require('../internals/a-function'); // optional / simple context binding\n\n\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 0:\n return function () {\n return fn.call(that);\n };\n\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};","var anObject = require('../internals/an-object'); // call something on iterator step with safe closing on error\n\n\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return {\n done: !!called++\n };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n }; // eslint-disable-next-line no-throw-literal\n\n\n Array.from(iteratorWithReturn, function () {\n throw 2;\n });\n} catch (error) {\n /* empty */\n}\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n\n try {\n var object = {};\n\n object[ITERATOR] = function () {\n return {\n next: function () {\n return {\n done: ITERATION_SUPPORT = true\n };\n }\n };\n };\n\n exec(object);\n } catch (error) {\n /* empty */\n }\n\n return ITERATION_SUPPORT;\n};","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};","var classofRaw = require('../internals/classof-raw');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag'); // ES3 wrong here\n\nvar CORRECT_ARGUMENTS = classofRaw(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) {\n /* empty */\n }\n}; // getting tag from ES6+ `Object.prototype.toString`\n\n\nmodule.exports = function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};","'use strict';\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar create = require('../internals/object-create');\n\nvar redefineAll = require('../internals/redefine-all');\n\nvar bind = require('../internals/bind-context');\n\nvar anInstance = require('../internals/an-instance');\n\nvar iterate = require('../internals/iterate');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar setSpecies = require('../internals/set-species');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar fastKey = require('../internals/internal-metadata').fastKey;\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n });\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index; // change existing entry\n\n if (entry) {\n entry.value = value; // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;else that.size++; // add to index\n\n if (index !== 'F') state.index[index] = entry;\n }\n\n return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that); // fast case\n\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index]; // frozen object case\n\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;else that.size = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;else that.size--;\n }\n\n return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn\n /* , that = undefined */\n ) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this); // revert to the last existing entry\n\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n redefineAll(C.prototype, IS_MAP ? {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last; // revert to the last existing entry\n\n while (entry && entry.removed) entry = entry.previous; // get next entry\n\n\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n } // return step by kind\n\n\n if (kind == 'keys') return {\n value: entry.key,\n done: false\n };\n if (kind == 'values') return {\n value: entry.value,\n done: false\n };\n return {\n value: [entry.key, entry.value],\n done: false\n };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2\n\n setSpecies(CONSTRUCTOR_NAME);\n }\n};","'use strict';\n\nvar $ = require('../internals/export');\n\nvar global = require('../internals/global');\n\nvar isForced = require('../internals/is-forced');\n\nvar redefine = require('../internals/redefine');\n\nvar InternalMetadataModule = require('../internals/internal-metadata');\n\nvar iterate = require('../internals/iterate');\n\nvar anInstance = require('../internals/an-instance');\n\nvar isObject = require('../internals/is-object');\n\nvar fails = require('../internals/fails');\n\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) {\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var ADDER = IS_MAP ? 'set' : 'add';\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY, KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n });\n }; // eslint-disable-next-line max-len\n\n\n if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor(); // early implementations not supports chaining\n\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n\n var THROWS_ON_PRIMITIVES = fails(function () {\n instance.has(1);\n }); // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new\n\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) {\n new NativeConstructor(iterable);\n }); // for early implementations -0 and +0 not the same\n\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n\n while (index--) $instance[ADDER](index, index);\n\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method\n\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({\n global: true,\n forced: Constructor != NativeConstructor\n }, exported);\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n return Constructor;\n};","var has = require('../internals/has');\n\nvar ownKeys = require('../internals/own-keys');\n\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() {\n /* empty */\n }\n\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});","'use strict';\n\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\n\nvar create = require('../internals/object-create');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () {\n return this;\n};\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, {\n next: createPropertyDescriptor(1, next)\n });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};","'use strict';\n\nvar $ = require('../internals/export');\n\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\n\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar hide = require('../internals/hide');\n\nvar redefine = require('../internals/redefine');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar Iterators = require('../internals/iterators');\n\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () {\n return this;\n};\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS:\n return function keys() {\n return new IteratorConstructor(this, KIND);\n };\n\n case VALUES:\n return function values() {\n return new IteratorConstructor(this, KIND);\n };\n\n case ENTRIES:\n return function entries() {\n return new IteratorConstructor(this, KIND);\n };\n }\n\n return function () {\n return new IteratorConstructor(this);\n };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY; // fix native\n\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n hide(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n } // Set @@toStringTag to native iterators\n\n\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n\n defaultIterator = function values() {\n return nativeIterator.call(this);\n };\n } // define iterator\n\n\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n hide(IterablePrototype, ITERATOR, defaultIterator);\n }\n\n Iterators[NAME] = defaultIterator; // export additional methods\n\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({\n target: NAME,\n proto: true,\n forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME\n }, methods);\n }\n\n return methods;\n};","var path = require('../internals/path');\n\nvar has = require('../internals/has');\n\nvar wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};","var fails = require('../internals/fails'); // Thank's IE8 for his funny defineProperty\n\n\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});","var global = require('../internals/global');\n\nvar isObject = require('../internals/is-object');\n\nvar document = global.document; // typeof document.createElement is 'object' in old IE\n\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};","// IE8- don't enum bug keys\nmodule.exports = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];","var global = require('../internals/global');\n\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\nvar hide = require('../internals/hide');\n\nvar redefine = require('../internals/redefine');\n\nvar setGlobal = require('../internals/set-global');\n\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar isForced = require('../internals/is-forced');\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\n\n\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n\n if (target) for (key in source) {\n sourceProperty = source[key];\n\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target\n\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n } // add a flag to not completely full polyfills\n\n\n if (options.sham || targetProperty && targetProperty.sham) {\n hide(sourceProperty, 'sham', true);\n } // extend global\n\n\n redefine(target, key, sourceProperty, options);\n }\n};","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});","var shared = require('../internals/shared');\n\nmodule.exports = shared('native-function-to-string', Function.toString);","var path = require('../internals/path');\n\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};","var classof = require('../internals/classof');\n\nvar Iterators = require('../internals/iterators');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];\n};","var O = 'object';\n\nvar check = function (it) {\n return it && it.Math == Math && it;\n}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\n\nmodule.exports = // eslint-disable-next-line no-undef\ncheck(typeof globalThis == O && globalThis) || check(typeof window == O && window) || check(typeof self == O && self) || check(typeof global == O && global) || // eslint-disable-next-line no-new-func\nFunction('return this')();","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};","module.exports = {};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');","var DESCRIPTORS = require('../internals/descriptors');\n\nvar fails = require('../internals/fails');\n\nvar createElement = require('../internals/document-create-element'); // Thank's IE8 for his funny defineProperty\n\n\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});","var fails = require('../internals/fails');\n\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings\n\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;","var isObject = require('../internals/is-object');\n\nvar setPrototypeOf = require('../internals/object-set-prototype-of'); // makes subclassing work correct for wrapped built-ins\n\n\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if ( // it can work only with native `setPrototypeOf`\n setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};","var hiddenKeys = require('../internals/hidden-keys');\n\nvar isObject = require('../internals/is-object');\n\nvar has = require('../internals/has');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar uid = require('../internals/uid');\n\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, {\n value: {\n objectID: 'O' + ++id,\n // object ID\n weakData: {} // weak collections IDs\n\n }\n });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMetadata(it); // return object ID\n }\n\n return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMetadata(it); // return the store of weak collections IDs\n }\n\n return it[METADATA].weakData;\n}; // add metadata on freeze-family methods calling\n\n\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\nhiddenKeys[METADATA] = true;","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\n\nvar global = require('../internals/global');\n\nvar isObject = require('../internals/is-object');\n\nvar hide = require('../internals/hide');\n\nvar objectHas = require('../internals/has');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n }\n\n return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n\n set = function (it, metadata) {\n hide(it, STATE, metadata);\n return metadata;\n };\n\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype; // check on default Array iterator\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};","var classof = require('../internals/classof-raw'); // `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\n\n\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\nmodule.exports = isForced;","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","module.exports = false;","var anObject = require('../internals/an-object');\n\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\n\nvar toLength = require('../internals/to-length');\n\nvar bind = require('../internals/bind-context');\n\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); // optimisation for array iterators\n\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n }\n\n return new Result(false);\n }\n\n iterator = iterFn.call(iterable);\n }\n\n while (!(step = iterator.next()).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (result && result instanceof Result) return result;\n }\n\n return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};","'use strict';\n\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar hide = require('../internals/hide');\n\nvar has = require('../internals/has');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () {\n return this;\n}; // `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\n\n\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`\n\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};","module.exports = {};","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});","var global = require('../internals/global');\n\nvar nativeFunctionToString = require('../internals/function-to-string');\n\nvar WeakMap = global.WeakMap;\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar fails = require('../internals/fails');\n\nvar objectKeys = require('../internals/object-keys');\n\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar toObject = require('../internals/to-object');\n\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign; // `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n// should work with symbols and should have deterministic property order (V8 bug)\n\nmodule.exports = !nativeAssign || fails(function () {\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) {\n B[chr] = chr;\n });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : nativeAssign;","var anObject = require('../internals/an-object');\n\nvar defineProperties = require('../internals/object-define-properties');\n\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar html = require('../internals/html');\n\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar PROTOTYPE = 'prototype';\n\nvar Empty = function () {\n /* empty */\n}; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\n\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var length = enumBugKeys.length;\n var lt = '<';\n var script = 'script';\n var gt = '>';\n var js = 'java' + script + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(js);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];\n\n return createDict();\n}; // `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\n\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\nhiddenKeys[IE_PROTO] = true;","var DESCRIPTORS = require('../internals/descriptors');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar anObject = require('../internals/an-object');\n\nvar objectKeys = require('../internals/object-keys'); // `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\n\n\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n\n return O;\n};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar anObject = require('../internals/an-object');\n\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\n\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar toPrimitive = require('../internals/to-primitive');\n\nvar has = require('../internals/has');\n\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) {\n /* empty */\n }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};","var toIndexedObject = require('../internals/to-indexed-object');\n\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n}; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : nativeGetOwnPropertyNames(toIndexedObject(it));\n};","var internalObjectKeys = require('../internals/object-keys-internal');\n\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};","exports.f = Object.getOwnPropertySymbols;","var has = require('../internals/has');\n\nvar toObject = require('../internals/to-object');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectPrototype : null;\n};","var has = require('../internals/has');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar indexOf = require('../internals/array-includes').indexOf;\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n\n return result;\n};","var internalObjectKeys = require('../internals/object-keys-internal');\n\nvar enumBugKeys = require('../internals/enum-bug-keys'); // `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n\n\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};","'use strict';\n\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug\n\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({\n 1: 2\n}, 1); // `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\n\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;","var anObject = require('../internals/an-object');\n\nvar aPossiblePrototype = require('../internals/a-possible-prototype'); // `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n\n/* eslint-disable no-proto */\n\n\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) {\n /* empty */\n }\n\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);else O.__proto__ = proto;\n return O;\n };\n}() : undefined);","'use strict';\n\nvar classof = require('../internals/classof');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\ntest[TO_STRING_TAG] = 'z'; // `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n\nmodule.exports = String(test) !== '[object z]' ? function toString() {\n return '[object ' + classof(this) + ']';\n} : test.toString;","var getBuiltIn = require('../internals/get-built-in');\n\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\n\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\n\nvar anObject = require('../internals/an-object'); // all object keys, includes non-enumerable and symbols\n\n\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};","module.exports = require('../internals/global');","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n\n return target;\n};","var global = require('../internals/global');\n\nvar shared = require('../internals/shared');\n\nvar hide = require('../internals/hide');\n\nvar has = require('../internals/has');\n\nvar setGlobal = require('../internals/set-global');\n\nvar nativeFunctionToString = require('../internals/function-to-string');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(nativeFunctionToString).split('toString');\nshared('inspectSource', function (it) {\n return nativeFunctionToString.call(it);\n});\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n\n if (O === global) {\n if (simple) O[key] = value;else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n\n if (simple) O[key] = value;else hide(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);\n});","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};","var global = require('../internals/global');\n\nvar hide = require('../internals/hide');\n\nmodule.exports = function (key, value) {\n try {\n hide(global, key, value);\n } catch (error) {\n global[key] = value;\n }\n\n return value;\n};","'use strict';\n\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () {\n return this;\n }\n });\n }\n};","var defineProperty = require('../internals/object-define-property').f;\n\nvar has = require('../internals/has');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, {\n configurable: true,\n value: TAG\n });\n }\n};","var shared = require('../internals/shared');\n\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};","var global = require('../internals/global');\n\nvar setGlobal = require('../internals/set-global');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.2.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});","'use strict';\n\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !method || !fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () {\n throw 1;\n }, 1);\n });\n};","var toInteger = require('../internals/to-integer');\n\nvar requireObjectCoercible = require('../internals/require-object-coercible'); // `String.prototype.{ codePointAt, at }` methods implementation\n\n\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min; // Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).\n\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\n\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};","var ceil = Math.ceil;\nvar floor = Math.floor; // `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\n\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min; // `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\n\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};","var requireObjectCoercible = require('../internals/require-object-coercible'); // `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\n\n\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};","var isObject = require('../internals/is-object'); // `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\n\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};","var global = require('../internals/global');\n\nvar shared = require('../internals/shared');\n\nvar uid = require('../internals/uid');\n\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nvar Symbol = global.Symbol;\nvar store = shared('wks');\n\nmodule.exports = function (name) {\n return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name] || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};","exports.f = require('../internals/well-known-symbol');","'use strict';\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar Iterators = require('../internals/iterators');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\n\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated),\n // target\n index: 0,\n // next index\n kind: kind // kind\n\n }); // `%ArrayIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n\n if (!target || index >= target.length) {\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n }\n\n if (kind == 'keys') return {\n value: index,\n done: false\n };\n if (kind == 'values') return {\n value: target[index],\n done: false\n };\n return {\n value: [index, target[index]],\n done: false\n };\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\n\nIterators.Arguments = Iterators.Array; // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');","'use strict';\n\nvar collection = require('../internals/collection');\n\nvar collectionStrong = require('../internals/collection-strong'); // `Map` constructor\n// https://tc39.github.io/ecma262/#sec-map-objects\n\n\nmodule.exports = collection('Map', function (get) {\n return function Map() {\n return get(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong, true);","var $ = require('../internals/export');\n\nvar assign = require('../internals/object-assign'); // `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n\n\n$({\n target: 'Object',\n stat: true,\n forced: Object.assign !== assign\n}, {\n assign: assign\n});","var $ = require('../internals/export');\n\nvar fails = require('../internals/fails');\n\nvar toObject = require('../internals/to-object');\n\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () {\n nativeGetPrototypeOf(1);\n}); // `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n\n$({\n target: 'Object',\n stat: true,\n forced: FAILS_ON_PRIMITIVES,\n sham: !CORRECT_PROTOTYPE_GETTER\n}, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});","var redefine = require('../internals/redefine');\n\nvar toString = require('../internals/object-to-string');\n\nvar ObjectPrototype = Object.prototype; // `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n\nif (toString !== ObjectPrototype.toString) {\n redefine(ObjectPrototype, 'toString', toString, {\n unsafe: true\n });\n}","var $ = require('../internals/export');\n\nvar anObject = require('../internals/an-object');\n\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; // `Reflect.deleteProperty` method\n// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty\n\n\n$({\n target: 'Reflect',\n stat: true\n}, {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);\n return descriptor && !descriptor.configurable ? false : delete target[propertyKey];\n }\n});","'use strict';\n\nvar collection = require('../internals/collection');\n\nvar collectionStrong = require('../internals/collection-strong'); // `Set` constructor\n// https://tc39.github.io/ecma262/#sec-set-objects\n\n\nmodule.exports = collection('Set', function (get) {\n return function Set() {\n return get(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong);","'use strict';\n\nvar charAt = require('../internals/string-multibyte').charAt;\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\n\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n }); // `%StringIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return {\n value: undefined,\n done: true\n };\n point = charAt(string, index);\n state.index += point.length;\n return {\n value: point,\n done: false\n };\n});","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\n\nvar $ = require('../internals/export');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar global = require('../internals/global');\n\nvar has = require('../internals/has');\n\nvar isObject = require('../internals/is-object');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) || // Safari 12 bug\nNativeSymbol().description !== undefined)) {\n var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description\n\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n $({\n global: true,\n forced: true\n }, {\n Symbol: SymbolWrapper\n });\n}","var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\n\n\ndefineWellKnownSymbol('iterator');","'use strict';\n\nvar $ = require('../internals/export');\n\nvar global = require('../internals/global');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nvar fails = require('../internals/fails');\n\nvar has = require('../internals/has');\n\nvar isArray = require('../internals/is-array');\n\nvar isObject = require('../internals/is-object');\n\nvar anObject = require('../internals/an-object');\n\nvar toObject = require('../internals/to-object');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar toPrimitive = require('../internals/to-primitive');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar nativeObjectCreate = require('../internals/object-create');\n\nvar objectKeys = require('../internals/object-keys');\n\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\n\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\n\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\n\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar hide = require('../internals/hide');\n\nvar redefine = require('../internals/redefine');\n\nvar shared = require('../internals/shared');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar uid = require('../internals/uid');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol');\n\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar JSON = global.JSON;\nvar nativeJSONStringify = JSON && JSON.stringify;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () {\n return nativeDefineProperty(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = NATIVE_SYMBOL && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, {\n enumerable: createPropertyDescriptor(0, false)\n });\n }\n\n return setSymbolDescriptor(O, key, Attributes);\n }\n\n return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n}; // `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\n\n\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, {\n configurable: true,\n set: setter\n });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, {\n unsafe: true\n });\n }\n }\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n}\n\n$({\n global: true,\n wrap: true,\n forced: !NATIVE_SYMBOL,\n sham: !NATIVE_SYMBOL\n}, {\n Symbol: $Symbol\n});\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n$({\n target: SYMBOL,\n stat: true,\n forced: !NATIVE_SYMBOL\n}, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () {\n USE_SETTER = true;\n },\n useSimple: function () {\n USE_SETTER = false;\n }\n});\n$({\n target: 'Object',\n stat: true,\n forced: !NATIVE_SYMBOL,\n sham: !DESCRIPTORS\n}, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n$({\n target: 'Object',\n stat: true,\n forced: !NATIVE_SYMBOL\n}, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\n$({\n target: 'Object',\n stat: true,\n forced: fails(function () {\n getOwnPropertySymbolsModule.f(1);\n })\n}, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n}); // `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\n\nJSON && $({\n target: 'JSON',\n stat: true,\n forced: !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol(); // MS Edge converts symbol values to JSON as {}\n\n return nativeJSONStringify([symbol]) != '[null]' // WebKit converts symbol values to JSON as null\n || nativeJSONStringify({\n a: symbol\n }) != '{}' // V8 throws on boxed symbols\n || nativeJSONStringify(Object(symbol)) != '{}';\n })\n}, {\n stringify: function stringify(it) {\n var args = [it];\n var index = 1;\n var replacer, $replacer;\n\n while (arguments.length > index) args.push(arguments[index++]);\n\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return nativeJSONStringify.apply(JSON, args);\n }\n}); // `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\n\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\n\nsetToStringTag($Symbol, SYMBOL);\nhiddenKeys[HIDDEN] = true;","var global = require('../internals/global');\n\nvar DOMIterables = require('../internals/dom-iterables');\n\nvar forEach = require('../internals/array-for-each');\n\nvar hide = require('../internals/hide');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype; // some Chrome versions have non-configurable methods on DOMTokenList\n\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n hide(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}","var global = require('../internals/global');\n\nvar DOMIterables = require('../internals/dom-iterables');\n\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\n\nvar hide = require('../internals/hide');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n hide(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) hide(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n hide(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}","module.exports = require('../../es/object/assign');","module.exports = require('../../es/reflect/delete-property');","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\n\nvar _invariant = require('fbjs/lib/invariant');\n\nif (process.env.NODE_ENV !== 'production') {\n var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\n\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\n\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n var injectedMixins = [];\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return
Hello World
;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return
Hello, {name}!
;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n\n var RESERVED_SPEC_KEYS = {\n displayName: function (Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function (Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function (Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n\n Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);\n },\n contextTypes: function (Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n\n Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);\n },\n\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function (Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function (Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function (Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function () {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName);\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed.\n\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name);\n } // Disallow defining methods more than once unless explicitly allowed.\n\n\n if (isAlreadyDefined) {\n _invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name);\n }\n }\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n\n\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(isMixinValid, \"%s: You're attempting to include a mixin that is either null \" + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec);\n }\n }\n\n return;\n }\n\n _invariant(typeof spec !== 'function', \"ReactClass: You're attempting to \" + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.');\n\n _invariant(!isValidElement(spec), \"ReactClass: You're attempting to \" + 'use a component as a mixin. Instead, just use a regular object.');\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride.\n\n _invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name); // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n\n\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n\n _invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name);\n\n var isAlreadyDefined = name in Constructor;\n\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null;\n\n _invariant(specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name);\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n return;\n }\n\n Constructor[name] = property;\n }\n }\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n\n\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.');\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key);\n\n one[key] = two[key];\n }\n }\n\n return one;\n }\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n\n\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n\n\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n\n\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n\n boundMethod.bind = function (newThis) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n } // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n\n\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName);\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName);\n }\n\n return boundMethod;\n }\n\n var reboundMethod = _bind.apply(boundMethod, arguments);\n\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n\n return boundMethod;\n }\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n\n\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function () {\n this.__isMounted = true;\n }\n };\n var IsMountedPostMixin = {\n componentWillUnmount: function () {\n this.__isMounted = false;\n }\n };\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function (newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function () {\n if (process.env.NODE_ENV !== 'production') {\n warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component');\n this.__didWarnIsMounted = true;\n }\n\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function () {};\n\n _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n\n\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function (props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n if (process.env.NODE_ENV !== 'production') {\n warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory');\n } // Wire up auto-binding\n\n\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n this.state = null; // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (initialState === undefined && this.getInitialState._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n\n _invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent');\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin); // Initialize the defaultProps property after all mixins have been merged.\n\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.');\n\n if (process.env.NODE_ENV !== 'production') {\n warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component');\n warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component');\n warning(!Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component');\n } // Reduce time spent doing lookups by setting these on the prototype.\n\n\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar React = require('react');\n\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error('create-react-class could not find the React object. If you are using script tags, ' + 'make sure that React is being loaded before create-react-class.');\n} // Hack to grab NoopUpdateQueue from isomorphic React\n\n\nvar ReactNoopUpdateQueue = new React.Component().updater;\nmodule.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue);","\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar printWarning = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function (text) {\n var message = 'Warning: ' + text;\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\n\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n\n if (error && !(error instanceof Error)) {\n printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');\n }\n\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n var stack = getStack ? getStack() : '';\n printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));\n }\n }\n }\n }\n}\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\n\n\ncheckPropTypes.resetWarningCache = function () {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n};\n\nmodule.exports = checkPropTypes;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactIs = require('react-is');\n\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\n\nvar printWarning = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function (text) {\n var message = 'Warning: ' + text;\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function (isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n\n var ANONYMOUS = '<>'; // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker\n };\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\n /*eslint-disable no-self-compare*/\n\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n\n\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n } // Make `instanceof Error` still work for returned errors.\n\n\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n\n if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3) {\n printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n\n var propValue = props[propName];\n\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n\n if (error instanceof Error) {\n return error;\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n\n if (type === 'symbol') {\n return String(value);\n }\n\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\n if (error instanceof Error) {\n return error;\n }\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n\n if (typeof checker !== 'function') {\n printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n\n if (!checker) {\n continue;\n }\n\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\n if (error) {\n return error;\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n } // We need to check all keys in case some are required but missing from\n // props.\n\n\n var allKeys = assign({}, props[propName], shapeTypes);\n\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n\n if (!checker) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));\n }\n\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\n if (error) {\n return error;\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n\n case 'boolean':\n return !propValue;\n\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n } // falsy value can't be a Symbol\n\n\n if (!propValue) {\n return false;\n } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\n\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n } // Fallback for non-spec compliant Symbols which are polyfilled.\n\n\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n } // Equivalent of `typeof` but with special handling for array and regexp.\n\n\n function getPropType(propValue) {\n var propType = typeof propValue;\n\n if (Array.isArray(propValue)) {\n return 'array';\n }\n\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n\n return propType;\n } // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n\n\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n\n var propType = getPropType(propValue);\n\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n\n return propType;\n } // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n\n\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n\n default:\n return type;\n }\n } // Returns class name of the object, if any.\n\n\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is'); // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n\n\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","/** @license React v16.8.6\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n\n var hasSymbol = typeof Symbol === 'function' && Symbol.for;\n var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\n var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\n var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\n var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\n var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\n var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\n var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\n var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\n var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\n var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\n var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\n var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\n var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\n function isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);\n }\n /**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\n var lowPriorityWarning = function () {};\n\n {\n var printWarning = function (format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarning = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n }\n var lowPriorityWarning$1 = lowPriorityWarning;\n\n function typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n } // AsyncMode is deprecated along with isAsyncMode\n\n\n var AsyncMode = REACT_ASYNC_MODE_TYPE;\n var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\n var ContextConsumer = REACT_CONTEXT_TYPE;\n var ContextProvider = REACT_PROVIDER_TYPE;\n var Element = REACT_ELEMENT_TYPE;\n var ForwardRef = REACT_FORWARD_REF_TYPE;\n var Fragment = REACT_FRAGMENT_TYPE;\n var Lazy = REACT_LAZY_TYPE;\n var Memo = REACT_MEMO_TYPE;\n var Portal = REACT_PORTAL_TYPE;\n var Profiler = REACT_PROFILER_TYPE;\n var StrictMode = REACT_STRICT_MODE_TYPE;\n var Suspense = REACT_SUSPENSE_TYPE;\n var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\n function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }\n\n function isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n }\n\n function isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n }\n\n function isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n }\n\n function isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n\n function isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n }\n\n function isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n }\n\n function isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n }\n\n function isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n }\n\n function isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n }\n\n function isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n }\n\n function isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n }\n\n function isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n }\n\n exports.typeOf = typeOf;\n exports.AsyncMode = AsyncMode;\n exports.ConcurrentMode = ConcurrentMode;\n exports.ContextConsumer = ContextConsumer;\n exports.ContextProvider = ContextProvider;\n exports.Element = Element;\n exports.ForwardRef = ForwardRef;\n exports.Fragment = Fragment;\n exports.Lazy = Lazy;\n exports.Memo = Memo;\n exports.Portal = Portal;\n exports.Profiler = Profiler;\n exports.StrictMode = StrictMode;\n exports.Suspense = Suspense;\n exports.isValidElementType = isValidElementType;\n exports.isAsyncMode = isAsyncMode;\n exports.isConcurrentMode = isConcurrentMode;\n exports.isContextConsumer = isContextConsumer;\n exports.isContextProvider = isContextProvider;\n exports.isElement = isElement;\n exports.isForwardRef = isForwardRef;\n exports.isFragment = isFragment;\n exports.isLazy = isLazy;\n exports.isMemo = isMemo;\n exports.isPortal = isPortal;\n exports.isProfiler = isProfiler;\n exports.isStrictMode = isStrictMode;\n exports.isSuspense = isSuspense;\n })();\n}","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","/** @license React v16.10.1\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n var _assign = require('object-assign');\n\n var checkPropTypes = require('prop-types/checkPropTypes'); // TODO: this is special because it gets imported during build.\n\n\n var ReactVersion = '16.10.1'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n\n var hasSymbol = typeof Symbol === 'function' && Symbol.for;\n var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\n var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\n var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\n var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\n var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\n var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\n var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n // (unstable) APIs that have been removed. Can we remove the symbols?\n\n var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\n var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\n var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\n var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\n var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\n var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\n var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\n var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n function getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n } // Do not require this module directly! Use normal `invariant` calls with\n // template literal strings. The messages will be converted to ReactError during\n // build, and in production they will be minified.\n // Do not require this module directly! Use normal `invariant` calls with\n // template literal strings. The messages will be converted to ReactError during\n // build, and in production they will be minified.\n\n\n function ReactError(error) {\n error.name = 'Invariant Violation';\n return error;\n }\n /**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\n /**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\n var lowPriorityWarningWithoutStack = function () {};\n\n {\n var printWarning = function (format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarningWithoutStack = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n };\n }\n var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;\n /**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n var warningWithoutStack = function () {};\n\n {\n warningWithoutStack = function (condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n if (format === undefined) {\n throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (args.length > 8) {\n // Check before the condition to catch violations early.\n throw new Error('warningWithoutStack() currently supports at most 8 arguments.');\n }\n\n if (condition) {\n return;\n }\n\n if (typeof console !== 'undefined') {\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n });\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n\n Function.prototype.apply.call(console.error, console, argsWithFormat);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n };\n }\n var warningWithoutStack$1 = warningWithoutStack;\n var didWarnStateUpdateForUnmountedComponent = {};\n\n function warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n warningWithoutStack$1(false, \"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n }\n /**\n * This is the abstract API for an update queue.\n */\n\n\n var ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n };\n var emptyObject = {};\n {\n Object.freeze(emptyObject);\n }\n /**\n * Base class helpers for the updating state of a component.\n */\n\n function Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n }\n\n Component.prototype.isReactComponent = {};\n /**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\n Component.prototype.setState = function (partialState, callback) {\n (function () {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw ReactError(Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\"));\n }\n }\n })();\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n };\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n };\n /**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n {\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n lowPriorityWarningWithoutStack$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n }\n\n function ComponentDummy() {}\n\n ComponentDummy.prototype = Component.prototype;\n /**\n * Convenience component with default shallow equality check for sCU.\n */\n\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n\n var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\n pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n _assign(pureComponentPrototype, Component.prototype);\n\n pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value\n\n function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }\n /**\n * Keeps track of the current dispatcher.\n */\n\n\n var ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n };\n /**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\n\n var ReactCurrentBatchConfig = {\n suspense: null\n };\n /**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\n\n var ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n };\n var BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\n\n var describeComponentFrame = function (name, source, ownerName) {\n var sourceInfo = '';\n\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n\n if (match) {\n var pathBeforeSlash = match[1];\n\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n };\n\n var Resolved = 1;\n\n function refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n }\n\n function getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n }\n\n function getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n\n break;\n }\n }\n }\n\n return null;\n }\n\n var ReactDebugCurrentFrame = {};\n var currentlyValidatingElement = null;\n\n function setCurrentlyValidatingElement(element) {\n {\n currentlyValidatingElement = element;\n }\n }\n\n {\n // Stack implementation injected by the current renderer.\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentlyValidatingElement) {\n var name = getComponentName(currentlyValidatingElement.type);\n var owner = currentlyValidatingElement._owner;\n stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n }\n /**\n * Used by act() to track whether you're inside an act() scope.\n */\n\n var IsSomeRendererActing = {\n current: false\n };\n var ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner,\n IsSomeRendererActing: IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n };\n {\n _assign(ReactSharedInternals, {\n // These should not be included in production.\n ReactDebugCurrentFrame: ReactDebugCurrentFrame,\n // Shim for React DOM 16.0.0 which still destructured (but not used) this.\n // TODO: remove in React 17.0.\n ReactComponentTreeHook: {}\n });\n }\n /**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n var warning = warningWithoutStack$1;\n {\n warning = function (condition, format) {\n if (condition) {\n return;\n }\n\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack]));\n };\n }\n var warning$1 = warning;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n };\n var specialPropKeyWarningShown;\n var specialPropRefWarningShown;\n\n function hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== undefined;\n }\n\n function hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== undefined;\n }\n\n function defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n\n function defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n /**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, no instanceof check\n * will work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\n var ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n return element;\n };\n /**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\n /**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\n\n function jsxDEV(type, config, maybeKey, source, self) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n /**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\n\n function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n /**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\n\n function cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n }\n /**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\n\n function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }\n /**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\n function isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n\n var SEPARATOR = '.';\n var SUBSEPARATOR = ':';\n /**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\n function escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n }\n /**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\n var didWarnAboutMaps = false;\n var userProvidedKeyEscapeRegex = /\\/+/g;\n\n function escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n }\n\n var POOL_SIZE = 10;\n var traverseContextPool = [];\n\n function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {\n if (traverseContextPool.length) {\n var traverseContext = traverseContextPool.pop();\n traverseContext.result = mapResult;\n traverseContext.keyPrefix = keyPrefix;\n traverseContext.func = mapFunction;\n traverseContext.context = mapContext;\n traverseContext.count = 0;\n return traverseContext;\n } else {\n return {\n result: mapResult,\n keyPrefix: keyPrefix,\n func: mapFunction,\n context: mapContext,\n count: 0\n };\n }\n }\n\n function releaseTraverseContext(traverseContext) {\n traverseContext.result = null;\n traverseContext.keyPrefix = null;\n traverseContext.func = null;\n traverseContext.context = null;\n traverseContext.count = 0;\n\n if (traverseContextPool.length < POOL_SIZE) {\n traverseContextPool.push(traverseContext);\n }\n }\n /**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\n\n\n function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n {\n // Warn about using Maps as children\n if (iteratorFn === children.entries) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n }\n var iterator = iteratorFn.call(children);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else if (type === 'object') {\n var addendum = '';\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();\n }\n var childrenString = '' + children;\n\n (function () {\n {\n {\n throw ReactError(Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \").\" + addendum));\n }\n }\n })();\n }\n }\n\n return subtreeCount;\n }\n /**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\n\n\n function traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n }\n /**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\n function getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof component === 'object' && component !== null && component.key != null) {\n // Explicit key\n return escape(component.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n }\n\n function forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n func.call(context, child, bookKeeping.count++);\n }\n /**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\n\n\n function forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n\n var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n releaseTraverseContext(traverseContext);\n }\n\n function mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n var mappedChild = func.call(context, child, bookKeeping.count++);\n\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n\n result.push(mappedChild);\n }\n }\n\n function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n\n var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n releaseTraverseContext(traverseContext);\n }\n /**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\n\n\n function mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n }\n /**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\n function countChildren(children) {\n return traverseAllChildren(children, function () {\n return null;\n }, null);\n }\n /**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\n function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }\n /**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\n function onlyChild(children) {\n (function () {\n if (!isValidElement(children)) {\n {\n throw ReactError(Error(\"React.Children.only expected to receive a single React element child.\"));\n }\n }\n })();\n\n return children;\n }\n\n function createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n warning$1(false, 'Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n warning$1(false, 'Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n return context;\n }\n\n function lazy(ctor) {\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _ctor: ctor,\n // React uses these fields to store the result.\n _status: -1,\n _result: null\n };\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes;\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n defaultProps = newDefaultProps; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n propTypes = newPropTypes; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n return lazyType;\n }\n\n function forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n !( // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object\n render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;\n }\n\n if (render != null) {\n !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;\n }\n }\n return {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n }\n\n function isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);\n }\n\n function memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n }\n\n function resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n (function () {\n if (!(dispatcher !== null)) {\n {\n throw ReactError(Error(\"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.\"));\n }\n }\n })();\n\n return dispatcher;\n }\n\n function useContext(Context, unstable_observedBits) {\n var dispatcher = resolveDispatcher();\n {\n !(unstable_observedBits === undefined) ? warning$1(false, 'useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\\n\\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '') : void 0; // TODO: add a more generic warning for invalid values.\n\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n return dispatcher.useContext(Context, unstable_observedBits);\n }\n\n function useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n }\n\n function useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n }\n\n function useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n }\n\n function useEffect(create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, inputs);\n }\n\n function useLayoutEffect(create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, inputs);\n }\n\n function useCallback(callback, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, inputs);\n }\n\n function useMemo(create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, inputs);\n }\n\n function useImperativeHandle(ref, create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, inputs);\n }\n\n function useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n }\n\n var emptyObject$1 = {};\n\n function useResponder(responder, listenerProps) {\n var dispatcher = resolveDispatcher();\n {\n if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) {\n warning$1(false, 'useResponder: invalid first argument. Expected an event responder, but instead got %s', responder);\n return;\n }\n }\n return dispatcher.useResponder(responder, listenerProps || emptyObject$1);\n }\n\n function withSuspenseConfig(scope, config) {\n var previousConfig = ReactCurrentBatchConfig.suspense;\n ReactCurrentBatchConfig.suspense = config === undefined ? null : config;\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.suspense = previousConfig;\n }\n }\n /**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\n\n var propTypesMisspellWarningShown;\n {\n propTypesMisspellWarningShown = false;\n }\n var hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n function getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n\n function getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n\n function getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n }\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\n var ownerHasKeyUseWarning = {};\n\n function getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n /**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\n function validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentName(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement(element);\n {\n warning$1(false, 'Each child in a list should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);\n }\n setCurrentlyValidatingElement(null);\n }\n /**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\n function validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n /**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\n function validatePropTypes(element) {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var name = getComponentName(type);\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n setCurrentlyValidatingElement(element);\n checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);\n setCurrentlyValidatingElement(null);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true;\n warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function') {\n !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;\n }\n }\n /**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\n function validateFragmentProps(fragment) {\n setCurrentlyValidatingElement(fragment);\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');\n }\n\n setCurrentlyValidatingElement(null);\n }\n\n function jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n warning$1(false, 'React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n warning$1(false, 'React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (hasOwnProperty$1.call(props, 'key')) {\n warning$1(false, 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + 'Explicitly pass a key after spreading props in your JSX call. ' + 'E.g. ');\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n } // These two functions exist to still get child warnings in dev\n // even with the prod transform. This means that jsxDEV is purely\n // opt-in behavior for better messages but that we won't stop\n // giving you warnings if you use production apis.\n\n\n function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }\n\n function jsxWithValidationDynamic(type, props, key) {\n return jsxWithValidation(type, props, key, false);\n }\n\n function createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n\n function createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type; // Legacy hook: remove it\n\n {\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n lowPriorityWarningWithoutStack$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n return validatedFactory;\n }\n\n function cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n }\n\n var hasBadMapPolyfill;\n {\n hasBadMapPolyfill = false;\n\n try {\n var frozenObject = Object.freeze({});\n var testMap = new Map([[frozenObject, null]]);\n var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.\n // https://github.com/rollup/rollup/issues/1771\n // TODO: we can remove these if Rollup fixes the bug.\n\n testMap.set(0, 0);\n testSet.add(0);\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n }\n\n function createFundamentalComponent(impl) {\n // We use responder as a Map key later on. When we have a bad\n // polyfill, then we can't use it as a key as the polyfill tries\n // to add a property to the object.\n if (true && !hasBadMapPolyfill) {\n Object.freeze(impl);\n }\n\n var fundamantalComponent = {\n $$typeof: REACT_FUNDAMENTAL_TYPE,\n impl: impl\n };\n {\n Object.freeze(fundamantalComponent);\n }\n return fundamantalComponent;\n }\n\n function createEventResponder(displayName, responderConfig) {\n var getInitialState = responderConfig.getInitialState,\n onEvent = responderConfig.onEvent,\n onMount = responderConfig.onMount,\n onUnmount = responderConfig.onUnmount,\n onRootEvent = responderConfig.onRootEvent,\n rootEventTypes = responderConfig.rootEventTypes,\n targetEventTypes = responderConfig.targetEventTypes,\n targetPortalPropagation = responderConfig.targetPortalPropagation;\n var eventResponder = {\n $$typeof: REACT_RESPONDER_TYPE,\n displayName: displayName,\n getInitialState: getInitialState || null,\n onEvent: onEvent || null,\n onMount: onMount || null,\n onRootEvent: onRootEvent || null,\n onUnmount: onUnmount || null,\n rootEventTypes: rootEventTypes || null,\n targetEventTypes: targetEventTypes || null,\n targetPortalPropagation: targetPortalPropagation || false\n }; // We use responder as a Map key later on. When we have a bad\n // polyfill, then we can't use it as a key as the polyfill tries\n // to add a property to the object.\n\n if (true && !hasBadMapPolyfill) {\n Object.freeze(eventResponder);\n }\n\n return eventResponder;\n }\n\n function createScope(fn) {\n var scopeComponent = {\n $$typeof: REACT_SCOPE_TYPE,\n fn: fn\n };\n {\n Object.freeze(scopeComponent);\n }\n return scopeComponent;\n } // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:\n // In some cases, StrictMode should also double-render lifecycles.\n // This can be confusing for tests though,\n // And it can be bad for performance in production.\n // This feature flag can be used to control the behavior:\n // To preserve the \"Pause on caught exceptions\" behavior of the debugger, we\n // replay the begin phase of a failed component inside invokeGuardedCallback.\n // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:\n // Gather advanced timing metrics for Profiler subtrees.\n // Trace which interactions trigger each commit.\n // Only used in www builds.\n // TODO: true? Here it might just be false.\n // Only used in www builds.\n // Only used in www builds.\n // Disable javascript: URL strings in href for XSS protection.\n // React Fire: prevent the value and checked attributes from syncing\n // with their related DOM properties\n // These APIs will no longer be \"unstable\" in the upcoming 16.7 release,\n // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.\n // See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information\n // This is a flag so we can fix warnings in RN core before turning it on\n // Experimental React Flare event system and event components support.\n\n\n var enableFlareAPI = false; // Experimental Host Component support.\n\n var enableFundamentalAPI = false; // Experimental Scope support.\n\n var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107\n\n var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)\n // Till then, we warn about the missing mock, but still fallback to a sync mode compatible version\n // For tests, we flush suspense fallbacks in an act scope;\n // *except* in some of our own tests, where we test incremental loading states.\n // Changes priority of some events like mousemove to user-blocking priority,\n // but without making them discrete. The flag exists in case it causes\n // starvation problems.\n // Add a callback property to suspense to notify which promises are currently\n // in the update queue. This allows reporting and tracing of what is causing\n // the user to see a loading state.\n // Also allows hydration callbacks to fire when a dehydrated boundary gets\n // hydrated or deleted.\n // Part of the simplification of React.createElement so we can eventually move\n // from React.createElement to React.jsx\n // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md\n\n var React = {\n Children: {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n },\n createRef: createRef,\n Component: Component,\n PureComponent: PureComponent,\n createContext: createContext,\n forwardRef: forwardRef,\n lazy: lazy,\n memo: memo,\n useCallback: useCallback,\n useContext: useContext,\n useEffect: useEffect,\n useImperativeHandle: useImperativeHandle,\n useDebugValue: useDebugValue,\n useLayoutEffect: useLayoutEffect,\n useMemo: useMemo,\n useReducer: useReducer,\n useRef: useRef,\n useState: useState,\n Fragment: REACT_FRAGMENT_TYPE,\n Profiler: REACT_PROFILER_TYPE,\n StrictMode: REACT_STRICT_MODE_TYPE,\n Suspense: REACT_SUSPENSE_TYPE,\n unstable_SuspenseList: REACT_SUSPENSE_LIST_TYPE,\n createElement: createElementWithValidation,\n cloneElement: cloneElementWithValidation,\n createFactory: createFactoryWithValidation,\n isValidElement: isValidElement,\n version: ReactVersion,\n unstable_withSuspenseConfig: withSuspenseConfig,\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals\n };\n\n if (enableFlareAPI) {\n React.unstable_useResponder = useResponder;\n React.unstable_createResponder = createEventResponder;\n }\n\n if (enableFundamentalAPI) {\n React.unstable_createFundamental = createFundamentalComponent;\n }\n\n if (enableScopeAPI) {\n React.unstable_createScope = createScope;\n } // Note: some APIs are added with feature flags.\n // Make sure that stable builds for open source\n // don't modify the React object to avoid deopts.\n // Also let's not expose their names in stable builds.\n\n\n if (enableJSXTransformAPI) {\n {\n React.jsxDEV = jsxWithValidation;\n React.jsx = jsxWithValidationDynamic;\n React.jsxs = jsxWithValidationStatic;\n }\n }\n\n var React$2 = Object.freeze({\n default: React\n });\n var React$3 = React$2 && React || React$2; // TODO: decide on the top-level export form.\n // This is hacky but makes it work with both Rollup and Jest.\n\n var react = React$3.default || React$3;\n module.exports = react;\n })();\n}","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}","var g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if (typeof window === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js_src/_dart_helpers.js","webpack:///./js_src/dart_env_dev.js","webpack:///./js_src/react.js","webpack:///./node_modules/core-js/es/map/index.js","webpack:///./node_modules/core-js/es/object/assign.js","webpack:///./node_modules/core-js/es/reflect/delete-property.js","webpack:///./node_modules/core-js/es/set/index.js","webpack:///./node_modules/core-js/internals/a-function.js","webpack:///./node_modules/core-js/internals/a-possible-prototype.js","webpack:///./node_modules/core-js/internals/add-to-unscopables.js","webpack:///./node_modules/core-js/internals/an-instance.js","webpack:///./node_modules/core-js/internals/an-object.js","webpack:///./node_modules/core-js/internals/array-for-each.js","webpack:///./node_modules/core-js/internals/array-includes.js","webpack:///./node_modules/core-js/internals/array-iteration.js","webpack:///./node_modules/core-js/internals/array-species-create.js","webpack:///./node_modules/core-js/internals/bind-context.js","webpack:///./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack:///./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack:///./node_modules/core-js/internals/classof-raw.js","webpack:///./node_modules/core-js/internals/classof.js","webpack:///./node_modules/core-js/internals/collection-strong.js","webpack:///./node_modules/core-js/internals/collection.js","webpack:///./node_modules/core-js/internals/copy-constructor-properties.js","webpack:///./node_modules/core-js/internals/correct-prototype-getter.js","webpack:///./node_modules/core-js/internals/create-iterator-constructor.js","webpack:///./node_modules/core-js/internals/create-property-descriptor.js","webpack:///./node_modules/core-js/internals/define-iterator.js","webpack:///./node_modules/core-js/internals/define-well-known-symbol.js","webpack:///./node_modules/core-js/internals/descriptors.js","webpack:///./node_modules/core-js/internals/document-create-element.js","webpack:///./node_modules/core-js/internals/dom-iterables.js","webpack:///./node_modules/core-js/internals/enum-bug-keys.js","webpack:///./node_modules/core-js/internals/export.js","webpack:///./node_modules/core-js/internals/fails.js","webpack:///./node_modules/core-js/internals/freezing.js","webpack:///./node_modules/core-js/internals/function-to-string.js","webpack:///./node_modules/core-js/internals/get-built-in.js","webpack:///./node_modules/core-js/internals/get-iterator-method.js","webpack:///./node_modules/core-js/internals/global.js","webpack:///./node_modules/core-js/internals/has.js","webpack:///./node_modules/core-js/internals/hidden-keys.js","webpack:///./node_modules/core-js/internals/hide.js","webpack:///./node_modules/core-js/internals/html.js","webpack:///./node_modules/core-js/internals/ie8-dom-define.js","webpack:///./node_modules/core-js/internals/indexed-object.js","webpack:///./node_modules/core-js/internals/inherit-if-required.js","webpack:///./node_modules/core-js/internals/internal-metadata.js","webpack:///./node_modules/core-js/internals/internal-state.js","webpack:///./node_modules/core-js/internals/is-array-iterator-method.js","webpack:///./node_modules/core-js/internals/is-array.js","webpack:///./node_modules/core-js/internals/is-forced.js","webpack:///./node_modules/core-js/internals/is-object.js","webpack:///./node_modules/core-js/internals/is-pure.js","webpack:///./node_modules/core-js/internals/iterate.js","webpack:///./node_modules/core-js/internals/iterators-core.js","webpack:///./node_modules/core-js/internals/iterators.js","webpack:///./node_modules/core-js/internals/native-symbol.js","webpack:///./node_modules/core-js/internals/native-weak-map.js","webpack:///./node_modules/core-js/internals/object-assign.js","webpack:///./node_modules/core-js/internals/object-create.js","webpack:///./node_modules/core-js/internals/object-define-properties.js","webpack:///./node_modules/core-js/internals/object-define-property.js","webpack:///./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names-external.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names.js","webpack:///./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:///./node_modules/core-js/internals/object-get-prototype-of.js","webpack:///./node_modules/core-js/internals/object-keys-internal.js","webpack:///./node_modules/core-js/internals/object-keys.js","webpack:///./node_modules/core-js/internals/object-property-is-enumerable.js","webpack:///./node_modules/core-js/internals/object-set-prototype-of.js","webpack:///./node_modules/core-js/internals/object-to-string.js","webpack:///./node_modules/core-js/internals/own-keys.js","webpack:///./node_modules/core-js/internals/path.js","webpack:///./node_modules/core-js/internals/redefine-all.js","webpack:///./node_modules/core-js/internals/redefine.js","webpack:///./node_modules/core-js/internals/require-object-coercible.js","webpack:///./node_modules/core-js/internals/set-global.js","webpack:///./node_modules/core-js/internals/set-species.js","webpack:///./node_modules/core-js/internals/set-to-string-tag.js","webpack:///./node_modules/core-js/internals/shared-key.js","webpack:///./node_modules/core-js/internals/shared.js","webpack:///./node_modules/core-js/internals/sloppy-array-method.js","webpack:///./node_modules/core-js/internals/string-multibyte.js","webpack:///./node_modules/core-js/internals/to-absolute-index.js","webpack:///./node_modules/core-js/internals/to-indexed-object.js","webpack:///./node_modules/core-js/internals/to-integer.js","webpack:///./node_modules/core-js/internals/to-length.js","webpack:///./node_modules/core-js/internals/to-object.js","webpack:///./node_modules/core-js/internals/to-primitive.js","webpack:///./node_modules/core-js/internals/uid.js","webpack:///./node_modules/core-js/internals/well-known-symbol.js","webpack:///./node_modules/core-js/internals/wrapped-well-known-symbol.js","webpack:///./node_modules/core-js/modules/es.array.iterator.js","webpack:///./node_modules/core-js/modules/es.map.js","webpack:///./node_modules/core-js/modules/es.object.assign.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.object.to-string.js","webpack:///./node_modules/core-js/modules/es.reflect.delete-property.js","webpack:///./node_modules/core-js/modules/es.set.js","webpack:///./node_modules/core-js/modules/es.string.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.description.js","webpack:///./node_modules/core-js/modules/es.symbol.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.js","webpack:///./node_modules/core-js/modules/web.dom-collections.for-each.js","webpack:///./node_modules/core-js/modules/web.dom-collections.iterator.js","webpack:///./node_modules/core-js/stable/object/assign.js","webpack:///./node_modules/core-js/stable/reflect/delete-property.js","webpack:///./node_modules/create-react-class/factory.js","webpack:///./node_modules/create-react-class/index.js","webpack:///./node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/fbjs/lib/emptyObject.js","webpack:///./node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/fbjs/lib/warning.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-is/cjs/react-is.development.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react/cjs/react.development.js","webpack:///./node_modules/react/index.js","webpack:///(webpack)/buildin/global.js"],"names":["_reactDartSymbolPrefix","_reactDartContextSymbol","Symbol","_throwErrorFromJS","error","_jsNull","_createReactDartComponentClass","dartInteropStatics","componentStatics","jsConfig","ReactDartComponent","props","context","dartComponent","initComponent","internal","handleComponentWillMount","handleComponentDidMount","nextProps","nextContext","handleComponentWillReceiveProps","nextState","handleShouldComponentUpdate","handleComponentWillUpdate","prevProps","prevState","handleComponentDidUpdate","handleComponentWillUnmount","result","handleRender","React","Component","childContextKeys","contextKeys","length","childContextTypes","i","PropTypes","object","prototype","handleGetChildContext","contextTypes","_createReactDartComponentClass2","ReactDartComponent2","snapshot","handleGetSnapshotBeforeUpdate","info","handleComponentDidCatch","state","derivedState","handleGetDerivedStateFromProps","handleGetDerivedStateFromError","skipMethods","forEach","method","contextType","defaultProps","propTypes","_markChildValidated","child","store","_store","validated","__isDevelopment","require","CreateReactClass","window","Object","assign","DartHelpers","createClass","process"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,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A;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;ACjFA,eAAe,mBAAO,CAAC,6EAAwB;;AAE/C,cAAc,mBAAO,CAAC,2EAAuB;;AAE7C,sBAAsB,mBAAO,CAAC,6FAAgC;;AAE9D,yCAAyC;AACzC;;AAEA;AACA;;AAEA;AACA,kCAAkC;;AAElC,uFAAuF;AACvF;AACA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;ACtBA,gBAAgB,mBAAO,CAAC,+EAAyB,EAAE;;;AAGnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;AClCA,eAAe,mBAAO,CAAC,6EAAwB,EAAE;;;AAGjD;AACA;AACA,kEAAkE;AAClE,GAAG;AACH;AACA;AACA;AACA;AACA,E;;;;;;;;;;;ACXA,sBAAsB,mBAAO,CAAC,6FAAgC;;AAE9D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA,E;;;;;;;;;;;ACrDA,iBAAiB;;AAEjB;AACA;AACA,E;;;;;;;;;;;ACJA,iBAAiB,mBAAO,CAAC,iFAA0B;;AAEnD,sBAAsB,mBAAO,CAAC,6FAAgC;;AAE9D,mDAAmD;;AAEnD;AACA;AACA,CAAC,mBAAmB;;AAEpB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;ACzBa;;AAEb,qBAAqB,mBAAO,CAAC,uGAAqC;;AAElE,aAAa,mBAAO,CAAC,qFAA4B;;AAEjD,kBAAkB,mBAAO,CAAC,mFAA2B;;AAErD,WAAW,mBAAO,CAAC,mFAA2B;;AAE9C,iBAAiB,mBAAO,CAAC,iFAA0B;;AAEnD,cAAc,mBAAO,CAAC,yEAAsB;;AAE5C,qBAAqB,mBAAO,CAAC,yFAA8B;;AAE3D,iBAAiB,mBAAO,CAAC,iFAA0B;;AAEnD,kBAAkB,mBAAO,CAAC,iFAA0B;;AAEpD,cAAc,mBAAO,CAAC,6FAAgC;;AAEtD,0BAA0B,mBAAO,CAAC,uFAA6B;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;;AAEvD;AACA;;AAEA;AACA;;AAEA;AACA,yCAAyC;;AAEzC;AACA;AACA,mDAAmD;;AAEnD,+BAA+B,OAAO;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;AACxC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sDAAsD;;AAEtD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;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A;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA,GAAG,eAAe,mBAAmB;;;AAGrC;AACA;;AAEA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,E;;;;;;;;;;;AC5HA,WAAW,mBAAO,CAAC,mEAAmB;;AAEtC,UAAU,mBAAO,CAAC,iEAAkB;;AAEpC,mCAAmC,mBAAO,CAAC,6GAAwC;;AAEnF,qBAAqB,mBAAO,CAAC,uGAAqC;;AAElE;AACA,+CAA+C;AAC/C;AACA;AACA,GAAG;AACH,E;;;;;;;;;;;ACbA,YAAY,mBAAO,CAAC,qEAAoB,EAAE;;;AAG1C;AACA,iCAAiC;AACjC;AACA;AACA;AACA,GAAG;AACH,CAAC,E;;;;;;;;;;;ACTD,aAAa,mBAAO,CAAC,uEAAqB;;AAE1C,eAAe,mBAAO,CAAC,6EAAwB;;AAE/C,+BAA+B;;AAE/B;;AAEA;AACA;AACA,E;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;AClCA;AACA,qI;;;;;;;;;;;ACDA,aAAa,mBAAO,CAAC,uEAAqB;;AAE1C,+BAA+B,mBAAO,CAAC,+HAAiD;;AAEx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;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,EAAE;AACF;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA,CAAC,EAAE;AACH;;AAEA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA,KAAK,QAAQ;AACb,iDAAiD;AACjD,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;AACH;;AAEA,0GAA0G;AAC1G;;AAEA;AACA,0B;;;;;;;;;;;AC3XA,aAAa,mBAAO,CAAC,uEAAqB;;AAE1C,mBAAmB,mBAAO,CAAC,qFAA4B;;AAEvD,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;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,0BAA0B;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,WAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA,KAAK;AACL;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,gDAAgD;AAChD,KAAK;AACL;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,2CAA2C;AAC3C,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,wCAAwC;AACxC,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,IAAqC;AACjD,wFAAwF;AACxF;AACA;AACA;AACA;;AAEA;AACA,iGAAiG;;AAEjG;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;;AAEA,YAAY,IAAqC;AACjD;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,uDAAuD;;AAEvD,+NAA+N;AAC/N;;;AAGA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;;AAEA,gBAAgB,IAAqC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,gMAAgM;;AAEhM;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;;;AAGA;AACA;;AAEA;AACA;AACA,8KAA8K;;AAE9K;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;;;AAGA;AACA;;AAEA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,aAAa;AACvG;AACA,SAAS,iDAAiD;AAC1D;AACA;;;AAGA;AACA,cAAc,IAAqC;AACnD;AACA;AACA,SAAS;AACT,cAAc,IAAqC;AACnD;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;;AAGA;AACA;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA,OAAO;;;AAGP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;;AAEA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;;AAE1D;AACA;AACA;;AAEA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;;;;;;;AC1xBA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,YAAY,mBAAO,CAAC,4CAAO;;AAE3B,cAAc,mBAAO,CAAC,+DAAW;;AAEjC;AACA;AACA,CAAC;;;AAGD;AACA,sF;;;;;;;;;;;;ACnBa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+B;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;;AAEA,IAAI,IAAqC;AACzC;AACA;;AAEA,6B;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qDAAqD;AACrD,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA,0BAA0B;;AAE1B;AACA;AACA;;AAEA,2B;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,oBAAoB,mBAAO,CAAC,iEAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,IAAI,IAAqC;AACzC;AACA,sFAAsF,aAAa;AACnG;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA,4FAA4F,eAAe;AAC3G;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yB;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA,kCAAkC;;AAElC;;AAEA;AACA;AACA,KAAK;;;AAGL;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA,KAAK;;AAEL,oCAAoC;AACpC;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;;AAEjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;;;AAGA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA,0HAA0H;AAC1H;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,sIAAsI;AACtI;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA,gC;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,cAAc,mBAAO,CAAC,kDAAU;;AAEhC,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;;AAE/D,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;;AAEA;;AAEA,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B;AAC7B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;;AAGA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAG;;;AAGH;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,KAAqC;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,sBAAsB;AAC3C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,SAAM;AAC7I;AACA;;AAEA,mBAAmB,gCAAgC;AACnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gCAAgC;AACrD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;;AAGA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;;;AAGL;AACA;AACA;;AAEA;AACA,GAAG;;;AAGH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;ACloBA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,kDAAU,EAAE;AACpC;;;AAGA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,CAAC,MAAM,E;;;;;;;;;;;;ACbP;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;AACA,sC;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA,KAAK,EAAE;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA,0FAA0F,aAAa;AACvG;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA,gGAAgG,eAAe;AAC/G;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;AC/Oa;;AAEb,IAAI,KAAqC,EAAE,EAE1C;AACD,mBAAmB,mBAAO,CAAC,0FAA+B;AAC1D,C;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA,kBAAkB,mBAAO,CAAC,4DAAe;;AAEzC,yBAAyB,mBAAO,CAAC,8EAA2B,EAAE;;;AAG9D,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA,8FAA8F,aAAa;AAC3G;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oGAAoG,eAAe;AACnH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8FAA8F,aAAa;AAC3G;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,uDAAuD;AACvD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yOAAyO;AACzO;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,UAAU;AAC3B,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,OAAO;AACxB,iBAAiB,UAAU;AAC3B,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,OAAO;AACxB,iBAAiB,UAAU;AAC3B,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;;AAE7B,8BAA8B;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;;AAEA;AACA,uDAAuD;;AAEvD;;AAEA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,SAAS;;;AAGT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D;;AAE9D,8FAA8F,aAAa;AAC3G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,eAAe,cAAc;AAC7B,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;;AAEX;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;;AAEA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;;;AAGA;AACA,mBAAmB;;AAEnB;AACA;AACA,qBAAqB;AACrB,6DAA6D,SAAS;AACtE,2BAA2B,SAAS;AACpC;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP,mBAAmB;;AAEnB,4BAA4B,iBAAiB;;;AAG7C;AACA,4BAA4B;;AAE5B,+BAA+B;AAC/B;AACA;;AAEA,mCAAmC;;AAEnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;;AAGT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB,eAAe,GAAG;AAClB;AACA,gBAAgB,QAAQ;AACxB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sJAAsJ,yCAAyC;AAC/L;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,UAAU;AACzB,eAAe,GAAG;AAClB,gBAAgB,QAAQ;AACxB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,gBAAgB;AAChB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,gBAAgB,OAAO;AACvB;;;AAGA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,aAAa;AAC7B;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,EAAE;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA,eAAe;AACf;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA,eAAe;AACf;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,8bAA8b;;AAE9b;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,EAAE;AACjB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,8DAA8D;AAC9D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,EAAE;AACjB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;;AAGA;AACA;AACA;;AAEA,qBAAqB,iBAAiB;AACtC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,+CAA+C;AAC/C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA,2DAA2D;AAC3D;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,qBAAqB;AAClD;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,kLAAkL,SAAS,MAAM,IAAI;AACrM;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+CAA+C;AAC/C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA,yDAAyD;AACzD;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,sBAAsB;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2CAA2C;AAC3C;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,KAAI;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,UAAU,KAAI;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,+BAA+B;;AAE/B,qCAAqC;;AAErC,+BAA+B;;AAE/B,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,8CAA8C;AAC9C;;AAEA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;ACluEa;;AAEb,IAAI,KAAqC,EAAE,EAE1C;AACD,mBAAmB,mBAAO,CAAC,iFAA4B;AACvD,C;;;;;;;;;;;ACNA,MAAM;;AAEN;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,4CAA4C;;;AAG5C,mB","file":"react.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js_src/react.js\");\n","/**\n * react-dart JS interop helpers (used by react_client.dart and react_client/js_interop_helpers.dart)\n */\n/// Prefix to namespace react-dart symbols\nvar _reactDartSymbolPrefix = 'react-dart.';\n/// A global symbol to identify javascript objects owned by react-dart context,\n/// in order to jsify and unjsify context objects correctly.\nvar _reactDartContextSymbol = Symbol(_reactDartSymbolPrefix+'context');\n\n/// A JS side function to allow Dart to throw an error from JS in order to catch it Dart side.\n/// Used within Component2 error boundry methods to dartify the error argument.\n/// See: https://github.com/dart-lang/sdk/issues/36363\nfunction _throwErrorFromJS(error) {\n throw error;\n}\n\n/// A JS variable that can be used with dart interop in order to force returning a\n/// javascript `null`. This prevents dart2js from possibly converting dart `null` into `undefined`.\nvar _jsNull = null;\n\nfunction _createReactDartComponentClass(dartInteropStatics, componentStatics, jsConfig) {\n class ReactDartComponent extends React.Component {\n constructor(props, context) {\n super(props, context);\n this.dartComponent = dartInteropStatics.initComponent(this, this.props.internal, this.context, componentStatics);\n }\n UNSAFE_componentWillMount() {\n dartInteropStatics.handleComponentWillMount(this.dartComponent);\n }\n componentDidMount() {\n dartInteropStatics.handleComponentDidMount(this.dartComponent);\n }\n /*\n /// This cannot be used with UNSAFE_ lifecycle methods.\n getDerivedStateFromProps(nextProps, prevState) {\n return dartInteropStatics.handleGetDerivedStateFromProps(this.props.internal, nextProps.internal);\n }\n */\n UNSAFE_componentWillReceiveProps(nextProps, nextContext) {\n dartInteropStatics.handleComponentWillReceiveProps(this.dartComponent, nextProps.internal, nextContext);\n }\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n return dartInteropStatics.handleShouldComponentUpdate(this.dartComponent, nextContext);\n }\n /*\n /// This cannot be used with UNSAFE_ lifecycle methods.\n getSnapshotBeforeUpdate() {\n return dartInteropStatics.handleGetSnapshotBeforeUpdate(this.props.internal, prevProps.internal);\n }\n */\n UNSAFE_componentWillUpdate(nextProps, nextState, nextContext) {\n dartInteropStatics.handleComponentWillUpdate(this.dartComponent, nextContext);\n }\n componentDidUpdate(prevProps, prevState) {\n dartInteropStatics.handleComponentDidUpdate(this.dartComponent, prevProps.internal);\n }\n componentWillUnmount() {\n dartInteropStatics.handleComponentWillUnmount(this.dartComponent);\n }\n render() {\n var result = dartInteropStatics.handleRender(this.dartComponent);\n if (typeof result === 'undefined') result = null;\n return result;\n }\n }\n\n // React limits the accessible context entries\n // to the keys specified in childContextTypes/contextTypes.\n var childContextKeys = jsConfig && jsConfig.childContextKeys;\n var contextKeys = jsConfig && jsConfig.contextKeys;\n\n if (childContextKeys && childContextKeys.length !== 0) {\n ReactDartComponent.childContextTypes = {};\n for (var i = 0; i < childContextKeys.length; i++) {\n ReactDartComponent.childContextTypes[childContextKeys[i]] = React.PropTypes.object;\n }\n // Only declare this when `childContextKeys` is non-empty to avoid unnecessarily\n // creating interop context objects for components that won't use it.\n ReactDartComponent.prototype['getChildContext'] = function() {\n return dartInteropStatics.handleGetChildContext(this.dartComponent);\n };\n }\n\n if (contextKeys && contextKeys.length !== 0) {\n ReactDartComponent.contextTypes = {};\n for (var i = 0; i < contextKeys.length; i++) {\n ReactDartComponent.contextTypes[contextKeys[i]] = React.PropTypes.object;\n }\n }\n\n return ReactDartComponent;\n}\n\nfunction _createReactDartComponentClass2(dartInteropStatics, componentStatics, jsConfig) {\n class ReactDartComponent2 extends React.Component {\n constructor(props, context) {\n super(props, context);\n // TODO combine these two calls into one\n this.dartComponent = dartInteropStatics.initComponent(this, componentStatics);\n }\n\n componentDidMount() {\n dartInteropStatics.handleComponentDidMount(this.dartComponent);\n }\n shouldComponentUpdate(nextProps, nextState) {\n return dartInteropStatics.handleShouldComponentUpdate(this.dartComponent, nextProps, nextState);\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n let derivedState = dartInteropStatics.handleGetDerivedStateFromProps(componentStatics, nextProps, prevState);\n return typeof derivedState !== 'undefined' ? derivedState : null;\n }\n\n getSnapshotBeforeUpdate(prevProps, prevState) {\n let snapshot = dartInteropStatics.handleGetSnapshotBeforeUpdate(this.dartComponent, prevProps, prevState);\n return typeof snapshot !== 'undefined' ? snapshot : null;\n }\n componentDidUpdate(prevProps, prevState, snapshot) {\n dartInteropStatics.handleComponentDidUpdate(this.dartComponent, this, prevProps, prevState, snapshot);\n }\n componentWillUnmount() {\n dartInteropStatics.handleComponentWillUnmount(this.dartComponent);\n }\n componentDidCatch(error, info) {\n dartInteropStatics.handleComponentDidCatch(this.dartComponent, error, info);\n }\n static getDerivedStateFromError(error) {\n return dartInteropStatics.handleGetDerivedStateFromError(componentStatics, error);\n }\n render() {\n var result = dartInteropStatics.handleRender(this.dartComponent, this.props, this.state, this.context);\n if (typeof result === 'undefined') result = null;\n return result;\n }\n }\n\n // Delete methods that the user does not want to include (such as error boundary event).\n jsConfig.skipMethods.forEach((method) => {\n if (ReactDartComponent2[method]) {\n delete ReactDartComponent2[method];\n } else {\n delete ReactDartComponent2.prototype[method];\n }\n });\n\n if (jsConfig) {\n if (jsConfig.contextType) {\n ReactDartComponent2.contextType = jsConfig.contextType;\n }\n if (jsConfig.defaultProps) {\n ReactDartComponent2.defaultProps = jsConfig.defaultProps;\n }\n if (jsConfig.propTypes) {\n ReactDartComponent2.propTypes = jsConfig.propTypes;\n }\n }\n\n return ReactDartComponent2;\n}\n\nfunction _markChildValidated(child) {\n const store = child._store;\n if (store) store.validated = true;\n}\n\nexport default {\n _reactDartContextSymbol,\n _createReactDartComponentClass,\n _createReactDartComponentClass2,\n _markChildValidated,\n _throwErrorFromJS,\n _jsNull,\n}\n","React.__isDevelopment = true;\n","// React 16 Polyfill requirements: https://reactjs.org/docs/javascript-environment-requirements.html\nimport 'core-js/es/map';\nimport 'core-js/es/set';\n\n// Know required Polyfill's for dart side usage\nimport 'core-js/stable/reflect/delete-property';\nimport 'core-js/stable/object/assign';\n\n// Additional polyfills are included by core-js based on 'usage' and browser requirements\n\n// Custom dart side methods\nimport DartHelpers from './_dart_helpers';\n\nconst React = require('react');\nconst PropTypes = require('prop-types');\nconst CreateReactClass = require('create-react-class');\n\nwindow.React = React;\nObject.assign(window, DartHelpers);\n\nReact.createClass = CreateReactClass; // TODO: Remove this once over_react_test doesnt rely on createClass.\nReact.PropTypes = PropTypes; // Only needed to support legacy context until we update. lol jk we need it for prop validation now.\n\nif (process.env.NODE_ENV == 'production') {\n require('./dart_env_prod');\n} else {\n require('./dart_env_dev');\n}\n","require('../../modules/es.map');\n\nrequire('../../modules/es.object.to-string');\n\nrequire('../../modules/es.string.iterator');\n\nrequire('../../modules/web.dom-collections.iterator');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Map;","require('../../modules/es.object.assign');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.assign;","require('../../modules/es.reflect.delete-property');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Reflect.deleteProperty;","require('../../modules/es.set');\n\nrequire('../../modules/es.object.to-string');\n\nrequire('../../modules/es.string.iterator');\n\nrequire('../../modules/web.dom-collections.iterator');\n\nvar path = require('../../internals/path');\n\nmodule.exports = path.Set;","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n }\n\n return it;\n};","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n }\n\n return it;\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar create = require('../internals/object-create');\n\nvar hide = require('../internals/hide');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n hide(ArrayPrototype, UNSCOPABLES, create(null));\n} // add a key to Array.prototype[@@unscopables]\n\n\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n }\n\n return it;\n};","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n }\n\n return it;\n};","'use strict';\n\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar sloppyArrayMethod = require('../internals/sloppy-array-method'); // `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n\n\nmodule.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn\n/* , thisArg */\n) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;","var toIndexedObject = require('../internals/to-indexed-object');\n\nvar toLength = require('../internals/to-length');\n\nvar toAbsoluteIndex = require('../internals/to-absolute-index'); // `Array.prototype.{ indexOf, includes }` methods implementation\n\n\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};","var bind = require('../internals/bind-context');\n\nvar IndexedObject = require('../internals/indexed-object');\n\nvar toObject = require('../internals/to-object');\n\nvar toLength = require('../internals/to-length');\n\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\n\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n\n for (; length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3:\n return true;\n // some\n\n case 5:\n return value;\n // find\n\n case 6:\n return index;\n // findIndex\n\n case 2:\n push.call(target, value);\n // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6)\n};","var isObject = require('../internals/is-object');\n\nvar isArray = require('../internals/is-array');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\n\nmodule.exports = function (originalArray, length) {\n var C;\n\n if (isArray(originalArray)) {\n C = originalArray.constructor; // cross-realm fallback\n\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n }\n\n return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};","var aFunction = require('../internals/a-function'); // optional / simple context binding\n\n\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 0:\n return function () {\n return fn.call(that);\n };\n\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};","var anObject = require('../internals/an-object'); // call something on iterator step with safe closing on error\n\n\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return {\n done: !!called++\n };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n }; // eslint-disable-next-line no-throw-literal\n\n\n Array.from(iteratorWithReturn, function () {\n throw 2;\n });\n} catch (error) {\n /* empty */\n}\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n\n try {\n var object = {};\n\n object[ITERATOR] = function () {\n return {\n next: function () {\n return {\n done: ITERATION_SUPPORT = true\n };\n }\n };\n };\n\n exec(object);\n } catch (error) {\n /* empty */\n }\n\n return ITERATION_SUPPORT;\n};","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};","var classofRaw = require('../internals/classof-raw');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag'); // ES3 wrong here\n\nvar CORRECT_ARGUMENTS = classofRaw(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) {\n /* empty */\n }\n}; // getting tag from ES6+ `Object.prototype.toString`\n\n\nmodule.exports = function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};","'use strict';\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar create = require('../internals/object-create');\n\nvar redefineAll = require('../internals/redefine-all');\n\nvar bind = require('../internals/bind-context');\n\nvar anInstance = require('../internals/an-instance');\n\nvar iterate = require('../internals/iterate');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar setSpecies = require('../internals/set-species');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar fastKey = require('../internals/internal-metadata').fastKey;\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n });\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index; // change existing entry\n\n if (entry) {\n entry.value = value; // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;else that.size++; // add to index\n\n if (index !== 'F') state.index[index] = entry;\n }\n\n return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that); // fast case\n\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index]; // frozen object case\n\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;else that.size = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;else that.size--;\n }\n\n return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn\n /* , that = undefined */\n ) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this); // revert to the last existing entry\n\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n redefineAll(C.prototype, IS_MAP ? {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last; // revert to the last existing entry\n\n while (entry && entry.removed) entry = entry.previous; // get next entry\n\n\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n } // return step by kind\n\n\n if (kind == 'keys') return {\n value: entry.key,\n done: false\n };\n if (kind == 'values') return {\n value: entry.value,\n done: false\n };\n return {\n value: [entry.key, entry.value],\n done: false\n };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2\n\n setSpecies(CONSTRUCTOR_NAME);\n }\n};","'use strict';\n\nvar $ = require('../internals/export');\n\nvar global = require('../internals/global');\n\nvar isForced = require('../internals/is-forced');\n\nvar redefine = require('../internals/redefine');\n\nvar InternalMetadataModule = require('../internals/internal-metadata');\n\nvar iterate = require('../internals/iterate');\n\nvar anInstance = require('../internals/an-instance');\n\nvar isObject = require('../internals/is-object');\n\nvar fails = require('../internals/fails');\n\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) {\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var ADDER = IS_MAP ? 'set' : 'add';\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY, KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n });\n }; // eslint-disable-next-line max-len\n\n\n if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor(); // early implementations not supports chaining\n\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n\n var THROWS_ON_PRIMITIVES = fails(function () {\n instance.has(1);\n }); // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new\n\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) {\n new NativeConstructor(iterable);\n }); // for early implementations -0 and +0 not the same\n\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n\n while (index--) $instance[ADDER](index, index);\n\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method\n\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({\n global: true,\n forced: Constructor != NativeConstructor\n }, exported);\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n return Constructor;\n};","var has = require('../internals/has');\n\nvar ownKeys = require('../internals/own-keys');\n\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() {\n /* empty */\n }\n\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});","'use strict';\n\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\n\nvar create = require('../internals/object-create');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () {\n return this;\n};\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, {\n next: createPropertyDescriptor(1, next)\n });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};","'use strict';\n\nvar $ = require('../internals/export');\n\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\n\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar hide = require('../internals/hide');\n\nvar redefine = require('../internals/redefine');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar Iterators = require('../internals/iterators');\n\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () {\n return this;\n};\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS:\n return function keys() {\n return new IteratorConstructor(this, KIND);\n };\n\n case VALUES:\n return function values() {\n return new IteratorConstructor(this, KIND);\n };\n\n case ENTRIES:\n return function entries() {\n return new IteratorConstructor(this, KIND);\n };\n }\n\n return function () {\n return new IteratorConstructor(this);\n };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY; // fix native\n\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n hide(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n } // Set @@toStringTag to native iterators\n\n\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n\n defaultIterator = function values() {\n return nativeIterator.call(this);\n };\n } // define iterator\n\n\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n hide(IterablePrototype, ITERATOR, defaultIterator);\n }\n\n Iterators[NAME] = defaultIterator; // export additional methods\n\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({\n target: NAME,\n proto: true,\n forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME\n }, methods);\n }\n\n return methods;\n};","var path = require('../internals/path');\n\nvar has = require('../internals/has');\n\nvar wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};","var fails = require('../internals/fails'); // Thank's IE8 for his funny defineProperty\n\n\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});","var global = require('../internals/global');\n\nvar isObject = require('../internals/is-object');\n\nvar document = global.document; // typeof document.createElement is 'object' in old IE\n\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};","// IE8- don't enum bug keys\nmodule.exports = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];","var global = require('../internals/global');\n\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\nvar hide = require('../internals/hide');\n\nvar redefine = require('../internals/redefine');\n\nvar setGlobal = require('../internals/set-global');\n\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar isForced = require('../internals/is-forced');\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\n\n\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n\n if (target) for (key in source) {\n sourceProperty = source[key];\n\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target\n\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n } // add a flag to not completely full polyfills\n\n\n if (options.sham || targetProperty && targetProperty.sham) {\n hide(sourceProperty, 'sham', true);\n } // extend global\n\n\n redefine(target, key, sourceProperty, options);\n }\n};","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});","var shared = require('../internals/shared');\n\nmodule.exports = shared('native-function-to-string', Function.toString);","var path = require('../internals/path');\n\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};","var classof = require('../internals/classof');\n\nvar Iterators = require('../internals/iterators');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];\n};","var O = 'object';\n\nvar check = function (it) {\n return it && it.Math == Math && it;\n}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\n\nmodule.exports = // eslint-disable-next-line no-undef\ncheck(typeof globalThis == O && globalThis) || check(typeof window == O && window) || check(typeof self == O && self) || check(typeof global == O && global) || // eslint-disable-next-line no-new-func\nFunction('return this')();","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};","module.exports = {};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');","var DESCRIPTORS = require('../internals/descriptors');\n\nvar fails = require('../internals/fails');\n\nvar createElement = require('../internals/document-create-element'); // Thank's IE8 for his funny defineProperty\n\n\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});","var fails = require('../internals/fails');\n\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings\n\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;","var isObject = require('../internals/is-object');\n\nvar setPrototypeOf = require('../internals/object-set-prototype-of'); // makes subclassing work correct for wrapped built-ins\n\n\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if ( // it can work only with native `setPrototypeOf`\n setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};","var hiddenKeys = require('../internals/hidden-keys');\n\nvar isObject = require('../internals/is-object');\n\nvar has = require('../internals/has');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar uid = require('../internals/uid');\n\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, {\n value: {\n objectID: 'O' + ++id,\n // object ID\n weakData: {} // weak collections IDs\n\n }\n });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMetadata(it); // return object ID\n }\n\n return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMetadata(it); // return the store of weak collections IDs\n }\n\n return it[METADATA].weakData;\n}; // add metadata on freeze-family methods calling\n\n\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\nhiddenKeys[METADATA] = true;","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\n\nvar global = require('../internals/global');\n\nvar isObject = require('../internals/is-object');\n\nvar hide = require('../internals/hide');\n\nvar objectHas = require('../internals/has');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n }\n\n return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n\n set = function (it, metadata) {\n hide(it, STATE, metadata);\n return metadata;\n };\n\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype; // check on default Array iterator\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};","var classof = require('../internals/classof-raw'); // `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\n\n\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\nmodule.exports = isForced;","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","module.exports = false;","var anObject = require('../internals/an-object');\n\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\n\nvar toLength = require('../internals/to-length');\n\nvar bind = require('../internals/bind-context');\n\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); // optimisation for array iterators\n\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n }\n\n return new Result(false);\n }\n\n iterator = iterFn.call(iterable);\n }\n\n while (!(step = iterator.next()).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (result && result instanceof Result) return result;\n }\n\n return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};","'use strict';\n\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar hide = require('../internals/hide');\n\nvar has = require('../internals/has');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () {\n return this;\n}; // `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\n\n\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`\n\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};","module.exports = {};","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});","var global = require('../internals/global');\n\nvar nativeFunctionToString = require('../internals/function-to-string');\n\nvar WeakMap = global.WeakMap;\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar fails = require('../internals/fails');\n\nvar objectKeys = require('../internals/object-keys');\n\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar toObject = require('../internals/to-object');\n\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign; // `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n// should work with symbols and should have deterministic property order (V8 bug)\n\nmodule.exports = !nativeAssign || fails(function () {\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) {\n B[chr] = chr;\n });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : nativeAssign;","var anObject = require('../internals/an-object');\n\nvar defineProperties = require('../internals/object-define-properties');\n\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar html = require('../internals/html');\n\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar PROTOTYPE = 'prototype';\n\nvar Empty = function () {\n /* empty */\n}; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\n\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var length = enumBugKeys.length;\n var lt = '<';\n var script = 'script';\n var gt = '>';\n var js = 'java' + script + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(js);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];\n\n return createDict();\n}; // `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\n\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\nhiddenKeys[IE_PROTO] = true;","var DESCRIPTORS = require('../internals/descriptors');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar anObject = require('../internals/an-object');\n\nvar objectKeys = require('../internals/object-keys'); // `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\n\n\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n\n return O;\n};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar anObject = require('../internals/an-object');\n\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\n\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar toPrimitive = require('../internals/to-primitive');\n\nvar has = require('../internals/has');\n\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) {\n /* empty */\n }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};","var toIndexedObject = require('../internals/to-indexed-object');\n\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n}; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : nativeGetOwnPropertyNames(toIndexedObject(it));\n};","var internalObjectKeys = require('../internals/object-keys-internal');\n\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};","exports.f = Object.getOwnPropertySymbols;","var has = require('../internals/has');\n\nvar toObject = require('../internals/to-object');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectPrototype : null;\n};","var has = require('../internals/has');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar indexOf = require('../internals/array-includes').indexOf;\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n\n return result;\n};","var internalObjectKeys = require('../internals/object-keys-internal');\n\nvar enumBugKeys = require('../internals/enum-bug-keys'); // `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n\n\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};","'use strict';\n\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug\n\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({\n 1: 2\n}, 1); // `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\n\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;","var anObject = require('../internals/an-object');\n\nvar aPossiblePrototype = require('../internals/a-possible-prototype'); // `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n\n/* eslint-disable no-proto */\n\n\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) {\n /* empty */\n }\n\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);else O.__proto__ = proto;\n return O;\n };\n}() : undefined);","'use strict';\n\nvar classof = require('../internals/classof');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\ntest[TO_STRING_TAG] = 'z'; // `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n\nmodule.exports = String(test) !== '[object z]' ? function toString() {\n return '[object ' + classof(this) + ']';\n} : test.toString;","var getBuiltIn = require('../internals/get-built-in');\n\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\n\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\n\nvar anObject = require('../internals/an-object'); // all object keys, includes non-enumerable and symbols\n\n\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};","module.exports = require('../internals/global');","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n\n return target;\n};","var global = require('../internals/global');\n\nvar shared = require('../internals/shared');\n\nvar hide = require('../internals/hide');\n\nvar has = require('../internals/has');\n\nvar setGlobal = require('../internals/set-global');\n\nvar nativeFunctionToString = require('../internals/function-to-string');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(nativeFunctionToString).split('toString');\nshared('inspectSource', function (it) {\n return nativeFunctionToString.call(it);\n});\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n\n if (O === global) {\n if (simple) O[key] = value;else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n\n if (simple) O[key] = value;else hide(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);\n});","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};","var global = require('../internals/global');\n\nvar hide = require('../internals/hide');\n\nmodule.exports = function (key, value) {\n try {\n hide(global, key, value);\n } catch (error) {\n global[key] = value;\n }\n\n return value;\n};","'use strict';\n\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () {\n return this;\n }\n });\n }\n};","var defineProperty = require('../internals/object-define-property').f;\n\nvar has = require('../internals/has');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, {\n configurable: true,\n value: TAG\n });\n }\n};","var shared = require('../internals/shared');\n\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};","var global = require('../internals/global');\n\nvar setGlobal = require('../internals/set-global');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.2.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});","'use strict';\n\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !method || !fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () {\n throw 1;\n }, 1);\n });\n};","var toInteger = require('../internals/to-integer');\n\nvar requireObjectCoercible = require('../internals/require-object-coercible'); // `String.prototype.{ codePointAt, at }` methods implementation\n\n\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min; // Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).\n\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\n\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};","var ceil = Math.ceil;\nvar floor = Math.floor; // `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\n\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min; // `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\n\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};","var requireObjectCoercible = require('../internals/require-object-coercible'); // `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\n\n\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};","var isObject = require('../internals/is-object'); // `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\n\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};","var global = require('../internals/global');\n\nvar shared = require('../internals/shared');\n\nvar uid = require('../internals/uid');\n\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nvar Symbol = global.Symbol;\nvar store = shared('wks');\n\nmodule.exports = function (name) {\n return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name] || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};","exports.f = require('../internals/well-known-symbol');","'use strict';\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar Iterators = require('../internals/iterators');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\n\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated),\n // target\n index: 0,\n // next index\n kind: kind // kind\n\n }); // `%ArrayIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n\n if (!target || index >= target.length) {\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n }\n\n if (kind == 'keys') return {\n value: index,\n done: false\n };\n if (kind == 'values') return {\n value: target[index],\n done: false\n };\n return {\n value: [index, target[index]],\n done: false\n };\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\n\nIterators.Arguments = Iterators.Array; // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');","'use strict';\n\nvar collection = require('../internals/collection');\n\nvar collectionStrong = require('../internals/collection-strong'); // `Map` constructor\n// https://tc39.github.io/ecma262/#sec-map-objects\n\n\nmodule.exports = collection('Map', function (get) {\n return function Map() {\n return get(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong, true);","var $ = require('../internals/export');\n\nvar assign = require('../internals/object-assign'); // `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n\n\n$({\n target: 'Object',\n stat: true,\n forced: Object.assign !== assign\n}, {\n assign: assign\n});","var $ = require('../internals/export');\n\nvar fails = require('../internals/fails');\n\nvar toObject = require('../internals/to-object');\n\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () {\n nativeGetPrototypeOf(1);\n}); // `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n\n$({\n target: 'Object',\n stat: true,\n forced: FAILS_ON_PRIMITIVES,\n sham: !CORRECT_PROTOTYPE_GETTER\n}, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});","var redefine = require('../internals/redefine');\n\nvar toString = require('../internals/object-to-string');\n\nvar ObjectPrototype = Object.prototype; // `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n\nif (toString !== ObjectPrototype.toString) {\n redefine(ObjectPrototype, 'toString', toString, {\n unsafe: true\n });\n}","var $ = require('../internals/export');\n\nvar anObject = require('../internals/an-object');\n\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; // `Reflect.deleteProperty` method\n// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty\n\n\n$({\n target: 'Reflect',\n stat: true\n}, {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);\n return descriptor && !descriptor.configurable ? false : delete target[propertyKey];\n }\n});","'use strict';\n\nvar collection = require('../internals/collection');\n\nvar collectionStrong = require('../internals/collection-strong'); // `Set` constructor\n// https://tc39.github.io/ecma262/#sec-set-objects\n\n\nmodule.exports = collection('Set', function (get) {\n return function Set() {\n return get(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong);","'use strict';\n\nvar charAt = require('../internals/string-multibyte').charAt;\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\n\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n }); // `%StringIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return {\n value: undefined,\n done: true\n };\n point = charAt(string, index);\n state.index += point.length;\n return {\n value: point,\n done: false\n };\n});","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\n\nvar $ = require('../internals/export');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar global = require('../internals/global');\n\nvar has = require('../internals/has');\n\nvar isObject = require('../internals/is-object');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) || // Safari 12 bug\nNativeSymbol().description !== undefined)) {\n var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description\n\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n $({\n global: true,\n forced: true\n }, {\n Symbol: SymbolWrapper\n });\n}","var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\n\n\ndefineWellKnownSymbol('iterator');","'use strict';\n\nvar $ = require('../internals/export');\n\nvar global = require('../internals/global');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nvar fails = require('../internals/fails');\n\nvar has = require('../internals/has');\n\nvar isArray = require('../internals/is-array');\n\nvar isObject = require('../internals/is-object');\n\nvar anObject = require('../internals/an-object');\n\nvar toObject = require('../internals/to-object');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar toPrimitive = require('../internals/to-primitive');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar nativeObjectCreate = require('../internals/object-create');\n\nvar objectKeys = require('../internals/object-keys');\n\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\n\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\n\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\n\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar hide = require('../internals/hide');\n\nvar redefine = require('../internals/redefine');\n\nvar shared = require('../internals/shared');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar uid = require('../internals/uid');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol');\n\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar JSON = global.JSON;\nvar nativeJSONStringify = JSON && JSON.stringify;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () {\n return nativeDefineProperty(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = NATIVE_SYMBOL && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, {\n enumerable: createPropertyDescriptor(0, false)\n });\n }\n\n return setSymbolDescriptor(O, key, Attributes);\n }\n\n return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n}; // `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\n\n\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, {\n configurable: true,\n set: setter\n });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, {\n unsafe: true\n });\n }\n }\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n}\n\n$({\n global: true,\n wrap: true,\n forced: !NATIVE_SYMBOL,\n sham: !NATIVE_SYMBOL\n}, {\n Symbol: $Symbol\n});\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n$({\n target: SYMBOL,\n stat: true,\n forced: !NATIVE_SYMBOL\n}, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () {\n USE_SETTER = true;\n },\n useSimple: function () {\n USE_SETTER = false;\n }\n});\n$({\n target: 'Object',\n stat: true,\n forced: !NATIVE_SYMBOL,\n sham: !DESCRIPTORS\n}, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n$({\n target: 'Object',\n stat: true,\n forced: !NATIVE_SYMBOL\n}, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\n$({\n target: 'Object',\n stat: true,\n forced: fails(function () {\n getOwnPropertySymbolsModule.f(1);\n })\n}, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n}); // `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\n\nJSON && $({\n target: 'JSON',\n stat: true,\n forced: !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol(); // MS Edge converts symbol values to JSON as {}\n\n return nativeJSONStringify([symbol]) != '[null]' // WebKit converts symbol values to JSON as null\n || nativeJSONStringify({\n a: symbol\n }) != '{}' // V8 throws on boxed symbols\n || nativeJSONStringify(Object(symbol)) != '{}';\n })\n}, {\n stringify: function stringify(it) {\n var args = [it];\n var index = 1;\n var replacer, $replacer;\n\n while (arguments.length > index) args.push(arguments[index++]);\n\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return nativeJSONStringify.apply(JSON, args);\n }\n}); // `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\n\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\n\nsetToStringTag($Symbol, SYMBOL);\nhiddenKeys[HIDDEN] = true;","var global = require('../internals/global');\n\nvar DOMIterables = require('../internals/dom-iterables');\n\nvar forEach = require('../internals/array-for-each');\n\nvar hide = require('../internals/hide');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype; // some Chrome versions have non-configurable methods on DOMTokenList\n\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n hide(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}","var global = require('../internals/global');\n\nvar DOMIterables = require('../internals/dom-iterables');\n\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\n\nvar hide = require('../internals/hide');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n hide(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) hide(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n hide(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}","module.exports = require('../../es/object/assign');","module.exports = require('../../es/reflect/delete-property');","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\n\nvar _invariant = require('fbjs/lib/invariant');\n\nif (process.env.NODE_ENV !== 'production') {\n var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\n\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\n\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n var injectedMixins = [];\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return
Hello World
;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return
Hello, {name}!
;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n\n var RESERVED_SPEC_KEYS = {\n displayName: function (Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function (Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function (Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n\n Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);\n },\n contextTypes: function (Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n\n Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);\n },\n\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function (Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function (Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function (Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function () {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName);\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed.\n\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name);\n } // Disallow defining methods more than once unless explicitly allowed.\n\n\n if (isAlreadyDefined) {\n _invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name);\n }\n }\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n\n\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(isMixinValid, \"%s: You're attempting to include a mixin that is either null \" + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec);\n }\n }\n\n return;\n }\n\n _invariant(typeof spec !== 'function', \"ReactClass: You're attempting to \" + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.');\n\n _invariant(!isValidElement(spec), \"ReactClass: You're attempting to \" + 'use a component as a mixin. Instead, just use a regular object.');\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride.\n\n _invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name); // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n\n\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n\n _invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name);\n\n var isAlreadyDefined = name in Constructor;\n\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null;\n\n _invariant(specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name);\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n return;\n }\n\n Constructor[name] = property;\n }\n }\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n\n\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.');\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key);\n\n one[key] = two[key];\n }\n }\n\n return one;\n }\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n\n\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n\n\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n\n\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n\n boundMethod.bind = function (newThis) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n } // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n\n\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName);\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName);\n }\n\n return boundMethod;\n }\n\n var reboundMethod = _bind.apply(boundMethod, arguments);\n\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n\n return boundMethod;\n }\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n\n\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function () {\n this.__isMounted = true;\n }\n };\n var IsMountedPostMixin = {\n componentWillUnmount: function () {\n this.__isMounted = false;\n }\n };\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function (newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function () {\n if (process.env.NODE_ENV !== 'production') {\n warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component');\n this.__didWarnIsMounted = true;\n }\n\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function () {};\n\n _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n\n\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function (props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n if (process.env.NODE_ENV !== 'production') {\n warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory');\n } // Wire up auto-binding\n\n\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n this.state = null; // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (initialState === undefined && this.getInitialState._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n\n _invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent');\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin); // Initialize the defaultProps property after all mixins have been merged.\n\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.');\n\n if (process.env.NODE_ENV !== 'production') {\n warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component');\n warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component');\n warning(!Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component');\n } // Reduce time spent doing lookups by setting these on the prototype.\n\n\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar React = require('react');\n\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error('create-react-class could not find the React object. If you are using script tags, ' + 'make sure that React is being loaded before create-react-class.');\n} // Hack to grab NoopUpdateQueue from isomorphic React\n\n\nvar ReactNoopUpdateQueue = new React.Component().updater;\nmodule.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue);","\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar printWarning = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function (text) {\n var message = 'Warning: ' + text;\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\n\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n\n if (error && !(error instanceof Error)) {\n printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');\n }\n\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n var stack = getStack ? getStack() : '';\n printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));\n }\n }\n }\n }\n}\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\n\n\ncheckPropTypes.resetWarningCache = function () {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n};\n\nmodule.exports = checkPropTypes;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactIs = require('react-is');\n\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\n\nvar printWarning = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function (text) {\n var message = 'Warning: ' + text;\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function (isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n\n var ANONYMOUS = '<>'; // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker\n };\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\n /*eslint-disable no-self-compare*/\n\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n\n\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n } // Make `instanceof Error` still work for returned errors.\n\n\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n\n if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3) {\n printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n\n var propValue = props[propName];\n\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n\n if (error instanceof Error) {\n return error;\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n\n if (type === 'symbol') {\n return String(value);\n }\n\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\n if (error instanceof Error) {\n return error;\n }\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n\n if (typeof checker !== 'function') {\n printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n\n if (!checker) {\n continue;\n }\n\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\n if (error) {\n return error;\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n } // We need to check all keys in case some are required but missing from\n // props.\n\n\n var allKeys = assign({}, props[propName], shapeTypes);\n\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n\n if (!checker) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));\n }\n\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\n if (error) {\n return error;\n }\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n\n case 'boolean':\n return !propValue;\n\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n } // falsy value can't be a Symbol\n\n\n if (!propValue) {\n return false;\n } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\n\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n } // Fallback for non-spec compliant Symbols which are polyfilled.\n\n\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n } // Equivalent of `typeof` but with special handling for array and regexp.\n\n\n function getPropType(propValue) {\n var propType = typeof propValue;\n\n if (Array.isArray(propValue)) {\n return 'array';\n }\n\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n\n return propType;\n } // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n\n\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n\n var propType = getPropType(propValue);\n\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n\n return propType;\n } // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n\n\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n\n default:\n return type;\n }\n } // Returns class name of the object, if any.\n\n\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is'); // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n\n\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","/** @license React v16.8.6\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n\n var hasSymbol = typeof Symbol === 'function' && Symbol.for;\n var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\n var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\n var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\n var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\n var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\n var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\n var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\n var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\n var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\n var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\n var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\n var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\n var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\n function isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);\n }\n /**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\n var lowPriorityWarning = function () {};\n\n {\n var printWarning = function (format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarning = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n }\n var lowPriorityWarning$1 = lowPriorityWarning;\n\n function typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n } // AsyncMode is deprecated along with isAsyncMode\n\n\n var AsyncMode = REACT_ASYNC_MODE_TYPE;\n var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\n var ContextConsumer = REACT_CONTEXT_TYPE;\n var ContextProvider = REACT_PROVIDER_TYPE;\n var Element = REACT_ELEMENT_TYPE;\n var ForwardRef = REACT_FORWARD_REF_TYPE;\n var Fragment = REACT_FRAGMENT_TYPE;\n var Lazy = REACT_LAZY_TYPE;\n var Memo = REACT_MEMO_TYPE;\n var Portal = REACT_PORTAL_TYPE;\n var Profiler = REACT_PROFILER_TYPE;\n var StrictMode = REACT_STRICT_MODE_TYPE;\n var Suspense = REACT_SUSPENSE_TYPE;\n var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\n function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }\n\n function isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n }\n\n function isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n }\n\n function isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n }\n\n function isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n\n function isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n }\n\n function isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n }\n\n function isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n }\n\n function isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n }\n\n function isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n }\n\n function isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n }\n\n function isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n }\n\n function isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n }\n\n exports.typeOf = typeOf;\n exports.AsyncMode = AsyncMode;\n exports.ConcurrentMode = ConcurrentMode;\n exports.ContextConsumer = ContextConsumer;\n exports.ContextProvider = ContextProvider;\n exports.Element = Element;\n exports.ForwardRef = ForwardRef;\n exports.Fragment = Fragment;\n exports.Lazy = Lazy;\n exports.Memo = Memo;\n exports.Portal = Portal;\n exports.Profiler = Profiler;\n exports.StrictMode = StrictMode;\n exports.Suspense = Suspense;\n exports.isValidElementType = isValidElementType;\n exports.isAsyncMode = isAsyncMode;\n exports.isConcurrentMode = isConcurrentMode;\n exports.isContextConsumer = isContextConsumer;\n exports.isContextProvider = isContextProvider;\n exports.isElement = isElement;\n exports.isForwardRef = isForwardRef;\n exports.isFragment = isFragment;\n exports.isLazy = isLazy;\n exports.isMemo = isMemo;\n exports.isPortal = isPortal;\n exports.isProfiler = isProfiler;\n exports.isStrictMode = isStrictMode;\n exports.isSuspense = isSuspense;\n })();\n}","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","/** @license React v16.10.1\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n var _assign = require('object-assign');\n\n var checkPropTypes = require('prop-types/checkPropTypes'); // TODO: this is special because it gets imported during build.\n\n\n var ReactVersion = '16.10.1'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n\n var hasSymbol = typeof Symbol === 'function' && Symbol.for;\n var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\n var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\n var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\n var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\n var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\n var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\n var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n // (unstable) APIs that have been removed. Can we remove the symbols?\n\n var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\n var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\n var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\n var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\n var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\n var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\n var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\n var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n function getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n } // Do not require this module directly! Use normal `invariant` calls with\n // template literal strings. The messages will be converted to ReactError during\n // build, and in production they will be minified.\n // Do not require this module directly! Use normal `invariant` calls with\n // template literal strings. The messages will be converted to ReactError during\n // build, and in production they will be minified.\n\n\n function ReactError(error) {\n error.name = 'Invariant Violation';\n return error;\n }\n /**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\n /**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\n var lowPriorityWarningWithoutStack = function () {};\n\n {\n var printWarning = function (format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarningWithoutStack = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n };\n }\n var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;\n /**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n var warningWithoutStack = function () {};\n\n {\n warningWithoutStack = function (condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n if (format === undefined) {\n throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (args.length > 8) {\n // Check before the condition to catch violations early.\n throw new Error('warningWithoutStack() currently supports at most 8 arguments.');\n }\n\n if (condition) {\n return;\n }\n\n if (typeof console !== 'undefined') {\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n });\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n\n Function.prototype.apply.call(console.error, console, argsWithFormat);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n };\n }\n var warningWithoutStack$1 = warningWithoutStack;\n var didWarnStateUpdateForUnmountedComponent = {};\n\n function warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n warningWithoutStack$1(false, \"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n }\n /**\n * This is the abstract API for an update queue.\n */\n\n\n var ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n };\n var emptyObject = {};\n {\n Object.freeze(emptyObject);\n }\n /**\n * Base class helpers for the updating state of a component.\n */\n\n function Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n }\n\n Component.prototype.isReactComponent = {};\n /**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\n Component.prototype.setState = function (partialState, callback) {\n (function () {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw ReactError(Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\"));\n }\n }\n })();\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n };\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n };\n /**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n {\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n lowPriorityWarningWithoutStack$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n }\n\n function ComponentDummy() {}\n\n ComponentDummy.prototype = Component.prototype;\n /**\n * Convenience component with default shallow equality check for sCU.\n */\n\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n\n var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\n pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n _assign(pureComponentPrototype, Component.prototype);\n\n pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value\n\n function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }\n /**\n * Keeps track of the current dispatcher.\n */\n\n\n var ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n };\n /**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\n\n var ReactCurrentBatchConfig = {\n suspense: null\n };\n /**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\n\n var ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n };\n var BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\n\n var describeComponentFrame = function (name, source, ownerName) {\n var sourceInfo = '';\n\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n\n if (match) {\n var pathBeforeSlash = match[1];\n\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n };\n\n var Resolved = 1;\n\n function refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n }\n\n function getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n }\n\n function getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n\n break;\n }\n }\n }\n\n return null;\n }\n\n var ReactDebugCurrentFrame = {};\n var currentlyValidatingElement = null;\n\n function setCurrentlyValidatingElement(element) {\n {\n currentlyValidatingElement = element;\n }\n }\n\n {\n // Stack implementation injected by the current renderer.\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentlyValidatingElement) {\n var name = getComponentName(currentlyValidatingElement.type);\n var owner = currentlyValidatingElement._owner;\n stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n }\n /**\n * Used by act() to track whether you're inside an act() scope.\n */\n\n var IsSomeRendererActing = {\n current: false\n };\n var ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner,\n IsSomeRendererActing: IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n };\n {\n _assign(ReactSharedInternals, {\n // These should not be included in production.\n ReactDebugCurrentFrame: ReactDebugCurrentFrame,\n // Shim for React DOM 16.0.0 which still destructured (but not used) this.\n // TODO: remove in React 17.0.\n ReactComponentTreeHook: {}\n });\n }\n /**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n var warning = warningWithoutStack$1;\n {\n warning = function (condition, format) {\n if (condition) {\n return;\n }\n\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack]));\n };\n }\n var warning$1 = warning;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n };\n var specialPropKeyWarningShown;\n var specialPropRefWarningShown;\n\n function hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== undefined;\n }\n\n function hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== undefined;\n }\n\n function defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n\n function defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n /**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, no instanceof check\n * will work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\n var ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n return element;\n };\n /**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\n /**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\n\n function jsxDEV(type, config, maybeKey, source, self) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n /**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\n\n function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n /**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\n\n function cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n }\n /**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\n\n function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }\n /**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\n function isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n\n var SEPARATOR = '.';\n var SUBSEPARATOR = ':';\n /**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\n function escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n }\n /**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\n var didWarnAboutMaps = false;\n var userProvidedKeyEscapeRegex = /\\/+/g;\n\n function escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n }\n\n var POOL_SIZE = 10;\n var traverseContextPool = [];\n\n function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {\n if (traverseContextPool.length) {\n var traverseContext = traverseContextPool.pop();\n traverseContext.result = mapResult;\n traverseContext.keyPrefix = keyPrefix;\n traverseContext.func = mapFunction;\n traverseContext.context = mapContext;\n traverseContext.count = 0;\n return traverseContext;\n } else {\n return {\n result: mapResult,\n keyPrefix: keyPrefix,\n func: mapFunction,\n context: mapContext,\n count: 0\n };\n }\n }\n\n function releaseTraverseContext(traverseContext) {\n traverseContext.result = null;\n traverseContext.keyPrefix = null;\n traverseContext.func = null;\n traverseContext.context = null;\n traverseContext.count = 0;\n\n if (traverseContextPool.length < POOL_SIZE) {\n traverseContextPool.push(traverseContext);\n }\n }\n /**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\n\n\n function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n {\n // Warn about using Maps as children\n if (iteratorFn === children.entries) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n }\n var iterator = iteratorFn.call(children);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else if (type === 'object') {\n var addendum = '';\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();\n }\n var childrenString = '' + children;\n\n (function () {\n {\n {\n throw ReactError(Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \").\" + addendum));\n }\n }\n })();\n }\n }\n\n return subtreeCount;\n }\n /**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\n\n\n function traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n }\n /**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\n function getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof component === 'object' && component !== null && component.key != null) {\n // Explicit key\n return escape(component.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n }\n\n function forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n func.call(context, child, bookKeeping.count++);\n }\n /**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\n\n\n function forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n\n var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n releaseTraverseContext(traverseContext);\n }\n\n function mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n var mappedChild = func.call(context, child, bookKeeping.count++);\n\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n\n result.push(mappedChild);\n }\n }\n\n function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n\n var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n releaseTraverseContext(traverseContext);\n }\n /**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\n\n\n function mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n }\n /**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\n function countChildren(children) {\n return traverseAllChildren(children, function () {\n return null;\n }, null);\n }\n /**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\n function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }\n /**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\n function onlyChild(children) {\n (function () {\n if (!isValidElement(children)) {\n {\n throw ReactError(Error(\"React.Children.only expected to receive a single React element child.\"));\n }\n }\n })();\n\n return children;\n }\n\n function createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n warning$1(false, 'Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n warning$1(false, 'Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n return context;\n }\n\n function lazy(ctor) {\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _ctor: ctor,\n // React uses these fields to store the result.\n _status: -1,\n _result: null\n };\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes;\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n defaultProps = newDefaultProps; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n propTypes = newPropTypes; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n return lazyType;\n }\n\n function forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n !( // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object\n render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;\n }\n\n if (render != null) {\n !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;\n }\n }\n return {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n }\n\n function isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);\n }\n\n function memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n }\n\n function resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n (function () {\n if (!(dispatcher !== null)) {\n {\n throw ReactError(Error(\"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.\"));\n }\n }\n })();\n\n return dispatcher;\n }\n\n function useContext(Context, unstable_observedBits) {\n var dispatcher = resolveDispatcher();\n {\n !(unstable_observedBits === undefined) ? warning$1(false, 'useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\\n\\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '') : void 0; // TODO: add a more generic warning for invalid values.\n\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n return dispatcher.useContext(Context, unstable_observedBits);\n }\n\n function useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n }\n\n function useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n }\n\n function useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n }\n\n function useEffect(create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, inputs);\n }\n\n function useLayoutEffect(create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, inputs);\n }\n\n function useCallback(callback, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, inputs);\n }\n\n function useMemo(create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, inputs);\n }\n\n function useImperativeHandle(ref, create, inputs) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, inputs);\n }\n\n function useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n }\n\n var emptyObject$1 = {};\n\n function useResponder(responder, listenerProps) {\n var dispatcher = resolveDispatcher();\n {\n if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) {\n warning$1(false, 'useResponder: invalid first argument. Expected an event responder, but instead got %s', responder);\n return;\n }\n }\n return dispatcher.useResponder(responder, listenerProps || emptyObject$1);\n }\n\n function withSuspenseConfig(scope, config) {\n var previousConfig = ReactCurrentBatchConfig.suspense;\n ReactCurrentBatchConfig.suspense = config === undefined ? null : config;\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.suspense = previousConfig;\n }\n }\n /**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\n\n var propTypesMisspellWarningShown;\n {\n propTypesMisspellWarningShown = false;\n }\n var hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n function getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n\n function getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n\n function getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n }\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\n var ownerHasKeyUseWarning = {};\n\n function getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n /**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\n function validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentName(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement(element);\n {\n warning$1(false, 'Each child in a list should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);\n }\n setCurrentlyValidatingElement(null);\n }\n /**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\n function validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n /**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\n function validatePropTypes(element) {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var name = getComponentName(type);\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n setCurrentlyValidatingElement(element);\n checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);\n setCurrentlyValidatingElement(null);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true;\n warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function') {\n !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;\n }\n }\n /**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\n function validateFragmentProps(fragment) {\n setCurrentlyValidatingElement(fragment);\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');\n }\n\n setCurrentlyValidatingElement(null);\n }\n\n function jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n warning$1(false, 'React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n warning$1(false, 'React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (hasOwnProperty$1.call(props, 'key')) {\n warning$1(false, 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + 'Explicitly pass a key after spreading props in your JSX call. ' + 'E.g. ');\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n } // These two functions exist to still get child warnings in dev\n // even with the prod transform. This means that jsxDEV is purely\n // opt-in behavior for better messages but that we won't stop\n // giving you warnings if you use production apis.\n\n\n function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }\n\n function jsxWithValidationDynamic(type, props, key) {\n return jsxWithValidation(type, props, key, false);\n }\n\n function createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n\n function createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type; // Legacy hook: remove it\n\n {\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n lowPriorityWarningWithoutStack$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n return validatedFactory;\n }\n\n function cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n }\n\n var hasBadMapPolyfill;\n {\n hasBadMapPolyfill = false;\n\n try {\n var frozenObject = Object.freeze({});\n var testMap = new Map([[frozenObject, null]]);\n var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.\n // https://github.com/rollup/rollup/issues/1771\n // TODO: we can remove these if Rollup fixes the bug.\n\n testMap.set(0, 0);\n testSet.add(0);\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n }\n\n function createFundamentalComponent(impl) {\n // We use responder as a Map key later on. When we have a bad\n // polyfill, then we can't use it as a key as the polyfill tries\n // to add a property to the object.\n if (true && !hasBadMapPolyfill) {\n Object.freeze(impl);\n }\n\n var fundamantalComponent = {\n $$typeof: REACT_FUNDAMENTAL_TYPE,\n impl: impl\n };\n {\n Object.freeze(fundamantalComponent);\n }\n return fundamantalComponent;\n }\n\n function createEventResponder(displayName, responderConfig) {\n var getInitialState = responderConfig.getInitialState,\n onEvent = responderConfig.onEvent,\n onMount = responderConfig.onMount,\n onUnmount = responderConfig.onUnmount,\n onRootEvent = responderConfig.onRootEvent,\n rootEventTypes = responderConfig.rootEventTypes,\n targetEventTypes = responderConfig.targetEventTypes,\n targetPortalPropagation = responderConfig.targetPortalPropagation;\n var eventResponder = {\n $$typeof: REACT_RESPONDER_TYPE,\n displayName: displayName,\n getInitialState: getInitialState || null,\n onEvent: onEvent || null,\n onMount: onMount || null,\n onRootEvent: onRootEvent || null,\n onUnmount: onUnmount || null,\n rootEventTypes: rootEventTypes || null,\n targetEventTypes: targetEventTypes || null,\n targetPortalPropagation: targetPortalPropagation || false\n }; // We use responder as a Map key later on. When we have a bad\n // polyfill, then we can't use it as a key as the polyfill tries\n // to add a property to the object.\n\n if (true && !hasBadMapPolyfill) {\n Object.freeze(eventResponder);\n }\n\n return eventResponder;\n }\n\n function createScope(fn) {\n var scopeComponent = {\n $$typeof: REACT_SCOPE_TYPE,\n fn: fn\n };\n {\n Object.freeze(scopeComponent);\n }\n return scopeComponent;\n } // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:\n // In some cases, StrictMode should also double-render lifecycles.\n // This can be confusing for tests though,\n // And it can be bad for performance in production.\n // This feature flag can be used to control the behavior:\n // To preserve the \"Pause on caught exceptions\" behavior of the debugger, we\n // replay the begin phase of a failed component inside invokeGuardedCallback.\n // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:\n // Gather advanced timing metrics for Profiler subtrees.\n // Trace which interactions trigger each commit.\n // Only used in www builds.\n // TODO: true? Here it might just be false.\n // Only used in www builds.\n // Only used in www builds.\n // Disable javascript: URL strings in href for XSS protection.\n // React Fire: prevent the value and checked attributes from syncing\n // with their related DOM properties\n // These APIs will no longer be \"unstable\" in the upcoming 16.7 release,\n // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.\n // See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information\n // This is a flag so we can fix warnings in RN core before turning it on\n // Experimental React Flare event system and event components support.\n\n\n var enableFlareAPI = false; // Experimental Host Component support.\n\n var enableFundamentalAPI = false; // Experimental Scope support.\n\n var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107\n\n var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)\n // Till then, we warn about the missing mock, but still fallback to a sync mode compatible version\n // For tests, we flush suspense fallbacks in an act scope;\n // *except* in some of our own tests, where we test incremental loading states.\n // Changes priority of some events like mousemove to user-blocking priority,\n // but without making them discrete. The flag exists in case it causes\n // starvation problems.\n // Add a callback property to suspense to notify which promises are currently\n // in the update queue. This allows reporting and tracing of what is causing\n // the user to see a loading state.\n // Also allows hydration callbacks to fire when a dehydrated boundary gets\n // hydrated or deleted.\n // Part of the simplification of React.createElement so we can eventually move\n // from React.createElement to React.jsx\n // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md\n\n var React = {\n Children: {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n },\n createRef: createRef,\n Component: Component,\n PureComponent: PureComponent,\n createContext: createContext,\n forwardRef: forwardRef,\n lazy: lazy,\n memo: memo,\n useCallback: useCallback,\n useContext: useContext,\n useEffect: useEffect,\n useImperativeHandle: useImperativeHandle,\n useDebugValue: useDebugValue,\n useLayoutEffect: useLayoutEffect,\n useMemo: useMemo,\n useReducer: useReducer,\n useRef: useRef,\n useState: useState,\n Fragment: REACT_FRAGMENT_TYPE,\n Profiler: REACT_PROFILER_TYPE,\n StrictMode: REACT_STRICT_MODE_TYPE,\n Suspense: REACT_SUSPENSE_TYPE,\n unstable_SuspenseList: REACT_SUSPENSE_LIST_TYPE,\n createElement: createElementWithValidation,\n cloneElement: cloneElementWithValidation,\n createFactory: createFactoryWithValidation,\n isValidElement: isValidElement,\n version: ReactVersion,\n unstable_withSuspenseConfig: withSuspenseConfig,\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals\n };\n\n if (enableFlareAPI) {\n React.unstable_useResponder = useResponder;\n React.unstable_createResponder = createEventResponder;\n }\n\n if (enableFundamentalAPI) {\n React.unstable_createFundamental = createFundamentalComponent;\n }\n\n if (enableScopeAPI) {\n React.unstable_createScope = createScope;\n } // Note: some APIs are added with feature flags.\n // Make sure that stable builds for open source\n // don't modify the React object to avoid deopts.\n // Also let's not expose their names in stable builds.\n\n\n if (enableJSXTransformAPI) {\n {\n React.jsxDEV = jsxWithValidation;\n React.jsx = jsxWithValidationDynamic;\n React.jsxs = jsxWithValidationStatic;\n }\n }\n\n var React$2 = Object.freeze({\n default: React\n });\n var React$3 = React$2 && React || React$2; // TODO: decide on the top-level export form.\n // This is hacky but makes it work with both Rollup and Jest.\n\n var react = React$3.default || React$3;\n module.exports = react;\n })();\n}","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}","var g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if (typeof window === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/react_client.dart b/lib/react_client.dart index 51785c36..2c960b03 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -763,7 +763,7 @@ class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy /// The JS component factory used by this factory to build [ReactElement]s. final ReactJsComponentFactory reactComponentFactory; - ReactDartFunctionComponentFactoryProxy(reactFunction, [String componentName]) + ReactDartFunctionComponentFactoryProxy(JsFunctionComponent reactFunction, [String componentName]) : this.reactFunction = reactFunction, this.componentName = componentName, this.reactComponentFactory = React.createFactory(reactFunction); @@ -777,9 +777,9 @@ JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionCom componentName ??= getProperty(dartFunctionComponent, 'name'); return true; }()); - jsFunctionComponent(JsMap jsProps, JsMap _legacyContext) => - dartFunctionComponent(jsProps != null ? JsBackedMap.backedBy(jsProps) : JsBackedMap()); - var interopFunction = allowInterop(jsFunctionComponent); + jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => + (dartFunctionComponent(jsProps != null ? JsBackedMap.backedBy(jsProps) : JsBackedMap()) ?? jsNull); + JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); if (componentName != null) { // This is a work-around to display the correct name in the React DevTools. callMethod(getProperty(window, 'Object'), 'defineProperty', [ diff --git a/lib/react_client/react_interop.dart b/lib/react_client/react_interop.dart index b02e59d3..dd978301 100644 --- a/lib/react_client/react_interop.dart +++ b/lib/react_client/react_interop.dart @@ -478,6 +478,11 @@ class JsError { external JsError(message); } +/// A JS variable that can be used with dart interop in order to force returning a javascript `null`. +/// Use this if dart2js is possibly converting dart `null` into `undefined`. +@JS('_jsNull') +external get jsNull; + /// Throws the error passed to it from Javascript. /// This allows us to catch the error in dart which re-dartifies the js errors/exceptions. @alwaysThrows diff --git a/lib/react_prod.js b/lib/react_prod.js index 570ee545..092fed00 100644 --- a/lib/react_prod.js +++ b/lib/react_prod.js @@ -1,9 +1,9 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=118)}([function(t,e,n){(function(e){var n="object",r=function(t){return t&&t.Math==Math&&t};t.exports=r(typeof globalThis==n&&globalThis)||r(typeof window==n&&window)||r(typeof self==n&&self)||r(typeof e==n&&e)||Function("return this")()}).call(this,n(69))},function(t,e,n){var r=n(0),o=n(13),i=n(22),u=n(54),c=r.Symbol,a=o("wks");t.exports=function(t){return a[t]||(a[t]=u&&c[t]||(u?c:i)("Symbol."+t))}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(2);t.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(5),o=n(7),i=n(19);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(5),o=n(45),i=n(8),u=n(29),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(i(t),e=u(e,!0),i(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(0),o=n(18).f,i=n(6),u=n(11),c=n(30),a=n(48),f=n(50);t.exports=function(t,e){var n,s,l,p,y,v=t.target,d=t.global,h=t.stat;if(n=d?r:h?r[v]||c(v,{}):(r[v]||{}).prototype)for(s in e){if(p=e[s],l=t.noTargetGet?(y=o(n,s))&&y.value:n[s],!f(d?s:v+(h?".":"#")+s,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;a(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),u(n,s,p,t)}}},function(t,e,n){var r=n(26),o=n(28);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(0),o=n(13),i=n(6),u=n(3),c=n(30),a=n(47),f=n(14),s=f.get,l=f.enforce,p=String(a).split("toString");o("inspectSource",(function(t){return a.call(t)})),(t.exports=function(t,e,n,o){var a=!!o&&!!o.unsafe,f=!!o&&!!o.enumerable,s=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||u(n,"name")||i(n,"name",e),l(n).source=p.join("string"==typeof e?e:"")),t!==r?(a?!s&&t[e]&&(f=!0):delete t[e],f?t[e]=n:i(t,e,n)):f?t[e]=n:c(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||a.call(this)}))},function(t,e,n){t.exports=n(0)},function(t,e,n){var r=n(0),o=n(30),i=n(20),u=r["__core-js_shared__"]||o("__core-js_shared__",{});(t.exports=function(t,e){return u[t]||(u[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.2.1",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r,o,i,u=n(70),c=n(0),a=n(4),f=n(6),s=n(3),l=n(21),p=n(15),y=c.WeakMap;if(u){var v=new y,d=v.get,h=v.has,m=v.set;r=function(t,e){return m.call(v,t,e),e},o=function(t){return d.call(v,t)||{}},i=function(t){return h.call(v,t)}}else{var g=l("state");p[g]=!0,r=function(t,e){return f(t,g,e),e},o=function(t){return s(t,g)?t[g]:{}},i=function(t){return s(t,g)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!a(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e){t.exports={}},function(t,e,n){var r=n(28);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports={}},function(t,e,n){var r=n(5),o=n(25),i=n(19),u=n(10),c=n(29),a=n(3),f=n(45),s=Object.getOwnPropertyDescriptor;e.f=r?s:function(t,e){if(t=u(t),e=c(e,!0),f)try{return s(t,e)}catch(t){}if(a(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(13),o=n(22),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(7).f,o=n(3),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(8),o=n(85),i=n(35),u=n(15),c=n(86),a=n(46),f=n(21)("IE_PROTO"),s=function(){},l=function(){var t,e=a("iframe"),n=i.length;for(e.style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(" + + + + + + + + From d984513f3a64a39bcb53bd9ce77c5f40bddb2fd3 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Fri, 1 Nov 2019 14:36:51 -0700 Subject: [PATCH 28/50] remove unused import --- test/factory/dart_function_factory_test.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index f3f6969d..da9c08e3 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -1,15 +1,11 @@ // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: invalid_use_of_protected_member @TestOn('browser') -import 'dart:js'; import 'package:test/test.dart'; import 'package:react/react.dart' as react; import 'package:react/react_client.dart'; -import 'package:react/react_client/react_interop.dart'; - -import '../util.dart'; import 'common_factory_tests.dart'; main() { From c819a932dc9f0ff5109270205684afea6ea8da79 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Fri, 1 Nov 2019 14:38:55 -0700 Subject: [PATCH 29/50] remove newline --- test/factory/dart_function_factory_test.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index da9c08e3..9139b429 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -3,7 +3,6 @@ @TestOn('browser') import 'package:test/test.dart'; - import 'package:react/react.dart' as react; import 'package:react/react_client.dart'; import 'common_factory_tests.dart'; From fc403264cce364a6972803058a479d4eacba1c91 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Mon, 4 Nov 2019 09:04:57 -0700 Subject: [PATCH 30/50] fix formatting --- lib/react_client.dart | 29 ++++++++++++++--------------- test/util_test.dart | 2 -- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index f914b2e6..5f8b4c9a 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -192,16 +192,19 @@ mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { static JsMap generateExtendedJsProps(Map props) => _generateJsProps(props); } -JsMap _generateJsProps(Map props, {bool convertEventHandlers = false, bool convertRefValue = true, bool convertCallbackRefValue = true, bool wrapWithJsify = false}) { - final propsForJs = JsBackedMap.from(props); +JsMap _generateJsProps(Map props, + {bool convertEventHandlers = false, + bool convertRefValue = true, + bool convertCallbackRefValue = true, + bool wrapWithJsify = false}) { + final propsForJs = JsBackedMap.from(props); - if (convertEventHandlers) _convertEventHandlers(propsForJs); - if (convertRefValue) _convertRefValue2(propsForJs, convertCallbackRefValue: convertCallbackRefValue); + if (convertEventHandlers) _convertEventHandlers(propsForJs); + if (convertRefValue) _convertRefValue2(propsForJs, convertCallbackRefValue: convertCallbackRefValue); - return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; + return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; } - /// Creates ReactJS [ReactElement] instances for components defined in the JS. class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { /// The JS class used by this factory. @@ -266,7 +269,6 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { } } - /// Creates ReactJS [ReactElement] instances for DOM components. class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { /// The name of the proxied DOM component. @@ -325,16 +327,16 @@ void _convertRefValue(Map args) { } } -void _convertRefValue2(Map args, { bool convertCallbackRefValue = true }) { +void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { var ref = args['ref']; if (ref is Ref) { args['ref'] = ref.jsRef; } else if (ref is _CallbackRef && convertCallbackRefValue) { args['ref'] = allowInterop((dynamic instance) { - if (instance is ReactComponent && instance.dartComponent != null) return ref(instance.dartComponent); - return ref(instance); - }); + if (instance is ReactComponent && instance.dartComponent != null) return ref(instance.dartComponent); + return ref(instance); + }); } } @@ -391,9 +393,7 @@ class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { } /// Creates ReactJS [Function Component] from Dart Function. -class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy - with JsBackedMapComponentFactoryMixin { - +class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy with JsBackedMapComponentFactoryMixin { /// The name of this function. final String displayName; @@ -941,7 +941,6 @@ ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionCo {String displayName}) => ReactDartFunctionComponentFactoryProxy(_wrapFunctionComponent(dartFunctionComponent, displayName: displayName)); - /// A mapping from converted/wrapped JS handler functions (the result of [_convertEventHandlers]) /// to the original Dart functions (the input of [_convertEventHandlers]). final Expando _originalEventHandlers = new Expando(); diff --git a/test/util_test.dart b/test/util_test.dart index 376785aa..0948203d 100644 --- a/test/util_test.dart +++ b/test/util_test.dart @@ -43,7 +43,6 @@ void main() { }); } - final FunctionFoo = react.registerFunctionComponent(_FunctionFoo); _FunctionFoo(Map props) { @@ -68,4 +67,3 @@ final JsFoo = ReactJsComponentFactoryProxy(React.createClass(ReactClassConfig( displayName: 'JsFoo', render: allowInterop(() => react.div({})), ))); - From fa7a6303e0191871ae0dbca45f0b0d163a7bee4c Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Mon, 4 Nov 2019 10:47:30 -0700 Subject: [PATCH 31/50] address cr feedback --- lib/react.dart | 22 +++++++++++-- lib/react_client.dart | 72 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 87 insertions(+), 7 deletions(-) diff --git a/lib/react.dart b/lib/react.dart index eebc0e58..b38c8e6d 100644 --- a/lib/react.dart +++ b/lib/react.dart @@ -1196,7 +1196,18 @@ mixin TypedSnapshot { abstract class ReactComponentFactoryProxy implements Function { /// The JS component factory used by this factory to build [ReactElement]s. /// - /// Deprecated: [ReactComponentFactoryProxy]s now use inline [React.createElement()]. + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourReactComponentFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourReactComponentFactoryProxy.type, props, children); + /// ``` @Deprecated('6.0.0') ReactJsComponentFactory reactComponentFactory; @@ -1780,7 +1791,14 @@ ComponentRegistrar2 registerComponent2 = ( throw new Exception('setClientConfiguration must be called before registerComponent.'); }; -/// Registers [componentFactory] on both client and server. +/// Registers [componentFactory] on client. +/// +/// Example: +/// ``` +/// var myFunctionComponent = registerFunctionComponent((Map props) { +/// return ['I am a function component', ...props.children]; +/// }); +/// ``` FunctionComponentRegistrar registerFunctionComponent = (DartFunctionComponent componentFactory, {String displayName}) { throw new Exception('setClientConfiguration must be called before registerFunctionComponent.'); }; diff --git a/lib/react_client.dart b/lib/react_client.dart index 5f8b4c9a..611e9064 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -74,7 +74,18 @@ class ReactDartComponentFactoryProxy extends React /// The JS component factory used by this factory to build [ReactElement]s. /// - /// Deprecated: [ReactComponentFactoryProxy]s now use inline [React.createElement()]. + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` @override @Deprecated('6.0.0') final ReactJsComponentFactory reactComponentFactory; @@ -160,7 +171,18 @@ class ReactDartComponentFactoryProxy2 extends Rea /// The JS component factory used by this factory to build [ReactElement]s. /// - /// Deprecated: [ReactComponentFactoryProxy]s now use inline [React.createElement()]. + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` @override @Deprecated('6.0.0') final ReactJsComponentFactory reactComponentFactory; @@ -213,7 +235,17 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { /// The JS component factory used by this factory to build [ReactElement]s. /// - /// Deprecated: [ReactComponentFactoryProxy]s now use inline [React.createElement()]. + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); @Deprecated('6.0.0') final Function factory; @@ -278,7 +310,17 @@ class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { /// The JS component factory used by this factory to build [ReactElement]s. /// - /// Deprecated: [ReactComponentFactoryProxy]s now use inline [React.createElement()]. + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); @Deprecated('6.0.0') final Function factory; @@ -347,7 +389,27 @@ class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { final bool isConsumer; final bool isProvider; - /// Deprecated: [ReactComponentFactoryProxy]s now use inline [React.createElement()]. + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); @override @Deprecated('6.0.0') final Function factory; From 52186c8243b423ac9f6232c7db944aa1fda9f76b Mon Sep 17 00:00:00 2001 From: Keal Jones <41018730+kealjones-wk@users.noreply.github.com> Date: Mon, 4 Nov 2019 13:22:23 -0700 Subject: [PATCH 32/50] Apply suggestions from code review Co-Authored-By: joebingham-wk <46691367+joebingham-wk@users.noreply.github.com> --- lib/react_client/react_interop.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/react_client/react_interop.dart b/lib/react_client/react_interop.dart index 90e7f797..bb0de841 100644 --- a/lib/react_client/react_interop.dart +++ b/lib/react_client/react_interop.dart @@ -478,8 +478,8 @@ class JsError { external JsError(message); } -/// A JS variable that can be used with dart interop in order to force returning a javascript `null`. -/// Use this if dart2js is possibly converting dart `null` into `undefined`. +/// A JS variable that can be used with Dart interop in order to force returning a JavaScript `null`. +/// Use this if dart2js is possibly converting Dart `null` into `undefined`. @JS('_jsNull') external get jsNull; From dd48b083948811efc3b073d42b0852d9ea1dab18 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 10:34:34 -0700 Subject: [PATCH 33/50] fix map infurence in context example --- example/test/react_test_components.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/test/react_test_components.dart b/example/test/react_test_components.dart index 00b515ef..f749f708 100644 --- a/example/test/react_test_components.dart +++ b/example/test/react_test_components.dart @@ -270,7 +270,7 @@ int calculateChangedBits(currentValue, nextValue) { return result; } -var TestNewContext = react.createContext>({'renderCount': 0}, calculateChangedBits); +var TestNewContext = react.createContext({'renderCount': 0}, calculateChangedBits); class _NewContextProviderComponent extends react.Component2 { _NewContextRefComponent componentRef; @@ -282,9 +282,9 @@ class _NewContextProviderComponent extends react.Component2 { } render() { - Map provideMap = {'renderCount': this.state['renderCount']}; + final provideMap = {'renderCount': this.state['renderCount']}; - Map complexValues = { + final complexValues = { 'callback': printMe, 'dartComponent': newContextRefComponent, 'map': { From 5d721bb9066942223df3cd52346c310b8f484134 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 10:40:45 -0700 Subject: [PATCH 34/50] fix doc comments --- lib/react.dart | 10 +++++----- lib/react_client.dart | 33 ++++++++++++++------------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/lib/react.dart b/lib/react.dart index b38c8e6d..46078d94 100644 --- a/lib/react.dart +++ b/lib/react.dart @@ -1201,12 +1201,12 @@ abstract class ReactComponentFactoryProxy implements Function { /// /// Before: /// ``` - /// YourReactComponentFactoryProxy.reactComponentFactory(props, children); + /// YourFactoryProxy.reactComponentFactory(props, children); /// ``` /// /// After: /// ``` - /// React.createElement(YourReactComponentFactoryProxy.type, props, children); + /// React.createElement(YourFactoryProxy.type, props, children); /// ``` @Deprecated('6.0.0') ReactJsComponentFactory reactComponentFactory; @@ -1795,9 +1795,9 @@ ComponentRegistrar2 registerComponent2 = ( /// /// Example: /// ``` -/// var myFunctionComponent = registerFunctionComponent((Map props) { -/// return ['I am a function component', ...props.children]; -/// }); +/// var myFunctionComponent = registerFunctionComponent((Map props) { +/// return ['I am a function component', ...props.children]; +/// }); /// ``` FunctionComponentRegistrar registerFunctionComponent = (DartFunctionComponent componentFactory, {String displayName}) { throw new Exception('setClientConfiguration must be called before registerFunctionComponent.'); diff --git a/lib/react_client.dart b/lib/react_client.dart index 611e9064..5ea23b6e 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -79,12 +79,12 @@ class ReactDartComponentFactoryProxy extends React /// /// Before: /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); + /// YourFactoryProxy.reactComponentFactory(props, children); /// ``` /// /// After: /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); + /// React.createElement(YourFactoryProxy.type, props, children); /// ``` @override @Deprecated('6.0.0') @@ -176,12 +176,12 @@ class ReactDartComponentFactoryProxy2 extends Rea /// /// Before: /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); + /// YourFactoryProxy.reactComponentFactory(props, children); /// ``` /// /// After: /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); + /// React.createElement(YourFactoryProxy.type, props, children); /// ``` @override @Deprecated('6.0.0') @@ -240,12 +240,13 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { /// /// Before: /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); + /// YourFactoryProxy.reactComponentFactory(props, children); /// ``` /// /// After: /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` @Deprecated('6.0.0') final Function factory; @@ -315,12 +316,13 @@ class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { /// /// Before: /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); + /// YourFactoryProxy.reactComponentFactory(props, children); /// ``` /// /// After: /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` @Deprecated('6.0.0') final Function factory; @@ -389,27 +391,20 @@ class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { final bool isConsumer; final bool isProvider; + /// The JS component factory used by this factory to build [ReactElement]s. + /// /// Deprecated: Use [React.createElement()] instead and pass in [type] as /// the first argument, followed by `props` and `children`. /// /// Before: /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); + /// YourFactoryProxy.reactComponentFactory(props, children); /// ``` /// /// After: /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: + /// React.createElement(YourFactoryProxy.type, props, children); /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); @override @Deprecated('6.0.0') final Function factory; From 1852701b0f841e7cd5a6fd6c8ab5e50ef89c612c Mon Sep 17 00:00:00 2001 From: Greg Littlefield Date: Tue, 5 Nov 2019 10:46:39 -0700 Subject: [PATCH 35/50] Fix confusing owner test utils and unnecessary isComponent2 flag --- test/factory/common_factory_tests.dart | 41 ++++++++++---------------- test/factory/dart_factory_test.dart | 4 +-- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/test/factory/common_factory_tests.dart b/test/factory/common_factory_tests.dart index 78a3fd7b..418a2372 100644 --- a/test/factory/common_factory_tests.dart +++ b/test/factory/common_factory_tests.dart @@ -16,12 +16,10 @@ import 'package:react/react_client/react_interop.dart'; import '../util.dart'; -void commonFactoryTests(ReactComponentFactoryProxy factory, - {bool isComponent2 = false, bool isFunctionComponent = false}) { +void commonFactoryTests(ReactComponentFactoryProxy factory, {bool isFunctionComponent = false}) { _childKeyWarningTests( factory, - renderWithUniqueOwnerName: - (isComponent2 || isFunctionComponent) ? _renderWithUniqueOwnerName2 : _renderWithUniqueOwnerName, + renderWithUniqueOwnerName: _renderWithUniqueOwnerName, ); test('renders an instance with the corresponding `type`', () { @@ -218,7 +216,7 @@ void refTests(ReactComponentFactoryProxy factory, {void verifyRefValue(dynamic r }); test('string refs are created with the correct value', () { - ReactComponent renderedInstance = _renderWithOwner(() => factory({'ref': 'test'})); + ReactComponent renderedInstance = _renderWithStringRefSupportingOwner(() => factory({'ref': 'test'})); verifyRefValue(renderedInstance.dartComponent.ref('test')); }); @@ -321,42 +319,33 @@ void _childKeyWarningTests(Function factory, {Function(ReactElement Function()) }); } -int _nextFactoryId = 0; - -/// Renders the provided [render] function with an owner that will have a unique name. -/// -/// This prevents React JS from not printing key warnings it deems as "duplicates". -void _renderWithUniqueOwnerName(ReactElement render()) { - final factory = react.registerComponent(() => new _OwnerHelperComponent()) as ReactDartComponentFactoryProxy; - factory.reactClass.displayName = 'OwnerHelperComponent_$_nextFactoryId'; - _nextFactoryId++; - - rtu.renderIntoDocument(factory({'render': render})); +class _StringRefOwnerOwnerHelperComponent extends react.Component { + @override + render() => props['render'](); } -_renderWithOwner(ReactElement render()) { - final factory = react.registerComponent(() => new _OwnerHelperComponent()) as ReactDartComponentFactoryProxy; +/// Renders the provided [render] function with a Component owner that supports string refs, +/// for string ref tests. +ReactComponent _renderWithStringRefSupportingOwner(ReactElement render()) { + final factory = react.registerComponent(() => new _StringRefOwnerOwnerHelperComponent()) as ReactDartComponentFactoryProxy; return rtu.renderIntoDocument(factory({'render': render})); } -class _OwnerHelperComponent extends react.Component { - @override - render() => props['render'](); -} +int _nextFactoryId = 0; /// Renders the provided [render] function with a Component2 owner that will have a unique name. /// /// This prevents React JS from not printing key warnings it deems as "duplicates". -void _renderWithUniqueOwnerName2(ReactElement render()) { - final factory = react.registerComponent2(() => new _OwnerHelperComponent2()); - factory.reactClass.displayName = 'OwnerHelperComponent2_$_nextFactoryId'; +void _renderWithUniqueOwnerName(ReactElement render()) { + final factory = react.registerComponent2(() => new _UniqueOwnerHelperComponent()); + factory.reactClass.displayName = 'OwnerHelperComponent_$_nextFactoryId'; _nextFactoryId++; rtu.renderIntoDocument(factory({'render': render})); } -class _OwnerHelperComponent2 extends react.Component2 { +class _UniqueOwnerHelperComponent extends react.Component2 { @override render() => props['render'](); } diff --git a/test/factory/dart_factory_test.dart b/test/factory/dart_factory_test.dart index ad446f3a..857171ca 100644 --- a/test/factory/dart_factory_test.dart +++ b/test/factory/dart_factory_test.dart @@ -22,7 +22,7 @@ main() { group('- common factory behavior -', () { group('Component -', () { group('- common factory behavior -', () { - commonFactoryTests(Foo, isComponent2: false); + commonFactoryTests(Foo); }); group('- refs -', () { @@ -34,7 +34,7 @@ main() { group('Component2 -', () { group('- common factory behavior -', () { - commonFactoryTests(Foo2, isComponent2: true); + commonFactoryTests(Foo2); }); group('- refs -', () { From 1c89e356cd8467cbf8f108e7dd50629baa8e0722 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 11:40:24 -0700 Subject: [PATCH 36/50] fix formatting --- test/factory/common_factory_tests.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/factory/common_factory_tests.dart b/test/factory/common_factory_tests.dart index 418a2372..c7557325 100644 --- a/test/factory/common_factory_tests.dart +++ b/test/factory/common_factory_tests.dart @@ -327,7 +327,8 @@ class _StringRefOwnerOwnerHelperComponent extends react.Component { /// Renders the provided [render] function with a Component owner that supports string refs, /// for string ref tests. ReactComponent _renderWithStringRefSupportingOwner(ReactElement render()) { - final factory = react.registerComponent(() => new _StringRefOwnerOwnerHelperComponent()) as ReactDartComponentFactoryProxy; + final factory = + react.registerComponent(() => new _StringRefOwnerOwnerHelperComponent()) as ReactDartComponentFactoryProxy; return rtu.renderIntoDocument(factory({'render': render})); } From 40b9ef24c2a4ab16c9de65ddbfce6864ac236918 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 13:40:26 -0700 Subject: [PATCH 37/50] refactor displayName and add tests --- lib/react_client.dart | 62 +++++++++++--------- test/factory/dart_function_factory_test.dart | 24 +++++++- test/util_test.dart | 3 + 3 files changed, 59 insertions(+), 30 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 5ea23b6e..c10bfd79 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -457,39 +457,43 @@ class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy /// The React JS component definition of this Function Component. final JsFunctionComponent reactFunction; - ReactDartFunctionComponentFactoryProxy(this.reactFunction, [this.displayName]); + ReactDartFunctionComponentFactoryProxy(DartFunctionComponent dartFunctionComponent, {String displayName}) + : this.displayName = displayName ?? _getJsFunctionName(dartFunctionComponent), + this.reactFunction = _wrapFunctionComponent(dartFunctionComponent, + displayName: displayName ?? _getJsFunctionName(dartFunctionComponent)); @override JsFunctionComponent get type => reactFunction; -} -/// Creates a function component from the given [dartFunctionComponent] that can be used with React. -/// -/// [displayName] Sets the component name for debugging purposes. -/// -/// In DDC, this will be the [DartFunctionComponent] name, but in dart2js it will be null unless -/// overridden, since using runtimeType can lead to larger dart2js output. -/// -/// This will result in the dart2js name being `ReactDartComponent2` (the -/// name of the proxying JS component defined in _dart_helpers.js). -JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionComponent, {String displayName}) { - displayName ??= getProperty(dartFunctionComponent, 'name') ?? getProperty(dartFunctionComponent, '\$static_name'); - - // dart2js uses null and undefined interchangeably, meaning returning `null` from dart - // may show up in js as `undefined`, ReactJS doesnt like that and expects a js `null` to be returned, - // and throws if it gets `undefined`. `jsNull` is an interop variable that holds a JS `null` value - // to force `null` as the return value if user returns a Dart `null`. - // See: https://github.com/dart-lang/sdk/issues/27485 - jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => - dartFunctionComponent(JsBackedMap.backedBy(jsProps)) ?? jsNull; - JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); - if (displayName != null) { - // This is a work-around to display the correct name in the React DevTools. - _defineProperty(interopFunction, 'name', jsify({'value': displayName})); + static String _getJsFunctionName(Function object) => + getProperty(object, 'name') ?? getProperty(object, '\$static_name'); + + /// Creates a function component from the given [dartFunctionComponent] that can be used with React. + /// + /// [displayName] Sets the component name for debugging purposes. + /// + /// In DDC, this will be the [DartFunctionComponent] name, but in dart2js it will be null unless + /// overridden, since using runtimeType can lead to larger dart2js output. + /// + /// This will result in the dart2js name being `ReactDartComponent2` (the + /// name of the proxying JS component defined in _dart_helpers.js). + static JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionComponent, {String displayName}) { + // dart2js uses null and undefined interchangeably, meaning returning `null` from dart + // may show up in js as `undefined`, ReactJS doesnt like that and expects a js `null` to be returned, + // and throws if it gets `undefined`. `jsNull` is an interop variable that holds a JS `null` value + // to force `null` as the return value if user returns a Dart `null`. + // See: https://github.com/dart-lang/sdk/issues/27485 + jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => + dartFunctionComponent(JsBackedMap.backedBy(jsProps)) ?? jsNull; + JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); + if (displayName != null) { + // This is a work-around to display the correct name in the React DevTools. + _defineProperty(interopFunction, 'name', jsify({'value': displayName})); + } + // ignore: invalid_use_of_protected_member + setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); + return interopFunction; } - // ignore: invalid_use_of_protected_member - setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); - return interopFunction; } /// Converts a list of variadic children arguments to children that should be passed to ReactJS. @@ -996,7 +1000,7 @@ ReactDartComponentFactoryProxy2 _registerComponent2( /// which produces a new `JsFunctionComponent`. ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, {String displayName}) => - ReactDartFunctionComponentFactoryProxy(_wrapFunctionComponent(dartFunctionComponent, displayName: displayName)); + ReactDartFunctionComponentFactoryProxy(dartFunctionComponent, displayName: displayName); /// A mapping from converted/wrapped JS handler functions (the result of [_convertEventHandlers]) /// to the original Dart functions (the input of [_convertEventHandlers]). diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index 9139b429..fa3df031 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -1,7 +1,7 @@ // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: invalid_use_of_protected_member +import 'package:js/js_util.dart'; @TestOn('browser') - import 'package:test/test.dart'; import 'package:react/react.dart' as react; import 'package:react/react_client.dart'; @@ -19,10 +19,32 @@ main() { group('- common factory behavior -', () { commonFactoryTests(FunctionFoo, isFunctionComponent: true); }); + + group('displayName', () { + test('gets automaticly populated when not provided', () { + expect(FunctionFoo.displayName, '_FunctionFoo'); + + expect(_getJsFunctionName(FunctionFoo.reactFunction), '_FunctionFoo'); + + expect(FunctionFoo.displayName, _getJsFunctionName(FunctionFoo.reactFunction)); + }); + + test('is populated by the provided argument', () { + expect(NamedFunctionFoo.displayName, 'Bar'); + + expect(_getJsFunctionName(NamedFunctionFoo.reactFunction), 'Bar'); + + expect(NamedFunctionFoo.displayName, _getJsFunctionName(NamedFunctionFoo.reactFunction)); + }); + }); }); }); } +String _getJsFunctionName(Function object) => getProperty(object, 'name') ?? getProperty(object, '\$static_name'); + +final NamedFunctionFoo = react.registerFunctionComponent(_FunctionFoo, displayName: 'Bar'); + final FunctionFoo = react.registerFunctionComponent(_FunctionFoo); _FunctionFoo(Map props) { diff --git a/test/util_test.dart b/test/util_test.dart index 0948203d..2eb6f464 100644 --- a/test/util_test.dart +++ b/test/util_test.dart @@ -25,6 +25,7 @@ void main() { expect(isDartComponent2(JsFoo({})), isFalse); expect(isDartComponent2(Foo({})), isFalse); expect(isDartComponent2(Foo2({})), isTrue); + expect(isDartComponent2(FunctionFoo({})), isTrue); }); test('isDartComponent1', () { @@ -32,6 +33,7 @@ void main() { expect(isDartComponent1(JsFoo({})), isFalse); expect(isDartComponent1(Foo({})), isTrue); expect(isDartComponent1(Foo2({})), isFalse); + expect(isDartComponent1(FunctionFoo({})), isFalse); }); test('isDartComponent', () { @@ -39,6 +41,7 @@ void main() { expect(isDartComponent(JsFoo({})), isFalse); expect(isDartComponent(Foo({})), isTrue); expect(isDartComponent(Foo2({})), isTrue); + expect(isDartComponent(FunctionFoo({})), isTrue); }); }); } From 2092d76f920fe7541359c2b50247a92b6922c120 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 15:25:18 -0700 Subject: [PATCH 38/50] merge 5.1.0 --- CHANGELOG.md | 12 +- README.md | 4 +- example/geocodes/geocodes.dart | 2 +- lib/react_client.dart | 2228 ++++++++--------- lib/react_client/react_interop.dart | 5 +- test/factory/common_factory_tests.dart | 1 + .../js_interop_helpers_test/shared_tests.dart | 4 +- 7 files changed, 1118 insertions(+), 1138 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 848c54e3..7b407cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ -## [5.0.0-alpha.0](https://github.com/cleandart/react-dart/compare/4.9.1...5.0.0-alpha.0) +## [5.0.0](https://github.com/cleandart/react-dart/compare/4.9.1...5.0.0) -__ReactJS 16.x Support__ + __ReactJS 16.x Support__ -- The underlying `.js` files provided by this package are now ReactJS version 16. -- Support for the new / updated lifecycle methods from ReactJS 16 [will be released in version `5.1.0`](https://github.com/cleandart/react-dart/milestone/1). + - The underlying `.js` files provided by this package are now ReactJS version 16. + - Support for the new / updated lifecycle methods from ReactJS 16 [will be released in version `5.1.0`](https://github.com/cleandart/react-dart/milestone/1). -> [Full list of 5.0.0 Pull Requests](https://github.com/cleandart/react-dart/milestone/2?closed=1) +> [Full list of 5.0.0 Changes](https://github.com/cleandart/react-dart/milestone/2?closed=1) + +> __[Full List of Breaking Changes](https://github.com/cleandart/react-dart/pull/224)__ ## [4.9.1](https://github.com/cleandart/react-dart/compare/4.9.0...4.9.1) - [#205] Fix `context` setter typing to match getter and not fail `implicit_casts: false` diff --git a/README.md b/README.md index 57d4a32d..d51e6305 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Dart wrapper for [React JS](https://reactjs.org/) -[![Pub](https://img.shields.io/pub/v/react.svg)](https://pub.dartlang.org/packages/react) +[![Pub](https://img.shields.io/pub/v/react.svg)](https://pub.dev/packages/react) ![ReactJS v16.10.1](https://img.shields.io/badge/React_JS-v16.10.1-green.svg) [![Build Status](https://travis-ci.com/cleandart/react-dart.svg?branch=master)](https://travis-ci.com/cleandart/react-dart) -[![React Dart API Docs](https://img.shields.io/badge/api_docs-react-blue.svg)](https://pub.dartlang.org/documentation/react/latest/) +[![React Dart API Docs](https://img.shields.io/badge/api_docs-react-blue.svg)](https://pub.dev/documentation/react/latest/) ## Getting Started diff --git a/example/geocodes/geocodes.dart b/example/geocodes/geocodes.dart index f95c87e5..5955e384 100644 --- a/example/geocodes/geocodes.dart +++ b/example/geocodes/geocodes.dart @@ -104,7 +104,7 @@ var geocodesResultList = react.registerComponent(() => new _GeocodesResultList() /// /// > The functions can be [Component] parameters _(handy for callbacks)_ /// -/// > The DOM [Element]s can be accessed using [ref]s. +/// > The DOM [Element]s can be accessed using `ref`s. class _GeocodesForm extends react.Component { var searchInputInstance; diff --git a/lib/react_client.dart b/lib/react_client.dart index c10bfd79..97e4794e 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -13,539 +13,633 @@ import 'dart:js'; import 'dart:js_util'; import "package:js/js.dart"; - import "package:react/react.dart"; +import 'package:react/react_client/bridge.dart'; +import 'package:react/react_client/js_backed_map.dart'; import 'package:react/react_client/js_interop_helpers.dart'; import 'package:react/react_client/react_interop.dart'; import "package:react/react_dom.dart"; import 'package:react/react_dom_server.dart'; -import 'package:react/react_client/bridge.dart'; import 'package:react/src/context.dart'; +import 'package:react/src/ddc_emulated_function_name_bug.dart' as ddc_emulated_function_name_bug; import "package:react/src/react_client/event_prop_key_to_event_factory.dart"; -import 'package:react/react_client/js_backed_map.dart'; import "package:react/src/react_client/synthetic_event_wrappers.dart" as events; import 'package:react/src/typedefs.dart'; -import 'package:react/src/ddc_emulated_function_name_bug.dart' as ddc_emulated_function_name_bug; -export 'package:react/react_client/react_interop.dart' show ReactElement, ReactJsComponentFactory, inReactDevMode, Ref; export 'package:react/react.dart' show ReactComponentFactoryProxy, ComponentFactory; +export 'package:react/react_client/react_interop.dart' show ReactElement, ReactJsComponentFactory, inReactDevMode, Ref; -/// The type of [Component.ref] specified as a callback. -/// -/// See: -typedef _CallbackRef(T componentOrDomNode); +/// The static methods that proxy JS component lifecycle methods to Dart components. +@Deprecated('6.0.0') +final ReactDartInteropStatics _dartInteropStatics = (() { + var zone = Zone.current; -/// The ReactJS function signature. -/// -/// - [props] will always be supplied as the first argument -/// - [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary -/// to match Dart's generated call signature based on the number of args React provides. -typedef JsFunctionComponent = dynamic Function(JsMap props, [JsMap legacyContext]); + /// Wrapper for [Component.getInitialState]. + Component initComponent(ReactComponent jsThis, ReactDartComponentInternal internal, InteropContextValue context, + ComponentStatics componentStatics) => + zone.run(() { + void jsRedraw() { + jsThis.setState(newObject()); + } -@JS('Object.defineProperty') -external void _defineProperty(dynamic object, String propertyName, JsMap descriptor); + RefMethod getRef = (name) { + var ref = getProperty(jsThis.refs, name); + if (ref == null) return null; + if (ref is Element) return ref; -/// Prepares [children] to be passed to the ReactJS [React.createElement] and -/// the Dart [react.Component]. -/// -/// Currently only involves converting a top-level non-[List] [Iterable] to -/// a non-growable [List], but this may be updated in the future to support -/// advanced nesting and other kinds of children. -dynamic listifyChildren(dynamic children) { - if (React.isValidElement(children)) { - // Short-circuit if we're dealing with a ReactElement to avoid the dart2js - // interceptor lookup involved in Dart type-checking. - return children; - } else if (children is Iterable && children is! List) { - return children.toList(growable: false); - } else { - return children; - } -} + return (ref as ReactComponent).dartComponent ?? ref; + }; -/// Use [ReactDartComponentFactoryProxy2] instead. -/// -/// Will be removed when [Component] is removed in the `6.0.0` release. -@Deprecated('6.0.0') -class ReactDartComponentFactoryProxy extends ReactComponentFactoryProxy { - /// The ReactJS class used as the type for all [ReactElement]s built by - /// this factory. - final ReactClass reactClass; + Component component = componentStatics.componentFactory() + ..initComponentInternal(internal.props, jsRedraw, getRef, jsThis, _unjsifyContext(context)) + ..initStateInternal(); - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @override - @Deprecated('6.0.0') - final ReactJsComponentFactory reactComponentFactory; + // Return the component so that the JS proxying component can store it, + // avoiding an interceptor lookup. + return component; + }); - /// The cached Dart default props retrieved from [reactClass] that are passed - /// into [generateExtendedJsProps] upon [ReactElement] creation. - final Map defaultProps; + InteropContextValue handleGetChildContext(Component component) => zone.run(() { + return _jsifyContext(component.getChildContext()); + }); - ReactDartComponentFactoryProxy(ReactClass reactClass) - : this.reactClass = reactClass, - this.reactComponentFactory = React.createFactory(reactClass), - this.defaultProps = reactClass.dartDefaultProps; + /// Wrapper for [Component.componentWillMount]. + void handleComponentWillMount(Component component) => zone.run(() { + component + ..componentWillMount() + ..transferComponentState(); + }); - @override - ReactClass get type => reactClass; + /// Wrapper for [Component.componentDidMount]. + void handleComponentDidMount(Component component) => zone.run(() { + component.componentDidMount(); + }); - @override - ReactElement build(Map props, [List childrenArgs = const []]) { - var children = _convertArgsToChildren(childrenArgs); - children = listifyChildren(children); + Map _getNextProps(Component component, ReactDartComponentInternal nextInternal) { + var newProps = nextInternal.props; + return newProps != null ? new Map.from(newProps) : {}; + } - return React.createElement(type, generateExtendedJsProps(props, children, defaultProps: defaultProps), children); + /// 1. Update [Component.props] using the value stored to [Component.nextProps] + /// in `componentWillReceiveProps`. + /// 2. Update [Component.context] using the value stored to [Component.nextContext] + /// in `componentWillReceivePropsWithContext`. + /// 3. Update [Component.state] by calling [Component.transferComponentState] + void _afterPropsChange(Component component, InteropContextValue nextContext) { + component + ..props = component.nextProps // [1] + ..context = component.nextContext // [2] + ..transferComponentState(); // [3] } - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - static InteropProps generateExtendedJsProps(Map props, dynamic children, {Map defaultProps}) { - if (children == null) { - children = []; - } else if (children is! Iterable) { - children = [children]; - } + void _clearPrevState(Component component) { + component.prevState = null; + } - // 1. Merge in defaults (if they were specified) - // 2. Add specified props and children. - // 3. Remove "reserved" props that should not be visible to the rendered component. + void _callSetStateCallbacks(Component component) { + var callbacks = component.setStateCallbacks.toList(); + // Prevent concurrent modification during iteration + component.setStateCallbacks.clear(); + callbacks.forEach((callback) { + callback(); + }); + } - // [1] - Map extendedProps = (defaultProps != null ? new Map.from(defaultProps) : {}) - // [2] - ..addAll(props) - ..['children'] = children - // [3] - ..remove('key') - ..remove('ref'); + void _callSetStateTransactionalCallbacks(Component component) { + var nextState = component.nextState; + var props = new UnmodifiableMapView(component.props); - var internal = new ReactDartComponentInternal()..props = extendedProps; + component.transactionalSetStateCallbacks.forEach((callback) { + nextState.addAll(callback(nextState, props)); + }); + component.transactionalSetStateCallbacks.clear(); + } - var interopProps = new InteropProps(internal: internal); + /// Wrapper for [Component.componentWillReceiveProps]. + void handleComponentWillReceiveProps( + Component component, ReactDartComponentInternal nextInternal, InteropContextValue nextContext) => + zone.run(() { + var nextProps = _getNextProps(component, nextInternal); + var newContext = _unjsifyContext(nextContext); - // Don't pass a key into InteropProps if one isn't defined, so that the value will - // be `undefined` in the JS, which is ignored by React, whereas `null` isn't. - if (props.containsKey('key')) { - interopProps.key = props['key']; - } + component + ..nextProps = nextProps + ..nextContext = newContext + ..componentWillReceiveProps(nextProps) + ..componentWillReceivePropsWithContext(nextProps, newContext); + }); - if (props.containsKey('ref')) { - var ref = props['ref']; + /// Wrapper for [Component.shouldComponentUpdate]. + bool handleShouldComponentUpdate(Component component, InteropContextValue nextContext) => zone.run(() { + _callSetStateTransactionalCallbacks(component); - // If the ref is a callback, pass ReactJS a function that will call it - // with the Dart Component instance, not the ReactComponent instance. - if (ref is _CallbackRef) { - interopProps.ref = allowInterop((ReactComponent instance) => ref(instance?.dartComponent)); - } else if (ref is Ref) { - interopProps.ref = ref.jsRef; - } else { - interopProps.ref = ref; - } - } + // If shouldComponentUpdateWithContext returns a valid bool (default implementation returns null), + // then don't bother calling `shouldComponentUpdate` and have it trump. + bool shouldUpdate = + component.shouldComponentUpdateWithContext(component.nextProps, component.nextState, component.nextContext); - return interopProps; - } -} + if (shouldUpdate == null) { + shouldUpdate = component.shouldComponentUpdate(component.nextProps, component.nextState); + } -/// Creates ReactJS [Component2] instances for Dart components. -class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy - with JsBackedMapComponentFactoryMixin - implements ReactDartComponentFactoryProxy { - /// The ReactJS class used as the type for all [ReactElement]s built by - /// this factory. - @override - final ReactClass reactClass; + if (shouldUpdate) { + return true; + } else { + // If component should not update, update props / transfer state because componentWillUpdate will not be called. + _afterPropsChange(component, nextContext); + _callSetStateCallbacks(component); + // Clear out prevState after it's done being used so it's not retained + _clearPrevState(component); + return false; + } + }); - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @override - @Deprecated('6.0.0') - final ReactJsComponentFactory reactComponentFactory; + /// Wrapper for [Component.componentWillUpdate]. + void handleComponentWillUpdate(Component component, InteropContextValue nextContext) => zone.run(() { + /// Call `componentWillUpdate` and the context variant + component + ..componentWillUpdate(component.nextProps, component.nextState) + ..componentWillUpdateWithContext(component.nextProps, component.nextState, component.nextContext); - @override - final Map defaultProps; + _afterPropsChange(component, nextContext); + }); - ReactDartComponentFactoryProxy2(ReactClass reactClass) - : this.reactClass = reactClass, - this.reactComponentFactory = React.createFactory(reactClass), - this.defaultProps = JsBackedMap.fromJs(reactClass.defaultProps); + /// Wrapper for [Component.componentDidUpdate]. + /// + /// Uses [prevState] which was transferred from [Component.nextState] in [componentWillUpdate]. + void handleComponentDidUpdate(Component component, ReactDartComponentInternal prevInternal) => zone.run(() { + var prevInternalProps = prevInternal.props; - @override - ReactClass get type => reactClass; + /// Call `componentDidUpdate` and the context variant + component.componentDidUpdate(prevInternalProps, component.prevState); - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - static JsMap generateExtendedJsProps(Map props) => JsBackedMapComponentFactoryMixin.generateExtendedJsProps(props); -} + _callSetStateCallbacks(component); + // Clear out prevState after it's done being used so it's not retained + _clearPrevState(component); + }); -/// Shared component factory proxy [build] method for components that utilize [JsBackedMap]s. -mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { - @override - ReactElement build(Map props, [List childrenArgs = const []]) { - var children = _generateChildren(childrenArgs, shouldAlwaysBeList: true); - return React.createElement(type, JsBackedMapComponentFactoryMixin.generateExtendedJsProps(props), children); - } + /// Wrapper for [Component.componentWillUnmount]. + void handleComponentWillUnmount(Component component) => zone.run(() { + component.componentWillUnmount(); + // Clear these callbacks in case they retain anything; + // they definitely won't be called after this point. + component.setStateCallbacks.clear(); + component.transactionalSetStateCallbacks.clear(); + }); - static JsMap generateExtendedJsProps(Map props) => _generateJsProps(props); -} + /// Wrapper for [Component.render]. + dynamic handleRender(Component component) => zone.run(() { + return component.render(); + }); -JsMap _generateJsProps(Map props, - {bool convertEventHandlers = false, - bool convertRefValue = true, - bool convertCallbackRefValue = true, - bool wrapWithJsify = false}) { - final propsForJs = JsBackedMap.from(props); + return new ReactDartInteropStatics( + initComponent: allowInterop(initComponent), + handleGetChildContext: allowInterop(handleGetChildContext), + handleComponentWillMount: allowInterop(handleComponentWillMount), + handleComponentDidMount: allowInterop(handleComponentDidMount), + handleComponentWillReceiveProps: allowInterop(handleComponentWillReceiveProps), + handleShouldComponentUpdate: allowInterop(handleShouldComponentUpdate), + handleComponentWillUpdate: allowInterop(handleComponentWillUpdate), + handleComponentDidUpdate: allowInterop(handleComponentDidUpdate), + handleComponentWillUnmount: allowInterop(handleComponentWillUnmount), + handleRender: allowInterop(handleRender)); +})(); - if (convertEventHandlers) _convertEventHandlers(propsForJs); - if (convertRefValue) _convertRefValue2(propsForJs, convertCallbackRefValue: convertCallbackRefValue); +/// A mapping from converted/wrapped JS handler functions (the result of [_convertEventHandlers]) +/// to the original Dart functions (the input of [_convertEventHandlers]). +final Expando _originalEventHandlers = new Expando(); - return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; +/// Prepares [children] to be passed to the ReactJS [React.createElement] and +/// the Dart [react.Component]. +/// +/// Currently only involves converting a top-level non-[List] [Iterable] to +/// a non-growable [List], but this may be updated in the future to support +/// advanced nesting and other kinds of children. +dynamic listifyChildren(dynamic children) { + if (React.isValidElement(children)) { + // Short-circuit if we're dealing with a ReactElement to avoid the dart2js + // interceptor lookup involved in Dart type-checking. + return children; + } else if (children is Iterable && children is! List) { + return children.toList(growable: false); + } else { + return children; + } } -/// Creates ReactJS [ReactElement] instances for components defined in the JS. -class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { - /// The JS class used by this factory. - @override - final ReactClass type; - - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @Deprecated('6.0.0') - final Function factory; - - /// Whether to automatically prepare props relating to bound values and event handlers - /// via [ReactDomComponentFactoryProxy.convertProps] for consumption by React JS DOM components. - /// - /// Useful when the JS component forwards DOM props to its rendered DOM components. - /// - /// Disable for more custom handling of these props. - final bool shouldConvertDomProps; - - /// Whether the props.children should always be treated as a list or not. - /// Default: `false` - final bool alwaysReturnChildrenAsList; - - ReactJsComponentFactoryProxy(ReactClass jsClass, - {this.shouldConvertDomProps: true, this.alwaysReturnChildrenAsList: false}) - : this.type = jsClass, - this.factory = React.createFactory(jsClass) { - if (jsClass == null) { - throw new ArgumentError('`jsClass` must not be null. ' - 'Ensure that the JS component class you\'re referencing is available and being accessed correctly.'); - } +void setClientConfiguration() { + try { + // Attempt to invoke JS interop methods, which will throw if the + // corresponding JS functions are not available. + React.isValidElement(null); + ReactDom.findDOMNode(null); + createReactDartComponentClass(null, null, null); + } on NoSuchMethodError catch (_) { + throw new Exception('react.js and react_dom.js must be loaded.'); + } catch (_) { + throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); } - @override - ReactElement build(Map props, [List childrenArgs]) { - dynamic children = _convertArgsToChildren(childrenArgs); - - if (alwaysReturnChildrenAsList && children is! List) { - children = [children]; - } - - Map potentiallyConvertedProps; - - final mightNeedConverting = shouldConvertDomProps || props['ref'] != null; - if (mightNeedConverting) { - // We can't mutate the original since we can't be certain that the value of the - // the converted event handler will be compatible with the Map's type parameters. - // We also want to avoid mutating the original map where possible. - // So, make a copy and mutate that. - potentiallyConvertedProps = Map.from(props); - if (shouldConvertDomProps) { - _convertEventHandlers(potentiallyConvertedProps); - } - _convertRefValue(potentiallyConvertedProps); - } else { - potentiallyConvertedProps = props; - } - - // jsifyAndAllowInterop also handles converting props with nested Map/List structures, like `style` - return React.createElement(type, jsifyAndAllowInterop(potentiallyConvertedProps), children); + setReactConfiguration(_reactDom, _registerComponent, + customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); + setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); + // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. + if (context['ReactDOMServer'] != null) { + setReactDOMServerConfiguration(ReactDomServer.renderToString, ReactDomServer.renderToStaticMarkup); } } -/// Creates ReactJS [ReactElement] instances for DOM components. -class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { - /// The name of the proxied DOM component. - /// - /// E.g. `'div'`, `'a'`, `'h1'` - final String name; +/// Wrapper for [SyntheticAnimationEvent]. +SyntheticAnimationEvent syntheticAnimationEventFactory(events.SyntheticAnimationEvent e) { + return new SyntheticAnimationEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.animationName, + e.elapsedTime, + e.pseudoElement, + ); +} - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @Deprecated('6.0.0') - final Function factory; +/// Wrapper for [SyntheticClipboardEvent]. +SyntheticClipboardEvent syntheticClipboardEventFactory(events.SyntheticClipboardEvent e) { + return new SyntheticClipboardEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.clipboardData); +} - ReactDomComponentFactoryProxy(name) - : this.name = name, - this.factory = React.createFactory(name) { - // TODO: Should we remove this once we validate that the bug is gone in Dart 2 DDC? - if (ddc_emulated_function_name_bug.isBugPresent) { - ddc_emulated_function_name_bug.patchName(this); +/// Wrapper for [SyntheticDataTransfer]. +SyntheticDataTransfer syntheticDataTransferFactory(events.SyntheticDataTransfer dt) { + if (dt == null) return null; + List files = []; + if (dt.files != null) { + for (int i = 0; i < dt.files.length; i++) { + files.add(dt.files[i]); } } + List types = []; + if (dt.types != null) { + for (int i = 0; i < dt.types.length; i++) { + types.add(dt.types[i]); + } + } + var effectAllowed; + var dropEffect; - @override - String get type => name; - - @override - ReactElement build(Map props, [List childrenArgs = const []]) { - var children = _convertArgsToChildren(childrenArgs); - children = listifyChildren(children); - - // We can't mutate the original since we can't be certain that the value of the - // the converted event handler will be compatible with the Map's type parameters. - var convertibleProps = new Map.from(props); - convertProps(convertibleProps); - - // jsifyAndAllowInterop also handles converting props with nested Map/List structures, like `style` - return React.createElement(type, jsifyAndAllowInterop(convertibleProps), children); + try { + // Works around a bug in IE where dragging from outside the browser fails. + // Trying to access this property throws the error "Unexpected call to method or property access.". + effectAllowed = dt.effectAllowed; + } catch (exception) { + effectAllowed = 'uninitialized'; } - /// Performs special handling of certain props for consumption by ReactJS DOM components. - static void convertProps(Map props) { - _convertEventHandlers(props); - _convertRefValue(props); + try { + // For certain types of drag events in IE (anything but ondragenter, ondragover, and ondrop), this fails. + // Trying to access this property throws the error "Unexpected call to method or property access.". + dropEffect = dt.dropEffect; + } catch (exception) { + dropEffect = 'none'; } + + return new SyntheticDataTransfer(dropEffect, effectAllowed, files, types); } -/// Create react-dart registered component for the HTML [Element]. -_reactDom(String name) { - return new ReactDomComponentFactoryProxy(name); +/// Wrapper for [SyntheticEvent]. +SyntheticEvent syntheticEventFactory(events.SyntheticEvent e) { + return new SyntheticEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), + () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); } -void _convertRefValue(Map args) { - var ref = args['ref']; - if (ref is Ref) { - args['ref'] = ref.jsRef; - } +/// Wrapper for [SyntheticFocusEvent]. +SyntheticFocusEvent syntheticFocusEventFactory(events.SyntheticFocusEvent e) { + return new SyntheticFocusEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.relatedTarget); } -void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { - var ref = args['ref']; - - if (ref is Ref) { - args['ref'] = ref.jsRef; - } else if (ref is _CallbackRef && convertCallbackRefValue) { - args['ref'] = allowInterop((dynamic instance) { - if (instance is ReactComponent && instance.dartComponent != null) return ref(instance.dartComponent); - return ref(instance); - }); - } +/// Wrapper for [SyntheticFormEvent]. +SyntheticFormEvent syntheticFormEventFactory(events.SyntheticFormEvent e) { + return new SyntheticFormEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), + () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); } -class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { - /// The JS class used by this factory. - @override - final ReactClass type; - final bool isConsumer; - final bool isProvider; - - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @override - @Deprecated('6.0.0') - final Function factory; - @override - final bool shouldConvertDomProps; - - ReactJsContextComponentFactoryProxy( - ReactClass jsClass, { - this.shouldConvertDomProps = true, - this.isConsumer = false, - this.isProvider = false, - }) : this.type = jsClass, - this.factory = React.createFactory(jsClass), - super(jsClass, shouldConvertDomProps: shouldConvertDomProps); - - @override - ReactElement build(Map props, [List childrenArgs]) { - dynamic children = _convertArgsToChildren(childrenArgs); +/// Wrapper for [SyntheticKeyboardEvent]. +SyntheticKeyboardEvent syntheticKeyboardEventFactory(events.SyntheticKeyboardEvent e) { + return new SyntheticKeyboardEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.altKey, + e.char, + e.charCode, + e.ctrlKey, + e.locale, + e.location, + e.key, + e.keyCode, + e.metaKey, + e.repeat, + e.shiftKey); +} - if (isConsumer) { - if (children is Function) { - Function contextCallback = children; - children = allowInterop((args) { - return contextCallback(ContextHelpers.unjsifyNewContext(args)); - }); - } - } +/// Wrapper for [SyntheticMouseEvent]. +SyntheticMouseEvent syntheticMouseEventFactory(events.SyntheticMouseEvent e) { + SyntheticDataTransfer dt = syntheticDataTransferFactory(e.dataTransfer); + return new SyntheticMouseEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.altKey, + e.button, + e.buttons, + e.clientX, + e.clientY, + e.ctrlKey, + dt, + e.metaKey, + e.pageX, + e.pageY, + e.relatedTarget, + e.screenX, + e.screenY, + e.shiftKey, + ); +} - return React.createElement(type, generateExtendedJsProps(props), children); - } +/// Wrapper for [SyntheticPointerEvent]. +SyntheticPointerEvent syntheticPointerEventFactory(events.SyntheticPointerEvent e) { + return new SyntheticPointerEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.pointerId, + e.width, + e.height, + e.pressure, + e.tangentialPressure, + e.tiltX, + e.tiltY, + e.twist, + e.pointerType, + e.isPrimary, + ); +} - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - JsMap generateExtendedJsProps(Map props) { - JsBackedMap propsForJs = JsBackedMap.from(props); +/// Wrapper for [SyntheticTouchEvent]. +SyntheticTouchEvent syntheticTouchEventFactory(events.SyntheticTouchEvent e) { + return new SyntheticTouchEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.altKey, + e.changedTouches, + e.ctrlKey, + e.metaKey, + e.shiftKey, + e.targetTouches, + e.touches, + ); +} - if (isProvider) { - propsForJs['value'] = ContextHelpers.jsifyNewContext(propsForJs['value']); - } +/// Wrapper for [SyntheticTransitionEvent]. +SyntheticTransitionEvent syntheticTransitionEventFactory(events.SyntheticTransitionEvent e) { + return new SyntheticTransitionEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.propertyName, + e.elapsedTime, + e.pseudoElement, + ); +} - return propsForJs.jsObject; - } +/// Wrapper for [SyntheticUIEvent]. +SyntheticUIEvent syntheticUIEventFactory(events.SyntheticUIEvent e) { + return new SyntheticUIEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.detail, + e.view, + ); } -/// Creates ReactJS [Function Component] from Dart Function. -class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy with JsBackedMapComponentFactoryMixin { - /// The name of this function. - final String displayName; +/// Wrapper for [SyntheticWheelEvent]. +SyntheticWheelEvent syntheticWheelEventFactory(events.SyntheticWheelEvent e) { + return new SyntheticWheelEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.deltaX, + e.deltaMode, + e.deltaY, + e.deltaZ, + ); +} - /// The React JS component definition of this Function Component. - final JsFunctionComponent reactFunction; +/// Returns the original Dart handler function that, within [_convertEventHandlers], +/// was converted/wrapped into the function [jsConvertedEventHandler] to be passed to the JS. +/// +/// Returns `null` if [jsConvertedEventHandler] is `null`. +/// +/// Returns `null` if [jsConvertedEventHandler] does not represent such a function +/// +/// Useful for chaining event handlers on DOM or JS composite [ReactElement]s. +Function unconvertJsEventHandler(Function jsConvertedEventHandler) { + if (jsConvertedEventHandler == null) return null; - ReactDartFunctionComponentFactoryProxy(DartFunctionComponent dartFunctionComponent, {String displayName}) - : this.displayName = displayName ?? _getJsFunctionName(dartFunctionComponent), - this.reactFunction = _wrapFunctionComponent(dartFunctionComponent, - displayName: displayName ?? _getJsFunctionName(dartFunctionComponent)); + return _originalEventHandlers[jsConvertedEventHandler]; +} - @override - JsFunctionComponent get type => reactFunction; +/// Returns the props for a [ReactElement] or composite [ReactComponent] [instance], +/// shallow-converted to a Dart Map for convenience. +/// +/// If `style` is specified in props, then it too is shallow-converted and included +/// in the returned Map. +/// +/// Any JS event handlers included in the props for the given [instance] will be +/// unconverted such that the original JS handlers are returned instead of their +/// Dart synthetic counterparts. +Map unconvertJsProps(/* ReactElement|ReactComponent */ instance) { + var props = Map.from(JsBackedMap.backedBy(instance.props)); - static String _getJsFunctionName(Function object) => - getProperty(object, 'name') ?? getProperty(object, '\$static_name'); + // Catch if a Dart component has been passed in. Component (version 1) can be identified by having the "internal" + // prop. Component2, however, does not have that but can be detected by checking whether or not the style prop is a + // Map. Because non-Dart components will have a JS Object, it can be assumed that if the style prop is a Map then + // it is a Dart Component. + if (props['internal'] is ReactDartComponentInternal || (props['style'] != null && props['style'] is Map)) { + throw new ArgumentError('A Dart Component cannot be passed into unconvertJsProps.'); + } - /// Creates a function component from the given [dartFunctionComponent] that can be used with React. - /// - /// [displayName] Sets the component name for debugging purposes. - /// - /// In DDC, this will be the [DartFunctionComponent] name, but in dart2js it will be null unless - /// overridden, since using runtimeType can lead to larger dart2js output. - /// - /// This will result in the dart2js name being `ReactDartComponent2` (the - /// name of the proxying JS component defined in _dart_helpers.js). - static JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionComponent, {String displayName}) { - // dart2js uses null and undefined interchangeably, meaning returning `null` from dart - // may show up in js as `undefined`, ReactJS doesnt like that and expects a js `null` to be returned, - // and throws if it gets `undefined`. `jsNull` is an interop variable that holds a JS `null` value - // to force `null` as the return value if user returns a Dart `null`. - // See: https://github.com/dart-lang/sdk/issues/27485 - jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => - dartFunctionComponent(JsBackedMap.backedBy(jsProps)) ?? jsNull; - JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); - if (displayName != null) { - // This is a work-around to display the correct name in the React DevTools. - _defineProperty(interopFunction, 'name', jsify({'value': displayName})); + eventPropKeyToEventFactory.keys.forEach((key) { + if (props.containsKey(key)) { + props[key] = unconvertJsEventHandler(props[key]) ?? props[key]; } - // ignore: invalid_use_of_protected_member - setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); - return interopFunction; + }); + + // Convert the nested style map so it can be read by Dart code. + var style = props['style']; + if (style != null) { + props['style'] = Map.from(JsBackedMap.backedBy(style)); } + + return props; } /// Converts a list of variadic children arguments to children that should be passed to ReactJS. /// /// Returns: /// -/// - `null` if there are no args and [shouldAlwaysBeList] is false -/// - `[]` if there are no args and [shouldAlwaysBeList] is true +/// - `null` if there are no args /// - the single child if only one was specified /// - otherwise, the same list of args, will all top-level children validated -dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) { - var children; +dynamic _convertArgsToChildren(List childrenArgs) { if (childrenArgs.isEmpty) { - if (!shouldAlwaysBeList) return null; - children = childrenArgs; + return null; } else if (childrenArgs.length == 1) { - if (shouldAlwaysBeList) { - final singleChild = listifyChildren(childrenArgs.single); - if (singleChild is List) { - children = singleChild; - } - } else { - children = childrenArgs.single; - } + return childrenArgs.single; + } else { + markChildrenValidated(childrenArgs); + return childrenArgs; } +} - if (children == null) { - children = shouldAlwaysBeList ? childrenArgs.map(listifyChildren).toList() : childrenArgs; - markChildrenValidated(children); +/// Convert packed event handler into wrapper and pass it only the Dart [SyntheticEvent] object converted from the +/// [events.SyntheticEvent] event. +_convertEventHandlers(Map args) { + args.forEach((propKey, value) { + var eventFactory = eventPropKeyToEventFactory[propKey]; + if (eventFactory != null && value != null) { + // Apply allowInterop here so that the function we store in [_originalEventHandlers] + // is the same one we'll retrieve from the JS props. + var reactDartConvertedEventHandler = allowInterop((events.SyntheticEvent e, [_, __]) { + value(eventFactory(e)); + }); + + args[propKey] = reactDartConvertedEventHandler; + _originalEventHandlers[reactDartConvertedEventHandler] = value; + } + }); +} + +void _convertRefValue(Map args) { + var ref = args['ref']; + if (ref is Ref) { + args['ref'] = ref.jsRef; } - - return children; } -/// Converts a list of variadic children arguments to children that should be passed to ReactJS. -/// -/// Returns: -/// -/// - `null` if there are no args -/// - the single child if only one was specified -/// - otherwise, the same list of args, will all top-level children validated -dynamic _convertArgsToChildren(List childrenArgs) { - if (childrenArgs.isEmpty) { - return null; - } else if (childrenArgs.length == 1) { - return childrenArgs.single; - } else { - markChildrenValidated(childrenArgs); - return childrenArgs; +void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { + var ref = args['ref']; + + if (ref is Ref) { + args['ref'] = ref.jsRef; + } else if (ref is _CallbackRef && convertCallbackRefValue) { + args['ref'] = allowInterop((dynamic instance) { + if (instance is ReactComponent && instance.dartComponent != null) return ref(instance.dartComponent); + return ref(instance); + }); } } +@JS('Object.defineProperty') +external void _defineProperty(dynamic object, String propertyName, JsMap descriptor); + /// Util used with [_registerComponent2] to ensure no imporant lifecycle /// events are skipped. This includes [shouldComponentUpdate], /// [componentDidUpdate], and [render] because they utilize @@ -583,8 +677,55 @@ List _filterSkipMethods(List methods) { return finalList; } -@JS('Object.keys') -external List _objectKeys(Object object); +dynamic _findDomNode(component) { + return ReactDom.findDOMNode(component is Component ? component.jsThis : component); +} + +/// Converts a list of variadic children arguments to children that should be passed to ReactJS. +/// +/// Returns: +/// +/// - `null` if there are no args and [shouldAlwaysBeList] is false +/// - `[]` if there are no args and [shouldAlwaysBeList] is true +/// - the single child if only one was specified +/// - otherwise, the same list of args, will all top-level children validated +dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) { + var children; + if (childrenArgs.isEmpty) { + if (!shouldAlwaysBeList) return null; + children = childrenArgs; + } else if (childrenArgs.length == 1) { + if (shouldAlwaysBeList) { + final singleChild = listifyChildren(childrenArgs.single); + if (singleChild is List) { + children = singleChild; + } + } else { + children = childrenArgs.single; + } + } + + if (children == null) { + children = shouldAlwaysBeList ? childrenArgs.map(listifyChildren).toList() : childrenArgs; + markChildrenValidated(children); + } + + return children; +} + +/// Converts [props] into a [JsMap] that can be utilized with [React.createElement()]. +JsMap _generateJsProps(Map props, + {bool convertEventHandlers = true, + bool convertRefValue = true, + bool convertCallbackRefValue = true, + bool wrapWithJsify = true}) { + final propsForJs = JsBackedMap.from(props); + + if (convertEventHandlers) _convertEventHandlers(propsForJs); + if (convertRefValue) _convertRefValue2(propsForJs, convertCallbackRefValue: convertCallbackRefValue); + + return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; +} @Deprecated('6.0.0') InteropContextValue _jsifyContext(Map context) { @@ -597,787 +738,620 @@ InteropContextValue _jsifyContext(Map context) { return interopContext; } -@Deprecated('6.0.0') -Map _unjsifyContext(InteropContextValue interopContext) { - // TODO consider using `contextKeys` for this if perf of objectKeys is bad. - return new Map.fromIterable(_objectKeys(interopContext), value: (key) { - // ignore: argument_type_not_assignable - ReactDartContextInternal internal = getProperty(interopContext, key); - return internal?.value; - }); +@JS('Object.keys') +external List _objectKeys(Object object); + +/// Create react-dart registered component for the HTML [Element]. +_reactDom(String name) { + return new ReactDomComponentFactoryProxy(name); } -/// The static methods that proxy JS component lifecycle methods to Dart components. +/// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] +/// which produces a new JS `ReactClass`. @Deprecated('6.0.0') -final ReactDartInteropStatics _dartInteropStatics = (() { - var zone = Zone.current; - - /// Wrapper for [Component.getInitialState]. - Component initComponent(ReactComponent jsThis, ReactDartComponentInternal internal, InteropContextValue context, - ComponentStatics componentStatics) => - zone.run(() { - void jsRedraw() { - jsThis.setState(newObject()); - } - - RefMethod getRef = (name) { - var ref = getProperty(jsThis.refs, name); - if (ref == null) return null; - if (ref is Element) return ref; - - return (ref as ReactComponent).dartComponent ?? ref; - }; - - Component component = componentStatics.componentFactory() - ..initComponentInternal(internal.props, jsRedraw, getRef, jsThis, _unjsifyContext(context)) - ..initStateInternal(); - - // Return the component so that the JS proxying component can store it, - // avoiding an interceptor lookup. - return component; - }); - - InteropContextValue handleGetChildContext(Component component) => zone.run(() { - return _jsifyContext(component.getChildContext()); - }); - - /// Wrapper for [Component.componentWillMount]. - void handleComponentWillMount(Component component) => zone.run(() { - component - ..componentWillMount() - ..transferComponentState(); - }); - - /// Wrapper for [Component.componentDidMount]. - void handleComponentDidMount(Component component) => zone.run(() { - component.componentDidMount(); - }); - - Map _getNextProps(Component component, ReactDartComponentInternal nextInternal) { - var newProps = nextInternal.props; - return newProps != null ? new Map.from(newProps) : {}; - } - - /// 1. Update [Component.props] using the value stored to [Component.nextProps] - /// in `componentWillReceiveProps`. - /// 2. Update [Component.context] using the value stored to [Component.nextContext] - /// in `componentWillReceivePropsWithContext`. - /// 3. Update [Component.state] by calling [Component.transferComponentState] - void _afterPropsChange(Component component, InteropContextValue nextContext) { - component - ..props = component.nextProps // [1] - ..context = component.nextContext // [2] - ..transferComponentState(); // [3] - } - - void _clearPrevState(Component component) { - component.prevState = null; - } +ReactDartComponentFactoryProxy _registerComponent( + ComponentFactory componentFactory, [ + Iterable skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'], +]) { + var componentInstance = componentFactory(); - void _callSetStateCallbacks(Component component) { - var callbacks = component.setStateCallbacks.toList(); - // Prevent concurrent modification during iteration - component.setStateCallbacks.clear(); - callbacks.forEach((callback) { - callback(); - }); + if (componentInstance is Component2) { + return _registerComponent2(componentFactory, skipMethods: skipMethods); } - void _callSetStateTransactionalCallbacks(Component component) { - var nextState = component.nextState; - var props = new UnmodifiableMapView(component.props); - - component.transactionalSetStateCallbacks.forEach((callback) { - nextState.addAll(callback(nextState, props)); - }); - component.transactionalSetStateCallbacks.clear(); - } + var componentStatics = new ComponentStatics(componentFactory); - /// Wrapper for [Component.componentWillReceiveProps]. - void handleComponentWillReceiveProps( - Component component, ReactDartComponentInternal nextInternal, InteropContextValue nextContext) => - zone.run(() { - var nextProps = _getNextProps(component, nextInternal); - var newContext = _unjsifyContext(nextContext); + var jsConfig = new JsComponentConfig( + childContextKeys: componentInstance.childContextKeys, + contextKeys: componentInstance.contextKeys, + ); - component - ..nextProps = nextProps - ..nextContext = newContext - ..componentWillReceiveProps(nextProps) - ..componentWillReceivePropsWithContext(nextProps, newContext); - }); + /// Create the JS `ReactClass`. + /// with custom JS lifecycle methods. + var reactComponentClass = createReactDartComponentClass(_dartInteropStatics, componentStatics, jsConfig) + // ignore: invalid_use_of_protected_member + ..dartComponentVersion = ReactDartComponentVersion.component + ..displayName = componentFactory().displayName; - /// Wrapper for [Component.shouldComponentUpdate]. - bool handleShouldComponentUpdate(Component component, InteropContextValue nextContext) => zone.run(() { - _callSetStateTransactionalCallbacks(component); + // Cache default props and store them on the ReactClass so they can be used + // by ReactDartComponentFactoryProxy and externally. + final Map defaultProps = new Map.unmodifiable(componentInstance.getDefaultProps()); + reactComponentClass.dartDefaultProps = defaultProps; - // If shouldComponentUpdateWithContext returns a valid bool (default implementation returns null), - // then don't bother calling `shouldComponentUpdate` and have it trump. - bool shouldUpdate = - component.shouldComponentUpdateWithContext(component.nextProps, component.nextState, component.nextContext); + return new ReactDartComponentFactoryProxy(reactComponentClass); +} - if (shouldUpdate == null) { - shouldUpdate = component.shouldComponentUpdate(component.nextProps, component.nextState); - } +/// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] +/// which produces a new JS `ReactClass`. +ReactDartComponentFactoryProxy2 _registerComponent2( + ComponentFactory componentFactory, { + Iterable skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'], + Component2BridgeFactory bridgeFactory, +}) { + bridgeFactory ??= Component2BridgeImpl.bridgeFactory; - if (shouldUpdate) { - return true; - } else { - // If component should not update, update props / transfer state because componentWillUpdate will not be called. - _afterPropsChange(component, nextContext); - _callSetStateCallbacks(component); - // Clear out prevState after it's done being used so it's not retained - _clearPrevState(component); - return false; - } - }); + final componentInstance = componentFactory(); + final componentStatics = new ComponentStatics2( + componentFactory: componentFactory, + instanceForStaticMethods: componentInstance, + bridgeFactory: bridgeFactory, + ); + final filteredSkipMethods = _filterSkipMethods(skipMethods); - /// Wrapper for [Component.componentWillUpdate]. - void handleComponentWillUpdate(Component component, InteropContextValue nextContext) => zone.run(() { - /// Call `componentWillUpdate` and the context variant - component - ..componentWillUpdate(component.nextProps, component.nextState) - ..componentWillUpdateWithContext(component.nextProps, component.nextState, component.nextContext); + // Cache default props and store them on the ReactClass so they can be used + // by ReactDartComponentFactoryProxy and externally. + final JsBackedMap defaultProps = new JsBackedMap.from(componentInstance.defaultProps); - _afterPropsChange(component, nextContext); - }); + final JsMap jsPropTypes = + bridgeFactory(componentInstance).jsifyPropTypes(componentInstance, componentInstance.propTypes); - /// Wrapper for [Component.componentDidUpdate]. - /// - /// Uses [prevState] which was transferred from [Component.nextState] in [componentWillUpdate]. - void handleComponentDidUpdate(Component component, ReactDartComponentInternal prevInternal) => zone.run(() { - var prevInternalProps = prevInternal.props; + var jsConfig2 = new JsComponentConfig2( + defaultProps: defaultProps.jsObject, + contextType: componentInstance.contextType?.jsThis, + skipMethods: filteredSkipMethods, + propTypes: jsPropTypes, + ); - /// Call `componentDidUpdate` and the context variant - component.componentDidUpdate(prevInternalProps, component.prevState); + /// Create the JS `ReactClass` component class + /// with custom JS lifecycle methods. + var reactComponentClass = + createReactDartComponentClass2(_ReactDartInteropStatics2.staticsForJs, componentStatics, jsConfig2) + ..displayName = componentInstance.displayName; + // ignore: invalid_use_of_protected_member + reactComponentClass.dartComponentVersion = ReactDartComponentVersion.component2; - _callSetStateCallbacks(component); - // Clear out prevState after it's done being used so it's not retained - _clearPrevState(component); - }); + return new ReactDartComponentFactoryProxy2(reactComponentClass); +} - /// Wrapper for [Component.componentWillUnmount]. - void handleComponentWillUnmount(Component component) => zone.run(() { - component.componentWillUnmount(); - // Clear these callbacks in case they retain anything; - // they definitely won't be called after this point. - component.setStateCallbacks.clear(); - component.transactionalSetStateCallbacks.clear(); - }); +/// Creates and returns a new `ReactDartFunctionComponentFactoryProxy` from the provided [dartFunctionComponent] +/// which produces a new `JsFunctionComponent`. +ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, + {String displayName}) => + ReactDartFunctionComponentFactoryProxy(dartFunctionComponent, displayName: displayName); - /// Wrapper for [Component.render]. - dynamic handleRender(Component component) => zone.run(() { - return component.render(); - }); +@Deprecated('6.0.0') +Map _unjsifyContext(InteropContextValue interopContext) { + // TODO consider using `contextKeys` for this if perf of objectKeys is bad. + return new Map.fromIterable(_objectKeys(interopContext), value: (key) { + // ignore: argument_type_not_assignable + ReactDartContextInternal internal = getProperty(interopContext, key); + return internal?.value; + }); +} - return new ReactDartInteropStatics( - initComponent: allowInterop(initComponent), - handleGetChildContext: allowInterop(handleGetChildContext), - handleComponentWillMount: allowInterop(handleComponentWillMount), - handleComponentDidMount: allowInterop(handleComponentDidMount), - handleComponentWillReceiveProps: allowInterop(handleComponentWillReceiveProps), - handleShouldComponentUpdate: allowInterop(handleShouldComponentUpdate), - handleComponentWillUpdate: allowInterop(handleComponentWillUpdate), - handleComponentDidUpdate: allowInterop(handleComponentDidUpdate), - handleComponentWillUnmount: allowInterop(handleComponentWillUnmount), - handleRender: allowInterop(handleRender)); -})(); +/// The ReactJS function signature. +/// +/// - [props] will always be supplied as the first argument +/// - [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary +/// to match Dart's generated call signature based on the number of args React provides. +typedef JsFunctionComponent = dynamic Function(JsMap props, [JsMap legacyContext]); -abstract class _ReactDartInteropStatics2 { - // TODO 3.1.0-wip expose for testing? - /// The zone in which all component lifecycle methods are run. - static final componentZone = Zone.root; +/// The type of [Component.ref] specified as a callback. +/// +/// See: +typedef _CallbackRef(T componentOrDomNode); - static void _updatePropsAndStateWithJs(Component2 component, JsMap props, JsMap state) { - component - ..props = new JsBackedMap.backedBy(props) - ..state = new JsBackedMap.backedBy(state); +/// Shared component factory proxy [build] method for components that utilize [JsBackedMap]s. +mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { + @override + ReactElement build(Map props, [List childrenArgs = const []]) { + var children = _generateChildren(childrenArgs, shouldAlwaysBeList: true); + var convertedProps = generateExtendedJsProps(props); + return React.createElement(type, convertedProps, children); } - static void _updateContextWithJs(Component2 component, dynamic jsContext) { - component.context = ContextHelpers.unjsifyNewContext(jsContext); - } + static JsMap generateExtendedJsProps(Map props) => + _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); +} - static Component2 initComponent(ReactComponent jsThis, ComponentStatics2 componentStatics) => // dartfmt - componentZone.run(() { - final component = componentStatics.componentFactory(); - // Return the component so that the JS proxying component can store it, - // avoiding an interceptor lookup. +/// Use [ReactDartComponentFactoryProxy2] instead. +/// +/// Will be removed when [Component] is removed in the `6.0.0` release. +@Deprecated('6.0.0') +class ReactDartComponentFactoryProxy extends ReactComponentFactoryProxy { + /// The ReactJS class used as the type for all [ReactElement]s built by + /// this factory. + final ReactClass reactClass; - component - ..jsThis = jsThis - ..props = new JsBackedMap.backedBy(jsThis.props) - ..context = ContextHelpers.unjsifyNewContext(jsThis.context); + /// The JS component factory used by this factory to build [ReactElement]s. + /// + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` + @override + @Deprecated('6.0.0') + final ReactJsComponentFactory reactComponentFactory; - jsThis.state = jsBackingMapOrJsCopy(component.initialState); + /// The cached Dart default props retrieved from [reactClass] that are passed + /// into [generateExtendedJsProps] upon [ReactElement] creation. + final Map defaultProps; - component.state = new JsBackedMap.backedBy(jsThis.state); + ReactDartComponentFactoryProxy(ReactClass reactClass) + : this.reactClass = reactClass, + this.reactComponentFactory = React.createFactory(reactClass), + this.defaultProps = reactClass.dartDefaultProps; - // ignore: invalid_use_of_protected_member - Component2Bridge.bridgeForComponent[component] = componentStatics.bridgeFactory(component); - return component; - }); + @override + ReactClass get type => reactClass; - static void handleComponentDidMount(Component2 component) => // dartfmt - componentZone.run(() { - component.componentDidMount(); - }); + @override + ReactElement build(Map props, [List childrenArgs = const []]) { + var children = _convertArgsToChildren(childrenArgs); + children = listifyChildren(children); - static bool handleShouldComponentUpdate(Component2 component, JsMap jsNextProps, JsMap jsNextState) => // dartfmt - componentZone.run(() { - final value = component.shouldComponentUpdate( - new JsBackedMap.backedBy(jsNextProps), - new JsBackedMap.backedBy(jsNextState), - ); + return React.createElement(type, generateExtendedJsProps(props, children, defaultProps: defaultProps), children); + } - if (!value) { - _updatePropsAndStateWithJs(component, jsNextProps, jsNextState); - } + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + static InteropProps generateExtendedJsProps(Map props, dynamic children, {Map defaultProps}) { + if (children == null) { + children = []; + } else if (children is! Iterable) { + children = [children]; + } - return value; - }); + // 1. Merge in defaults (if they were specified) + // 2. Add specified props and children. + // 3. Remove "reserved" props that should not be visible to the rendered component. - static JsMap handleGetDerivedStateFromProps( - ComponentStatics2 componentStatics, JsMap jsNextProps, JsMap jsPrevState) => // dartfmt - componentZone.run(() { - var derivedState = componentStatics.instanceForStaticMethods - .getDerivedStateFromProps(new JsBackedMap.backedBy(jsNextProps), new JsBackedMap.backedBy(jsPrevState)); - if (derivedState != null) { - return jsBackingMapOrJsCopy(derivedState); - } - return null; - }); + // [1] + Map extendedProps = (defaultProps != null ? new Map.from(defaultProps) : {}) + // [2] + ..addAll(props) + ..['children'] = children + // [3] + ..remove('key') + ..remove('ref'); - static dynamic handleGetSnapshotBeforeUpdate(Component2 component, JsMap jsPrevProps, JsMap jsPrevState) => // dartfmt - componentZone.run(() { - final snapshotValue = component.getSnapshotBeforeUpdate( - new JsBackedMap.backedBy(jsPrevProps), - new JsBackedMap.backedBy(jsPrevState), - ); + var internal = new ReactDartComponentInternal()..props = extendedProps; - return snapshotValue; - }); + var interopProps = new InteropProps(internal: internal); - static void handleComponentDidUpdate( - Component2 component, ReactComponent jsThis, JsMap jsPrevProps, JsMap jsPrevState, - [dynamic snapshot]) => // dartfmt - componentZone.run(() { - component.componentDidUpdate( - new JsBackedMap.backedBy(jsPrevProps), - new JsBackedMap.backedBy(jsPrevState), - snapshot, - ); - }); + // Don't pass a key into InteropProps if one isn't defined, so that the value will + // be `undefined` in the JS, which is ignored by React, whereas `null` isn't. + if (props.containsKey('key')) { + interopProps.key = props['key']; + } - static void handleComponentWillUnmount(Component2 component) => // dartfmt - componentZone.run(() { - component.componentWillUnmount(); - }); + if (props.containsKey('ref')) { + var ref = props['ref']; + + // If the ref is a callback, pass ReactJS a function that will call it + // with the Dart Component instance, not the ReactComponent instance. + if (ref is _CallbackRef) { + interopProps.ref = allowInterop((ReactComponent instance) => ref(instance?.dartComponent)); + } else if (ref is Ref) { + interopProps.ref = ref.jsRef; + } else { + interopProps.ref = ref; + } + } + + return interopProps; + } +} + +/// Creates ReactJS [Component2] instances for Dart components. +class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy + with JsBackedMapComponentFactoryMixin + implements ReactDartComponentFactoryProxy { + /// The ReactJS class used as the type for all [ReactElement]s built by + /// this factory. + @override + final ReactClass reactClass; + + /// The JS component factory used by this factory to build [ReactElement]s. + /// + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` + @override + @Deprecated('6.0.0') + final ReactJsComponentFactory reactComponentFactory; - static void handleComponentDidCatch(Component2 component, dynamic error, ReactErrorInfo info) => // dartfmt - componentZone.run(() { - // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. - // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. - try { - throwErrorFromJS(error); - } catch (e, stack) { - info.dartStackTrace = stack; - // The Dart stack track gets lost so we manually add it to the info object for reference. - component.componentDidCatch(e, info); - } - }); + @override + final Map defaultProps; - static JsMap handleGetDerivedStateFromError(ComponentStatics2 componentStatics, dynamic error) => // dartfmt - componentZone.run(() { - // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. - // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. - try { - throwErrorFromJS(error); - } catch (e) { - return jsBackingMapOrJsCopy(componentStatics.instanceForStaticMethods.getDerivedStateFromError(e)); - } - }); + ReactDartComponentFactoryProxy2(ReactClass reactClass) + : this.reactClass = reactClass, + this.reactComponentFactory = React.createFactory(reactClass), + this.defaultProps = JsBackedMap.fromJs(reactClass.defaultProps); - static dynamic handleRender(Component2 component, JsMap jsProps, JsMap jsState, dynamic jsContext) => // dartfmt - componentZone.run(() { - _updatePropsAndStateWithJs(component, jsProps, jsState); - _updateContextWithJs(component, jsContext); - return component.render(); - }); + @override + ReactClass get type => reactClass; - static final JsMap staticsForJs = jsifyAndAllowInterop({ - 'initComponent': initComponent, - 'handleComponentDidMount': handleComponentDidMount, - 'handleGetDerivedStateFromProps': handleGetDerivedStateFromProps, - 'handleShouldComponentUpdate': handleShouldComponentUpdate, - 'handleGetSnapshotBeforeUpdate': handleGetSnapshotBeforeUpdate, - 'handleComponentDidUpdate': handleComponentDidUpdate, - 'handleComponentWillUnmount': handleComponentWillUnmount, - 'handleComponentDidCatch': handleComponentDidCatch, - 'handleGetDerivedStateFromError': handleGetDerivedStateFromError, - 'handleRender': handleRender, - }); + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + static JsMap generateExtendedJsProps(Map props) => JsBackedMapComponentFactoryMixin.generateExtendedJsProps(props); } -/// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] -/// which produces a new JS `ReactClass`. -@Deprecated('6.0.0') -ReactDartComponentFactoryProxy _registerComponent( - ComponentFactory componentFactory, [ - Iterable skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'], -]) { - var componentInstance = componentFactory(); +/// Creates ReactJS [Function Component] from Dart Function. +class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy with JsBackedMapComponentFactoryMixin { + /// The name of this function. + final String displayName; - if (componentInstance is Component2) { - return _registerComponent2(componentFactory, skipMethods: skipMethods); - } + /// The React JS component definition of this Function Component. + final JsFunctionComponent reactFunction; - var componentStatics = new ComponentStatics(componentFactory); + ReactDartFunctionComponentFactoryProxy(DartFunctionComponent dartFunctionComponent, {String displayName}) + : this.displayName = displayName ?? _getJsFunctionName(dartFunctionComponent), + this.reactFunction = _wrapFunctionComponent(dartFunctionComponent, + displayName: displayName ?? _getJsFunctionName(dartFunctionComponent)); - var jsConfig = new JsComponentConfig( - childContextKeys: componentInstance.childContextKeys, - contextKeys: componentInstance.contextKeys, - ); + @override + JsFunctionComponent get type => reactFunction; - /// Create the JS `ReactClass`. - /// with custom JS lifecycle methods. - var reactComponentClass = createReactDartComponentClass(_dartInteropStatics, componentStatics, jsConfig) + static String _getJsFunctionName(Function object) => + getProperty(object, 'name') ?? getProperty(object, '\$static_name'); + + /// Creates a function component from the given [dartFunctionComponent] that can be used with React. + /// + /// [displayName] Sets the component name for debugging purposes. + /// + /// In DDC, this will be the [DartFunctionComponent] name, but in dart2js it will be null unless + /// overridden, since using runtimeType can lead to larger dart2js output. + /// + /// This will result in the dart2js name being `ReactDartComponent2` (the + /// name of the proxying JS component defined in _dart_helpers.js). + static JsFunctionComponent _wrapFunctionComponent(DartFunctionComponent dartFunctionComponent, {String displayName}) { + // dart2js uses null and undefined interchangeably, meaning returning `null` from dart + // may show up in js as `undefined`, ReactJS doesnt like that and expects a js `null` to be returned, + // and throws if it gets `undefined`. `jsNull` is an interop variable that holds a JS `null` value + // to force `null` as the return value if user returns a Dart `null`. + // See: https://github.com/dart-lang/sdk/issues/27485 + jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => + dartFunctionComponent(JsBackedMap.backedBy(jsProps)) ?? jsNull; + JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); + if (displayName != null) { + // This is a work-around to display the correct name in the React DevTools. + _defineProperty(interopFunction, 'name', jsify({'value': displayName})); + } // ignore: invalid_use_of_protected_member - ..dartComponentVersion = ReactDartComponentVersion.component - ..displayName = componentFactory().displayName; + setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); + return interopFunction; + } +} - // Cache default props and store them on the ReactClass so they can be used - // by ReactDartComponentFactoryProxy and externally. - final Map defaultProps = new Map.unmodifiable(componentInstance.getDefaultProps()); - reactComponentClass.dartDefaultProps = defaultProps; +/// Creates ReactJS [ReactElement] instances for DOM components. +class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { + /// The name of the proxied DOM component. + /// + /// E.g. `'div'`, `'a'`, `'h1'` + final String name; - return new ReactDartComponentFactoryProxy(reactComponentClass); -} + /// The JS component factory used by this factory to build [ReactElement]s. + /// + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` + @Deprecated('6.0.0') + final Function factory; -/// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] -/// which produces a new JS `ReactClass`. -ReactDartComponentFactoryProxy2 _registerComponent2( - ComponentFactory componentFactory, { - Iterable skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'], - Component2BridgeFactory bridgeFactory, -}) { - bridgeFactory ??= Component2BridgeImpl.bridgeFactory; + ReactDomComponentFactoryProxy(name) + : this.name = name, + this.factory = React.createFactory(name) { + // TODO: Should we remove this once we validate that the bug is gone in Dart 2 DDC? + if (ddc_emulated_function_name_bug.isBugPresent) { + ddc_emulated_function_name_bug.patchName(this); + } + } - final componentInstance = componentFactory(); - final componentStatics = new ComponentStatics2( - componentFactory: componentFactory, - instanceForStaticMethods: componentInstance, - bridgeFactory: bridgeFactory, - ); - final filteredSkipMethods = _filterSkipMethods(skipMethods); + @override + String get type => name; - // Cache default props and store them on the ReactClass so they can be used - // by ReactDartComponentFactoryProxy and externally. - final JsBackedMap defaultProps = new JsBackedMap.from(componentInstance.defaultProps); + @override + ReactElement build(Map props, [List childrenArgs = const []]) { + var children = _generateChildren(childrenArgs); + var convertedProps = _generateJsProps(props); + return React.createElement(type, convertedProps, children); + } - final JsMap jsPropTypes = - bridgeFactory(componentInstance).jsifyPropTypes(componentInstance, componentInstance.propTypes); + /// Performs special handling of certain props for consumption by ReactJS DOM components. + static void convertProps(Map props) { + _convertEventHandlers(props); + _convertRefValue(props); + } +} - var jsConfig2 = new JsComponentConfig2( - defaultProps: defaultProps.jsObject, - contextType: componentInstance.contextType?.jsThis, - skipMethods: filteredSkipMethods, - propTypes: jsPropTypes, - ); +/// Creates ReactJS [ReactElement] instances for components defined in the JS. +class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { + /// The JS class used by this factory. + @override + final ReactClass type; - /// Create the JS `ReactClass` component class - /// with custom JS lifecycle methods. - var reactComponentClass = - createReactDartComponentClass2(_ReactDartInteropStatics2.staticsForJs, componentStatics, jsConfig2) - ..displayName = componentInstance.displayName; - // ignore: invalid_use_of_protected_member - reactComponentClass.dartComponentVersion = ReactDartComponentVersion.component2; + /// The JS component factory used by this factory to build [ReactElement]s. + /// + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` + @Deprecated('6.0.0') + final Function factory; - return new ReactDartComponentFactoryProxy2(reactComponentClass); -} + /// Whether to automatically prepare props relating to bound values and event handlers + /// via [ReactDomComponentFactoryProxy.convertProps] for consumption by React JS DOM components. + /// + /// Useful when the JS component forwards DOM props to its rendered DOM components. + /// + /// Disable for more custom handling of these props. + final bool shouldConvertDomProps; -/// Creates and returns a new `ReactDartFunctionComponentFactoryProxy` from the provided [dartFunctionComponent] -/// which produces a new `JsFunctionComponent`. -ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, - {String displayName}) => - ReactDartFunctionComponentFactoryProxy(dartFunctionComponent, displayName: displayName); + /// Whether the props.children should always be treated as a list or not. + /// Default: `false` + final bool alwaysReturnChildrenAsList; + + ReactJsComponentFactoryProxy(ReactClass jsClass, + {this.shouldConvertDomProps: true, this.alwaysReturnChildrenAsList: false}) + : this.type = jsClass, + this.factory = React.createFactory(jsClass) { + if (jsClass == null) { + throw new ArgumentError('`jsClass` must not be null. ' + 'Ensure that the JS component class you\'re referencing is available and being accessed correctly.'); + } + } + + @override + ReactElement build(Map props, [List childrenArgs]) { + dynamic children = _generateChildren(childrenArgs, shouldAlwaysBeList: alwaysReturnChildrenAsList); + JsMap convertedProps = _generateJsProps(props, + convertEventHandlers: shouldConvertDomProps || props['ref'] != null, convertCallbackRefValue: false); + return React.createElement(type, convertedProps, children); + } +} -/// A mapping from converted/wrapped JS handler functions (the result of [_convertEventHandlers]) -/// to the original Dart functions (the input of [_convertEventHandlers]). -final Expando _originalEventHandlers = new Expando(); +class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { + /// The JS class used by this factory. + @override + final ReactClass type; + final bool isConsumer; + final bool isProvider; -/// Returns the props for a [ReactElement] or composite [ReactComponent] [instance], -/// shallow-converted to a Dart Map for convenience. -/// -/// If `style` is specified in props, then it too is shallow-converted and included -/// in the returned Map. -/// -/// Any JS event handlers included in the props for the given [instance] will be -/// unconverted such that the original JS handlers are returned instead of their -/// Dart synthetic counterparts. -Map unconvertJsProps(/* ReactElement|ReactComponent */ instance) { - var props = Map.from(JsBackedMap.backedBy(instance.props)); + /// The JS component factory used by this factory to build [ReactElement]s. + /// + /// Deprecated: Use [React.createElement()] instead and pass in [type] as + /// the first argument, followed by `props` and `children`. + /// + /// Before: + /// ``` + /// YourFactoryProxy.reactComponentFactory(props, children); + /// ``` + /// + /// After: + /// ``` + /// React.createElement(YourFactoryProxy.type, props, children); + /// ``` + @override + @Deprecated('6.0.0') + final Function factory; + @override + final bool shouldConvertDomProps; - // Catch if a Dart component has been passed in. Component (version 1) can be identified by having the "internal" - // prop. Component2, however, does not have that but can be detected by checking whether or not the style prop is a - // Map. Because non-Dart components will have a JS Object, it can be assumed that if the style prop is a Map then - // it is a Dart Component. - if (props['internal'] is ReactDartComponentInternal || (props['style'] != null && props['style'] is Map)) { - throw new ArgumentError('A Dart Component cannot be passed into unconvertJsProps.'); - } + ReactJsContextComponentFactoryProxy( + ReactClass jsClass, { + this.shouldConvertDomProps = true, + this.isConsumer = false, + this.isProvider = false, + }) : this.type = jsClass, + this.factory = React.createFactory(jsClass), + super(jsClass, shouldConvertDomProps: shouldConvertDomProps); - eventPropKeyToEventFactory.keys.forEach((key) { - if (props.containsKey(key)) { - props[key] = unconvertJsEventHandler(props[key]) ?? props[key]; + @override + ReactElement build(Map props, [List childrenArgs]) { + dynamic children = _generateChildren(childrenArgs); + + if (isConsumer) { + if (children is Function) { + Function contextCallback = children; + children = allowInterop((args) { + return contextCallback(ContextHelpers.unjsifyNewContext(args)); + }); + } } - }); - // Convert the nested style map so it can be read by Dart code. - var style = props['style']; - if (style != null) { - props['style'] = Map.from(JsBackedMap.backedBy(style)); + return React.createElement(type, generateExtendedJsProps(props), children); } - return props; -} + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + JsMap generateExtendedJsProps(Map props) { + JsBackedMap propsForJs = JsBackedMap.from(props); -/// Returns the original Dart handler function that, within [_convertEventHandlers], -/// was converted/wrapped into the function [jsConvertedEventHandler] to be passed to the JS. -/// -/// Returns `null` if [jsConvertedEventHandler] is `null`. -/// -/// Returns `null` if [jsConvertedEventHandler] does not represent such a function -/// -/// Useful for chaining event handlers on DOM or JS composite [ReactElement]s. -Function unconvertJsEventHandler(Function jsConvertedEventHandler) { - if (jsConvertedEventHandler == null) return null; + if (isProvider) { + propsForJs['value'] = ContextHelpers.jsifyNewContext(propsForJs['value']); + } - return _originalEventHandlers[jsConvertedEventHandler]; + return propsForJs.jsObject; + } } -/// Convert packed event handler into wrapper and pass it only the Dart [SyntheticEvent] object converted from the -/// [events.SyntheticEvent] event. -_convertEventHandlers(Map args) { - args.forEach((propKey, value) { - var eventFactory = eventPropKeyToEventFactory[propKey]; - if (eventFactory != null && value != null) { - // Apply allowInterop here so that the function we store in [_originalEventHandlers] - // is the same one we'll retrieve from the JS props. - var reactDartConvertedEventHandler = allowInterop((events.SyntheticEvent e, [_, __]) { - value(eventFactory(e)); - }); +abstract class _ReactDartInteropStatics2 { + // TODO 3.1.0-wip expose for testing? + /// The zone in which all component lifecycle methods are run. + static final componentZone = Zone.root; - args[propKey] = reactDartConvertedEventHandler; - _originalEventHandlers[reactDartConvertedEventHandler] = value; - } + static final JsMap staticsForJs = jsifyAndAllowInterop({ + 'initComponent': initComponent, + 'handleComponentDidMount': handleComponentDidMount, + 'handleGetDerivedStateFromProps': handleGetDerivedStateFromProps, + 'handleShouldComponentUpdate': handleShouldComponentUpdate, + 'handleGetSnapshotBeforeUpdate': handleGetSnapshotBeforeUpdate, + 'handleComponentDidUpdate': handleComponentDidUpdate, + 'handleComponentWillUnmount': handleComponentWillUnmount, + 'handleComponentDidCatch': handleComponentDidCatch, + 'handleGetDerivedStateFromError': handleGetDerivedStateFromError, + 'handleRender': handleRender, }); -} - -/// Wrapper for [SyntheticEvent]. -SyntheticEvent syntheticEventFactory(events.SyntheticEvent e) { - return new SyntheticEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), - () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); -} -/// Wrapper for [SyntheticClipboardEvent]. -SyntheticClipboardEvent syntheticClipboardEventFactory(events.SyntheticClipboardEvent e) { - return new SyntheticClipboardEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.clipboardData); -} + static void handleComponentDidCatch(Component2 component, dynamic error, ReactErrorInfo info) => // dartfmt + componentZone.run(() { + // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. + // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. + try { + throwErrorFromJS(error); + } catch (e, stack) { + info.dartStackTrace = stack; + // The Dart stack track gets lost so we manually add it to the info object for reference. + component.componentDidCatch(e, info); + } + }); -/// Wrapper for [SyntheticKeyboardEvent]. -SyntheticKeyboardEvent syntheticKeyboardEventFactory(events.SyntheticKeyboardEvent e) { - return new SyntheticKeyboardEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.altKey, - e.char, - e.charCode, - e.ctrlKey, - e.locale, - e.location, - e.key, - e.keyCode, - e.metaKey, - e.repeat, - e.shiftKey); -} + static void handleComponentDidMount(Component2 component) => // dartfmt + componentZone.run(() { + component.componentDidMount(); + }); -/// Wrapper for [SyntheticFocusEvent]. -SyntheticFocusEvent syntheticFocusEventFactory(events.SyntheticFocusEvent e) { - return new SyntheticFocusEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.relatedTarget); -} + static void handleComponentDidUpdate( + Component2 component, ReactComponent jsThis, JsMap jsPrevProps, JsMap jsPrevState, + [dynamic snapshot]) => // dartfmt + componentZone.run(() { + component.componentDidUpdate( + new JsBackedMap.backedBy(jsPrevProps), + new JsBackedMap.backedBy(jsPrevState), + snapshot, + ); + }); -/// Wrapper for [SyntheticFormEvent]. -SyntheticFormEvent syntheticFormEventFactory(events.SyntheticFormEvent e) { - return new SyntheticFormEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), - () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); -} + static void handleComponentWillUnmount(Component2 component) => // dartfmt + componentZone.run(() { + component.componentWillUnmount(); + }); -/// Wrapper for [SyntheticDataTransfer]. -SyntheticDataTransfer syntheticDataTransferFactory(events.SyntheticDataTransfer dt) { - if (dt == null) return null; - List files = []; - if (dt.files != null) { - for (int i = 0; i < dt.files.length; i++) { - files.add(dt.files[i]); - } - } - List types = []; - if (dt.types != null) { - for (int i = 0; i < dt.types.length; i++) { - types.add(dt.types[i]); - } - } - var effectAllowed; - var dropEffect; + static JsMap handleGetDerivedStateFromError(ComponentStatics2 componentStatics, dynamic error) => // dartfmt + componentZone.run(() { + // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. + // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. + try { + throwErrorFromJS(error); + } catch (e) { + return jsBackingMapOrJsCopy(componentStatics.instanceForStaticMethods.getDerivedStateFromError(e)); + } + }); - try { - // Works around a bug in IE where dragging from outside the browser fails. - // Trying to access this property throws the error "Unexpected call to method or property access.". - effectAllowed = dt.effectAllowed; - } catch (exception) { - effectAllowed = 'uninitialized'; - } + static JsMap handleGetDerivedStateFromProps( + ComponentStatics2 componentStatics, JsMap jsNextProps, JsMap jsPrevState) => // dartfmt + componentZone.run(() { + var derivedState = componentStatics.instanceForStaticMethods + .getDerivedStateFromProps(new JsBackedMap.backedBy(jsNextProps), new JsBackedMap.backedBy(jsPrevState)); + if (derivedState != null) { + return jsBackingMapOrJsCopy(derivedState); + } + return null; + }); - try { - // For certain types of drag events in IE (anything but ondragenter, ondragover, and ondrop), this fails. - // Trying to access this property throws the error "Unexpected call to method or property access.". - dropEffect = dt.dropEffect; - } catch (exception) { - dropEffect = 'none'; - } + static dynamic handleGetSnapshotBeforeUpdate(Component2 component, JsMap jsPrevProps, JsMap jsPrevState) => // dartfmt + componentZone.run(() { + final snapshotValue = component.getSnapshotBeforeUpdate( + new JsBackedMap.backedBy(jsPrevProps), + new JsBackedMap.backedBy(jsPrevState), + ); - return new SyntheticDataTransfer(dropEffect, effectAllowed, files, types); -} + return snapshotValue; + }); -/// Wrapper for [SyntheticPointerEvent]. -SyntheticPointerEvent syntheticPointerEventFactory(events.SyntheticPointerEvent e) { - return new SyntheticPointerEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.pointerId, - e.width, - e.height, - e.pressure, - e.tangentialPressure, - e.tiltX, - e.tiltY, - e.twist, - e.pointerType, - e.isPrimary, - ); -} + static dynamic handleRender(Component2 component, JsMap jsProps, JsMap jsState, dynamic jsContext) => // dartfmt + componentZone.run(() { + _updatePropsAndStateWithJs(component, jsProps, jsState); + _updateContextWithJs(component, jsContext); + return component.render(); + }); -/// Wrapper for [SyntheticMouseEvent]. -SyntheticMouseEvent syntheticMouseEventFactory(events.SyntheticMouseEvent e) { - SyntheticDataTransfer dt = syntheticDataTransferFactory(e.dataTransfer); - return new SyntheticMouseEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.altKey, - e.button, - e.buttons, - e.clientX, - e.clientY, - e.ctrlKey, - dt, - e.metaKey, - e.pageX, - e.pageY, - e.relatedTarget, - e.screenX, - e.screenY, - e.shiftKey, - ); -} + static bool handleShouldComponentUpdate(Component2 component, JsMap jsNextProps, JsMap jsNextState) => // dartfmt + componentZone.run(() { + final value = component.shouldComponentUpdate( + new JsBackedMap.backedBy(jsNextProps), + new JsBackedMap.backedBy(jsNextState), + ); -/// Wrapper for [SyntheticTouchEvent]. -SyntheticTouchEvent syntheticTouchEventFactory(events.SyntheticTouchEvent e) { - return new SyntheticTouchEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.altKey, - e.changedTouches, - e.ctrlKey, - e.metaKey, - e.shiftKey, - e.targetTouches, - e.touches, - ); -} + if (!value) { + _updatePropsAndStateWithJs(component, jsNextProps, jsNextState); + } -/// Wrapper for [SyntheticTransitionEvent]. -SyntheticTransitionEvent syntheticTransitionEventFactory(events.SyntheticTransitionEvent e) { - return new SyntheticTransitionEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.propertyName, - e.elapsedTime, - e.pseudoElement, - ); -} + return value; + }); -/// Wrapper for [SyntheticAnimationEvent]. -SyntheticAnimationEvent syntheticAnimationEventFactory(events.SyntheticAnimationEvent e) { - return new SyntheticAnimationEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.animationName, - e.elapsedTime, - e.pseudoElement, - ); -} + static Component2 initComponent(ReactComponent jsThis, ComponentStatics2 componentStatics) => // dartfmt + componentZone.run(() { + final component = componentStatics.componentFactory(); + // Return the component so that the JS proxying component can store it, + // avoiding an interceptor lookup. -/// Wrapper for [SyntheticUIEvent]. -SyntheticUIEvent syntheticUIEventFactory(events.SyntheticUIEvent e) { - return new SyntheticUIEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.detail, - e.view, - ); -} + component + ..jsThis = jsThis + ..props = new JsBackedMap.backedBy(jsThis.props) + ..context = ContextHelpers.unjsifyNewContext(jsThis.context); -/// Wrapper for [SyntheticWheelEvent]. -SyntheticWheelEvent syntheticWheelEventFactory(events.SyntheticWheelEvent e) { - return new SyntheticWheelEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.deltaX, - e.deltaMode, - e.deltaY, - e.deltaZ, - ); -} + jsThis.state = jsBackingMapOrJsCopy(component.initialState); -dynamic _findDomNode(component) { - return ReactDom.findDOMNode(component is Component ? component.jsThis : component); -} + component.state = new JsBackedMap.backedBy(jsThis.state); -void setClientConfiguration() { - try { - // Attempt to invoke JS interop methods, which will throw if the - // corresponding JS functions are not available. - React.isValidElement(null); - ReactDom.findDOMNode(null); - createReactDartComponentClass(null, null, null); - } on NoSuchMethodError catch (_) { - throw new Exception('react.js and react_dom.js must be loaded.'); - } catch (_) { - throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); + // ignore: invalid_use_of_protected_member + Component2Bridge.bridgeForComponent[component] = componentStatics.bridgeFactory(component); + return component; + }); + + static void _updateContextWithJs(Component2 component, dynamic jsContext) { + component.context = ContextHelpers.unjsifyNewContext(jsContext); } - setReactConfiguration(_reactDom, _registerComponent, - customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); - setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); - // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. - if (context['ReactDOMServer'] != null) { - setReactDOMServerConfiguration(ReactDomServer.renderToString, ReactDomServer.renderToStaticMarkup); + static void _updatePropsAndStateWithJs(Component2 component, JsMap props, JsMap state) { + component + ..props = new JsBackedMap.backedBy(props) + ..state = new JsBackedMap.backedBy(state); } } diff --git a/lib/react_client/react_interop.dart b/lib/react_client/react_interop.dart index bb0de841..bbc00da9 100644 --- a/lib/react_client/react_interop.dart +++ b/lib/react_client/react_interop.dart @@ -2,6 +2,9 @@ /// JS interop classes for main React JS APIs and react-dart internals. /// /// For use in `react_client.dart` and by advanced react-dart users. + +// ignore_for_file: deprecated_member_use_from_same_package + @JS() library react_client.react_interop; @@ -155,7 +158,7 @@ abstract class PropTypes { // Types and data structures // ---------------------------------------------------------------------------- -/// A React class specification returned by [React.createClass]. +/// A React class specification returned by `React.createClass`. /// /// To be used as the value of [ReactElement.type], which is set upon initialization /// by a component factory or by [React.createElement]. diff --git a/test/factory/common_factory_tests.dart b/test/factory/common_factory_tests.dart index c7557325..69e0eac1 100644 --- a/test/factory/common_factory_tests.dart +++ b/test/factory/common_factory_tests.dart @@ -218,6 +218,7 @@ void refTests(ReactComponentFactoryProxy factory, {void verifyRefValue(dynamic r test('string refs are created with the correct value', () { ReactComponent renderedInstance = _renderWithStringRefSupportingOwner(() => factory({'ref': 'test'})); + // ignore: deprecated_member_use_from_same_package verifyRefValue(renderedInstance.dartComponent.ref('test')); }); diff --git a/test/js_interop_helpers_test/shared_tests.dart b/test/js_interop_helpers_test/shared_tests.dart index 0f6586b4..17720f60 100644 --- a/test/js_interop_helpers_test/shared_tests.dart +++ b/test/js_interop_helpers_test/shared_tests.dart @@ -3,7 +3,7 @@ library js_function_test; import 'dart:html'; -import 'dart:js_util'; +import 'dart:js_util' as js_util; import 'package:js/js.dart'; import 'package:react/react_client/react_interop.dart'; @@ -21,7 +21,7 @@ void sharedJsFunctionTests() { group('JS functions:', () { group('markChildValidated', () { test('is function that does not throw when called', () { - expect(() => markChildValidated(newObject()), returnsNormally); + expect(() => markChildValidated(js_util.newObject()), returnsNormally); }); }); From 0a453d87ef6bfc904e6226ea4657ccecc71b40d5 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 15:50:11 -0700 Subject: [PATCH 39/50] re-sync with 5.2.0-wip --- lib/react_client.dart | 2151 ++++++++++++++++++++--------------------- 1 file changed, 1072 insertions(+), 1079 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 97e4794e..2cac6957 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -13,741 +13,678 @@ import 'dart:js'; import 'dart:js_util'; import "package:js/js.dart"; + import "package:react/react.dart"; -import 'package:react/react_client/bridge.dart'; -import 'package:react/react_client/js_backed_map.dart'; import 'package:react/react_client/js_interop_helpers.dart'; import 'package:react/react_client/react_interop.dart'; import "package:react/react_dom.dart"; import 'package:react/react_dom_server.dart'; +import 'package:react/react_client/bridge.dart'; import 'package:react/src/context.dart'; -import 'package:react/src/ddc_emulated_function_name_bug.dart' as ddc_emulated_function_name_bug; import "package:react/src/react_client/event_prop_key_to_event_factory.dart"; +import 'package:react/react_client/js_backed_map.dart'; import "package:react/src/react_client/synthetic_event_wrappers.dart" as events; import 'package:react/src/typedefs.dart'; +import 'package:react/src/ddc_emulated_function_name_bug.dart' as ddc_emulated_function_name_bug; -export 'package:react/react.dart' show ReactComponentFactoryProxy, ComponentFactory; export 'package:react/react_client/react_interop.dart' show ReactElement, ReactJsComponentFactory, inReactDevMode, Ref; +export 'package:react/react.dart' show ReactComponentFactoryProxy, ComponentFactory; -/// The static methods that proxy JS component lifecycle methods to Dart components. -@Deprecated('6.0.0') -final ReactDartInteropStatics _dartInteropStatics = (() { - var zone = Zone.current; - - /// Wrapper for [Component.getInitialState]. - Component initComponent(ReactComponent jsThis, ReactDartComponentInternal internal, InteropContextValue context, - ComponentStatics componentStatics) => - zone.run(() { - void jsRedraw() { - jsThis.setState(newObject()); - } - - RefMethod getRef = (name) { - var ref = getProperty(jsThis.refs, name); - if (ref == null) return null; - if (ref is Element) return ref; +/// The type of `Component.ref` specified as a callback. +/// +/// See: +typedef _CallbackRef(T componentOrDomNode); - return (ref as ReactComponent).dartComponent ?? ref; - }; +/// The ReactJS function signature. +/// +/// - [props] will always be supplied as the first argument +/// - [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary +/// to match Dart's generated call signature based on the number of args React provides. +typedef JsFunctionComponent = dynamic Function(JsMap props, [JsMap legacyContext]); - Component component = componentStatics.componentFactory() - ..initComponentInternal(internal.props, jsRedraw, getRef, jsThis, _unjsifyContext(context)) - ..initStateInternal(); +/// Prepares [children] to be passed to the ReactJS [React.createElement] and +/// the Dart [react.Component]. +/// +/// Currently only involves converting a top-level non-[List] [Iterable] to +/// a non-growable [List], but this may be updated in the future to support +/// advanced nesting and other kinds of children. +dynamic listifyChildren(dynamic children) { + if (React.isValidElement(children)) { + // Short-circuit if we're dealing with a ReactElement to avoid the dart2js + // interceptor lookup involved in Dart type-checking. + return children; + } else if (children is Iterable && children is! List) { + return children.toList(growable: false); + } else { + return children; + } +} - // Return the component so that the JS proxying component can store it, - // avoiding an interceptor lookup. - return component; - }); +/// Use [ReactDartComponentFactoryProxy2] instead. +/// +/// Will be removed when [Component] is removed in the `6.0.0` release. +@Deprecated('6.0.0') +class ReactDartComponentFactoryProxy extends ReactComponentFactoryProxy { + /// The ReactJS class used as the type for all [ReactElement]s built by + /// this factory. + final ReactClass reactClass; - InteropContextValue handleGetChildContext(Component component) => zone.run(() { - return _jsifyContext(component.getChildContext()); - }); + /// The JS component factory used by this factory to build [ReactElement]s. + final ReactJsComponentFactory reactComponentFactory; - /// Wrapper for [Component.componentWillMount]. - void handleComponentWillMount(Component component) => zone.run(() { - component - ..componentWillMount() - ..transferComponentState(); - }); + /// The cached Dart default props retrieved from [reactClass] that are passed + /// into [generateExtendedJsProps] upon [ReactElement] creation. + final Map defaultProps; - /// Wrapper for [Component.componentDidMount]. - void handleComponentDidMount(Component component) => zone.run(() { - component.componentDidMount(); - }); + ReactDartComponentFactoryProxy(ReactClass reactClass) + : this.reactClass = reactClass, + this.reactComponentFactory = React.createFactory(reactClass), + this.defaultProps = reactClass.dartDefaultProps; - Map _getNextProps(Component component, ReactDartComponentInternal nextInternal) { - var newProps = nextInternal.props; - return newProps != null ? new Map.from(newProps) : {}; - } + ReactClass get type => reactClass; - /// 1. Update [Component.props] using the value stored to [Component.nextProps] - /// in `componentWillReceiveProps`. - /// 2. Update [Component.context] using the value stored to [Component.nextContext] - /// in `componentWillReceivePropsWithContext`. - /// 3. Update [Component.state] by calling [Component.transferComponentState] - void _afterPropsChange(Component component, InteropContextValue nextContext) { - component - ..props = component.nextProps // [1] - ..context = component.nextContext // [2] - ..transferComponentState(); // [3] - } + ReactElement build(Map props, [List childrenArgs = const []]) { + var children = _convertArgsToChildren(childrenArgs); + children = listifyChildren(children); - void _clearPrevState(Component component) { - component.prevState = null; + return reactComponentFactory(generateExtendedJsProps(props, children, defaultProps: defaultProps), children); } - void _callSetStateCallbacks(Component component) { - var callbacks = component.setStateCallbacks.toList(); - // Prevent concurrent modification during iteration - component.setStateCallbacks.clear(); - callbacks.forEach((callback) { - callback(); - }); - } + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + static InteropProps generateExtendedJsProps(Map props, dynamic children, {Map defaultProps}) { + if (children == null) { + children = []; + } else if (children is! Iterable) { + children = [children]; + } - void _callSetStateTransactionalCallbacks(Component component) { - var nextState = component.nextState; - var props = new UnmodifiableMapView(component.props); + // 1. Merge in defaults (if they were specified) + // 2. Add specified props and children. + // 3. Remove "reserved" props that should not be visible to the rendered component. - component.transactionalSetStateCallbacks.forEach((callback) { - nextState.addAll(callback(nextState, props)); - }); - component.transactionalSetStateCallbacks.clear(); - } + // [1] + Map extendedProps = (defaultProps != null ? new Map.from(defaultProps) : {}) + // [2] + ..addAll(props) + ..['children'] = children + // [3] + ..remove('key') + ..remove('ref'); - /// Wrapper for [Component.componentWillReceiveProps]. - void handleComponentWillReceiveProps( - Component component, ReactDartComponentInternal nextInternal, InteropContextValue nextContext) => - zone.run(() { - var nextProps = _getNextProps(component, nextInternal); - var newContext = _unjsifyContext(nextContext); + var internal = new ReactDartComponentInternal()..props = extendedProps; - component - ..nextProps = nextProps - ..nextContext = newContext - ..componentWillReceiveProps(nextProps) - ..componentWillReceivePropsWithContext(nextProps, newContext); - }); + var interopProps = new InteropProps(internal: internal); - /// Wrapper for [Component.shouldComponentUpdate]. - bool handleShouldComponentUpdate(Component component, InteropContextValue nextContext) => zone.run(() { - _callSetStateTransactionalCallbacks(component); + // Don't pass a key into InteropProps if one isn't defined, so that the value will + // be `undefined` in the JS, which is ignored by React, whereas `null` isn't. + if (props.containsKey('key')) { + interopProps.key = props['key']; + } - // If shouldComponentUpdateWithContext returns a valid bool (default implementation returns null), - // then don't bother calling `shouldComponentUpdate` and have it trump. - bool shouldUpdate = - component.shouldComponentUpdateWithContext(component.nextProps, component.nextState, component.nextContext); + if (props.containsKey('ref')) { + var ref = props['ref']; - if (shouldUpdate == null) { - shouldUpdate = component.shouldComponentUpdate(component.nextProps, component.nextState); - } + // If the ref is a callback, pass ReactJS a function that will call it + // with the Dart Component instance, not the ReactComponent instance. + if (ref is _CallbackRef) { + interopProps.ref = allowInterop((ReactComponent instance) => ref(instance?.dartComponent)); + } else if (ref is Ref) { + interopProps.ref = ref.jsRef; + } else { + interopProps.ref = ref; + } + } - if (shouldUpdate) { - return true; - } else { - // If component should not update, update props / transfer state because componentWillUpdate will not be called. - _afterPropsChange(component, nextContext); - _callSetStateCallbacks(component); - // Clear out prevState after it's done being used so it's not retained - _clearPrevState(component); - return false; - } - }); + return interopProps; + } +} - /// Wrapper for [Component.componentWillUpdate]. - void handleComponentWillUpdate(Component component, InteropContextValue nextContext) => zone.run(() { - /// Call `componentWillUpdate` and the context variant - component - ..componentWillUpdate(component.nextProps, component.nextState) - ..componentWillUpdateWithContext(component.nextProps, component.nextState, component.nextContext); - _afterPropsChange(component, nextContext); - }); +/// Creates and returns a new `ReactDartFunctionComponentFactoryProxy` from the provided [dartFunctionComponent] +/// which produces a new `JsFunctionComponent`. +ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, + {String displayName}) => + ReactDartFunctionComponentFactoryProxy(dartFunctionComponent, displayName: displayName); - /// Wrapper for [Component.componentDidUpdate]. - /// - /// Uses [prevState] which was transferred from [Component.nextState] in [componentWillUpdate]. - void handleComponentDidUpdate(Component component, ReactDartComponentInternal prevInternal) => zone.run(() { - var prevInternalProps = prevInternal.props; +@Deprecated('6.0.0') +Map _unjsifyContext(InteropContextValue interopContext) { + // TODO consider using `contextKeys` for this if perf of objectKeys is bad. + return new Map.fromIterable(_objectKeys(interopContext), value: (key) { + // ignore: argument_type_not_assignable + ReactDartContextInternal internal = getProperty(interopContext, key); + return internal?.value; + }); +} - /// Call `componentDidUpdate` and the context variant - component.componentDidUpdate(prevInternalProps, component.prevState); +/// Shared component factory proxy [build] method for components that utilize [JsBackedMap]s. +mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { + @override + ReactElement build(Map props, [List childrenArgs = const []]) { + var children = _generateChildren(childrenArgs, shouldAlwaysBeList: true); + var convertedProps = generateExtendedJsProps(props); + return React.createElement(type, convertedProps, children); + } - _callSetStateCallbacks(component); - // Clear out prevState after it's done being used so it's not retained - _clearPrevState(component); - }); + static JsMap generateExtendedJsProps(Map props) => + _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); +} - /// Wrapper for [Component.componentWillUnmount]. - void handleComponentWillUnmount(Component component) => zone.run(() { - component.componentWillUnmount(); - // Clear these callbacks in case they retain anything; - // they definitely won't be called after this point. - component.setStateCallbacks.clear(); - component.transactionalSetStateCallbacks.clear(); - }); - /// Wrapper for [Component.render]. - dynamic handleRender(Component component) => zone.run(() { - return component.render(); - }); +/// Converts a list of variadic children arguments to children that should be passed to ReactJS. +/// +/// Returns: +/// +/// - `null` if there are no args and [shouldAlwaysBeList] is false +/// - `[]` if there are no args and [shouldAlwaysBeList] is true +/// - the single child if only one was specified +/// - otherwise, the same list of args, will all top-level children validated +dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) { + var children; + if (childrenArgs.isEmpty) { + if (!shouldAlwaysBeList) return null; + children = childrenArgs; + } else if (childrenArgs.length == 1) { + if (shouldAlwaysBeList) { + final singleChild = listifyChildren(childrenArgs.single); + if (singleChild is List) { + children = singleChild; + } + } else { + children = childrenArgs.single; + } + } - return new ReactDartInteropStatics( - initComponent: allowInterop(initComponent), - handleGetChildContext: allowInterop(handleGetChildContext), - handleComponentWillMount: allowInterop(handleComponentWillMount), - handleComponentDidMount: allowInterop(handleComponentDidMount), - handleComponentWillReceiveProps: allowInterop(handleComponentWillReceiveProps), - handleShouldComponentUpdate: allowInterop(handleShouldComponentUpdate), - handleComponentWillUpdate: allowInterop(handleComponentWillUpdate), - handleComponentDidUpdate: allowInterop(handleComponentDidUpdate), - handleComponentWillUnmount: allowInterop(handleComponentWillUnmount), - handleRender: allowInterop(handleRender)); -})(); + if (children == null) { + children = shouldAlwaysBeList ? childrenArgs.map(listifyChildren).toList() : childrenArgs; + markChildrenValidated(children); + } -/// A mapping from converted/wrapped JS handler functions (the result of [_convertEventHandlers]) -/// to the original Dart functions (the input of [_convertEventHandlers]). -final Expando _originalEventHandlers = new Expando(); + return children; +} -/// Prepares [children] to be passed to the ReactJS [React.createElement] and -/// the Dart [react.Component]. -/// -/// Currently only involves converting a top-level non-[List] [Iterable] to -/// a non-growable [List], but this may be updated in the future to support -/// advanced nesting and other kinds of children. -dynamic listifyChildren(dynamic children) { - if (React.isValidElement(children)) { - // Short-circuit if we're dealing with a ReactElement to avoid the dart2js - // interceptor lookup involved in Dart type-checking. - return children; - } else if (children is Iterable && children is! List) { - return children.toList(growable: false); - } else { - return children; +/// Converts [props] into a [JsMap] that can be utilized with [React.createElement()]. +JsMap _generateJsProps(Map props, + {bool convertEventHandlers = true, + bool convertRefValue = true, + bool convertCallbackRefValue = true, + bool wrapWithJsify = true}) { + final propsForJs = JsBackedMap.from(props); + + if (convertEventHandlers) _convertEventHandlers(propsForJs); + if (convertRefValue) _convertRefValue2(propsForJs, convertCallbackRefValue: convertCallbackRefValue); + + return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; +} + + +void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { + var ref = args['ref']; + + if (ref is Ref) { + args['ref'] = ref.jsRef; + } else if (ref is _CallbackRef && convertCallbackRefValue) { + args['ref'] = allowInterop((dynamic instance) { + if (instance is ReactComponent && instance.dartComponent != null) return ref(instance.dartComponent); + return ref(instance); + }); } } -void setClientConfiguration() { - try { - // Attempt to invoke JS interop methods, which will throw if the - // corresponding JS functions are not available. - React.isValidElement(null); - ReactDom.findDOMNode(null); - createReactDartComponentClass(null, null, null); - } on NoSuchMethodError catch (_) { - throw new Exception('react.js and react_dom.js must be loaded.'); - } catch (_) { - throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); +/// Creates ReactJS [Component2] instances for Dart components. +class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy + implements ReactDartComponentFactoryProxy { + /// The ReactJS class used as the type for all [ReactElement]s built by + /// this factory. + final ReactClass reactClass; + + /// The JS component factory used by this factory to build [ReactElement]s. + final ReactJsComponentFactory reactComponentFactory; + + final Map defaultProps; + + ReactDartComponentFactoryProxy2(ReactClass reactClass) + : this.reactClass = reactClass, + this.reactComponentFactory = React.createFactory(reactClass), + this.defaultProps = new JsBackedMap.fromJs(reactClass.defaultProps); + + ReactClass get type => reactClass; + + ReactElement build(Map props, [List childrenArgs = const []]) { + // TODO 3.1.0-wip if we don't pass in a list into React, we don't get a list back in Dart... + + List children; + if (childrenArgs.isEmpty) { + children = childrenArgs; + } else if (childrenArgs.length == 1) { + final singleChild = listifyChildren(childrenArgs[0]); + if (singleChild is List) { + children = singleChild; + } + } + + if (children == null) { + // FIXME 3.1.0-wip are we cool to modify this list? + // FIXME 3.1.0-wip why are there unmodifiable lists here? + children = childrenArgs.map(listifyChildren).toList(); + markChildrenValidated(children); + } + + return reactComponentFactory( + generateExtendedJsProps(props), + children, + ); } - setReactConfiguration(_reactDom, _registerComponent, - customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); - setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); - // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. - if (context['ReactDOMServer'] != null) { - setReactDOMServerConfiguration(ReactDomServer.renderToString, ReactDomServer.renderToStaticMarkup); + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + static JsMap generateExtendedJsProps(Map props) { + final propsForJs = new JsBackedMap.from(props); + + final ref = propsForJs['ref']; + if (ref != null) { + // If the ref is a callback, pass ReactJS a function that will call it + // with the Dart Component instance, not the ReactComponent instance. + if (ref is _CallbackRef) { + propsForJs['ref'] = allowInterop((ReactComponent instance) => ref(instance?.dartComponent)); + } + + if (ref is Ref) { + propsForJs['ref'] = ref.jsRef; + } + } + + return propsForJs.jsObject; } } -/// Wrapper for [SyntheticAnimationEvent]. -SyntheticAnimationEvent syntheticAnimationEventFactory(events.SyntheticAnimationEvent e) { - return new SyntheticAnimationEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.animationName, - e.elapsedTime, - e.pseudoElement, - ); +/// Converts a list of variadic children arguments to children that should be passed to ReactJS. +/// +/// Returns: +/// +/// - `null` if there are no args +/// - the single child if only one was specified +/// - otherwise, the same list of args, will all top-level children validated +dynamic _convertArgsToChildren(List childrenArgs) { + if (childrenArgs.isEmpty) { + return null; + } else if (childrenArgs.length == 1) { + return childrenArgs.single; + } else { + markChildrenValidated(childrenArgs); + return childrenArgs; + } } -/// Wrapper for [SyntheticClipboardEvent]. -SyntheticClipboardEvent syntheticClipboardEventFactory(events.SyntheticClipboardEvent e) { - return new SyntheticClipboardEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.clipboardData); -} +/// Util used with [_registerComponent2] to ensure no imporant lifecycle +/// events are skipped. This includes [shouldComponentUpdate], +/// [componentDidUpdate], and [render] because they utilize +/// [_updatePropsAndStateWithJs]. +/// +/// Returns the list of lifecycle events to skip, having removed the +/// important ones. If an important lifecycle event was set for skipping, a +/// warning is issued. +List _filterSkipMethods(List methods) { + List finalList = List.from(methods); + bool shouldWarn = false; -/// Wrapper for [SyntheticDataTransfer]. -SyntheticDataTransfer syntheticDataTransferFactory(events.SyntheticDataTransfer dt) { - if (dt == null) return null; - List files = []; - if (dt.files != null) { - for (int i = 0; i < dt.files.length; i++) { - files.add(dt.files[i]); - } + if (finalList.contains('shouldComponentUpdate')) { + finalList.remove('shouldComponentUpdate'); + shouldWarn = true; } - List types = []; - if (dt.types != null) { - for (int i = 0; i < dt.types.length; i++) { - types.add(dt.types[i]); - } + + if (finalList.contains('componentDidUpdate')) { + finalList.remove('componentDidUpdate'); + shouldWarn = true; } - var effectAllowed; - var dropEffect; - try { - // Works around a bug in IE where dragging from outside the browser fails. - // Trying to access this property throws the error "Unexpected call to method or property access.". - effectAllowed = dt.effectAllowed; - } catch (exception) { - effectAllowed = 'uninitialized'; + if (finalList.contains('render')) { + finalList.remove('render'); + shouldWarn = true; } - try { - // For certain types of drag events in IE (anything but ondragenter, ondragover, and ondrop), this fails. - // Trying to access this property throws the error "Unexpected call to method or property access.". - dropEffect = dt.dropEffect; - } catch (exception) { - dropEffect = 'none'; + if (shouldWarn) { + window.console.warn("WARNING: Crucial lifecycle methods passed into " + "skipMethods. shouldComponentUpdate, componentDidUpdate, and render " + "cannot be skipped and will still be added to the new component. Please " + "remove them from skipMethods."); } - return new SyntheticDataTransfer(dropEffect, effectAllowed, files, types); + return finalList; } -/// Wrapper for [SyntheticEvent]. -SyntheticEvent syntheticEventFactory(events.SyntheticEvent e) { - return new SyntheticEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), - () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); -} +@JS('Object.keys') +external List _objectKeys(Object object); -/// Wrapper for [SyntheticFocusEvent]. -SyntheticFocusEvent syntheticFocusEventFactory(events.SyntheticFocusEvent e) { - return new SyntheticFocusEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.relatedTarget); -} +@JS('Object.defineProperty') +external void _defineProperty(dynamic object, String propertyName, JsMap descriptor); -/// Wrapper for [SyntheticFormEvent]. -SyntheticFormEvent syntheticFormEventFactory(events.SyntheticFormEvent e) { - return new SyntheticFormEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), - () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); -} -/// Wrapper for [SyntheticKeyboardEvent]. -SyntheticKeyboardEvent syntheticKeyboardEventFactory(events.SyntheticKeyboardEvent e) { - return new SyntheticKeyboardEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.altKey, - e.char, - e.charCode, - e.ctrlKey, - e.locale, - e.location, - e.key, - e.keyCode, - e.metaKey, - e.repeat, - e.shiftKey); -} +@Deprecated('6.0.0') +InteropContextValue _jsifyContext(Map context) { + var interopContext = new InteropContextValue(); + context.forEach((key, value) { + // ignore: argument_type_not_assignable + setProperty(interopContext, key, new ReactDartContextInternal(value)); + }); -/// Wrapper for [SyntheticMouseEvent]. -SyntheticMouseEvent syntheticMouseEventFactory(events.SyntheticMouseEvent e) { - SyntheticDataTransfer dt = syntheticDataTransferFactory(e.dataTransfer); - return new SyntheticMouseEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.altKey, - e.button, - e.buttons, - e.clientX, - e.clientY, - e.ctrlKey, - dt, - e.metaKey, - e.pageX, - e.pageY, - e.relatedTarget, - e.screenX, - e.screenY, - e.shiftKey, - ); + return interopContext; } -/// Wrapper for [SyntheticPointerEvent]. -SyntheticPointerEvent syntheticPointerEventFactory(events.SyntheticPointerEvent e) { - return new SyntheticPointerEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.pointerId, - e.width, - e.height, - e.pressure, - e.tangentialPressure, - e.tiltX, - e.tiltY, - e.twist, - e.pointerType, - e.isPrimary, - ); -} +/// The static methods that proxy JS component lifecycle methods to Dart components. +@Deprecated('6.0.0') +final ReactDartInteropStatics _dartInteropStatics = (() { + var zone = Zone.current; -/// Wrapper for [SyntheticTouchEvent]. -SyntheticTouchEvent syntheticTouchEventFactory(events.SyntheticTouchEvent e) { - return new SyntheticTouchEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.altKey, - e.changedTouches, - e.ctrlKey, - e.metaKey, - e.shiftKey, - e.targetTouches, - e.touches, - ); -} + /// Wrapper for [Component.getInitialState]. + Component initComponent(ReactComponent jsThis, ReactDartComponentInternal internal, InteropContextValue context, + ComponentStatics componentStatics) => + zone.run(() { + void jsRedraw() { + jsThis.setState(newObject()); + } -/// Wrapper for [SyntheticTransitionEvent]. -SyntheticTransitionEvent syntheticTransitionEventFactory(events.SyntheticTransitionEvent e) { - return new SyntheticTransitionEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.propertyName, - e.elapsedTime, - e.pseudoElement, - ); -} + RefMethod getRef = (name) { + var ref = getProperty(jsThis.refs, name); + if (ref == null) return null; + if (ref is Element) return ref; -/// Wrapper for [SyntheticUIEvent]. -SyntheticUIEvent syntheticUIEventFactory(events.SyntheticUIEvent e) { - return new SyntheticUIEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.detail, - e.view, - ); -} + return (ref as ReactComponent).dartComponent ?? ref; + }; -/// Wrapper for [SyntheticWheelEvent]. -SyntheticWheelEvent syntheticWheelEventFactory(events.SyntheticWheelEvent e) { - return new SyntheticWheelEvent( - e.bubbles, - e.cancelable, - e.currentTarget, - e.defaultPrevented, - () => e.preventDefault(), - () => e.stopPropagation(), - e.eventPhase, - e.isTrusted, - e.nativeEvent, - e.target, - e.timeStamp, - e.type, - e.deltaX, - e.deltaMode, - e.deltaY, - e.deltaZ, - ); -} + Component component = componentStatics.componentFactory() + ..initComponentInternal(internal.props, jsRedraw, getRef, jsThis, _unjsifyContext(context)) + ..initStateInternal(); -/// Returns the original Dart handler function that, within [_convertEventHandlers], -/// was converted/wrapped into the function [jsConvertedEventHandler] to be passed to the JS. -/// -/// Returns `null` if [jsConvertedEventHandler] is `null`. -/// -/// Returns `null` if [jsConvertedEventHandler] does not represent such a function -/// -/// Useful for chaining event handlers on DOM or JS composite [ReactElement]s. -Function unconvertJsEventHandler(Function jsConvertedEventHandler) { - if (jsConvertedEventHandler == null) return null; + // Return the component so that the JS proxying component can store it, + // avoiding an interceptor lookup. + return component; + }); - return _originalEventHandlers[jsConvertedEventHandler]; -} + InteropContextValue handleGetChildContext(Component component) => zone.run(() { + return _jsifyContext(component.getChildContext()); + }); -/// Returns the props for a [ReactElement] or composite [ReactComponent] [instance], -/// shallow-converted to a Dart Map for convenience. -/// -/// If `style` is specified in props, then it too is shallow-converted and included -/// in the returned Map. -/// -/// Any JS event handlers included in the props for the given [instance] will be -/// unconverted such that the original JS handlers are returned instead of their -/// Dart synthetic counterparts. -Map unconvertJsProps(/* ReactElement|ReactComponent */ instance) { - var props = Map.from(JsBackedMap.backedBy(instance.props)); + /// Wrapper for [Component.componentWillMount]. + void handleComponentWillMount(Component component) => zone.run(() { + component + ..componentWillMount() + ..transferComponentState(); + }); - // Catch if a Dart component has been passed in. Component (version 1) can be identified by having the "internal" - // prop. Component2, however, does not have that but can be detected by checking whether or not the style prop is a - // Map. Because non-Dart components will have a JS Object, it can be assumed that if the style prop is a Map then - // it is a Dart Component. - if (props['internal'] is ReactDartComponentInternal || (props['style'] != null && props['style'] is Map)) { - throw new ArgumentError('A Dart Component cannot be passed into unconvertJsProps.'); + /// Wrapper for [Component.componentDidMount]. + void handleComponentDidMount(Component component) => zone.run(() { + component.componentDidMount(); + }); + + Map _getNextProps(Component component, ReactDartComponentInternal nextInternal) { + var newProps = nextInternal.props; + return newProps != null ? new Map.from(newProps) : {}; } - eventPropKeyToEventFactory.keys.forEach((key) { - if (props.containsKey(key)) { - props[key] = unconvertJsEventHandler(props[key]) ?? props[key]; - } - }); + /// 1. Update [Component.props] using the value stored to [Component.nextProps] + /// in `componentWillReceiveProps`. + /// 2. Update [Component.context] using the value stored to [Component.nextContext] + /// in `componentWillReceivePropsWithContext`. + /// 3. Update [Component.state] by calling [Component.transferComponentState] + void _afterPropsChange(Component component, InteropContextValue nextContext) { + component + ..props = component.nextProps // [1] + ..context = component.nextContext // [2] + ..transferComponentState(); // [3] + } - // Convert the nested style map so it can be read by Dart code. - var style = props['style']; - if (style != null) { - props['style'] = Map.from(JsBackedMap.backedBy(style)); + void _clearPrevState(Component component) { + component.prevState = null; } - return props; -} + void _callSetStateCallbacks(Component component) { + var callbacks = component.setStateCallbacks.toList(); + // Prevent concurrent modification during iteration + component.setStateCallbacks.clear(); + callbacks.forEach((callback) { + callback(); + }); + } -/// Converts a list of variadic children arguments to children that should be passed to ReactJS. -/// -/// Returns: -/// -/// - `null` if there are no args -/// - the single child if only one was specified -/// - otherwise, the same list of args, will all top-level children validated -dynamic _convertArgsToChildren(List childrenArgs) { - if (childrenArgs.isEmpty) { - return null; - } else if (childrenArgs.length == 1) { - return childrenArgs.single; - } else { - markChildrenValidated(childrenArgs); - return childrenArgs; + void _callSetStateTransactionalCallbacks(Component component) { + var nextState = component.nextState; + var props = new UnmodifiableMapView(component.props); + + component.transactionalSetStateCallbacks.forEach((callback) { + nextState.addAll(callback(nextState, props)); + }); + component.transactionalSetStateCallbacks.clear(); } -} -/// Convert packed event handler into wrapper and pass it only the Dart [SyntheticEvent] object converted from the -/// [events.SyntheticEvent] event. -_convertEventHandlers(Map args) { - args.forEach((propKey, value) { - var eventFactory = eventPropKeyToEventFactory[propKey]; - if (eventFactory != null && value != null) { - // Apply allowInterop here so that the function we store in [_originalEventHandlers] - // is the same one we'll retrieve from the JS props. - var reactDartConvertedEventHandler = allowInterop((events.SyntheticEvent e, [_, __]) { - value(eventFactory(e)); + /// Wrapper for [Component.componentWillReceiveProps]. + void handleComponentWillReceiveProps( + Component component, ReactDartComponentInternal nextInternal, InteropContextValue nextContext) => + zone.run(() { + var nextProps = _getNextProps(component, nextInternal); + var newContext = _unjsifyContext(nextContext); + + component + ..nextProps = nextProps + ..nextContext = newContext + ..componentWillReceiveProps(nextProps) + ..componentWillReceivePropsWithContext(nextProps, newContext); }); - args[propKey] = reactDartConvertedEventHandler; - _originalEventHandlers[reactDartConvertedEventHandler] = value; - } - }); -} + /// Wrapper for [Component.shouldComponentUpdate]. + bool handleShouldComponentUpdate(Component component, InteropContextValue nextContext) => zone.run(() { + _callSetStateTransactionalCallbacks(component); -void _convertRefValue(Map args) { - var ref = args['ref']; - if (ref is Ref) { - args['ref'] = ref.jsRef; - } -} + // If shouldComponentUpdateWithContext returns a valid bool (default implementation returns null), + // then don't bother calling `shouldComponentUpdate` and have it trump. + bool shouldUpdate = + component.shouldComponentUpdateWithContext(component.nextProps, component.nextState, component.nextContext); -void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { - var ref = args['ref']; + if (shouldUpdate == null) { + shouldUpdate = component.shouldComponentUpdate(component.nextProps, component.nextState); + } - if (ref is Ref) { - args['ref'] = ref.jsRef; - } else if (ref is _CallbackRef && convertCallbackRefValue) { - args['ref'] = allowInterop((dynamic instance) { - if (instance is ReactComponent && instance.dartComponent != null) return ref(instance.dartComponent); - return ref(instance); - }); - } -} + if (shouldUpdate) { + return true; + } else { + // If component should not update, update props / transfer state because componentWillUpdate will not be called. + _afterPropsChange(component, nextContext); + _callSetStateCallbacks(component); + // Clear out prevState after it's done being used so it's not retained + _clearPrevState(component); + return false; + } + }); -@JS('Object.defineProperty') -external void _defineProperty(dynamic object, String propertyName, JsMap descriptor); + /// Wrapper for [Component.componentWillUpdate]. + void handleComponentWillUpdate(Component component, InteropContextValue nextContext) => zone.run(() { + /// Call `componentWillUpdate` and the context variant + component + ..componentWillUpdate(component.nextProps, component.nextState) + ..componentWillUpdateWithContext(component.nextProps, component.nextState, component.nextContext); -/// Util used with [_registerComponent2] to ensure no imporant lifecycle -/// events are skipped. This includes [shouldComponentUpdate], -/// [componentDidUpdate], and [render] because they utilize -/// [_updatePropsAndStateWithJs]. -/// -/// Returns the list of lifecycle events to skip, having removed the -/// important ones. If an important lifecycle event was set for skipping, a -/// warning is issued. -List _filterSkipMethods(List methods) { - List finalList = List.from(methods); - bool shouldWarn = false; + _afterPropsChange(component, nextContext); + }); - if (finalList.contains('shouldComponentUpdate')) { - finalList.remove('shouldComponentUpdate'); - shouldWarn = true; + /// Wrapper for [Component.componentDidUpdate]. + /// + /// Uses [prevState] which was transferred from [Component.nextState] in [componentWillUpdate]. + void handleComponentDidUpdate(Component component, ReactDartComponentInternal prevInternal) => zone.run(() { + var prevInternalProps = prevInternal.props; + + /// Call `componentDidUpdate` and the context variant + component.componentDidUpdate(prevInternalProps, component.prevState); + + _callSetStateCallbacks(component); + // Clear out prevState after it's done being used so it's not retained + _clearPrevState(component); + }); + + /// Wrapper for [Component.componentWillUnmount]. + void handleComponentWillUnmount(Component component) => zone.run(() { + component.componentWillUnmount(); + // Clear these callbacks in case they retain anything; + // they definitely won't be called after this point. + component.setStateCallbacks.clear(); + component.transactionalSetStateCallbacks.clear(); + }); + + /// Wrapper for [Component.render]. + dynamic handleRender(Component component) => zone.run(() { + return component.render(); + }); + + return new ReactDartInteropStatics( + initComponent: allowInterop(initComponent), + handleGetChildContext: allowInterop(handleGetChildContext), + handleComponentWillMount: allowInterop(handleComponentWillMount), + handleComponentDidMount: allowInterop(handleComponentDidMount), + handleComponentWillReceiveProps: allowInterop(handleComponentWillReceiveProps), + handleShouldComponentUpdate: allowInterop(handleShouldComponentUpdate), + handleComponentWillUpdate: allowInterop(handleComponentWillUpdate), + handleComponentDidUpdate: allowInterop(handleComponentDidUpdate), + handleComponentWillUnmount: allowInterop(handleComponentWillUnmount), + handleRender: allowInterop(handleRender)); +})(); + +abstract class _ReactDartInteropStatics2 { + // TODO 3.1.0-wip expose for testing? + /// The zone in which all component lifecycle methods are run. + static final componentZone = Zone.root; + + static void _updatePropsAndStateWithJs(Component2 component, JsMap props, JsMap state) { + component + ..props = new JsBackedMap.backedBy(props) + ..state = new JsBackedMap.backedBy(state); } - if (finalList.contains('componentDidUpdate')) { - finalList.remove('componentDidUpdate'); - shouldWarn = true; - } + static void _updateContextWithJs(Component2 component, dynamic jsContext) { + component.context = ContextHelpers.unjsifyNewContext(jsContext); + } + + static Component2 initComponent(ReactComponent jsThis, ComponentStatics2 componentStatics) => // dartfmt + componentZone.run(() { + final component = componentStatics.componentFactory(); + // Return the component so that the JS proxying component can store it, + // avoiding an interceptor lookup. + + component + ..jsThis = jsThis + ..props = new JsBackedMap.backedBy(jsThis.props) + ..context = ContextHelpers.unjsifyNewContext(jsThis.context); + + jsThis.state = jsBackingMapOrJsCopy(component.initialState); - if (finalList.contains('render')) { - finalList.remove('render'); - shouldWarn = true; - } + component.state = new JsBackedMap.backedBy(jsThis.state); - if (shouldWarn) { - window.console.warn("WARNING: Crucial lifecycle methods passed into " - "skipMethods. shouldComponentUpdate, componentDidUpdate, and render " - "cannot be skipped and will still be added to the new component. Please " - "remove them from skipMethods."); - } + // ignore: invalid_use_of_protected_member + Component2Bridge.bridgeForComponent[component] = componentStatics.bridgeFactory(component); + return component; + }); - return finalList; -} + static void handleComponentDidMount(Component2 component) => // dartfmt + componentZone.run(() { + component.componentDidMount(); + }); -dynamic _findDomNode(component) { - return ReactDom.findDOMNode(component is Component ? component.jsThis : component); -} + static bool handleShouldComponentUpdate(Component2 component, JsMap jsNextProps, JsMap jsNextState) => // dartfmt + componentZone.run(() { + final value = component.shouldComponentUpdate( + new JsBackedMap.backedBy(jsNextProps), + new JsBackedMap.backedBy(jsNextState), + ); -/// Converts a list of variadic children arguments to children that should be passed to ReactJS. -/// -/// Returns: -/// -/// - `null` if there are no args and [shouldAlwaysBeList] is false -/// - `[]` if there are no args and [shouldAlwaysBeList] is true -/// - the single child if only one was specified -/// - otherwise, the same list of args, will all top-level children validated -dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) { - var children; - if (childrenArgs.isEmpty) { - if (!shouldAlwaysBeList) return null; - children = childrenArgs; - } else if (childrenArgs.length == 1) { - if (shouldAlwaysBeList) { - final singleChild = listifyChildren(childrenArgs.single); - if (singleChild is List) { - children = singleChild; - } - } else { - children = childrenArgs.single; - } - } + if (!value) { + _updatePropsAndStateWithJs(component, jsNextProps, jsNextState); + } - if (children == null) { - children = shouldAlwaysBeList ? childrenArgs.map(listifyChildren).toList() : childrenArgs; - markChildrenValidated(children); - } + return value; + }); - return children; -} + static JsMap handleGetDerivedStateFromProps( + ComponentStatics2 componentStatics, JsMap jsNextProps, JsMap jsPrevState) => // dartfmt + componentZone.run(() { + var derivedState = componentStatics.instanceForStaticMethods + .getDerivedStateFromProps(new JsBackedMap.backedBy(jsNextProps), new JsBackedMap.backedBy(jsPrevState)); + if (derivedState != null) { + return jsBackingMapOrJsCopy(derivedState); + } + return null; + }); -/// Converts [props] into a [JsMap] that can be utilized with [React.createElement()]. -JsMap _generateJsProps(Map props, - {bool convertEventHandlers = true, - bool convertRefValue = true, - bool convertCallbackRefValue = true, - bool wrapWithJsify = true}) { - final propsForJs = JsBackedMap.from(props); + static dynamic handleGetSnapshotBeforeUpdate(Component2 component, JsMap jsPrevProps, JsMap jsPrevState) => // dartfmt + componentZone.run(() { + final snapshotValue = component.getSnapshotBeforeUpdate( + new JsBackedMap.backedBy(jsPrevProps), + new JsBackedMap.backedBy(jsPrevState), + ); - if (convertEventHandlers) _convertEventHandlers(propsForJs); - if (convertRefValue) _convertRefValue2(propsForJs, convertCallbackRefValue: convertCallbackRefValue); + return snapshotValue; + }); - return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; -} + static void handleComponentDidUpdate( + Component2 component, ReactComponent jsThis, JsMap jsPrevProps, JsMap jsPrevState, + [dynamic snapshot]) => // dartfmt + componentZone.run(() { + component.componentDidUpdate( + new JsBackedMap.backedBy(jsPrevProps), + new JsBackedMap.backedBy(jsPrevState), + snapshot, + ); + }); -@Deprecated('6.0.0') -InteropContextValue _jsifyContext(Map context) { - var interopContext = new InteropContextValue(); - context.forEach((key, value) { - // ignore: argument_type_not_assignable - setProperty(interopContext, key, new ReactDartContextInternal(value)); - }); + static void handleComponentWillUnmount(Component2 component) => // dartfmt + componentZone.run(() { + component.componentWillUnmount(); + }); - return interopContext; -} + static void handleComponentDidCatch(Component2 component, dynamic error, ReactErrorInfo info) => // dartfmt + componentZone.run(() { + // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. + // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. + try { + throwErrorFromJS(error); + } catch (e, stack) { + info.dartStackTrace = stack; + // The Dart stack track gets lost so we manually add it to the info object for reference. + component.componentDidCatch(e, info); + } + }); -@JS('Object.keys') -external List _objectKeys(Object object); + static JsMap handleGetDerivedStateFromError(ComponentStatics2 componentStatics, dynamic error) => // dartfmt + componentZone.run(() { + // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. + // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. + try { + throwErrorFromJS(error); + } catch (e) { + return jsBackingMapOrJsCopy(componentStatics.instanceForStaticMethods.getDerivedStateFromError(e)); + } + }); -/// Create react-dart registered component for the HTML [Element]. -_reactDom(String name) { - return new ReactDomComponentFactoryProxy(name); + static dynamic handleRender(Component2 component, JsMap jsProps, JsMap jsState, dynamic jsContext) => // dartfmt + componentZone.run(() { + _updatePropsAndStateWithJs(component, jsProps, jsState); + _updateContextWithJs(component, jsContext); + return component.render(); + }); + + static final JsMap staticsForJs = jsifyAndAllowInterop({ + 'initComponent': initComponent, + 'handleComponentDidMount': handleComponentDidMount, + 'handleGetDerivedStateFromProps': handleGetDerivedStateFromProps, + 'handleShouldComponentUpdate': handleShouldComponentUpdate, + 'handleGetSnapshotBeforeUpdate': handleGetSnapshotBeforeUpdate, + 'handleComponentDidUpdate': handleComponentDidUpdate, + 'handleComponentWillUnmount': handleComponentWillUnmount, + 'handleComponentDidCatch': handleComponentDidCatch, + 'handleGetDerivedStateFromError': handleGetDerivedStateFromError, + 'handleRender': handleRender, + }); } /// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] -/// which produces a new JS `ReactClass`. +/// which produces a new JS [`ReactClass` component class](https://facebook.github.io/react/docs/top-level-api.html#react.createclass). @Deprecated('6.0.0') ReactDartComponentFactoryProxy _registerComponent( ComponentFactory componentFactory, [ @@ -766,23 +703,131 @@ ReactDartComponentFactoryProxy _registerComponent( contextKeys: componentInstance.contextKeys, ); - /// Create the JS `ReactClass`. - /// with custom JS lifecycle methods. - var reactComponentClass = createReactDartComponentClass(_dartInteropStatics, componentStatics, jsConfig) - // ignore: invalid_use_of_protected_member - ..dartComponentVersion = ReactDartComponentVersion.component - ..displayName = componentFactory().displayName; + /// Create the JS [`ReactClass` component class](https://facebook.github.io/react/docs/top-level-api.html#react.createclass) + /// with custom JS lifecycle methods. + var reactComponentClass = createReactDartComponentClass(_dartInteropStatics, componentStatics, jsConfig) + // ignore: invalid_use_of_protected_member + ..dartComponentVersion = ReactDartComponentVersion.component + ..displayName = componentFactory().displayName; + + // Cache default props and store them on the ReactClass so they can be used + // by ReactDartComponentFactoryProxy and externally. + final Map defaultProps = new Map.unmodifiable(componentInstance.getDefaultProps()); + reactComponentClass.dartDefaultProps = defaultProps; + + return new ReactDartComponentFactoryProxy(reactComponentClass); +} + +class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { + /// The JS class used by this factory. + @override + final ReactClass type; + final bool isConsumer; + final bool isProvider; + final Function factory; + final bool shouldConvertDomProps; + + ReactJsContextComponentFactoryProxy( + ReactClass jsClass, { + this.shouldConvertDomProps: true, + this.isConsumer: false, + this.isProvider: false, + }) : this.type = jsClass, + this.factory = React.createFactory(jsClass), + super(jsClass, shouldConvertDomProps: shouldConvertDomProps); + + @override + ReactElement build(Map props, [List childrenArgs]) { + dynamic children = _convertArgsToChildren(childrenArgs); + + if (isConsumer) { + if (children is Function) { + Function contextCallback = children; + children = allowInterop((args) { + return contextCallback(ContextHelpers.unjsifyNewContext(args)); + }); + } + } + + return factory(generateExtendedJsProps(props), children); + } + + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + JsMap generateExtendedJsProps(Map props) { + JsBackedMap propsForJs = new JsBackedMap.from(props); + + if (isProvider) { + propsForJs['value'] = ContextHelpers.jsifyNewContext(propsForJs['value']); + } + + return propsForJs.jsObject; + } +} + +/// Creates ReactJS [ReactElement] instances for components defined in the JS. +class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { + /// The JS class used by this factory. + @override + final ReactClass type; + + /// The JS component factory used by this factory to build [ReactElement]s. + final Function factory; + + /// Whether to automatically prepare props relating to bound values and event handlers + /// via [ReactDomComponentFactoryProxy.convertProps] for consumption by React JS DOM components. + /// + /// Useful when the JS component forwards DOM props to its rendered DOM components. + /// + /// Disable for more custom handling of these props. + final bool shouldConvertDomProps; + + /// Whether the props.children should always be treated as a list or not. + /// Default: `false` + final bool alwaysReturnChildrenAsList; + + ReactJsComponentFactoryProxy(ReactClass jsClass, + {this.shouldConvertDomProps: true, this.alwaysReturnChildrenAsList: false}) + : this.type = jsClass, + this.factory = React.createFactory(jsClass) { + if (jsClass == null) { + throw new ArgumentError('`jsClass` must not be null. ' + 'Ensure that the JS component class you\'re referencing is available and being accessed correctly.'); + } + } + + @override + ReactElement build(Map props, [List childrenArgs]) { + dynamic children = _convertArgsToChildren(childrenArgs); + + if (alwaysReturnChildrenAsList && children is! List) { + children = [children]; + } - // Cache default props and store them on the ReactClass so they can be used - // by ReactDartComponentFactoryProxy and externally. - final Map defaultProps = new Map.unmodifiable(componentInstance.getDefaultProps()); - reactComponentClass.dartDefaultProps = defaultProps; + Map potentiallyConvertedProps; + + final mightNeedConverting = shouldConvertDomProps || props['ref'] != null; + if (mightNeedConverting) { + // We can't mutate the original since we can't be certain that the value of the + // the converted event handler will be compatible with the Map's type parameters. + // We also want to avoid mutating the original map where possible. + // So, make a copy and mutate that. + potentiallyConvertedProps = Map.from(props); + if (shouldConvertDomProps) { + _convertEventHandlers(potentiallyConvertedProps); + } + _convertRefValue(potentiallyConvertedProps); + } else { + potentiallyConvertedProps = props; + } - return new ReactDartComponentFactoryProxy(reactComponentClass); + // jsifyAndAllowInterop also handles converting props with nested Map/List structures, like `style` + return factory(jsifyAndAllowInterop(potentiallyConvertedProps), children); + } } /// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory] -/// which produces a new JS `ReactClass`. +/// which produces a new JS [`ReactClass` component class](https://facebook.github.io/react/docs/top-level-api.html#react.createclass). ReactDartComponentFactoryProxy2 _registerComponent2( ComponentFactory componentFactory, { Iterable skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'], @@ -812,7 +857,7 @@ ReactDartComponentFactoryProxy2 _registerComponent2( propTypes: jsPropTypes, ); - /// Create the JS `ReactClass` component class + /// Create the JS [`ReactClass` component class](https://facebook.github.io/react/docs/top-level-api.html#react.createclass) /// with custom JS lifecycle methods. var reactComponentClass = createReactDartComponentClass2(_ReactDartInteropStatics2.staticsForJs, componentStatics, jsConfig2) @@ -823,185 +868,47 @@ ReactDartComponentFactoryProxy2 _registerComponent2( return new ReactDartComponentFactoryProxy2(reactComponentClass); } -/// Creates and returns a new `ReactDartFunctionComponentFactoryProxy` from the provided [dartFunctionComponent] -/// which produces a new `JsFunctionComponent`. -ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, - {String displayName}) => - ReactDartFunctionComponentFactoryProxy(dartFunctionComponent, displayName: displayName); - -@Deprecated('6.0.0') -Map _unjsifyContext(InteropContextValue interopContext) { - // TODO consider using `contextKeys` for this if perf of objectKeys is bad. - return new Map.fromIterable(_objectKeys(interopContext), value: (key) { - // ignore: argument_type_not_assignable - ReactDartContextInternal internal = getProperty(interopContext, key); - return internal?.value; - }); -} - -/// The ReactJS function signature. -/// -/// - [props] will always be supplied as the first argument -/// - [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary -/// to match Dart's generated call signature based on the number of args React provides. -typedef JsFunctionComponent = dynamic Function(JsMap props, [JsMap legacyContext]); - -/// The type of [Component.ref] specified as a callback. -/// -/// See: -typedef _CallbackRef(T componentOrDomNode); - -/// Shared component factory proxy [build] method for components that utilize [JsBackedMap]s. -mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { - @override - ReactElement build(Map props, [List childrenArgs = const []]) { - var children = _generateChildren(childrenArgs, shouldAlwaysBeList: true); - var convertedProps = generateExtendedJsProps(props); - return React.createElement(type, convertedProps, children); - } - - static JsMap generateExtendedJsProps(Map props) => - _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); -} - -/// Use [ReactDartComponentFactoryProxy2] instead. -/// -/// Will be removed when [Component] is removed in the `6.0.0` release. -@Deprecated('6.0.0') -class ReactDartComponentFactoryProxy extends ReactComponentFactoryProxy { - /// The ReactJS class used as the type for all [ReactElement]s built by - /// this factory. - final ReactClass reactClass; - - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` +/// Creates ReactJS [ReactElement] instances for DOM components. +class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { + /// The name of the proxied DOM component. /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @override - @Deprecated('6.0.0') - final ReactJsComponentFactory reactComponentFactory; + /// E.g. `'div'`, `'a'`, `'h1'` + final String name; - /// The cached Dart default props retrieved from [reactClass] that are passed - /// into [generateExtendedJsProps] upon [ReactElement] creation. - final Map defaultProps; + /// The JS component factory used by this factory to build [ReactElement]s. + final Function factory; - ReactDartComponentFactoryProxy(ReactClass reactClass) - : this.reactClass = reactClass, - this.reactComponentFactory = React.createFactory(reactClass), - this.defaultProps = reactClass.dartDefaultProps; + ReactDomComponentFactoryProxy(name) + : this.name = name, + this.factory = React.createFactory(name) { + // TODO: Should we remove this once we validate that the bug is gone in Dart 2 DDC? + if (ddc_emulated_function_name_bug.isBugPresent) { + ddc_emulated_function_name_bug.patchName(this); + } + } @override - ReactClass get type => reactClass; + String get type => name; @override ReactElement build(Map props, [List childrenArgs = const []]) { var children = _convertArgsToChildren(childrenArgs); children = listifyChildren(children); - return React.createElement(type, generateExtendedJsProps(props, children, defaultProps: defaultProps), children); - } - - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - static InteropProps generateExtendedJsProps(Map props, dynamic children, {Map defaultProps}) { - if (children == null) { - children = []; - } else if (children is! Iterable) { - children = [children]; - } - - // 1. Merge in defaults (if they were specified) - // 2. Add specified props and children. - // 3. Remove "reserved" props that should not be visible to the rendered component. - - // [1] - Map extendedProps = (defaultProps != null ? new Map.from(defaultProps) : {}) - // [2] - ..addAll(props) - ..['children'] = children - // [3] - ..remove('key') - ..remove('ref'); - - var internal = new ReactDartComponentInternal()..props = extendedProps; - - var interopProps = new InteropProps(internal: internal); - - // Don't pass a key into InteropProps if one isn't defined, so that the value will - // be `undefined` in the JS, which is ignored by React, whereas `null` isn't. - if (props.containsKey('key')) { - interopProps.key = props['key']; - } - - if (props.containsKey('ref')) { - var ref = props['ref']; - - // If the ref is a callback, pass ReactJS a function that will call it - // with the Dart Component instance, not the ReactComponent instance. - if (ref is _CallbackRef) { - interopProps.ref = allowInterop((ReactComponent instance) => ref(instance?.dartComponent)); - } else if (ref is Ref) { - interopProps.ref = ref.jsRef; - } else { - interopProps.ref = ref; - } - } + // We can't mutate the original since we can't be certain that the value of the + // the converted event handler will be compatible with the Map's type parameters. + var convertibleProps = new Map.from(props); + convertProps(convertibleProps); - return interopProps; + // jsifyAndAllowInterop also handles converting props with nested Map/List structures, like `style` + return factory(jsifyAndAllowInterop(convertibleProps), children); } -} - -/// Creates ReactJS [Component2] instances for Dart components. -class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy - with JsBackedMapComponentFactoryMixin - implements ReactDartComponentFactoryProxy { - /// The ReactJS class used as the type for all [ReactElement]s built by - /// this factory. - @override - final ReactClass reactClass; - - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @override - @Deprecated('6.0.0') - final ReactJsComponentFactory reactComponentFactory; - - @override - final Map defaultProps; - - ReactDartComponentFactoryProxy2(ReactClass reactClass) - : this.reactClass = reactClass, - this.reactComponentFactory = React.createFactory(reactClass), - this.defaultProps = JsBackedMap.fromJs(reactClass.defaultProps); - - @override - ReactClass get type => reactClass; - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - static JsMap generateExtendedJsProps(Map props) => JsBackedMapComponentFactoryMixin.generateExtendedJsProps(props); + /// Performs special handling of certain props for consumption by ReactJS DOM components. + static void convertProps(Map props) { + _convertEventHandlers(props); + _convertRefValue(props); + } } /// Creates ReactJS [Function Component] from Dart Function. @@ -1038,320 +945,406 @@ class ReactDartFunctionComponentFactoryProxy extends ReactComponentFactoryProxy // and throws if it gets `undefined`. `jsNull` is an interop variable that holds a JS `null` value // to force `null` as the return value if user returns a Dart `null`. // See: https://github.com/dart-lang/sdk/issues/27485 - jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => - dartFunctionComponent(JsBackedMap.backedBy(jsProps)) ?? jsNull; - JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); - if (displayName != null) { - // This is a work-around to display the correct name in the React DevTools. - _defineProperty(interopFunction, 'name', jsify({'value': displayName})); - } - // ignore: invalid_use_of_protected_member - setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); - return interopFunction; - } -} - -/// Creates ReactJS [ReactElement] instances for DOM components. -class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { - /// The name of the proxied DOM component. - /// - /// E.g. `'div'`, `'a'`, `'h1'` - final String name; - - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @Deprecated('6.0.0') - final Function factory; - - ReactDomComponentFactoryProxy(name) - : this.name = name, - this.factory = React.createFactory(name) { - // TODO: Should we remove this once we validate that the bug is gone in Dart 2 DDC? - if (ddc_emulated_function_name_bug.isBugPresent) { - ddc_emulated_function_name_bug.patchName(this); - } - } - - @override - String get type => name; - - @override - ReactElement build(Map props, [List childrenArgs = const []]) { - var children = _generateChildren(childrenArgs); - var convertedProps = _generateJsProps(props); - return React.createElement(type, convertedProps, children); - } - - /// Performs special handling of certain props for consumption by ReactJS DOM components. - static void convertProps(Map props) { - _convertEventHandlers(props); - _convertRefValue(props); - } -} - -/// Creates ReactJS [ReactElement] instances for components defined in the JS. -class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { - /// The JS class used by this factory. - @override - final ReactClass type; - - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @Deprecated('6.0.0') - final Function factory; - - /// Whether to automatically prepare props relating to bound values and event handlers - /// via [ReactDomComponentFactoryProxy.convertProps] for consumption by React JS DOM components. - /// - /// Useful when the JS component forwards DOM props to its rendered DOM components. - /// - /// Disable for more custom handling of these props. - final bool shouldConvertDomProps; - - /// Whether the props.children should always be treated as a list or not. - /// Default: `false` - final bool alwaysReturnChildrenAsList; - - ReactJsComponentFactoryProxy(ReactClass jsClass, - {this.shouldConvertDomProps: true, this.alwaysReturnChildrenAsList: false}) - : this.type = jsClass, - this.factory = React.createFactory(jsClass) { - if (jsClass == null) { - throw new ArgumentError('`jsClass` must not be null. ' - 'Ensure that the JS component class you\'re referencing is available and being accessed correctly.'); + jsFunctionComponent(JsMap jsProps, [JsMap _legacyContext]) => + dartFunctionComponent(JsBackedMap.backedBy(jsProps)) ?? jsNull; + JsFunctionComponent interopFunction = allowInterop(jsFunctionComponent); + if (displayName != null) { + // This is a work-around to display the correct name in the React DevTools. + _defineProperty(interopFunction, 'name', jsify({'value': displayName})); } + // ignore: invalid_use_of_protected_member + setProperty(interopFunction, 'dartComponentVersion', ReactDartComponentVersion.component2); + return interopFunction; } +} - @override - ReactElement build(Map props, [List childrenArgs]) { - dynamic children = _generateChildren(childrenArgs, shouldAlwaysBeList: alwaysReturnChildrenAsList); - JsMap convertedProps = _generateJsProps(props, - convertEventHandlers: shouldConvertDomProps || props['ref'] != null, convertCallbackRefValue: false); - return React.createElement(type, convertedProps, children); - } +/// Create react-dart registered component for the HTML [Element]. +_reactDom(String name) { + return new ReactDomComponentFactoryProxy(name); } -class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { - /// The JS class used by this factory. - @override - final ReactClass type; - final bool isConsumer; - final bool isProvider; +void _convertRefValue(Map args) { + var ref = args['ref']; + if (ref is Ref) { + args['ref'] = ref.jsRef; + } +} - /// The JS component factory used by this factory to build [ReactElement]s. - /// - /// Deprecated: Use [React.createElement()] instead and pass in [type] as - /// the first argument, followed by `props` and `children`. - /// - /// Before: - /// ``` - /// YourFactoryProxy.reactComponentFactory(props, children); - /// ``` - /// - /// After: - /// ``` - /// React.createElement(YourFactoryProxy.type, props, children); - /// ``` - @override - @Deprecated('6.0.0') - final Function factory; - @override - final bool shouldConvertDomProps; +/// A mapping from converted/wrapped JS handler functions (the result of [_convertEventHandlers]) +/// to the original Dart functions (the input of [_convertEventHandlers]). +final Expando _originalEventHandlers = new Expando(); - ReactJsContextComponentFactoryProxy( - ReactClass jsClass, { - this.shouldConvertDomProps = true, - this.isConsumer = false, - this.isProvider = false, - }) : this.type = jsClass, - this.factory = React.createFactory(jsClass), - super(jsClass, shouldConvertDomProps: shouldConvertDomProps); +/// Returns the props for a [ReactElement] or composite [ReactComponent] [instance], +/// shallow-converted to a Dart Map for convenience. +/// +/// If `style` is specified in props, then it too is shallow-converted and included +/// in the returned Map. +/// +/// Any JS event handlers included in the props for the given [instance] will be +/// unconverted such that the original JS handlers are returned instead of their +/// Dart synthetic counterparts. +Map unconvertJsProps(/* ReactElement|ReactComponent */ instance) { + var props = Map.from(JsBackedMap.backedBy(instance.props)); - @override - ReactElement build(Map props, [List childrenArgs]) { - dynamic children = _generateChildren(childrenArgs); + // Catch if a Dart component has been passed in. Component (version 1) can be identified by having the "internal" + // prop. Component2, however, does not have that but can be detected by checking whether or not the style prop is a + // Map. Because non-Dart components will have a JS Object, it can be assumed that if the style prop is a Map then + // it is a Dart Component. + if (props['internal'] is ReactDartComponentInternal || (props['style'] != null && props['style'] is Map)) { + throw new ArgumentError('A Dart Component cannot be passed into unconvertJsProps.'); + } - if (isConsumer) { - if (children is Function) { - Function contextCallback = children; - children = allowInterop((args) { - return contextCallback(ContextHelpers.unjsifyNewContext(args)); - }); - } + eventPropKeyToEventFactory.keys.forEach((key) { + if (props.containsKey(key)) { + props[key] = unconvertJsEventHandler(props[key]) ?? props[key]; } + }); - return React.createElement(type, generateExtendedJsProps(props), children); + // Convert the nested style map so it can be read by Dart code. + var style = props['style']; + if (style != null) { + props['style'] = Map.from(JsBackedMap.backedBy(style)); } - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - JsMap generateExtendedJsProps(Map props) { - JsBackedMap propsForJs = JsBackedMap.from(props); + return props; +} - if (isProvider) { - propsForJs['value'] = ContextHelpers.jsifyNewContext(propsForJs['value']); - } +/// Returns the original Dart handler function that, within [_convertEventHandlers], +/// was converted/wrapped into the function [jsConvertedEventHandler] to be passed to the JS. +/// +/// Returns `null` if [jsConvertedEventHandler] is `null`. +/// +/// Returns `null` if [jsConvertedEventHandler] does not represent such a function +/// +/// Useful for chaining event handlers on DOM or JS composite [ReactElement]s. +Function unconvertJsEventHandler(Function jsConvertedEventHandler) { + if (jsConvertedEventHandler == null) return null; - return propsForJs.jsObject; - } + return _originalEventHandlers[jsConvertedEventHandler]; } -abstract class _ReactDartInteropStatics2 { - // TODO 3.1.0-wip expose for testing? - /// The zone in which all component lifecycle methods are run. - static final componentZone = Zone.root; +/// Convert packed event handler into wrapper and pass it only the Dart [SyntheticEvent] object converted from the +/// [events.SyntheticEvent] event. +_convertEventHandlers(Map args) { + args.forEach((propKey, value) { + var eventFactory = eventPropKeyToEventFactory[propKey]; + if (eventFactory != null && value != null) { + // Apply allowInterop here so that the function we store in [_originalEventHandlers] + // is the same one we'll retrieve from the JS props. + var reactDartConvertedEventHandler = allowInterop((events.SyntheticEvent e, [_, __]) { + value(eventFactory(e)); + }); - static final JsMap staticsForJs = jsifyAndAllowInterop({ - 'initComponent': initComponent, - 'handleComponentDidMount': handleComponentDidMount, - 'handleGetDerivedStateFromProps': handleGetDerivedStateFromProps, - 'handleShouldComponentUpdate': handleShouldComponentUpdate, - 'handleGetSnapshotBeforeUpdate': handleGetSnapshotBeforeUpdate, - 'handleComponentDidUpdate': handleComponentDidUpdate, - 'handleComponentWillUnmount': handleComponentWillUnmount, - 'handleComponentDidCatch': handleComponentDidCatch, - 'handleGetDerivedStateFromError': handleGetDerivedStateFromError, - 'handleRender': handleRender, + args[propKey] = reactDartConvertedEventHandler; + _originalEventHandlers[reactDartConvertedEventHandler] = value; + } }); +} - static void handleComponentDidCatch(Component2 component, dynamic error, ReactErrorInfo info) => // dartfmt - componentZone.run(() { - // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. - // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. - try { - throwErrorFromJS(error); - } catch (e, stack) { - info.dartStackTrace = stack; - // The Dart stack track gets lost so we manually add it to the info object for reference. - component.componentDidCatch(e, info); - } - }); +/// Wrapper for [SyntheticEvent]. +SyntheticEvent syntheticEventFactory(events.SyntheticEvent e) { + return new SyntheticEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), + () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); +} - static void handleComponentDidMount(Component2 component) => // dartfmt - componentZone.run(() { - component.componentDidMount(); - }); +/// Wrapper for [SyntheticClipboardEvent]. +SyntheticClipboardEvent syntheticClipboardEventFactory(events.SyntheticClipboardEvent e) { + return new SyntheticClipboardEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.clipboardData); +} - static void handleComponentDidUpdate( - Component2 component, ReactComponent jsThis, JsMap jsPrevProps, JsMap jsPrevState, - [dynamic snapshot]) => // dartfmt - componentZone.run(() { - component.componentDidUpdate( - new JsBackedMap.backedBy(jsPrevProps), - new JsBackedMap.backedBy(jsPrevState), - snapshot, - ); - }); +/// Wrapper for [SyntheticKeyboardEvent]. +SyntheticKeyboardEvent syntheticKeyboardEventFactory(events.SyntheticKeyboardEvent e) { + return new SyntheticKeyboardEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.altKey, + e.char, + e.charCode, + e.ctrlKey, + e.locale, + e.location, + e.key, + e.keyCode, + e.metaKey, + e.repeat, + e.shiftKey); +} - static void handleComponentWillUnmount(Component2 component) => // dartfmt - componentZone.run(() { - component.componentWillUnmount(); - }); +/// Wrapper for [SyntheticFocusEvent]. +SyntheticFocusEvent syntheticFocusEventFactory(events.SyntheticFocusEvent e) { + return new SyntheticFocusEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.relatedTarget); +} - static JsMap handleGetDerivedStateFromError(ComponentStatics2 componentStatics, dynamic error) => // dartfmt - componentZone.run(() { - // Due to the error object being passed in from ReactJS it is a javascript object that does not get dartified. - // To fix this we throw the error again from Dart to the JS side and catch it Dart side which re-dartifies it. - try { - throwErrorFromJS(error); - } catch (e) { - return jsBackingMapOrJsCopy(componentStatics.instanceForStaticMethods.getDerivedStateFromError(e)); - } - }); +/// Wrapper for [SyntheticFormEvent]. +SyntheticFormEvent syntheticFormEventFactory(events.SyntheticFormEvent e) { + return new SyntheticFormEvent(e.bubbles, e.cancelable, e.currentTarget, e.defaultPrevented, () => e.preventDefault(), + () => e.stopPropagation(), e.eventPhase, e.isTrusted, e.nativeEvent, e.target, e.timeStamp, e.type); +} - static JsMap handleGetDerivedStateFromProps( - ComponentStatics2 componentStatics, JsMap jsNextProps, JsMap jsPrevState) => // dartfmt - componentZone.run(() { - var derivedState = componentStatics.instanceForStaticMethods - .getDerivedStateFromProps(new JsBackedMap.backedBy(jsNextProps), new JsBackedMap.backedBy(jsPrevState)); - if (derivedState != null) { - return jsBackingMapOrJsCopy(derivedState); - } - return null; - }); +/// Wrapper for [SyntheticDataTransfer]. +SyntheticDataTransfer syntheticDataTransferFactory(events.SyntheticDataTransfer dt) { + if (dt == null) return null; + List files = []; + if (dt.files != null) { + for (int i = 0; i < dt.files.length; i++) { + files.add(dt.files[i]); + } + } + List types = []; + if (dt.types != null) { + for (int i = 0; i < dt.types.length; i++) { + types.add(dt.types[i]); + } + } + var effectAllowed; + var dropEffect; - static dynamic handleGetSnapshotBeforeUpdate(Component2 component, JsMap jsPrevProps, JsMap jsPrevState) => // dartfmt - componentZone.run(() { - final snapshotValue = component.getSnapshotBeforeUpdate( - new JsBackedMap.backedBy(jsPrevProps), - new JsBackedMap.backedBy(jsPrevState), - ); + try { + // Works around a bug in IE where dragging from outside the browser fails. + // Trying to access this property throws the error "Unexpected call to method or property access.". + effectAllowed = dt.effectAllowed; + } catch (exception) { + effectAllowed = 'uninitialized'; + } - return snapshotValue; - }); + try { + // For certain types of drag events in IE (anything but ondragenter, ondragover, and ondrop), this fails. + // Trying to access this property throws the error "Unexpected call to method or property access.". + dropEffect = dt.dropEffect; + } catch (exception) { + dropEffect = 'none'; + } - static dynamic handleRender(Component2 component, JsMap jsProps, JsMap jsState, dynamic jsContext) => // dartfmt - componentZone.run(() { - _updatePropsAndStateWithJs(component, jsProps, jsState); - _updateContextWithJs(component, jsContext); - return component.render(); - }); + return new SyntheticDataTransfer(dropEffect, effectAllowed, files, types); +} - static bool handleShouldComponentUpdate(Component2 component, JsMap jsNextProps, JsMap jsNextState) => // dartfmt - componentZone.run(() { - final value = component.shouldComponentUpdate( - new JsBackedMap.backedBy(jsNextProps), - new JsBackedMap.backedBy(jsNextState), - ); +/// Wrapper for [SyntheticPointerEvent]. +SyntheticPointerEvent syntheticPointerEventFactory(events.SyntheticPointerEvent e) { + return new SyntheticPointerEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.pointerId, + e.width, + e.height, + e.pressure, + e.tangentialPressure, + e.tiltX, + e.tiltY, + e.twist, + e.pointerType, + e.isPrimary, + ); +} - if (!value) { - _updatePropsAndStateWithJs(component, jsNextProps, jsNextState); - } +/// Wrapper for [SyntheticMouseEvent]. +SyntheticMouseEvent syntheticMouseEventFactory(events.SyntheticMouseEvent e) { + SyntheticDataTransfer dt = syntheticDataTransferFactory(e.dataTransfer); + return new SyntheticMouseEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.altKey, + e.button, + e.buttons, + e.clientX, + e.clientY, + e.ctrlKey, + dt, + e.metaKey, + e.pageX, + e.pageY, + e.relatedTarget, + e.screenX, + e.screenY, + e.shiftKey, + ); +} - return value; - }); +/// Wrapper for [SyntheticTouchEvent]. +SyntheticTouchEvent syntheticTouchEventFactory(events.SyntheticTouchEvent e) { + return new SyntheticTouchEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.altKey, + e.changedTouches, + e.ctrlKey, + e.metaKey, + e.shiftKey, + e.targetTouches, + e.touches, + ); +} - static Component2 initComponent(ReactComponent jsThis, ComponentStatics2 componentStatics) => // dartfmt - componentZone.run(() { - final component = componentStatics.componentFactory(); - // Return the component so that the JS proxying component can store it, - // avoiding an interceptor lookup. +/// Wrapper for [SyntheticTransitionEvent]. +SyntheticTransitionEvent syntheticTransitionEventFactory(events.SyntheticTransitionEvent e) { + return new SyntheticTransitionEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.propertyName, + e.elapsedTime, + e.pseudoElement, + ); +} - component - ..jsThis = jsThis - ..props = new JsBackedMap.backedBy(jsThis.props) - ..context = ContextHelpers.unjsifyNewContext(jsThis.context); +/// Wrapper for [SyntheticAnimationEvent]. +SyntheticAnimationEvent syntheticAnimationEventFactory(events.SyntheticAnimationEvent e) { + return new SyntheticAnimationEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.animationName, + e.elapsedTime, + e.pseudoElement, + ); +} - jsThis.state = jsBackingMapOrJsCopy(component.initialState); +/// Wrapper for [SyntheticUIEvent]. +SyntheticUIEvent syntheticUIEventFactory(events.SyntheticUIEvent e) { + return new SyntheticUIEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.detail, + e.view, + ); +} - component.state = new JsBackedMap.backedBy(jsThis.state); +/// Wrapper for [SyntheticWheelEvent]. +SyntheticWheelEvent syntheticWheelEventFactory(events.SyntheticWheelEvent e) { + return new SyntheticWheelEvent( + e.bubbles, + e.cancelable, + e.currentTarget, + e.defaultPrevented, + () => e.preventDefault(), + () => e.stopPropagation(), + e.eventPhase, + e.isTrusted, + e.nativeEvent, + e.target, + e.timeStamp, + e.type, + e.deltaX, + e.deltaMode, + e.deltaY, + e.deltaZ, + ); +} - // ignore: invalid_use_of_protected_member - Component2Bridge.bridgeForComponent[component] = componentStatics.bridgeFactory(component); - return component; - }); +dynamic _findDomNode(component) { + return ReactDom.findDOMNode(component is Component ? component.jsThis : component); +} - static void _updateContextWithJs(Component2 component, dynamic jsContext) { - component.context = ContextHelpers.unjsifyNewContext(jsContext); +void setClientConfiguration() { + try { + // Attempt to invoke JS interop methods, which will throw if the + // corresponding JS functions are not available. + React.isValidElement(null); + ReactDom.findDOMNode(null); + createReactDartComponentClass(null, null, null); + } on NoSuchMethodError catch (_) { + throw new Exception('react.js and react_dom.js must be loaded.'); + } catch (_) { + throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); } - static void _updatePropsAndStateWithJs(Component2 component, JsMap props, JsMap state) { - component - ..props = new JsBackedMap.backedBy(props) - ..state = new JsBackedMap.backedBy(state); + setReactConfiguration(_reactDom, _registerComponent, customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); + setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); + // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. + if (context['ReactDOMServer'] != null) { + setReactDOMServerConfiguration(ReactDomServer.renderToString, ReactDomServer.renderToStaticMarkup); } } From b69ba40a3ba4aab9d0a182ae3b7e4319578ed1ea Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 15:56:40 -0700 Subject: [PATCH 40/50] unify FactoryProxy build methods --- lib/react_client.dart | 94 +++++-------------------------------------- 1 file changed, 10 insertions(+), 84 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 2cac6957..906d70a9 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -233,6 +233,7 @@ void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { /// Creates ReactJS [Component2] instances for Dart components. class ReactDartComponentFactoryProxy2 extends ReactComponentFactoryProxy + with JsBackedMapComponentFactoryMixin implements ReactDartComponentFactoryProxy { /// The ReactJS class used as the type for all [ReactElement]s built by /// this factory. @@ -249,53 +250,6 @@ class ReactDartComponentFactoryProxy2 extends Rea this.defaultProps = new JsBackedMap.fromJs(reactClass.defaultProps); ReactClass get type => reactClass; - - ReactElement build(Map props, [List childrenArgs = const []]) { - // TODO 3.1.0-wip if we don't pass in a list into React, we don't get a list back in Dart... - - List children; - if (childrenArgs.isEmpty) { - children = childrenArgs; - } else if (childrenArgs.length == 1) { - final singleChild = listifyChildren(childrenArgs[0]); - if (singleChild is List) { - children = singleChild; - } - } - - if (children == null) { - // FIXME 3.1.0-wip are we cool to modify this list? - // FIXME 3.1.0-wip why are there unmodifiable lists here? - children = childrenArgs.map(listifyChildren).toList(); - markChildrenValidated(children); - } - - return reactComponentFactory( - generateExtendedJsProps(props), - children, - ); - } - - /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for - /// consumption by the [react] library internals. - static JsMap generateExtendedJsProps(Map props) { - final propsForJs = new JsBackedMap.from(props); - - final ref = propsForJs['ref']; - if (ref != null) { - // If the ref is a callback, pass ReactJS a function that will call it - // with the Dart Component instance, not the ReactComponent instance. - if (ref is _CallbackRef) { - propsForJs['ref'] = allowInterop((ReactComponent instance) => ref(instance?.dartComponent)); - } - - if (ref is Ref) { - propsForJs['ref'] = ref.jsRef; - } - } - - return propsForJs.jsObject; - } } /// Converts a list of variadic children arguments to children that should be passed to ReactJS. @@ -738,7 +692,7 @@ class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { @override ReactElement build(Map props, [List childrenArgs]) { - dynamic children = _convertArgsToChildren(childrenArgs); + dynamic children = _generateChildren(childrenArgs); if (isConsumer) { if (children is Function) { @@ -749,7 +703,7 @@ class ReactJsContextComponentFactoryProxy extends ReactJsComponentFactoryProxy { } } - return factory(generateExtendedJsProps(props), children); + return React.createElement(type, generateExtendedJsProps(props), children); } /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for @@ -798,31 +752,10 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { @override ReactElement build(Map props, [List childrenArgs]) { - dynamic children = _convertArgsToChildren(childrenArgs); - - if (alwaysReturnChildrenAsList && children is! List) { - children = [children]; - } - - Map potentiallyConvertedProps; - - final mightNeedConverting = shouldConvertDomProps || props['ref'] != null; - if (mightNeedConverting) { - // We can't mutate the original since we can't be certain that the value of the - // the converted event handler will be compatible with the Map's type parameters. - // We also want to avoid mutating the original map where possible. - // So, make a copy and mutate that. - potentiallyConvertedProps = Map.from(props); - if (shouldConvertDomProps) { - _convertEventHandlers(potentiallyConvertedProps); - } - _convertRefValue(potentiallyConvertedProps); - } else { - potentiallyConvertedProps = props; - } - - // jsifyAndAllowInterop also handles converting props with nested Map/List structures, like `style` - return factory(jsifyAndAllowInterop(potentiallyConvertedProps), children); + dynamic children = _generateChildren(childrenArgs, shouldAlwaysBeList: alwaysReturnChildrenAsList); + JsMap convertedProps = _generateJsProps(props, + convertEventHandlers: shouldConvertDomProps || props['ref'] != null, convertCallbackRefValue: false); + return React.createElement(type, convertedProps, children); } } @@ -892,16 +825,9 @@ class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { @override ReactElement build(Map props, [List childrenArgs = const []]) { - var children = _convertArgsToChildren(childrenArgs); - children = listifyChildren(children); - - // We can't mutate the original since we can't be certain that the value of the - // the converted event handler will be compatible with the Map's type parameters. - var convertibleProps = new Map.from(props); - convertProps(convertibleProps); - - // jsifyAndAllowInterop also handles converting props with nested Map/List structures, like `style` - return factory(jsifyAndAllowInterop(convertibleProps), children); + var children = _generateChildren(childrenArgs); + var convertedProps = _generateJsProps(props); + return React.createElement(type, convertedProps, children); } /// Performs special handling of certain props for consumption by ReactJS DOM components. From b38fb994d278c272415257840d432815d3cac8d6 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 17:28:13 -0700 Subject: [PATCH 41/50] update _generateChildren to handle Iterables --- lib/react_client.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 906d70a9..64a9e62b 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -181,6 +181,7 @@ mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { /// - otherwise, the same list of args, will all top-level children validated dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) { var children; + if (childrenArgs.isEmpty) { if (!shouldAlwaysBeList) return null; children = childrenArgs; @@ -195,6 +196,10 @@ dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) } } + if (children is Iterable && children is! List) { + children = children.toList(growable: false); + } + if (children == null) { children = shouldAlwaysBeList ? childrenArgs.map(listifyChildren).toList() : childrenArgs; markChildrenValidated(children); @@ -250,6 +255,10 @@ class ReactDartComponentFactoryProxy2 extends Rea this.defaultProps = new JsBackedMap.fromJs(reactClass.defaultProps); ReactClass get type => reactClass; + + /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for + /// consumption by the [react] library internals. + static JsMap generateExtendedJsProps(Map props) => _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); } /// Converts a list of variadic children arguments to children that should be passed to ReactJS. @@ -826,7 +835,7 @@ class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy { @override ReactElement build(Map props, [List childrenArgs = const []]) { var children = _generateChildren(childrenArgs); - var convertedProps = _generateJsProps(props); + var convertedProps = _generateJsProps(props, convertCallbackRefValue: false, wrapWithJsify: true); return React.createElement(type, convertedProps, children); } From faadc3080a071831d90b8a1150fe68d84a1a188e Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Tue, 5 Nov 2019 17:33:25 -0700 Subject: [PATCH 42/50] Update comment for registerFunctionComponent --- lib/react.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/react.dart b/lib/react.dart index 46078d94..f1445441 100644 --- a/lib/react.dart +++ b/lib/react.dart @@ -1799,6 +1799,20 @@ ComponentRegistrar2 registerComponent2 = ( /// return ['I am a function component', ...props.children]; /// }); /// ``` +/// +/// Example with display name: +/// ``` +/// var myFunctionComponent = registerFunctionComponent((Map props) { +/// return ['I am a function component', ...props.children]; +/// }, displayName: 'myFunctionComponent'); +/// ``` +/// or with an inferred name from the Dart function +/// ``` +/// myDartFunctionComponent(Map props) { +/// return ['I am a function component', ...props.children]; +/// } +/// var myFunctionComponent = registerFunctionComponent(myDartFunctionComponent); +/// ``` FunctionComponentRegistrar registerFunctionComponent = (DartFunctionComponent componentFactory, {String displayName}) { throw new Exception('setClientConfiguration must be called before registerFunctionComponent.'); }; From a8db14cdb17d64a0df100ab8149fda2a1738f80a Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 6 Nov 2019 08:42:41 -0700 Subject: [PATCH 43/50] format --- lib/react_client.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 64a9e62b..b6349002 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -140,7 +140,6 @@ class ReactDartComponentFactoryProxy extends React } } - /// Creates and returns a new `ReactDartFunctionComponentFactoryProxy` from the provided [dartFunctionComponent] /// which produces a new `JsFunctionComponent`. ReactDartFunctionComponentFactoryProxy _registerFunctionComponent(DartFunctionComponent dartFunctionComponent, @@ -170,7 +169,6 @@ mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); } - /// Converts a list of variadic children arguments to children that should be passed to ReactJS. /// /// Returns: @@ -181,7 +179,7 @@ mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy { /// - otherwise, the same list of args, will all top-level children validated dynamic _generateChildren(List childrenArgs, {bool shouldAlwaysBeList = false}) { var children; - + if (childrenArgs.isEmpty) { if (!shouldAlwaysBeList) return null; children = childrenArgs; @@ -222,7 +220,6 @@ JsMap _generateJsProps(Map props, return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) : propsForJs.jsObject; } - void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { var ref = args['ref']; @@ -258,7 +255,8 @@ class ReactDartComponentFactoryProxy2 extends Rea /// Returns a JavaScript version of the specified [props], preprocessed for consumption by ReactJS and prepared for /// consumption by the [react] library internals. - static JsMap generateExtendedJsProps(Map props) => _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); + static JsMap generateExtendedJsProps(Map props) => + _generateJsProps(props, convertEventHandlers: false, wrapWithJsify: false); } /// Converts a list of variadic children arguments to children that should be passed to ReactJS. @@ -322,7 +320,6 @@ external List _objectKeys(Object object); @JS('Object.defineProperty') external void _defineProperty(dynamic object, String propertyName, JsMap descriptor); - @Deprecated('6.0.0') InteropContextValue _jsifyContext(Map context) { var interopContext = new InteropContextValue(); @@ -1276,7 +1273,8 @@ void setClientConfiguration() { throw new Exception('Loaded react.js must include react-dart JS interop helpers.'); } - setReactConfiguration(_reactDom, _registerComponent, customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); + setReactConfiguration(_reactDom, _registerComponent, + customRegisterComponent2: _registerComponent2, customRegisterFunctionComponent: _registerFunctionComponent); setReactDOMConfiguration(ReactDom.render, ReactDom.unmountComponentAtNode, _findDomNode); // Accessing ReactDomServer.renderToString when it's not available breaks in DDC. if (context['ReactDOMServer'] != null) { From 213b47d999f848feb3e904d07f778028ef29cffd Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 6 Nov 2019 10:36:15 -0700 Subject: [PATCH 44/50] organize imports --- lib/react_client/react_interop.dart | 2 +- test/factory/dart_function_factory_test.dart | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/react_client/react_interop.dart b/lib/react_client/react_interop.dart index bbc00da9..3567bf15 100644 --- a/lib/react_client/react_interop.dart +++ b/lib/react_client/react_interop.dart @@ -10,9 +10,9 @@ library react_client.react_interop; import 'dart:html'; +import 'package:js/js.dart'; import 'package:js/js_util.dart'; import 'package:meta/meta.dart'; -import 'package:js/js.dart'; import 'package:react/react.dart'; import 'package:react/react_client.dart' show ComponentFactory, ReactJsComponentFactoryProxy; import 'package:react/react_client/bridge.dart'; diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index fa3df031..1a960796 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -1,10 +1,12 @@ // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: invalid_use_of_protected_member -import 'package:js/js_util.dart'; @TestOn('browser') -import 'package:test/test.dart'; + +import 'package:js/js_util.dart'; import 'package:react/react.dart' as react; import 'package:react/react_client.dart'; +import 'package:test/test.dart'; + import 'common_factory_tests.dart'; main() { From 01e65a8f97fa505a95c9505a9189ad5bcc6c9c5e Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 6 Nov 2019 10:55:00 -0700 Subject: [PATCH 45/50] update doc comment for JsFunctionComponent --- lib/react_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index b6349002..3c3b282d 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -35,7 +35,7 @@ export 'package:react/react.dart' show ReactComponentFactoryProxy, ComponentFact /// See: typedef _CallbackRef(T componentOrDomNode); -/// The ReactJS function signature. +/// The function signature for ReactJS Function Components. /// /// - [props] will always be supplied as the first argument /// - [legacyContext] has been deprecated and should not be used but remains for backward compatibility and is necessary From af630c75880f29092cf1357846a83638dc5d8ca4 Mon Sep 17 00:00:00 2001 From: Keal Jones <41018730+kealjones-wk@users.noreply.github.com> Date: Wed, 13 Nov 2019 10:14:16 -0700 Subject: [PATCH 46/50] Apply suggestions from code review Co-Authored-By: Greg Littlefield --- lib/react_client.dart | 2 +- test/factory/dart_function_factory_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/react_client.dart b/lib/react_client.dart index 4f9ba095..5f4ac655 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -779,7 +779,7 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { ReactElement build(Map props, [List childrenArgs]) { dynamic children = _generateChildren(childrenArgs, shouldAlwaysBeList: alwaysReturnChildrenAsList); JsMap convertedProps = _generateJsProps(props, - convertEventHandlers: shouldConvertDomProps || props['ref'] != null, convertCallbackRefValue: false); + convertEventHandlers: shouldConvertDomProps, convertCallbackRefValue: false); return React.createElement(type, convertedProps, children); } } diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index 1a960796..64c3356c 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -23,7 +23,7 @@ main() { }); group('displayName', () { - test('gets automaticly populated when not provided', () { + test('gets automatically populated when not provided', () { expect(FunctionFoo.displayName, '_FunctionFoo'); expect(_getJsFunctionName(FunctionFoo.reactFunction), '_FunctionFoo'); From 1834105233113ecb12a96955d837fadd9dee7628 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 13 Nov 2019 10:43:14 -0700 Subject: [PATCH 47/50] fix bad merge --- lib/react.dart | 3 +-- lib/react_client.dart | 16 ++++++++-------- test/js_interop_helpers_test/shared_tests.dart | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/react.dart b/lib/react.dart index 363d6663..c983629a 100644 --- a/lib/react.dart +++ b/lib/react.dart @@ -19,8 +19,7 @@ export 'package:react/src/context.dart'; export 'package:react/src/prop_validator.dart'; export 'package:react/react_client/react_interop.dart' show forwardRef, createRef; -typedef Error PropValidator( - TProps props, String propName, String componentName, String location, String propFullName); +typedef Error PropValidator(TProps props, PropValidatorInfo info); /// A React component declared using a function that takes in [props] and returns rendered output. /// diff --git a/lib/react_client.dart b/lib/react_client.dart index 5f4ac655..7ba0d19d 100644 --- a/lib/react_client.dart +++ b/lib/react_client.dart @@ -233,12 +233,12 @@ void _convertRefValue2(Map args, {bool convertCallbackRefValue = true}) { if (ref is Ref) { args['ref'] = ref.jsRef; - // If the ref is a callback, pass ReactJS a function that will call it - // with the Dart Component instance, not the ReactComponent instance. - // - // Use _CallbackRef to check arity, since parameters could be non-dynamic, and thus - // would fail the `is _CallbackRef` check. - // See https://github.com/dart-lang/sdk/issues/34593 for more information on arity checks. + // If the ref is a callback, pass ReactJS a function that will call it + // with the Dart Component instance, not the ReactComponent instance. + // + // Use _CallbackRef to check arity, since parameters could be non-dynamic, and thus + // would fail the `is _CallbackRef` check. + // See https://github.com/dart-lang/sdk/issues/34593 for more information on arity checks. } else if (ref is _CallbackRef && convertCallbackRefValue) { args['ref'] = allowInterop((dynamic instance) { // Call as dynamic to perform dynamic dispatch, since we can't cast to _CallbackRef, @@ -778,8 +778,8 @@ class ReactJsComponentFactoryProxy extends ReactComponentFactoryProxy { @override ReactElement build(Map props, [List childrenArgs]) { dynamic children = _generateChildren(childrenArgs, shouldAlwaysBeList: alwaysReturnChildrenAsList); - JsMap convertedProps = _generateJsProps(props, - convertEventHandlers: shouldConvertDomProps, convertCallbackRefValue: false); + JsMap convertedProps = + _generateJsProps(props, convertEventHandlers: shouldConvertDomProps, convertCallbackRefValue: false); return React.createElement(type, convertedProps, children); } } diff --git a/test/js_interop_helpers_test/shared_tests.dart b/test/js_interop_helpers_test/shared_tests.dart index ddee050b..0f6586b4 100644 --- a/test/js_interop_helpers_test/shared_tests.dart +++ b/test/js_interop_helpers_test/shared_tests.dart @@ -21,7 +21,7 @@ void sharedJsFunctionTests() { group('JS functions:', () { group('markChildValidated', () { test('is function that does not throw when called', () { - expect(() => markChildValidated(js_util.newObject()), returnsNormally); + expect(() => markChildValidated(newObject()), returnsNormally); }); }); From 392994734718f46db271ac7beb82e52b34fc8ae3 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 13 Nov 2019 11:38:50 -0700 Subject: [PATCH 48/50] exclude function name test due to 2.4.1 --- .travis.yml | 5 +++-- dart_test.yaml | 2 ++ test/factory/dart_function_factory_test.dart | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 dart_test.yaml diff --git a/.travis.yml b/.travis.yml index 860f51d5..07c88e7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,5 +17,6 @@ before_script: - pub run dependency_validator -i build_runner,build_test,build_web_compilers script: - - pub run build_runner test --release -- -p chrome - - pub run build_runner test -- -p chrome + # TODO once production is above 2.4.1 re-check the `fails-on-2.4.1` tagged tests + - pub run build_runner test --release -- -p chrome -x fails-on-2.4.1 + - pub run build_runner test -- -p chrome -x fails-on-2.4.1 diff --git a/dart_test.yaml b/dart_test.yaml new file mode 100644 index 00000000..8a8808d8 --- /dev/null +++ b/dart_test.yaml @@ -0,0 +1,2 @@ +tags: + "fails-on-2.4.1": diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index 64c3356c..1b34c618 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -29,7 +29,7 @@ main() { expect(_getJsFunctionName(FunctionFoo.reactFunction), '_FunctionFoo'); expect(FunctionFoo.displayName, _getJsFunctionName(FunctionFoo.reactFunction)); - }); + }, tags: ['fails-on-2.4.1']); test('is populated by the provided argument', () { expect(NamedFunctionFoo.displayName, 'Bar'); From 3242857faf01ba51834a8a7a1521253630e9b9c9 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 13 Nov 2019 12:08:09 -0700 Subject: [PATCH 49/50] remove periods because linux --- .travis.yml | 2 +- dart_test.yaml | 2 +- test/factory/dart_function_factory_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07c88e7b..9e7719e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ before_script: script: # TODO once production is above 2.4.1 re-check the `fails-on-2.4.1` tagged tests - pub run build_runner test --release -- -p chrome -x fails-on-2.4.1 - - pub run build_runner test -- -p chrome -x fails-on-2.4.1 + - pub run build_runner test -- -p chrome -x fails-on-241 diff --git a/dart_test.yaml b/dart_test.yaml index 8a8808d8..31394c2a 100644 --- a/dart_test.yaml +++ b/dart_test.yaml @@ -1,2 +1,2 @@ tags: - "fails-on-2.4.1": + "fails-on-241": diff --git a/test/factory/dart_function_factory_test.dart b/test/factory/dart_function_factory_test.dart index 1b34c618..1a80db65 100644 --- a/test/factory/dart_function_factory_test.dart +++ b/test/factory/dart_function_factory_test.dart @@ -29,7 +29,7 @@ main() { expect(_getJsFunctionName(FunctionFoo.reactFunction), '_FunctionFoo'); expect(FunctionFoo.displayName, _getJsFunctionName(FunctionFoo.reactFunction)); - }, tags: ['fails-on-2.4.1']); + }, tags: ['fails-on-241']); test('is populated by the provided argument', () { expect(NamedFunctionFoo.displayName, 'Bar'); From a6278e07d4fcf780a5549e3175c3230cb8fddfe2 Mon Sep 17 00:00:00 2001 From: Keal Jones Date: Wed, 13 Nov 2019 12:57:46 -0700 Subject: [PATCH 50/50] fix 241 on release --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9e7719e1..eb164e29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,5 @@ before_script: script: # TODO once production is above 2.4.1 re-check the `fails-on-2.4.1` tagged tests - - pub run build_runner test --release -- -p chrome -x fails-on-2.4.1 + - pub run build_runner test --release -- -p chrome -x fails-on-241 - pub run build_runner test -- -p chrome -x fails-on-241