@appbaseio/reactivesearch-vue 3.0.0-rc.4 → 3.0.0-rc.5.alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +1 -1
  2. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  4. package/dist/cjs/version.js +1 -1
  5. package/dist/es/{Button-fd869491.js → Button-a376dd9b.js} +1 -1
  6. package/dist/es/{Card-54b9e7a0.js → Card-56bd984e.js} +2 -2
  7. package/dist/es/{ComponentWrapper-8a3c388d.js → ComponentWrapper-b43a546e.js} +3 -4
  8. package/dist/es/{Container-d00219f7.js → Container-6c21a1e6.js} +1 -1
  9. package/dist/es/{DropDown-fc1fef02.js → DropDown-59c3fbc7.js} +5 -5
  10. package/dist/es/DynamicRangeSlider.js +6 -7
  11. package/dist/es/{Flex-25792bc3.js → Flex-651f2422.js} +1 -1
  12. package/dist/es/{FormControlList-fe6eaee4.js → FormControlList-be0456b0.js} +1 -1
  13. package/dist/es/{Input-f7499ef8.js → Input-3126d7b6.js} +1 -1
  14. package/dist/es/{ListItem-e3c6acf4.js → ListItem-a25ed63a.js} +2 -2
  15. package/dist/es/MultiDropdownList.js +12 -14
  16. package/dist/es/MultiList.js +10 -12
  17. package/dist/es/MultiRange.js +9 -10
  18. package/dist/es/{Pagination-c2745bec.js → Pagination-874e01df.js} +2 -2
  19. package/dist/es/{PreferencesConsumer-b058d14e.js → PreferencesConsumer-9a3b0bac.js} +2 -2
  20. package/dist/es/RangeInput.js +11 -12
  21. package/dist/es/RangeSlider.js +8 -9
  22. package/dist/es/ReactiveBase.js +5508 -17
  23. package/dist/es/ReactiveComponent.js +5 -6
  24. package/dist/es/ReactiveGoogleMap.js +9 -10
  25. package/dist/es/ReactiveList.js +13 -14
  26. package/dist/es/ResultCard.js +3 -3
  27. package/dist/es/ResultList.js +3 -3
  28. package/dist/es/SelectedFilters.js +6 -7
  29. package/dist/es/SingleDropdownList.js +12 -14
  30. package/dist/es/SingleList.js +10 -12
  31. package/dist/es/SingleRange.js +9 -10
  32. package/dist/es/StateProvider.js +3 -4
  33. package/dist/es/{Title-863dfa42.js → Title-4b7614be.js} +1 -1
  34. package/dist/es/ToggleButton.js +8 -9
  35. package/dist/es/_rollupPluginBabelHelpers-dac426db.js +423 -0
  36. package/dist/es/helper-39773859.js +558 -0
  37. package/dist/es/{index-882489e1.js → index-b2212b15.js} +67 -3
  38. package/dist/es/index-b9203a60.js +10 -0
  39. package/dist/es/index.js +22 -29
  40. package/dist/es/initReactivesearch.js +2291 -3
  41. package/dist/es/{install-0c7962bc.js → install-d7f59dee.js} +1462 -146
  42. package/dist/es/install.js +21 -26
  43. package/dist/es/{ssr-c630ccb9.js → ssr-26e0b4af.js} +1 -1
  44. package/dist/es/transform-e41c9e5c.js +412 -0
  45. package/dist/es/utils-782d91c4.js +1315 -0
  46. package/dist/es/version.js +1 -1
  47. package/package.json +2 -2
  48. package/dist/es/_rollupPluginBabelHelpers-ded08042.js +0 -61
  49. package/dist/es/utils-d7dd4f4e.js +0 -60
@@ -1,34 +1,31 @@
1
1
  import { helper, Actions, causes } from '@appbaseio/reactivecore';
2
- import { SEARCH_COMPONENTS_MODES, componentTypes, TREELIST_VALUES_PATH_SEPARATOR } from '@appbaseio/reactivecore/lib/utils/constants';
3
- import _transformOn from '@vue/babel-helper-vue-transform-on';
4
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
2
+ import { g as getComponent, h as hasCustomRenderer, S as SEARCH_COMPONENTS_MODES, j as decodeHtml, i as isQueryIdentical, u as updateDefaultQuery, a as componentTypes$1, k as updateCustomQuery, b as isFunction, l as isEmpty, p as parseFocusShortcuts, m as extractModifierKeysFromFocusShortcuts, c as connect, T as TREELIST_VALUES_PATH_SEPARATOR } from './index-b2212b15.js';
3
+ import { _ as _transformOn } from './index-b9203a60.js';
4
+ import { a as _taggedTemplateLiteralLoose, _ as _extends } from './_rollupPluginBabelHelpers-dac426db.js';
5
5
  import { createVNode, createTextVNode, defineComponent, isVNode, mergeProps, h } from 'vue';
6
6
  import VueTypes from 'vue-types';
7
- import { getQueryOptions, suggestionTypes, recLookup, getClassName as getClassName$2, updateCustomQuery as updateCustomQuery$1, updateDefaultQuery as updateDefaultQuery$1, transformTreeListLocalStateIntoQueryComptaibleFormat, isEqual as isEqual$1, transformRawTreeListData, setDeep, getComponent as getComponent$1, getOptionsFromQuery, checkValueChange as checkValueChange$1, getAggsQuery, updateInternalQuery, isFunction as isFunction$1 } from '@appbaseio/reactivecore/lib/utils/helper';
7
+ import { g as getQueryOptions, s as suggestionTypes, r as recLookup, a as getClassName$2, u as updateCustomQuery$1, b as updateDefaultQuery$1, c as transformTreeListLocalStateIntoQueryComptaibleFormat, i as isEqual$1, d as transformRawTreeListData, e as setDeep, f as getComponent$1, h as getOptionsFromQuery, j as checkValueChange$1, k as getAggsQuery, l as updateInternalQuery, m as isFunction$1 } from './helper-39773859.js';
8
8
  import { styled, createGlobalStyle } from '@appbaseio/vue-emotion';
9
9
  import { css } from '@emotion/css';
10
- import { B as Button } from './Button-fd869491.js';
11
- import { t as types } from './vueTypes-f1923c72.js';
10
+ import { B as Button } from './Button-a376dd9b.js';
11
+ import { t as types$1 } from './vueTypes-f1923c72.js';
12
12
  import { RLConnected as ReactiveList } from './ReactiveList.js';
13
- import { getInternalComponentID } from '@appbaseio/reactivecore/lib/utils/transform';
14
- import { g as getComponent, h as hasCustomRenderer, f as decodeHtml, i as isQueryIdentical, u as updateDefaultQuery, j as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-882489e1.js';
15
- import { C as ComponentWrapper } from './ComponentWrapper-8a3c388d.js';
16
- import { P as PreferencesConsumer } from './PreferencesConsumer-b058d14e.js';
17
- import { T as Title } from './Title-863dfa42.js';
18
- import { L as ListItem } from './ListItem-e3c6acf4.js';
19
- import { F as Flex } from './Flex-25792bc3.js';
13
+ import { g as getInternalComponentID } from './transform-e41c9e5c.js';
14
+ import { C as ComponentWrapper } from './ComponentWrapper-b43a546e.js';
15
+ import { P as PreferencesConsumer } from './PreferencesConsumer-9a3b0bac.js';
16
+ import { T as Title } from './Title-4b7614be.js';
17
+ import { L as ListItem } from './ListItem-a25ed63a.js';
18
+ import { F as Flex } from './Flex-651f2422.js';
20
19
  import ReactiveBase from './ReactiveBase.js';
21
20
  import hotkeys from 'hotkeys-js';
22
- import { I as IconWrapper, C as CancelSvg, a as IconGroup, D as Downshift, b as InputWrapper } from './DropDown-fc1fef02.js';
23
- import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-f7499ef8.js';
24
- import { C as Container } from './Container-d00219f7.js';
21
+ import { I as IconWrapper, C as CancelSvg, a as IconGroup, D as Downshift, b as InputWrapper } from './DropDown-59c3fbc7.js';
22
+ import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-3126d7b6.js';
23
+ import { C as Container } from './Container-6c21a1e6.js';
25
24
  import Highlight from 'vue-highlight-words';
26
- import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
27
- import { C as Checkbox, R as Radio } from './FormControlList-fe6eaee4.js';
28
- import { s as sanitizeObject } from './utils-d7dd4f4e.js';
25
+ import { s as sanitizeObject, r as replaceDiacritics } from './utils-782d91c4.js';
26
+ import { C as Checkbox, R as Radio } from './FormControlList-be0456b0.js';
29
27
  import { ListConnected as SingleList } from './SingleList.js';
30
28
  import { ListConnected as MultiList } from './MultiList.js';
31
- import types$1 from '@appbaseio/reactivecore/lib/utils/types';
32
29
  import { ListConnected as SingleDropdownList } from './SingleDropdownList.js';
33
30
  import { ListConnected as MultiDropdownList } from './MultiDropdownList.js';
34
31
  import { TBConnected as ToggleButton } from './ToggleButton.js';
@@ -59,9 +56,9 @@ var getClassName = helper.getClassName;
59
56
  var SuggestionWrapper = {
60
57
  name: 'SuggestionWrapper',
61
58
  props: {
62
- innerClassName: types.string,
63
- themePreset: types.themePreset,
64
- innerClass: types.style
59
+ innerClassName: types$1.string,
60
+ themePreset: types$1.themePreset,
61
+ innerClass: types$1.style
65
62
  },
66
63
  render: function render() {
67
64
  var _this$$props = this.$props,
@@ -85,8 +82,8 @@ var PredictiveSuggestion = styled('span')(_templateObject$2 || (_templateObject$
85
82
  var SuggestionItem = {
86
83
  name: 'SuggestionItem',
87
84
  props: {
88
- currentValue: types.string,
89
- suggestion: types.any
85
+ currentValue: types$1.string,
86
+ suggestion: types$1.any
90
87
  },
91
88
  render: function render() {
92
89
  var _this = this;
@@ -488,15 +485,15 @@ var STATUS = {
488
485
  var Mic = {
489
486
  name: 'Mic',
490
487
  props: {
491
- children: types.title,
488
+ children: types$1.title,
492
489
  lang: VueTypes.string.def('en-US'),
493
490
  iconPosition: VueTypes.string.def('left'),
494
- handleResult: types.func,
495
- onNoMatch: types.func,
496
- onError: types.func,
497
- getInstance: types.func,
498
- render: types.func,
499
- className: types.string,
491
+ handleResult: types$1.func,
492
+ onNoMatch: types$1.func,
493
+ onError: types$1.func,
494
+ getInstance: types$1.func,
495
+ render: types$1.func,
496
+ className: types$1.string,
500
497
  applyClearStyle: VueTypes.bool,
501
498
  showIcon: VueTypes.bool
502
499
  },
@@ -821,13 +818,13 @@ var SearchBox = defineComponent({
821
818
  props: {
822
819
  autoFocus: VueTypes.bool,
823
820
  autosuggest: VueTypes.bool.def(true),
824
- beforeValueChange: types.func,
821
+ beforeValueChange: types$1.func,
825
822
  className: VueTypes.string.def(''),
826
- clearIcon: types.children,
827
- componentId: types.stringRequired,
828
- customHighlight: types.func,
829
- customQuery: types.func,
830
- defaultQuery: types.func,
823
+ clearIcon: types$1.children,
824
+ componentId: types$1.stringRequired,
825
+ customHighlight: types$1.func,
826
+ customQuery: types$1.func,
827
+ defaultQuery: types$1.func,
831
828
  dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
832
829
  field: VueTypes.string,
833
830
  weight: VueTypes.number
@@ -835,51 +832,51 @@ var SearchBox = defineComponent({
835
832
  field: VueTypes.string,
836
833
  weight: VueTypes.number
837
834
  })]),
838
- aggregationField: types.string,
835
+ aggregationField: types$1.string,
839
836
  aggregationSize: VueTypes.number,
840
837
  size: VueTypes.number,
841
838
  debounce: VueTypes.number.def(0),
842
- defaultValue: types.string,
843
- excludeFields: types.excludeFields,
844
- value: VueTypes.oneOfType([VueTypes.arrayOf(VueTypes.string), types.value]),
845
- defaultSuggestions: types.suggestions,
839
+ defaultValue: types$1.string,
840
+ excludeFields: types$1.excludeFields,
841
+ value: VueTypes.oneOfType([VueTypes.arrayOf(VueTypes.string), types$1.value]),
842
+ defaultSuggestions: types$1.suggestions,
846
843
  enableSynonyms: VueTypes.bool.def(true),
847
844
  enableQuerySuggestions: VueTypes.bool.def(false),
848
845
  enablePopularSuggestions: VueTypes.bool.def(false),
849
846
  enableRecentSuggestions: VueTypes.bool.def(false),
850
- fieldWeights: types.fieldWeights,
851
- filterLabel: types.string,
852
- fuzziness: types.fuzziness,
847
+ fieldWeights: types$1.fieldWeights,
848
+ filterLabel: types$1.string,
849
+ fuzziness: types$1.fuzziness,
853
850
  highlight: VueTypes.bool,
854
- highlightField: types.stringOrArray,
855
- icon: types.children,
851
+ highlightField: types$1.stringOrArray,
852
+ icon: types$1.children,
856
853
  iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
857
- includeFields: types.includeFields,
858
- innerClass: types.style,
854
+ includeFields: types$1.includeFields,
855
+ innerClass: types$1.style,
859
856
  innerRef: VueTypes.string.def('searchInputField'),
860
- render: types.func,
861
- renderNoSuggestion: types.title,
862
- renderError: types.title,
857
+ render: types$1.func,
858
+ renderNoSuggestion: types$1.title,
859
+ renderError: types$1.title,
863
860
  placeholder: VueTypes.string.def('Search'),
864
861
  queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
865
- react: types.react,
862
+ react: types$1.react,
866
863
  showClear: VueTypes.bool.def(true),
867
864
  showDistinctSuggestions: VueTypes.bool.def(true),
868
865
  showFilter: VueTypes.bool.def(true),
869
866
  showIcon: VueTypes.bool.def(true),
870
- title: types.title,
867
+ title: types$1.title,
871
868
  URLParams: VueTypes.bool.def(false),
872
869
  strictSelection: VueTypes.bool.def(false),
873
- nestedField: types.string,
870
+ nestedField: types$1.string,
874
871
  enablePredictiveSuggestions: VueTypes.bool.def(false),
875
872
  recentSearchesIcon: VueTypes.any,
876
873
  popularSearchesIcon: VueTypes.any,
877
874
  // mic props
878
875
  showVoiceSearch: VueTypes.bool.def(false),
879
- getMicInstance: types.func,
880
- renderMic: types.func,
881
- distinctField: types.string,
882
- distinctFieldConfig: types.props,
876
+ getMicInstance: types$1.func,
877
+ renderMic: types$1.func,
878
+ distinctField: types$1.string,
879
+ distinctFieldConfig: types$1.props,
883
880
  //
884
881
  focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
885
882
  addonBefore: VueTypes.any,
@@ -889,15 +886,15 @@ var SearchBox = defineComponent({
889
886
  popularSuggestionsConfig: VueTypes.object,
890
887
  recentSuggestionsConfig: VueTypes.object,
891
888
  applyStopwords: VueTypes.bool,
892
- customStopwords: types.stringArray,
893
- onData: types.func,
894
- renderItem: types.func,
889
+ customStopwords: types$1.stringArray,
890
+ onData: types$1.func,
891
+ renderItem: types$1.func,
895
892
  enterButton: VueTypes.bool.def(false),
896
893
  renderEnterButton: VueTypes.any,
897
894
  mode: VueTypes.oneOf(['select', 'tag']).def('select'),
898
895
  renderSelectedTags: VueTypes.any,
899
896
  searchboxId: VueTypes.string,
900
- endpoint: types.endpointConfig
897
+ endpoint: types$1.endpointConfig
901
898
  },
902
899
  mounted: function mounted() {
903
900
  this.listenForFocusShortcuts();
@@ -1139,7 +1136,7 @@ var SearchBox = defineComponent({
1139
1136
  componentId: this.internalComponent,
1140
1137
  query: query,
1141
1138
  value: value,
1142
- componentType: componentTypes.searchBox
1139
+ componentType: componentTypes$1.searchBox
1143
1140
  });
1144
1141
  },
1145
1142
  triggerCustomQuery: function triggerCustomQuery(paramValue, categoryValue) {
@@ -1172,7 +1169,7 @@ var SearchBox = defineComponent({
1172
1169
  label: filterLabel,
1173
1170
  showFilter: showFilter,
1174
1171
  URLParams: URLParams,
1175
- componentType: componentTypes.searchBox,
1172
+ componentType: componentTypes$1.searchBox,
1176
1173
  category: categoryValue
1177
1174
  });
1178
1175
  },
@@ -1849,7 +1846,7 @@ var mapDispatchToProps = {
1849
1846
  recordSuggestionClick: recordSuggestionClick
1850
1847
  };
1851
1848
  var SBConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchToProps)(SearchBox), {
1852
- componentType: componentTypes.searchBox,
1849
+ componentType: componentTypes$1.searchBox,
1853
1850
  internalComponent: true
1854
1851
  }));
1855
1852
  SBConnected.name = SearchBox.name;
@@ -1860,7 +1857,1326 @@ SBConnected.install = function (Vue) {
1860
1857
  Vue.component(SBConnected.name, SBConnected);
1861
1858
  };
1862
1859
  // Add componentType for SSR
1863
- SBConnected.componentType = componentTypes.searchBox;
1860
+ SBConnected.componentType = componentTypes$1.searchBox;
1861
+
1862
+ function _typeof(obj) {
1863
+ "@babel/helpers - typeof";
1864
+
1865
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1866
+ return typeof obj;
1867
+ } : function (obj) {
1868
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1869
+ }, _typeof(obj);
1870
+ }
1871
+ var propTypes = {
1872
+ exports: {}
1873
+ };
1874
+ var reactIs = {
1875
+ exports: {}
1876
+ };
1877
+ var reactIs_production_min = {};
1878
+ var hasRequiredReactIs_production_min;
1879
+ function requireReactIs_production_min() {
1880
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
1881
+ hasRequiredReactIs_production_min = 1;
1882
+ var b = "function" === typeof Symbol && Symbol["for"],
1883
+ c = b ? Symbol["for"]("react.element") : 60103,
1884
+ d = b ? Symbol["for"]("react.portal") : 60106,
1885
+ e = b ? Symbol["for"]("react.fragment") : 60107,
1886
+ f = b ? Symbol["for"]("react.strict_mode") : 60108,
1887
+ g = b ? Symbol["for"]("react.profiler") : 60114,
1888
+ h = b ? Symbol["for"]("react.provider") : 60109,
1889
+ k = b ? Symbol["for"]("react.context") : 60110,
1890
+ l = b ? Symbol["for"]("react.async_mode") : 60111,
1891
+ m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
1892
+ n = b ? Symbol["for"]("react.forward_ref") : 60112,
1893
+ p = b ? Symbol["for"]("react.suspense") : 60113,
1894
+ q = b ? Symbol["for"]("react.suspense_list") : 60120,
1895
+ r = b ? Symbol["for"]("react.memo") : 60115,
1896
+ t = b ? Symbol["for"]("react.lazy") : 60116,
1897
+ v = b ? Symbol["for"]("react.block") : 60121,
1898
+ w = b ? Symbol["for"]("react.fundamental") : 60117,
1899
+ x = b ? Symbol["for"]("react.responder") : 60118,
1900
+ y = b ? Symbol["for"]("react.scope") : 60119;
1901
+ function z(a) {
1902
+ if ("object" === _typeof(a) && null !== a) {
1903
+ var u = a.$$typeof;
1904
+ switch (u) {
1905
+ case c:
1906
+ switch (a = a.type, a) {
1907
+ case l:
1908
+ case m:
1909
+ case e:
1910
+ case g:
1911
+ case f:
1912
+ case p:
1913
+ return a;
1914
+ default:
1915
+ switch (a = a && a.$$typeof, a) {
1916
+ case k:
1917
+ case n:
1918
+ case t:
1919
+ case r:
1920
+ case h:
1921
+ return a;
1922
+ default:
1923
+ return u;
1924
+ }
1925
+ }
1926
+ case d:
1927
+ return u;
1928
+ }
1929
+ }
1930
+ }
1931
+ function A(a) {
1932
+ return z(a) === m;
1933
+ }
1934
+ reactIs_production_min.AsyncMode = l;
1935
+ reactIs_production_min.ConcurrentMode = m;
1936
+ reactIs_production_min.ContextConsumer = k;
1937
+ reactIs_production_min.ContextProvider = h;
1938
+ reactIs_production_min.Element = c;
1939
+ reactIs_production_min.ForwardRef = n;
1940
+ reactIs_production_min.Fragment = e;
1941
+ reactIs_production_min.Lazy = t;
1942
+ reactIs_production_min.Memo = r;
1943
+ reactIs_production_min.Portal = d;
1944
+ reactIs_production_min.Profiler = g;
1945
+ reactIs_production_min.StrictMode = f;
1946
+ reactIs_production_min.Suspense = p;
1947
+ reactIs_production_min.isAsyncMode = function (a) {
1948
+ return A(a) || z(a) === l;
1949
+ };
1950
+ reactIs_production_min.isConcurrentMode = A;
1951
+ reactIs_production_min.isContextConsumer = function (a) {
1952
+ return z(a) === k;
1953
+ };
1954
+ reactIs_production_min.isContextProvider = function (a) {
1955
+ return z(a) === h;
1956
+ };
1957
+ reactIs_production_min.isElement = function (a) {
1958
+ return "object" === _typeof(a) && null !== a && a.$$typeof === c;
1959
+ };
1960
+ reactIs_production_min.isForwardRef = function (a) {
1961
+ return z(a) === n;
1962
+ };
1963
+ reactIs_production_min.isFragment = function (a) {
1964
+ return z(a) === e;
1965
+ };
1966
+ reactIs_production_min.isLazy = function (a) {
1967
+ return z(a) === t;
1968
+ };
1969
+ reactIs_production_min.isMemo = function (a) {
1970
+ return z(a) === r;
1971
+ };
1972
+ reactIs_production_min.isPortal = function (a) {
1973
+ return z(a) === d;
1974
+ };
1975
+ reactIs_production_min.isProfiler = function (a) {
1976
+ return z(a) === g;
1977
+ };
1978
+ reactIs_production_min.isStrictMode = function (a) {
1979
+ return z(a) === f;
1980
+ };
1981
+ reactIs_production_min.isSuspense = function (a) {
1982
+ return z(a) === p;
1983
+ };
1984
+ reactIs_production_min.isValidElementType = function (a) {
1985
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
1986
+ };
1987
+ reactIs_production_min.typeOf = z;
1988
+ return reactIs_production_min;
1989
+ }
1990
+ var reactIs_development = {};
1991
+ var hasRequiredReactIs_development;
1992
+ function requireReactIs_development() {
1993
+ if (hasRequiredReactIs_development) return reactIs_development;
1994
+ hasRequiredReactIs_development = 1;
1995
+ if (process.env.NODE_ENV !== "production") {
1996
+ (function () {
1997
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1998
+ // nor polyfill, then a plain number is used for performance.
1999
+ var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
2000
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol["for"]('react.element') : 0xeac7;
2001
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol["for"]('react.portal') : 0xeaca;
2002
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol["for"]('react.fragment') : 0xeacb;
2003
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.strict_mode') : 0xeacc;
2004
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol["for"]('react.profiler') : 0xead2;
2005
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol["for"]('react.provider') : 0xeacd;
2006
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol["for"]('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
2007
+ // (unstable) APIs that have been removed. Can we remove the symbols?
2008
+
2009
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol["for"]('react.async_mode') : 0xeacf;
2010
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.concurrent_mode') : 0xeacf;
2011
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol["for"]('react.forward_ref') : 0xead0;
2012
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol["for"]('react.suspense') : 0xead1;
2013
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol["for"]('react.suspense_list') : 0xead8;
2014
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol["for"]('react.memo') : 0xead3;
2015
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol["for"]('react.lazy') : 0xead4;
2016
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol["for"]('react.block') : 0xead9;
2017
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol["for"]('react.fundamental') : 0xead5;
2018
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol["for"]('react.responder') : 0xead6;
2019
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol["for"]('react.scope') : 0xead7;
2020
+ function isValidElementType(type) {
2021
+ return typeof type === 'string' || typeof type === 'function' ||
2022
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
2023
+ 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 || type.$$typeof === REACT_BLOCK_TYPE);
2024
+ }
2025
+ function typeOf(object) {
2026
+ if (_typeof(object) === 'object' && object !== null) {
2027
+ var $$typeof = object.$$typeof;
2028
+ switch ($$typeof) {
2029
+ case REACT_ELEMENT_TYPE:
2030
+ var type = object.type;
2031
+ switch (type) {
2032
+ case REACT_ASYNC_MODE_TYPE:
2033
+ case REACT_CONCURRENT_MODE_TYPE:
2034
+ case REACT_FRAGMENT_TYPE:
2035
+ case REACT_PROFILER_TYPE:
2036
+ case REACT_STRICT_MODE_TYPE:
2037
+ case REACT_SUSPENSE_TYPE:
2038
+ return type;
2039
+ default:
2040
+ var $$typeofType = type && type.$$typeof;
2041
+ switch ($$typeofType) {
2042
+ case REACT_CONTEXT_TYPE:
2043
+ case REACT_FORWARD_REF_TYPE:
2044
+ case REACT_LAZY_TYPE:
2045
+ case REACT_MEMO_TYPE:
2046
+ case REACT_PROVIDER_TYPE:
2047
+ return $$typeofType;
2048
+ default:
2049
+ return $$typeof;
2050
+ }
2051
+ }
2052
+ case REACT_PORTAL_TYPE:
2053
+ return $$typeof;
2054
+ }
2055
+ }
2056
+ return undefined;
2057
+ } // AsyncMode is deprecated along with isAsyncMode
2058
+
2059
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
2060
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
2061
+ var ContextConsumer = REACT_CONTEXT_TYPE;
2062
+ var ContextProvider = REACT_PROVIDER_TYPE;
2063
+ var Element = REACT_ELEMENT_TYPE;
2064
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
2065
+ var Fragment = REACT_FRAGMENT_TYPE;
2066
+ var Lazy = REACT_LAZY_TYPE;
2067
+ var Memo = REACT_MEMO_TYPE;
2068
+ var Portal = REACT_PORTAL_TYPE;
2069
+ var Profiler = REACT_PROFILER_TYPE;
2070
+ var StrictMode = REACT_STRICT_MODE_TYPE;
2071
+ var Suspense = REACT_SUSPENSE_TYPE;
2072
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
2073
+
2074
+ function isAsyncMode(object) {
2075
+ {
2076
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
2077
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
2078
+
2079
+ console['warn']('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.');
2080
+ }
2081
+ }
2082
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
2083
+ }
2084
+ function isConcurrentMode(object) {
2085
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
2086
+ }
2087
+ function isContextConsumer(object) {
2088
+ return typeOf(object) === REACT_CONTEXT_TYPE;
2089
+ }
2090
+ function isContextProvider(object) {
2091
+ return typeOf(object) === REACT_PROVIDER_TYPE;
2092
+ }
2093
+ function isElement(object) {
2094
+ return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2095
+ }
2096
+ function isForwardRef(object) {
2097
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
2098
+ }
2099
+ function isFragment(object) {
2100
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
2101
+ }
2102
+ function isLazy(object) {
2103
+ return typeOf(object) === REACT_LAZY_TYPE;
2104
+ }
2105
+ function isMemo(object) {
2106
+ return typeOf(object) === REACT_MEMO_TYPE;
2107
+ }
2108
+ function isPortal(object) {
2109
+ return typeOf(object) === REACT_PORTAL_TYPE;
2110
+ }
2111
+ function isProfiler(object) {
2112
+ return typeOf(object) === REACT_PROFILER_TYPE;
2113
+ }
2114
+ function isStrictMode(object) {
2115
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
2116
+ }
2117
+ function isSuspense(object) {
2118
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
2119
+ }
2120
+ reactIs_development.AsyncMode = AsyncMode;
2121
+ reactIs_development.ConcurrentMode = ConcurrentMode;
2122
+ reactIs_development.ContextConsumer = ContextConsumer;
2123
+ reactIs_development.ContextProvider = ContextProvider;
2124
+ reactIs_development.Element = Element;
2125
+ reactIs_development.ForwardRef = ForwardRef;
2126
+ reactIs_development.Fragment = Fragment;
2127
+ reactIs_development.Lazy = Lazy;
2128
+ reactIs_development.Memo = Memo;
2129
+ reactIs_development.Portal = Portal;
2130
+ reactIs_development.Profiler = Profiler;
2131
+ reactIs_development.StrictMode = StrictMode;
2132
+ reactIs_development.Suspense = Suspense;
2133
+ reactIs_development.isAsyncMode = isAsyncMode;
2134
+ reactIs_development.isConcurrentMode = isConcurrentMode;
2135
+ reactIs_development.isContextConsumer = isContextConsumer;
2136
+ reactIs_development.isContextProvider = isContextProvider;
2137
+ reactIs_development.isElement = isElement;
2138
+ reactIs_development.isForwardRef = isForwardRef;
2139
+ reactIs_development.isFragment = isFragment;
2140
+ reactIs_development.isLazy = isLazy;
2141
+ reactIs_development.isMemo = isMemo;
2142
+ reactIs_development.isPortal = isPortal;
2143
+ reactIs_development.isProfiler = isProfiler;
2144
+ reactIs_development.isStrictMode = isStrictMode;
2145
+ reactIs_development.isSuspense = isSuspense;
2146
+ reactIs_development.isValidElementType = isValidElementType;
2147
+ reactIs_development.typeOf = typeOf;
2148
+ })();
2149
+ }
2150
+ return reactIs_development;
2151
+ }
2152
+ var hasRequiredReactIs;
2153
+ function requireReactIs() {
2154
+ if (hasRequiredReactIs) return reactIs.exports;
2155
+ hasRequiredReactIs = 1;
2156
+ if (process.env.NODE_ENV === 'production') {
2157
+ reactIs.exports = requireReactIs_production_min();
2158
+ } else {
2159
+ reactIs.exports = requireReactIs_development();
2160
+ }
2161
+ return reactIs.exports;
2162
+ }
2163
+
2164
+ /*
2165
+ object-assign
2166
+ (c) Sindre Sorhus
2167
+ @license MIT
2168
+ */
2169
+ var objectAssign;
2170
+ var hasRequiredObjectAssign;
2171
+ function requireObjectAssign() {
2172
+ if (hasRequiredObjectAssign) return objectAssign;
2173
+ hasRequiredObjectAssign = 1;
2174
+ /* eslint-disable no-unused-vars */
2175
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2176
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2177
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2178
+ function toObject(val) {
2179
+ if (val === null || val === undefined) {
2180
+ throw new TypeError('Object.assign cannot be called with null or undefined');
2181
+ }
2182
+ return Object(val);
2183
+ }
2184
+ function shouldUseNative() {
2185
+ try {
2186
+ if (!Object.assign) {
2187
+ return false;
2188
+ }
2189
+
2190
+ // Detect buggy property enumeration order in older V8 versions.
2191
+
2192
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2193
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
2194
+ test1[5] = 'de';
2195
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
2196
+ return false;
2197
+ }
2198
+
2199
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2200
+ var test2 = {};
2201
+ for (var i = 0; i < 10; i++) {
2202
+ test2['_' + String.fromCharCode(i)] = i;
2203
+ }
2204
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2205
+ return test2[n];
2206
+ });
2207
+ if (order2.join('') !== '0123456789') {
2208
+ return false;
2209
+ }
2210
+
2211
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2212
+ var test3 = {};
2213
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2214
+ test3[letter] = letter;
2215
+ });
2216
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
2217
+ return false;
2218
+ }
2219
+ return true;
2220
+ } catch (err) {
2221
+ // We don't expect any of the above to throw, but better to be safe.
2222
+ return false;
2223
+ }
2224
+ }
2225
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
2226
+ var from;
2227
+ var to = toObject(target);
2228
+ var symbols;
2229
+ for (var s = 1; s < arguments.length; s++) {
2230
+ from = Object(arguments[s]);
2231
+ for (var key in from) {
2232
+ if (hasOwnProperty.call(from, key)) {
2233
+ to[key] = from[key];
2234
+ }
2235
+ }
2236
+ if (getOwnPropertySymbols) {
2237
+ symbols = getOwnPropertySymbols(from);
2238
+ for (var i = 0; i < symbols.length; i++) {
2239
+ if (propIsEnumerable.call(from, symbols[i])) {
2240
+ to[symbols[i]] = from[symbols[i]];
2241
+ }
2242
+ }
2243
+ }
2244
+ }
2245
+ return to;
2246
+ };
2247
+ return objectAssign;
2248
+ }
2249
+
2250
+ /**
2251
+ * Copyright (c) 2013-present, Facebook, Inc.
2252
+ *
2253
+ * This source code is licensed under the MIT license found in the
2254
+ * LICENSE file in the root directory of this source tree.
2255
+ */
2256
+ var ReactPropTypesSecret_1;
2257
+ var hasRequiredReactPropTypesSecret;
2258
+ function requireReactPropTypesSecret() {
2259
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
2260
+ hasRequiredReactPropTypesSecret = 1;
2261
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2262
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
2263
+ return ReactPropTypesSecret_1;
2264
+ }
2265
+ var has;
2266
+ var hasRequiredHas;
2267
+ function requireHas() {
2268
+ if (hasRequiredHas) return has;
2269
+ hasRequiredHas = 1;
2270
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
2271
+ return has;
2272
+ }
2273
+ var checkPropTypes_1;
2274
+ var hasRequiredCheckPropTypes;
2275
+ function requireCheckPropTypes() {
2276
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
2277
+ hasRequiredCheckPropTypes = 1;
2278
+ var printWarning = function printWarning() {};
2279
+ if (process.env.NODE_ENV !== 'production') {
2280
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
2281
+ var loggedTypeFailures = {};
2282
+ var has = requireHas();
2283
+ printWarning = function printWarning(text) {
2284
+ var message = 'Warning: ' + text;
2285
+ if (typeof console !== 'undefined') {
2286
+ console.error(message);
2287
+ }
2288
+ try {
2289
+ // --- Welcome to debugging React ---
2290
+ // This error was thrown as a convenience so that you can use this stack
2291
+ // to find the callsite that caused this warning to fire.
2292
+ throw new Error(message);
2293
+ } catch (x) {/**/}
2294
+ };
2295
+ }
2296
+
2297
+ /**
2298
+ * Assert that the values match with the type specs.
2299
+ * Error messages are memorized and will only be shown once.
2300
+ *
2301
+ * @param {object} typeSpecs Map of name to a ReactPropType
2302
+ * @param {object} values Runtime values that need to be type-checked
2303
+ * @param {string} location e.g. "prop", "context", "child context"
2304
+ * @param {string} componentName Name of the component for error messages.
2305
+ * @param {?Function} getStack Returns the component stack.
2306
+ * @private
2307
+ */
2308
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2309
+ if (process.env.NODE_ENV !== 'production') {
2310
+ for (var typeSpecName in typeSpecs) {
2311
+ if (has(typeSpecs, typeSpecName)) {
2312
+ var error;
2313
+ // Prop type validation may throw. In case they do, we don't want to
2314
+ // fail the render phase where it didn't fail before. So we log it.
2315
+ // After these have been cleaned up, we'll let them throw.
2316
+ try {
2317
+ // This is intentionally an invariant that gets caught. It's the same
2318
+ // behavior as without this statement except with a better message.
2319
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
2320
+ 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]) + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
2321
+ err.name = 'Invariant Violation';
2322
+ throw err;
2323
+ }
2324
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2325
+ } catch (ex) {
2326
+ error = ex;
2327
+ }
2328
+ if (error && !(error instanceof Error)) {
2329
+ 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).');
2330
+ }
2331
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2332
+ // Only monitor this failure once because there tends to be a lot of the
2333
+ // same error.
2334
+ loggedTypeFailures[error.message] = true;
2335
+ var stack = getStack ? getStack() : '';
2336
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
2337
+ }
2338
+ }
2339
+ }
2340
+ }
2341
+ }
2342
+
2343
+ /**
2344
+ * Resets warning cache when testing.
2345
+ *
2346
+ * @private
2347
+ */
2348
+ checkPropTypes.resetWarningCache = function () {
2349
+ if (process.env.NODE_ENV !== 'production') {
2350
+ loggedTypeFailures = {};
2351
+ }
2352
+ };
2353
+ checkPropTypes_1 = checkPropTypes;
2354
+ return checkPropTypes_1;
2355
+ }
2356
+ var factoryWithTypeCheckers;
2357
+ var hasRequiredFactoryWithTypeCheckers;
2358
+ function requireFactoryWithTypeCheckers() {
2359
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
2360
+ hasRequiredFactoryWithTypeCheckers = 1;
2361
+ var ReactIs = requireReactIs();
2362
+ var assign = requireObjectAssign();
2363
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
2364
+ var has = requireHas();
2365
+ var checkPropTypes = requireCheckPropTypes();
2366
+ var printWarning = function printWarning() {};
2367
+ if (process.env.NODE_ENV !== 'production') {
2368
+ printWarning = function printWarning(text) {
2369
+ var message = 'Warning: ' + text;
2370
+ if (typeof console !== 'undefined') {
2371
+ console.error(message);
2372
+ }
2373
+ try {
2374
+ // --- Welcome to debugging React ---
2375
+ // This error was thrown as a convenience so that you can use this stack
2376
+ // to find the callsite that caused this warning to fire.
2377
+ throw new Error(message);
2378
+ } catch (x) {}
2379
+ };
2380
+ }
2381
+ function emptyFunctionThatReturnsNull() {
2382
+ return null;
2383
+ }
2384
+ factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
2385
+ /* global Symbol */
2386
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2387
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
2388
+
2389
+ /**
2390
+ * Returns the iterator method function contained on the iterable object.
2391
+ *
2392
+ * Be sure to invoke the function with the iterable as context:
2393
+ *
2394
+ * var iteratorFn = getIteratorFn(myIterable);
2395
+ * if (iteratorFn) {
2396
+ * var iterator = iteratorFn.call(myIterable);
2397
+ * ...
2398
+ * }
2399
+ *
2400
+ * @param {?object} maybeIterable
2401
+ * @return {?function}
2402
+ */
2403
+ function getIteratorFn(maybeIterable) {
2404
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
2405
+ if (typeof iteratorFn === 'function') {
2406
+ return iteratorFn;
2407
+ }
2408
+ }
2409
+
2410
+ /**
2411
+ * Collection of methods that allow declaration and validation of props that are
2412
+ * supplied to React components. Example usage:
2413
+ *
2414
+ * var Props = require('ReactPropTypes');
2415
+ * var MyArticle = React.createClass({
2416
+ * propTypes: {
2417
+ * // An optional string prop named "description".
2418
+ * description: Props.string,
2419
+ *
2420
+ * // A required enum prop named "category".
2421
+ * category: Props.oneOf(['News','Photos']).isRequired,
2422
+ *
2423
+ * // A prop named "dialog" that requires an instance of Dialog.
2424
+ * dialog: Props.instanceOf(Dialog).isRequired
2425
+ * },
2426
+ * render: function() { ... }
2427
+ * });
2428
+ *
2429
+ * A more formal specification of how these methods are used:
2430
+ *
2431
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
2432
+ * decl := ReactPropTypes.{type}(.isRequired)?
2433
+ *
2434
+ * Each and every declaration produces a function with the same signature. This
2435
+ * allows the creation of custom validation functions. For example:
2436
+ *
2437
+ * var MyLink = React.createClass({
2438
+ * propTypes: {
2439
+ * // An optional string or URI prop named "href".
2440
+ * href: function(props, propName, componentName) {
2441
+ * var propValue = props[propName];
2442
+ * if (propValue != null && typeof propValue !== 'string' &&
2443
+ * !(propValue instanceof URI)) {
2444
+ * return new Error(
2445
+ * 'Expected a string or an URI for ' + propName + ' in ' +
2446
+ * componentName
2447
+ * );
2448
+ * }
2449
+ * }
2450
+ * },
2451
+ * render: function() {...}
2452
+ * });
2453
+ *
2454
+ * @internal
2455
+ */
2456
+
2457
+ var ANONYMOUS = '<<anonymous>>';
2458
+
2459
+ // Important!
2460
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
2461
+ var ReactPropTypes = {
2462
+ array: createPrimitiveTypeChecker('array'),
2463
+ bigint: createPrimitiveTypeChecker('bigint'),
2464
+ bool: createPrimitiveTypeChecker('boolean'),
2465
+ func: createPrimitiveTypeChecker('function'),
2466
+ number: createPrimitiveTypeChecker('number'),
2467
+ object: createPrimitiveTypeChecker('object'),
2468
+ string: createPrimitiveTypeChecker('string'),
2469
+ symbol: createPrimitiveTypeChecker('symbol'),
2470
+ any: createAnyTypeChecker(),
2471
+ arrayOf: createArrayOfTypeChecker,
2472
+ element: createElementTypeChecker(),
2473
+ elementType: createElementTypeTypeChecker(),
2474
+ instanceOf: createInstanceTypeChecker,
2475
+ node: createNodeChecker(),
2476
+ objectOf: createObjectOfTypeChecker,
2477
+ oneOf: createEnumTypeChecker,
2478
+ oneOfType: createUnionTypeChecker,
2479
+ shape: createShapeTypeChecker,
2480
+ exact: createStrictShapeTypeChecker
2481
+ };
2482
+
2483
+ /**
2484
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
2485
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2486
+ */
2487
+ /*eslint-disable no-self-compare*/
2488
+ function is(x, y) {
2489
+ // SameValue algorithm
2490
+ if (x === y) {
2491
+ // Steps 1-5, 7-10
2492
+ // Steps 6.b-6.e: +0 != -0
2493
+ return x !== 0 || 1 / x === 1 / y;
2494
+ } else {
2495
+ // Step 6.a: NaN == NaN
2496
+ return x !== x && y !== y;
2497
+ }
2498
+ }
2499
+ /*eslint-enable no-self-compare*/
2500
+
2501
+ /**
2502
+ * We use an Error-like object for backward compatibility as people may call
2503
+ * PropTypes directly and inspect their output. However, we don't use real
2504
+ * Errors anymore. We don't inspect their stack anyway, and creating them
2505
+ * is prohibitively expensive if they are created too often, such as what
2506
+ * happens in oneOfType() for any type before the one that matched.
2507
+ */
2508
+ function PropTypeError(message, data) {
2509
+ this.message = message;
2510
+ this.data = data && _typeof(data) === 'object' ? data : {};
2511
+ this.stack = '';
2512
+ }
2513
+ // Make `instanceof Error` still work for returned errors.
2514
+ PropTypeError.prototype = Error.prototype;
2515
+ function createChainableTypeChecker(validate) {
2516
+ if (process.env.NODE_ENV !== 'production') {
2517
+ var manualPropTypeCallCache = {};
2518
+ var manualPropTypeWarningCount = 0;
2519
+ }
2520
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
2521
+ componentName = componentName || ANONYMOUS;
2522
+ propFullName = propFullName || propName;
2523
+ if (secret !== ReactPropTypesSecret) {
2524
+ if (throwOnDirectAccess) {
2525
+ // New behavior only for users of `prop-types` package
2526
+ 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');
2527
+ err.name = 'Invariant Violation';
2528
+ throw err;
2529
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
2530
+ // Old behavior for people using React.PropTypes
2531
+ var cacheKey = componentName + ':' + propName;
2532
+ if (!manualPropTypeCallCache[cacheKey] &&
2533
+ // Avoid spamming the console because they are often not actionable except for lib authors
2534
+ manualPropTypeWarningCount < 3) {
2535
+ 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.');
2536
+ manualPropTypeCallCache[cacheKey] = true;
2537
+ manualPropTypeWarningCount++;
2538
+ }
2539
+ }
2540
+ }
2541
+ if (props[propName] == null) {
2542
+ if (isRequired) {
2543
+ if (props[propName] === null) {
2544
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2545
+ }
2546
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2547
+ }
2548
+ return null;
2549
+ } else {
2550
+ return validate(props, propName, componentName, location, propFullName);
2551
+ }
2552
+ }
2553
+ var chainedCheckType = checkType.bind(null, false);
2554
+ chainedCheckType.isRequired = checkType.bind(null, true);
2555
+ return chainedCheckType;
2556
+ }
2557
+ function createPrimitiveTypeChecker(expectedType) {
2558
+ function validate(props, propName, componentName, location, propFullName, secret) {
2559
+ var propValue = props[propName];
2560
+ var propType = getPropType(propValue);
2561
+ if (propType !== expectedType) {
2562
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
2563
+ // check, but we can offer a more precise error message here rather than
2564
+ // 'of type `object`'.
2565
+ var preciseType = getPreciseType(propValue);
2566
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
2567
+ expectedType: expectedType
2568
+ });
2569
+ }
2570
+ return null;
2571
+ }
2572
+ return createChainableTypeChecker(validate);
2573
+ }
2574
+ function createAnyTypeChecker() {
2575
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
2576
+ }
2577
+ function createArrayOfTypeChecker(typeChecker) {
2578
+ function validate(props, propName, componentName, location, propFullName) {
2579
+ if (typeof typeChecker !== 'function') {
2580
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
2581
+ }
2582
+ var propValue = props[propName];
2583
+ if (!Array.isArray(propValue)) {
2584
+ var propType = getPropType(propValue);
2585
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2586
+ }
2587
+ for (var i = 0; i < propValue.length; i++) {
2588
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
2589
+ if (error instanceof Error) {
2590
+ return error;
2591
+ }
2592
+ }
2593
+ return null;
2594
+ }
2595
+ return createChainableTypeChecker(validate);
2596
+ }
2597
+ function createElementTypeChecker() {
2598
+ function validate(props, propName, componentName, location, propFullName) {
2599
+ var propValue = props[propName];
2600
+ if (!isValidElement(propValue)) {
2601
+ var propType = getPropType(propValue);
2602
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2603
+ }
2604
+ return null;
2605
+ }
2606
+ return createChainableTypeChecker(validate);
2607
+ }
2608
+ function createElementTypeTypeChecker() {
2609
+ function validate(props, propName, componentName, location, propFullName) {
2610
+ var propValue = props[propName];
2611
+ if (!ReactIs.isValidElementType(propValue)) {
2612
+ var propType = getPropType(propValue);
2613
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
2614
+ }
2615
+ return null;
2616
+ }
2617
+ return createChainableTypeChecker(validate);
2618
+ }
2619
+ function createInstanceTypeChecker(expectedClass) {
2620
+ function validate(props, propName, componentName, location, propFullName) {
2621
+ if (!(props[propName] instanceof expectedClass)) {
2622
+ var expectedClassName = expectedClass.name || ANONYMOUS;
2623
+ var actualClassName = getClassName(props[propName]);
2624
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2625
+ }
2626
+ return null;
2627
+ }
2628
+ return createChainableTypeChecker(validate);
2629
+ }
2630
+ function createEnumTypeChecker(expectedValues) {
2631
+ if (!Array.isArray(expectedValues)) {
2632
+ if (process.env.NODE_ENV !== 'production') {
2633
+ if (arguments.length > 1) {
2634
+ 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]).');
2635
+ } else {
2636
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
2637
+ }
2638
+ }
2639
+ return emptyFunctionThatReturnsNull;
2640
+ }
2641
+ function validate(props, propName, componentName, location, propFullName) {
2642
+ var propValue = props[propName];
2643
+ for (var i = 0; i < expectedValues.length; i++) {
2644
+ if (is(propValue, expectedValues[i])) {
2645
+ return null;
2646
+ }
2647
+ }
2648
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
2649
+ var type = getPreciseType(value);
2650
+ if (type === 'symbol') {
2651
+ return String(value);
2652
+ }
2653
+ return value;
2654
+ });
2655
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2656
+ }
2657
+ return createChainableTypeChecker(validate);
2658
+ }
2659
+ function createObjectOfTypeChecker(typeChecker) {
2660
+ function validate(props, propName, componentName, location, propFullName) {
2661
+ if (typeof typeChecker !== 'function') {
2662
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
2663
+ }
2664
+ var propValue = props[propName];
2665
+ var propType = getPropType(propValue);
2666
+ if (propType !== 'object') {
2667
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2668
+ }
2669
+ for (var key in propValue) {
2670
+ if (has(propValue, key)) {
2671
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2672
+ if (error instanceof Error) {
2673
+ return error;
2674
+ }
2675
+ }
2676
+ }
2677
+ return null;
2678
+ }
2679
+ return createChainableTypeChecker(validate);
2680
+ }
2681
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
2682
+ if (!Array.isArray(arrayOfTypeCheckers)) {
2683
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
2684
+ return emptyFunctionThatReturnsNull;
2685
+ }
2686
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2687
+ var checker = arrayOfTypeCheckers[i];
2688
+ if (typeof checker !== 'function') {
2689
+ printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
2690
+ return emptyFunctionThatReturnsNull;
2691
+ }
2692
+ }
2693
+ function validate(props, propName, componentName, location, propFullName) {
2694
+ var expectedTypes = [];
2695
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2696
+ var checker = arrayOfTypeCheckers[i];
2697
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
2698
+ if (checkerResult == null) {
2699
+ return null;
2700
+ }
2701
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
2702
+ expectedTypes.push(checkerResult.data.expectedType);
2703
+ }
2704
+ }
2705
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
2706
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
2707
+ }
2708
+ return createChainableTypeChecker(validate);
2709
+ }
2710
+ function createNodeChecker() {
2711
+ function validate(props, propName, componentName, location, propFullName) {
2712
+ if (!isNode(props[propName])) {
2713
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2714
+ }
2715
+ return null;
2716
+ }
2717
+ return createChainableTypeChecker(validate);
2718
+ }
2719
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
2720
+ return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
2721
+ }
2722
+ function createShapeTypeChecker(shapeTypes) {
2723
+ function validate(props, propName, componentName, location, propFullName) {
2724
+ var propValue = props[propName];
2725
+ var propType = getPropType(propValue);
2726
+ if (propType !== 'object') {
2727
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2728
+ }
2729
+ for (var key in shapeTypes) {
2730
+ var checker = shapeTypes[key];
2731
+ if (typeof checker !== 'function') {
2732
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2733
+ }
2734
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2735
+ if (error) {
2736
+ return error;
2737
+ }
2738
+ }
2739
+ return null;
2740
+ }
2741
+ return createChainableTypeChecker(validate);
2742
+ }
2743
+ function createStrictShapeTypeChecker(shapeTypes) {
2744
+ function validate(props, propName, componentName, location, propFullName) {
2745
+ var propValue = props[propName];
2746
+ var propType = getPropType(propValue);
2747
+ if (propType !== 'object') {
2748
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2749
+ }
2750
+ // We need to check all keys in case some are required but missing from props.
2751
+ var allKeys = assign({}, props[propName], shapeTypes);
2752
+ for (var key in allKeys) {
2753
+ var checker = shapeTypes[key];
2754
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
2755
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2756
+ }
2757
+ if (!checker) {
2758
+ 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, ' '));
2759
+ }
2760
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2761
+ if (error) {
2762
+ return error;
2763
+ }
2764
+ }
2765
+ return null;
2766
+ }
2767
+ return createChainableTypeChecker(validate);
2768
+ }
2769
+ function isNode(propValue) {
2770
+ switch (_typeof(propValue)) {
2771
+ case 'number':
2772
+ case 'string':
2773
+ case 'undefined':
2774
+ return true;
2775
+ case 'boolean':
2776
+ return !propValue;
2777
+ case 'object':
2778
+ if (Array.isArray(propValue)) {
2779
+ return propValue.every(isNode);
2780
+ }
2781
+ if (propValue === null || isValidElement(propValue)) {
2782
+ return true;
2783
+ }
2784
+ var iteratorFn = getIteratorFn(propValue);
2785
+ if (iteratorFn) {
2786
+ var iterator = iteratorFn.call(propValue);
2787
+ var step;
2788
+ if (iteratorFn !== propValue.entries) {
2789
+ while (!(step = iterator.next()).done) {
2790
+ if (!isNode(step.value)) {
2791
+ return false;
2792
+ }
2793
+ }
2794
+ } else {
2795
+ // Iterator will provide entry [k,v] tuples rather than values.
2796
+ while (!(step = iterator.next()).done) {
2797
+ var entry = step.value;
2798
+ if (entry) {
2799
+ if (!isNode(entry[1])) {
2800
+ return false;
2801
+ }
2802
+ }
2803
+ }
2804
+ }
2805
+ } else {
2806
+ return false;
2807
+ }
2808
+ return true;
2809
+ default:
2810
+ return false;
2811
+ }
2812
+ }
2813
+ function isSymbol(propType, propValue) {
2814
+ // Native Symbol.
2815
+ if (propType === 'symbol') {
2816
+ return true;
2817
+ }
2818
+
2819
+ // falsy value can't be a Symbol
2820
+ if (!propValue) {
2821
+ return false;
2822
+ }
2823
+
2824
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
2825
+ if (propValue['@@toStringTag'] === 'Symbol') {
2826
+ return true;
2827
+ }
2828
+
2829
+ // Fallback for non-spec compliant Symbols which are polyfilled.
2830
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
2831
+ return true;
2832
+ }
2833
+ return false;
2834
+ }
2835
+
2836
+ // Equivalent of `typeof` but with special handling for array and regexp.
2837
+ function getPropType(propValue) {
2838
+ var propType = _typeof(propValue);
2839
+ if (Array.isArray(propValue)) {
2840
+ return 'array';
2841
+ }
2842
+ if (propValue instanceof RegExp) {
2843
+ // Old webkits (at least until Android 4.0) return 'function' rather than
2844
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
2845
+ // passes PropTypes.object.
2846
+ return 'object';
2847
+ }
2848
+ if (isSymbol(propType, propValue)) {
2849
+ return 'symbol';
2850
+ }
2851
+ return propType;
2852
+ }
2853
+
2854
+ // This handles more types than `getPropType`. Only used for error messages.
2855
+ // See `createPrimitiveTypeChecker`.
2856
+ function getPreciseType(propValue) {
2857
+ if (typeof propValue === 'undefined' || propValue === null) {
2858
+ return '' + propValue;
2859
+ }
2860
+ var propType = getPropType(propValue);
2861
+ if (propType === 'object') {
2862
+ if (propValue instanceof Date) {
2863
+ return 'date';
2864
+ } else if (propValue instanceof RegExp) {
2865
+ return 'regexp';
2866
+ }
2867
+ }
2868
+ return propType;
2869
+ }
2870
+
2871
+ // Returns a string that is postfixed to a warning about an invalid type.
2872
+ // For example, "undefined" or "of type array"
2873
+ function getPostfixForTypeWarning(value) {
2874
+ var type = getPreciseType(value);
2875
+ switch (type) {
2876
+ case 'array':
2877
+ case 'object':
2878
+ return 'an ' + type;
2879
+ case 'boolean':
2880
+ case 'date':
2881
+ case 'regexp':
2882
+ return 'a ' + type;
2883
+ default:
2884
+ return type;
2885
+ }
2886
+ }
2887
+
2888
+ // Returns class name of the object, if any.
2889
+ function getClassName(propValue) {
2890
+ if (!propValue.constructor || !propValue.constructor.name) {
2891
+ return ANONYMOUS;
2892
+ }
2893
+ return propValue.constructor.name;
2894
+ }
2895
+ ReactPropTypes.checkPropTypes = checkPropTypes;
2896
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
2897
+ ReactPropTypes.PropTypes = ReactPropTypes;
2898
+ return ReactPropTypes;
2899
+ };
2900
+ return factoryWithTypeCheckers;
2901
+ }
2902
+
2903
+ /**
2904
+ * Copyright (c) 2013-present, Facebook, Inc.
2905
+ *
2906
+ * This source code is licensed under the MIT license found in the
2907
+ * LICENSE file in the root directory of this source tree.
2908
+ */
2909
+ var factoryWithThrowingShims;
2910
+ var hasRequiredFactoryWithThrowingShims;
2911
+ function requireFactoryWithThrowingShims() {
2912
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
2913
+ hasRequiredFactoryWithThrowingShims = 1;
2914
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
2915
+ function emptyFunction() {}
2916
+ function emptyFunctionWithReset() {}
2917
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
2918
+ factoryWithThrowingShims = function factoryWithThrowingShims() {
2919
+ function shim(props, propName, componentName, location, propFullName, secret) {
2920
+ if (secret === ReactPropTypesSecret) {
2921
+ // It is still safe when called from React.
2922
+ return;
2923
+ }
2924
+ 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');
2925
+ err.name = 'Invariant Violation';
2926
+ throw err;
2927
+ }
2928
+ shim.isRequired = shim;
2929
+ function getShim() {
2930
+ return shim;
2931
+ }
2932
+ // Important!
2933
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
2934
+ var ReactPropTypes = {
2935
+ array: shim,
2936
+ bigint: shim,
2937
+ bool: shim,
2938
+ func: shim,
2939
+ number: shim,
2940
+ object: shim,
2941
+ string: shim,
2942
+ symbol: shim,
2943
+ any: shim,
2944
+ arrayOf: getShim,
2945
+ element: shim,
2946
+ elementType: shim,
2947
+ instanceOf: getShim,
2948
+ node: shim,
2949
+ objectOf: getShim,
2950
+ oneOf: getShim,
2951
+ oneOfType: getShim,
2952
+ shape: getShim,
2953
+ exact: getShim,
2954
+ checkPropTypes: emptyFunctionWithReset,
2955
+ resetWarningCache: emptyFunction
2956
+ };
2957
+ ReactPropTypes.PropTypes = ReactPropTypes;
2958
+ return ReactPropTypes;
2959
+ };
2960
+ return factoryWithThrowingShims;
2961
+ }
2962
+
2963
+ /**
2964
+ * Copyright (c) 2013-present, Facebook, Inc.
2965
+ *
2966
+ * This source code is licensed under the MIT license found in the
2967
+ * LICENSE file in the root directory of this source tree.
2968
+ */
2969
+ if (process.env.NODE_ENV !== 'production') {
2970
+ var ReactIs = requireReactIs();
2971
+
2972
+ // By explicitly using `prop-types` you are opting into new development behavior.
2973
+ // http://fb.me/prop-types-in-prod
2974
+ var throwOnDirectAccess = true;
2975
+ propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
2976
+ } else {
2977
+ // By explicitly using `prop-types` you are opting into new production behavior.
2978
+ // http://fb.me/prop-types-in-prod
2979
+ propTypes.exports = requireFactoryWithThrowingShims()();
2980
+ }
2981
+ var propTypesExports = propTypes.exports;
2982
+ var dateFormats = {
2983
+ date: 'YYYY-MM-DD',
2984
+ basic_date: 'YYYYMMDD',
2985
+ basic_date_time: 'YYYYMMDD[T]HHmmss.SSSZ',
2986
+ basic_date_time_no_millis: 'YYYYMMDD[T]HHmmssZ',
2987
+ date_time_no_millis: 'YYYY-MM-DD[T]HH:mm:ssZ',
2988
+ basic_time: 'HHmmss.SSSZ',
2989
+ basic_time_no_millis: 'HHmmssZ',
2990
+ epoch_millis: 'epoch_millis',
2991
+ epoch_second: 'epoch_second'
2992
+ };
2993
+ var componentTypes = {
2994
+ reactiveList: 'REACTIVELIST',
2995
+ // search components
2996
+ dataSearch: 'DATASEARCH',
2997
+ categorySearch: 'CATEGORYSEARCH',
2998
+ searchBox: 'SEARCHBOX',
2999
+ // list components
3000
+ singleList: 'SINGLELIST',
3001
+ multiList: 'MULTILIST',
3002
+ singleDataList: 'SINGLEDATALIST',
3003
+ tabDataList: 'TABDATALIST',
3004
+ singleDropdownList: 'SINGLEDROPDOWNLIST',
3005
+ multiDataList: 'MULTIDATALIST',
3006
+ multiDropdownList: 'MULTIDROPDOWNLIST',
3007
+ singleDropdownRange: 'SINGLEDROPDOWNRANGE',
3008
+ treeList: 'TREELIST',
3009
+ // basic components
3010
+ numberBox: 'NUMBERBOX',
3011
+ tagCloud: 'TAGCLOUD',
3012
+ toggleButton: 'TOGGLEBUTTON',
3013
+ reactiveComponent: 'REACTIVECOMPONENT',
3014
+ // range components
3015
+ datePicker: 'DATEPICKER',
3016
+ dateRange: 'DATERANGE',
3017
+ dynamicRangeSlider: 'DYNAMICRANGESLIDER',
3018
+ multiDropdownRange: 'MULTIDROPDOWNRANGE',
3019
+ singleRange: 'SINGLERANGE',
3020
+ multiRange: 'MULTIRANGE',
3021
+ rangeSlider: 'RANGESLIDER',
3022
+ ratingsFilter: 'RATINGSFILTER',
3023
+ rangeInput: 'RANGEINPUT',
3024
+ // map components
3025
+ geoDistanceDropdown: 'GEO_DISTANCE_DROPDOWN',
3026
+ geoDistanceSlider: 'GEO_DISTANCE_SLIDER',
3027
+ reactiveMap: 'REACTIVE_MAP',
3028
+ // chart components
3029
+ reactiveChart: 'REACTIVE_CHART'
3030
+ };
3031
+ var CLEAR_ALL = {
3032
+ NEVER: 'never',
3033
+ ALWAYS: 'always',
3034
+ DEFAULT: 'default'
3035
+ };
3036
+ var reactKeyType = propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string), propTypesExports.object, propTypesExports.arrayOf(propTypesExports.object)]);
3037
+ function validateLocation(props, propName) {
3038
+ // eslint-disable-next-line
3039
+ if (isNaN(props[propName])) {
3040
+ return new Error("".concat(propName, " value must be a number"));
3041
+ }
3042
+ if (propName === 'lat' && (props[propName] < -90 || props[propName] > 90)) {
3043
+ return new Error("".concat(propName, " value should be between -90 and 90."));
3044
+ } else if (propName === 'lng' && (props[propName] < -180 || props[propName] > 180)) {
3045
+ return new Error("".concat(propName, " value should be between -180 and 180."));
3046
+ }
3047
+ return null;
3048
+ }
3049
+
3050
+ // eslint-disable-next-line consistent-return
3051
+ var dataFieldValidator = function dataFieldValidator(props, propName, componentName) {
3052
+ var requiredError = new Error("".concat(propName, " supplied to ").concat(componentName, " is required. Validation failed."));
3053
+ var propValue = props[propName];
3054
+ if (!propValue) return requiredError;
3055
+ if (typeof propValue !== 'string' && _typeof(propValue) !== 'object' && !Array.isArray(propValue)) {
3056
+ return new Error("Invalid ".concat(propName, " supplied to ").concat(componentName, ". Validation failed."));
3057
+ }
3058
+ if (Array.isArray(propValue) && propValue.length === 0) return requiredError;
3059
+ };
3060
+ var types = {
3061
+ any: propTypesExports.any,
3062
+ analyticsConfig: propTypesExports.shape({
3063
+ emptyQuery: propTypesExports.bool,
3064
+ suggestionAnalytics: propTypesExports.bool,
3065
+ userId: propTypesExports.string,
3066
+ customEvents: propTypesExports.object // eslint-disable-line
3067
+ }),
3068
+
3069
+ appbaseConfig: propTypesExports.shape({
3070
+ enableQueryRules: propTypesExports.bool,
3071
+ enableSearchRelevancy: propTypesExports.bool,
3072
+ recordAnalytics: propTypesExports.bool,
3073
+ emptyQuery: propTypesExports.bool,
3074
+ suggestionAnalytics: propTypesExports.bool,
3075
+ userId: propTypesExports.string,
3076
+ useCache: propTypesExports.bool,
3077
+ customEvents: propTypesExports.object,
3078
+ // eslint-disable-line
3079
+ enableTelemetry: propTypesExports.bool,
3080
+ queryString: propTypesExports.object // eslint-disable-line
3081
+ }),
3082
+
3083
+ bool: propTypesExports.bool,
3084
+ boolRequired: propTypesExports.bool.isRequired,
3085
+ components: propTypesExports.arrayOf(propTypesExports.string),
3086
+ children: propTypesExports.any,
3087
+ data: propTypesExports.arrayOf(propTypesExports.object),
3088
+ dataFieldArray: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string)]).isRequired,
3089
+ dataNumberBox: propTypesExports.shape({
3090
+ label: propTypesExports.string,
3091
+ start: propTypesExports.number.isRequired,
3092
+ end: propTypesExports.number.isRequired
3093
+ }).isRequired,
3094
+ date: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string)]),
3095
+ dateObject: propTypesExports.object,
3096
+ excludeFields: propTypesExports.arrayOf(propTypesExports.string),
3097
+ fieldWeights: propTypesExports.arrayOf(propTypesExports.number),
3098
+ filterLabel: propTypesExports.string,
3099
+ func: propTypesExports.func,
3100
+ funcRequired: propTypesExports.func.isRequired,
3101
+ fuzziness: propTypesExports.oneOf([0, 1, 2, 'AUTO']),
3102
+ headers: propTypesExports.object,
3103
+ hits: propTypesExports.arrayOf(propTypesExports.object),
3104
+ rawData: propTypesExports.object,
3105
+ iconPosition: propTypesExports.oneOf(['left', 'right']),
3106
+ includeFields: propTypesExports.arrayOf(propTypesExports.string),
3107
+ labelPosition: propTypesExports.oneOf(['left', 'right', 'top', 'bottom']),
3108
+ number: propTypesExports.number,
3109
+ options: propTypesExports.oneOfType([propTypesExports.arrayOf(propTypesExports.object), propTypesExports.object]),
3110
+ paginationAt: propTypesExports.oneOf(['top', 'bottom', 'both']),
3111
+ range: propTypesExports.shape({
3112
+ start: propTypesExports.oneOfType([propTypesExports.number, propTypesExports.string, propTypesExports.object]).isRequired,
3113
+ end: propTypesExports.oneOfType([propTypesExports.number, propTypesExports.string, propTypesExports.object]).isRequired
3114
+ }),
3115
+ rangeLabels: propTypesExports.shape({
3116
+ start: propTypesExports.string.isRequired,
3117
+ end: propTypesExports.string.isRequired
3118
+ }),
3119
+ react: propTypesExports.shape({
3120
+ and: reactKeyType,
3121
+ or: reactKeyType,
3122
+ not: reactKeyType
3123
+ }),
3124
+ categorySearchValue: propTypesExports.shape({
3125
+ term: propTypesExports.string,
3126
+ category: propTypesExports.string
3127
+ }),
3128
+ selectedValues: propTypesExports.object,
3129
+ selectedValue: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string), propTypesExports.arrayOf(propTypesExports.object), propTypesExports.object, propTypesExports.number, propTypesExports.arrayOf(propTypesExports.number)]),
3130
+ suggestions: propTypesExports.arrayOf(propTypesExports.object),
3131
+ supportedOrientations: propTypesExports.oneOf(['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']),
3132
+ tooltipTrigger: propTypesExports.oneOf(['hover', 'none', 'focus', 'always']),
3133
+ sortBy: propTypesExports.oneOf(['asc', 'desc']),
3134
+ sortOptions: propTypesExports.arrayOf(propTypesExports.shape({
3135
+ label: propTypesExports.string,
3136
+ dataField: propTypesExports.string,
3137
+ sortBy: propTypesExports.string
3138
+ })),
3139
+ sortByWithCount: propTypesExports.oneOf(['asc', 'desc', 'count']),
3140
+ stats: propTypesExports.arrayOf(propTypesExports.object),
3141
+ string: propTypesExports.string,
3142
+ stringArray: propTypesExports.arrayOf(propTypesExports.string),
3143
+ stringOrArray: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string)]),
3144
+ stringRequired: propTypesExports.string.isRequired,
3145
+ style: propTypesExports.object,
3146
+ themePreset: propTypesExports.oneOf(['light', 'dark']),
3147
+ queryFormatDate: propTypesExports.oneOf(Object.keys(dateFormats)),
3148
+ queryFormatSearch: propTypesExports.oneOf(['and', 'or']),
3149
+ queryFormatNumberBox: propTypesExports.oneOf(['exact', 'lte', 'gte']),
3150
+ params: propTypesExports.object.isRequired,
3151
+ props: propTypesExports.object,
3152
+ rangeLabelsAlign: propTypesExports.oneOf(['left', 'right']),
3153
+ title: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.any]),
3154
+ location: propTypesExports.shape({
3155
+ lat: validateLocation,
3156
+ lng: validateLocation
3157
+ }),
3158
+ unit: propTypesExports.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
3159
+ aggregationData: propTypesExports.array,
3160
+ showClearAll: propTypesExports.oneOf([CLEAR_ALL.NEVER, CLEAR_ALL.ALWAYS, CLEAR_ALL.DEFAULT, true, false]),
3161
+ componentType: propTypesExports.oneOf(Object.values(componentTypes)),
3162
+ componentObject: propTypesExports.object,
3163
+ dataFieldValidator: dataFieldValidator,
3164
+ focusShortcuts: propTypesExports.oneOfType([propTypesExports.arrayOf(propTypesExports.string), propTypesExports.arrayOf(propTypesExports.number)]),
3165
+ mongodb: propTypesExports.shape({
3166
+ db: propTypesExports.string,
3167
+ collection: propTypesExports.string
3168
+ }),
3169
+ calendarInterval: propTypesExports.oneOf(['month', 'day', 'year', 'week', 'quarter', 'hour', 'minute']),
3170
+ preferences: propTypesExports.object,
3171
+ endpoint: propTypesExports.shape({
3172
+ url: propTypesExports.string.isRequired,
3173
+ method: propTypesExports.string,
3174
+ /* eslint-disable react/forbid-prop-types */
3175
+ headers: propTypesExports.object,
3176
+ body: propTypesExports.object
3177
+ /* eslint-enable react/forbid-prop-types */
3178
+ })
3179
+ };
1864
3180
 
1865
3181
  var _templateObject$8, _templateObject2$1;
1866
3182
  var HierarchicalMenuList = styled('ul')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 0;\n\toverflow: hidden;\n\n\t&.--open {\n\t\tmax-height: 100%;\n\t}\n"])));
@@ -1896,22 +3212,22 @@ var HierarchicalMenuListItemComponent = {
1896
3212
  }
1897
3213
  },
1898
3214
  props: {
1899
- parentPath: types$1.string,
1900
- selectedValues: types$1.rawData,
1901
- mode: types$1.string,
1902
- searchTerm: types$1.string,
1903
- listItem: types$1.rawData,
1904
- showLine: types$1.bool,
1905
- renderItem: types$1.func,
1906
- handleListItemClick: types$1.func,
1907
- renderSwitcherIcon: types$1.func,
3215
+ parentPath: types.string,
3216
+ selectedValues: types.rawData,
3217
+ mode: types.string,
3218
+ searchTerm: types.string,
3219
+ listItem: types.rawData,
3220
+ showLine: types.bool,
3221
+ renderItem: types.func,
3222
+ handleListItemClick: types.func,
3223
+ renderSwitcherIcon: types.func,
1908
3224
  showCheckbox: VueTypes.bool,
1909
- innerClass: types$1.style,
3225
+ innerClass: types.style,
1910
3226
  showRadio: VueTypes.bool,
1911
- renderIcon: types$1.func,
3227
+ renderIcon: types.func,
1912
3228
  showCount: VueTypes.bool,
1913
- showSwitcherIcon: types$1.bool,
1914
- switcherIcon: types$1.children
3229
+ showSwitcherIcon: types.bool,
3230
+ switcherIcon: types.children
1915
3231
  },
1916
3232
  render: function render() {
1917
3233
  var _this = this;
@@ -2087,7 +3403,7 @@ var HierarchicalMenuComponent = {
2087
3403
  // array of objects
2088
3404
  parentPath: VueTypes.string.def(''),
2089
3405
  isExpanded: VueTypes.bool.def(false),
2090
- listItemProps: types$1.rawData
3406
+ listItemProps: types.rawData
2091
3407
  },
2092
3408
  render: function render() {
2093
3409
  var _slot;
@@ -2135,62 +3451,62 @@ var transformValueIntoLocalState = function transformValueIntoLocalState(valueAr
2135
3451
  var TreeList = {
2136
3452
  name: 'TreeList',
2137
3453
  props: {
2138
- selectedValue: types.selectedValue,
2139
- error: types.title,
2140
- rawData: types.rawData,
2141
- aggregationData: types.rawData,
2142
- themePreset: types.themePreset,
2143
- updateQueryAction: types.funcRequired,
2144
- setQueryOptions: types.funcRequired,
3454
+ selectedValue: types$1.selectedValue,
3455
+ error: types$1.title,
3456
+ rawData: types$1.rawData,
3457
+ aggregationData: types$1.rawData,
3458
+ themePreset: types$1.themePreset,
3459
+ updateQueryAction: types$1.funcRequired,
3460
+ setQueryOptions: types$1.funcRequired,
2145
3461
  // component props
2146
- componentId: types.string.isRequired,
2147
- className: types.string,
2148
- style: types.style,
3462
+ componentId: types$1.string.isRequired,
3463
+ className: types$1.string,
3464
+ style: types$1.style,
2149
3465
  showRadio: VueTypes.bool.def(false),
2150
- showCheckbox: types.bool.def(false),
3466
+ showCheckbox: types$1.bool.def(false),
2151
3467
  mode: VueTypes.oneOf(['single', 'multiple']).def('multiple'),
2152
3468
  showCount: VueTypes.bool.def(false),
2153
3469
  showSearch: VueTypes.bool.def(false),
2154
3470
  showIcon: VueTypes.bool.def(false),
2155
- icon: types.children,
3471
+ icon: types$1.children,
2156
3472
  showLeafIcon: VueTypes.bool.def(false),
2157
- leafIcon: types.children,
3473
+ leafIcon: types$1.children,
2158
3474
  showLine: VueTypes.bool.def(false),
2159
- switcherIcon: types.func,
2160
- render: types.func,
2161
- renderItem: types.func,
2162
- innerClass: types.style,
2163
- placeholder: types.string,
2164
- title: types.title,
2165
- isLoading: types.bool,
2166
- dataField: types.stringArray.isRequired,
2167
- onQueryChange: types.func,
2168
- defaultValue: types.stringArray,
2169
- value: types.stringArray,
2170
- customQuery: types.func,
2171
- defaultQuery: types.func,
2172
- enableAppbase: types.bool,
2173
- index: types.string,
2174
- showFilter: types.bool,
2175
- URLParams: types.bool,
2176
- filterLabel: types.string,
2177
- onChange: types.func,
2178
- onValueChange: types.func,
2179
- beforeValueChange: types.func,
2180
- sortBy: types.sortByWithCount.def('count'),
2181
- onError: types.func,
2182
- showSwitcherIcon: types.bool.def(true),
2183
- renderError: types.title,
2184
- renderNoResults: types.func,
2185
- loader: types.title,
2186
- aggergationSize: types.number,
2187
- endpoint: types.endpoint,
2188
- queryFormat: types.queryFormatSearch.def('or'),
2189
- size: types.number.def(100),
2190
- nestedField: types.string,
2191
- react: types.react,
2192
- transformData: types.func,
2193
- selectAllLabel: types.string,
3475
+ switcherIcon: types$1.func,
3476
+ render: types$1.func,
3477
+ renderItem: types$1.func,
3478
+ innerClass: types$1.style,
3479
+ placeholder: types$1.string,
3480
+ title: types$1.title,
3481
+ isLoading: types$1.bool,
3482
+ dataField: types$1.stringArray.isRequired,
3483
+ onQueryChange: types$1.func,
3484
+ defaultValue: types$1.stringArray,
3485
+ value: types$1.stringArray,
3486
+ customQuery: types$1.func,
3487
+ defaultQuery: types$1.func,
3488
+ enableAppbase: types$1.bool,
3489
+ index: types$1.string,
3490
+ showFilter: types$1.bool,
3491
+ URLParams: types$1.bool,
3492
+ filterLabel: types$1.string,
3493
+ onChange: types$1.func,
3494
+ onValueChange: types$1.func,
3495
+ beforeValueChange: types$1.func,
3496
+ sortBy: types$1.sortByWithCount.def('count'),
3497
+ onError: types$1.func,
3498
+ showSwitcherIcon: types$1.bool.def(true),
3499
+ renderError: types$1.title,
3500
+ renderNoResults: types$1.func,
3501
+ loader: types$1.title,
3502
+ aggergationSize: types$1.number,
3503
+ endpoint: types$1.endpoint,
3504
+ queryFormat: types$1.queryFormatSearch.def('or'),
3505
+ size: types$1.number.def(100),
3506
+ nestedField: types$1.string,
3507
+ react: types$1.react,
3508
+ transformData: types$1.func,
3509
+ selectAllLabel: types$1.string,
2194
3510
  showMissing: VueTypes.bool.def(false),
2195
3511
  missingLabel: VueTypes.string.def('N/A')
2196
3512
  },
@@ -2484,7 +3800,7 @@ var TreeList = {
2484
3800
  label: this.$props.filterLabel,
2485
3801
  showFilter: this.$props.showFilter,
2486
3802
  URLParams: this.$props.URLParams,
2487
- componentType: componentTypes.treeList
3803
+ componentType: componentTypes$1.treeList
2488
3804
  });
2489
3805
  },
2490
3806
  setValue: function setValue(value, hasMountedParam) {
@@ -2614,7 +3930,7 @@ TreeList.hasInternalComponent = function () {
2614
3930
  return true;
2615
3931
  };
2616
3932
  var TreeListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps$1, mapDispatchtoProps)(TreeList), {
2617
- componentType: componentTypes.treeList,
3933
+ componentType: componentTypes$1.treeList,
2618
3934
  internalComponent: TreeList.hasInternalComponent()
2619
3935
  }));
2620
3936
  TreeListConnected.name = TreeList.name;
@@ -2623,50 +3939,50 @@ TreeListConnected.install = function (Vue) {
2623
3939
  };
2624
3940
 
2625
3941
  // Add componentType for SSR
2626
- TreeListConnected.componentType = componentTypes.treeList;
3942
+ TreeListConnected.componentType = componentTypes$1.treeList;
2627
3943
 
2628
3944
  var RcConnected = PreferencesConsumer({
2629
3945
  name: 'RcConnected',
2630
3946
  render: function render() {
2631
3947
  var component = ReactiveComponent;
2632
3948
  switch (this.$attrs.componentType) {
2633
- case componentTypes.reactiveList:
3949
+ case componentTypes$1.reactiveList:
2634
3950
  component = ReactiveList;
2635
3951
  break;
2636
- case componentTypes.searchBox:
3952
+ case componentTypes$1.searchBox:
2637
3953
  component = SBConnected;
2638
3954
  break;
2639
3955
  // list components
2640
- case componentTypes.singleList:
3956
+ case componentTypes$1.singleList:
2641
3957
  component = SingleList;
2642
3958
  break;
2643
- case componentTypes.multiList:
3959
+ case componentTypes$1.multiList:
2644
3960
  component = MultiList;
2645
3961
  break;
2646
- case componentTypes.singleDropdownList:
3962
+ case componentTypes$1.singleDropdownList:
2647
3963
  component = SingleDropdownList;
2648
3964
  break;
2649
- case componentTypes.multiDropdownList:
3965
+ case componentTypes$1.multiDropdownList:
2650
3966
  component = MultiDropdownList;
2651
3967
  break;
2652
3968
  // basic components
2653
- case componentTypes.toggleButton:
3969
+ case componentTypes$1.toggleButton:
2654
3970
  component = ToggleButton;
2655
3971
  break;
2656
3972
  // range components
2657
- case componentTypes.dynamicRangeSlider:
3973
+ case componentTypes$1.dynamicRangeSlider:
2658
3974
  component = DynamicRangeSlider;
2659
3975
  break;
2660
- case componentTypes.singleRange:
3976
+ case componentTypes$1.singleRange:
2661
3977
  component = SingleRange;
2662
3978
  break;
2663
- case componentTypes.multiRange:
3979
+ case componentTypes$1.multiRange:
2664
3980
  component = MultiRange;
2665
3981
  break;
2666
- case componentTypes.rangeSlider:
3982
+ case componentTypes$1.rangeSlider:
2667
3983
  component = RangeSlider;
2668
3984
  break;
2669
- case componentTypes.rangeInput:
3985
+ case componentTypes$1.rangeInput:
2670
3986
  component = RangeInput;
2671
3987
  break;
2672
3988
  }
@@ -2676,7 +3992,7 @@ var RcConnected = PreferencesConsumer({
2676
3992
  RcConnected.name = ReactiveComponent.name;
2677
3993
  RcConnected.hasInternalComponent = ReactiveComponent.hasInternalComponent;
2678
3994
  // Add componentType for SSR
2679
- RcConnected.componentType = componentTypes.reactiveComponent;
3995
+ RcConnected.componentType = componentTypes$1.reactiveComponent;
2680
3996
  RcConnected.install = function (Vue) {
2681
3997
  Vue.component(RcConnected.name, RcConnected);
2682
3998
  };