{"version":3,"sources":["../node_modules/lodash/set.js","../node_modules/lodash/cloneDeep.js","../../src/rules.js","../../src/utils.js","../../src/renderTextNode.js","../../src/errors.js","../../../src/components/OptimiseField.js","../../../src/components/FormBuilderField.js","../../src/defaultRenderErrorSummary.js","../../src/defaultRenderForm.js","../../src/validation.js","../../src/FormBuilder.js","../../src/constants.js","../../src/index.js","../node_modules/react-google-recaptcha/lib/esm/recaptcha.js","../node_modules/react-async-script/lib/esm/async-script-loader.js","../node_modules/react-google-recaptcha/lib/esm/recaptcha-wrapper.js","../node_modules/react-google-recaptcha/lib/esm/index.js","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/react-transition-group/esm/config.js","../node_modules/react-transition-group/esm/Transition.js","../node_modules/@babel/runtime/regenerator/index.js","../node_modules/lodash/_cloneArrayBuffer.js","../node_modules/lodash/_getSymbolsIn.js","../node_modules/lodash/_baseClone.js","../node_modules/lodash/_baseAssign.js","../node_modules/lodash/_baseAssignIn.js","../node_modules/lodash/_cloneBuffer.js","../node_modules/lodash/_copySymbols.js","../node_modules/lodash/_copySymbolsIn.js","../node_modules/lodash/_getAllKeysIn.js","../node_modules/lodash/_initCloneArray.js","../node_modules/lodash/_initCloneByTag.js","../node_modules/lodash/_cloneDataView.js","../node_modules/lodash/_cloneRegExp.js","../node_modules/lodash/_cloneSymbol.js","../node_modules/lodash/_cloneTypedArray.js","../node_modules/lodash/_initCloneObject.js","../node_modules/lodash/isMap.js","../node_modules/lodash/_baseIsMap.js","../node_modules/lodash/isSet.js","../node_modules/lodash/_baseIsSet.js","../node_modules/lodash.clonedeep/index.js","../node_modules/lodash.unset/index.js","../node_modules/lodash/_baseSet.js","../node_modules/dom-helpers/esm/removeClass.js","../node_modules/react-transition-group/esm/CSSTransition.js","../node_modules/dom-helpers/esm/addClass.js","../node_modules/dom-helpers/esm/hasClass.js","../node_modules/react-transition-group/esm/utils/ChildMapping.js","../node_modules/react-transition-group/esm/TransitionGroup.js"],"names":["baseSet","require","module","exports","object","path","value","baseClone","CLONE_DEEP_FLAG","properties","conditionTypes","EQUALITY","ALL","ANY","NOT","getConditionType","condition","customRuleConditions","Object","type","getComputedProperties","computedProperties","treePath","equal","fieldValue","params","RulesParser","this","shown","computed","lastHiddenParent","iterateFields","fieldConfig","isShown","parentWasHidden","computeShown","disabled","computeProperty","required","partialShownMap","shownRule","rule","dependencies","dependencyPath","dependencyFields","dependencyConfig","field","acc","parseCondition","property","defaultValue","shownMap","found","arg","all","any","not","isFieldShown","pathsToTreeMap","getIn","config","conditionFn","registeredRuleCondtions","conditions","parseRules","formValues","getValidator","registeredValidators","validatorName","console","_iterateFieldsAux","partialTreePath","types","node","WrappingTag","context","content","dangerouslySetInnerHTML","__html","getFieldErrors","internal","external","internalErrors","externalErrors","getErrorSummaryFieldLabel","renderTextNode","getFieldErrorToDisplay","errors","touched","OptimiseField","nextProps","isEqual","props","React","Component","propTypes","shouldOptimise","PropTypes","children","isRequired","FormBuilderField","setIn","action","prevProps","nextFieldValue","formik","prevFieldValue","fieldComputedProperties","registeredComponents","currentValue","state","formId","configTimestamp","registeredRuleConditions","onTriggerCallback","registeredActions","clearExternalError","componentName","getComponent","Error","fieldTouched","fieldErrors","fieldExternalErrors","htmlId","runActions","handleChange","triggersTouched","handleBlur","handleChangeFast","handleBlurFast","handleKeyPressFast","event","getDisplayError","error","renderFieldError","getChildError","childName","childError","child","renderChildError","wrappingTag","setValues","nestedField","nestedFieldTreePath","key","runAction","defaultProps","undefined","renderItem","id","label","message","onClick","e","fieldId","element","document","rect","window","focusField","href","ErrorSummary","submitCount","summaryData","reduce","items","renderField","buttons","handleSubmit","errorSummary","onSubmit","noValidate","REQUIRED_VALIDATOR_KEY","defaultRequiredFn","falseCountsAsNoValue","Array","validateForm","validateField","partialId","partialErrors","fieldIsShown","componentDefinition","validators","validationFn","validatorConfig","options","fullId","makeFieldValidationFunction","validateFieldFn","FormBuilder","availableActions","setFieldValue","val","triggerCallback","submitForm","getInitialErrors","initial","initialValues","defaultValues","defaultVal","getDefaultValues","renderForm","renderButtons","renderErrorSummary","mapping","mapPathsToTree","ref","validateOnBlur","validateOnChange","enableReinitialize","values","filteredValues","valuesClone","cloneDeep","shouldFilter","unset","filterFormValues","validate","render","formikProps","fields","errorPath","prevState","errorSummaryData","getErrorSummaryData","isValidating","onActionCallback","formikRef","func","_extends","assign","target","i","arguments","length","source","prototype","hasOwnProperty","call","apply","_assertThisInitialized","self","ReferenceError","ReCAPTCHA","_React$Component","subClass","superClass","_this","handleExpired","bind","handleErrored","handleRecaptchaRef","create","constructor","__proto__","_proto","getValue","grecaptcha","_widgetId","getResponse","getWidgetId","execute","_executeRequested","executeAsync","_this2","Promise","resolve","reject","executionResolve","executionReject","reset","onExpired","onErrored","token","onChange","explicitRender","wrapper","createElement","sitekey","callback","theme","tabindex","size","stoken","hl","badge","captcha","appendChild","componentDidMount","componentDidUpdate","componentWillUnmount","delayOfCaptchaIframeRemoving","temporaryNode","body","style","display","firstChild","setTimeout","removeChild","elem","_this$props","childProps","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","displayName","string","oneOf","number","SCRIPT_MAP","idCount","makeAsyncScriptLoader","getScriptURL","recaptchaOptions","useRecaptchaNet","callbackName","globalName","WrappedComponent","wrappedComponentName","name","AsyncScriptLoader","_Component","__scriptURL","asyncScriptLoaderGetScriptLoaderID","__scriptLoaderID","setupScriptURL","asyncScriptLoaderHandleLoad","setState","asyncScriptOnLoad","asyncScriptLoaderTriggerOnScriptLoaded","mapEntry","loaded","obsKey","observers","_this3","scriptURL","_options","scriptId","entry","errored","script","attribute","src","async","attributes","setAttribute","callObserverFuncAndRemoveObserver","observersMap","onload","observer","onerror","removeOnUnmount","allScripts","getElementsByTagName","parentNode","forwardedRef","ForwardedComponent","forwardRef","hoistStatics","RecaptchaWrapper","createContext","ENTERING","ENTERED","EXITING","Transition","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","status","nextCallback","_inheritsLoose","getDerivedStateFromProps","_ref","updateStatus","nextStatus","cancelNextCallback","getTimeouts","exit","timeout","mounting","performEnter","performExit","appearing","_ref2","nodeRef","ReactDOM","findDOMNode","maybeNode","maybeAppearing","timeouts","enterTimeout","safeSetState","onEntered","onEnter","onEntering","onTransitionEnd","onExit","onExiting","onExited","cancel","nextState","setNextCallback","_this4","active","handler","current","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","TransitionGroupContext","Provider","cloneElement","Children","only","noop","contextType","UNMOUNTED","EXITED","Uint8Array","arrayBuffer","result","byteLength","set","arrayPush","getPrototype","getSymbols","stubArray","getSymbolsIn","getOwnPropertySymbols","Stack","arrayEach","assignValue","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isArray","isBuffer","isMap","isObject","isSet","keysIn","cloneableTags","bitmask","customizer","stack","isDeep","isFlat","isFull","isArr","tag","isFunc","stacked","get","forEach","subValue","add","copyObject","root","freeExports","nodeType","freeModule","Buffer","allocUnsafe","buffer","slice","copy","baseGetAllKeys","array","index","input","cloneArrayBuffer","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","Ctor","dataView","byteOffset","reFlags","regexp","exec","lastIndex","Symbol","symbolProto","symbolValueOf","valueOf","symbol","typedArray","baseCreate","isPrototype","baseIsMap","baseUnary","nodeUtil","nodeIsMap","isObjectLike","baseIsSet","nodeIsSet","argsTag","funcTag","genTag","mapTag","setTag","reIsHostCtor","reIsUint","freeGlobal","global","freeSelf","Function","moduleExports","addMapEntry","map","pair","addSetEntry","arrayReduce","iteratee","accumulator","initAccum","isHostObject","toString","mapToArray","overArg","transform","setToArray","arrayProto","funcProto","objectProto","coreJsData","maskSrcKey","uid","IE_PROTO","funcToString","objectToString","reIsNative","RegExp","replace","getPrototypeOf","objectCreate","propertyIsEnumerable","splice","nativeGetSymbols","nativeIsBuffer","nativeKeys","DataView","getNative","Map","Set","WeakMap","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","Hash","entries","clear","ListCache","MapCache","__data__","arrayLikeKeys","inherited","isArrayLike","isArrayLikeObject","isArguments","n","baseTimes","String","skipIndexes","isIndex","push","objValue","eq","assocIndexOf","proto","cloneFunc","cloneMap","cloneSet","keysFunc","symbolsFunc","offset","baseIsNative","isFunction","test","newValue","getMapData","data","isKeyable","has","pop","cache","pairs","LARGE_ARRAY_SIZE","other","ArrayBuffer","ctorString","isLength","baseKeys","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reEscapeChar","symbolToString","baseUnset","isKey","castPath","toKey","baseGet","start","end","baseSlice","parent","last","stringToPath","isSymbol","memoize","baseToString","match","quote","resolver","TypeError","memoized","args","Cache","nested","replaceClassName","origClass","classToRemove","removeClass","classes","split","c","className","classList","remove","baseVal","CSSTransition","_len","_key","concat","appliedClasses","_this$resolveArgument","resolveArguments","removeClasses","addClass","_this$resolveArgument2","_this$resolveArgument3","getClassNames","classNames","isStringClassNames","baseClassName","activeClassName","doneClassName","phase","scrollTop","contains","hasClass","_addClass","_this$appliedClasses$","base","done","getChildMapping","mapFn","isValidElement","mapper","getProp","prop","getNextChildMapping","prevChildMapping","nextChildMapping","prev","next","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","mergeChildMappings","hasPrev","hasNext","prevChild","isLeaving","obj","k","TransitionGroup","handleExited","contextValue","firstRender","mounted","currentChildMapping","component","childFactory"],"mappings":"gHAAA,IAAIA,EAAUC,EAAQ,MAkCtBC,EAAOC,QAJP,SAAaC,EAAQC,EAAMC,GACzB,OAAiB,MAAVF,EAAiBA,EAASJ,EAAQI,EAAQC,EAAMC,K,qBC/BzD,IAAIC,EAAYN,EAAQ,MA4BxBC,EAAOC,QAJP,SAAmBG,GACjB,OAAOC,EAAUD,EAAOE,K,2vCCtBnB,IAAMC,EAAa,QAAbA,EAAa,WAAbA,EAGF,WAGLC,EAAiB,CACtBC,S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B,CA2FjCnmB,IAAMC,WAERkmB,EAAgBjmB,UAyDZ,GACJimB,EAAgB9iB,aA5KG,CACjBojB,UAAW,MACXC,aAAc,SAAsB7jB,GAClC,OAAOA,IA0KIsjB","file":"static/js/3.7ff9cc1a.chunk.js","sourcesContent":["var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","import { getIn } from 'formik';\nimport { iterateFields } from './utils';\n\nexport const properties = {\n\tSHOWN: 'shown',\n\tDISABLED: 'disabled',\n\tREQUIRED: 'required',\n};\n\nconst conditionTypes = {\n\tEQUALITY: 'eq',\n\tALL: 'all',\n\tANY: 'any',\n\tNOT: 'not',\n};\n\n/**\n * Gets the type (e.g. 'eq', 'all') from a condition object.\n *\n * If no type can be determined, returns undefined\n *\n * @param {Object} condition\n * @returns {String|undefined}\n */\nconst getConditionType = (condition, customRuleConditions = {}) => {\n\tif (!condition) {\n\t\treturn undefined;\n\t}\n\n\tfor (const type of Object.values(conditionTypes)) {\n\t\tif (condition.hasOwnProperty(type)) {\n\t\t\treturn type;\n\t\t}\n\t}\n\n\tfor (const type of Object.keys(customRuleConditions)) {\n\t\tif (condition.hasOwnProperty(type)) {\n\t\t\treturn type;\n\t\t}\n\t}\n\n\treturn undefined;\n};\n\nexport const isShown = (computedProperties, treePath) => {\n\tif (!computedProperties || !treePath) {\n\t\treturn true;\n\t}\n\n\tconst fieldProperties = computedProperties[treePath];\n\n\tif (fieldProperties && fieldProperties.shown) {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nexport const getComputedProperties = (computedProperties, treePath) => {\n\tif (!computedProperties || !treePath) {\n\t\treturn {};\n\t}\n\n\treturn computedProperties[treePath] || {};\n};\n\n/**\n * Implements the 'eq' condition.\n *\n * Returns true if any values in `args` match `value`, false otherwise.\n *\n * @param {*} value - The value to compare against\n * @param {Array<*>} args - The values to compare\n *\n * @returns {boolean}\n */\nconst equal = ({ fieldValue, params }) => {\n\treturn params.values.includes(fieldValue);\n};\n\nclass RulesParser {\n\tconstructor(config, pathsToTreeMap, formValues, registeredRuleCondtions) {\n\t\tthis.config = config;\n\t\tthis.pathsToTreeMap = pathsToTreeMap;\n\t\tthis.formValues = formValues;\n\t\tthis.registeredRuleCondtions = {\n\t\t\t[conditionTypes.EQUALITY]: equal,\n\t\t\t...registeredRuleCondtions,\n\t\t};\n\t}\n\n\tparseRules() {\n\t\tconst shown = {};\n\t\tconst computed = {};\n\t\tlet lastHiddenParent = null;\n\n\t\tfor (const { fieldConfig, treePath } of iterateFields(this.config)) {\n\t\t\tlet isShown;\n\t\t\tlet parentWasHidden;\n\n\t\t\tif (lastHiddenParent && treePath.startsWith(lastHiddenParent)) {\n\t\t\t\tisShown = false;\n\t\t\t\tparentWasHidden = true;\n\t\t\t} else {\n\t\t\t\tisShown = this.computeShown(fieldConfig, shown);\n\t\t\t}\n\n\t\t\tshown[fieldConfig.path] = isShown;\n\n\t\t\tif (!parentWasHidden && !isShown) {\n\t\t\t\tlastHiddenParent = treePath;\n\t\t\t}\n\n\t\t\tcomputed[treePath] = {\n\t\t\t\tshown: isShown,\n\t\t\t};\n\t\t}\n\n\t\t// After the shown property is resolved for all fields, other properties can be computed\n\t\tfor (const { fieldConfig, treePath } of iterateFields(this.config)) {\n\t\t\tcomputed[treePath] = {\n\t\t\t\t...(computed[treePath] || {}),\n\t\t\t\tdisabled: this.computeProperty(properties.DISABLED, !!fieldConfig.disabled, fieldConfig, shown),\n\t\t\t\trequired: this.computeProperty(properties.REQUIRED, !!fieldConfig.required, fieldConfig, shown),\n\t\t\t};\n\t\t}\n\n\t\treturn computed;\n\t}\n\n\tcomputeShown(fieldConfig, partialShownMap) {\n\t\tconst shownRule = (fieldConfig.rules || []).find(rule => rule.property === properties.SHOWN);\n\n\t\tif (!shownRule) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst dependencies = new Set();\n\t\t// This will add any dependencies to the dependencies set, need to make this functional\n\t\tthis.getConditionDependencies(shownRule.when, dependencies);\n\n\t\tdependencies.forEach(dependencyPath => {\n\t\t\tconst dependencyFields = this.pathsToTreeMap[dependencyPath];\n\n\t\t\t// If we know there's a field with this path already shown, there's no need for extra calculations\n\t\t\tif (dependencyFields && !partialShownMap[dependencyPath]) {\n\t\t\t\tconst isShown = dependencyFields.reduce((acc, field) => {\n\t\t\t\t\tconst dependencyConfig = field.fieldConfig;\n\t\t\t\t\treturn acc || this.computeShown(dependencyConfig, partialShownMap);\n\t\t\t\t}, false);\n\n\t\t\t\tpartialShownMap[dependencyPath] = isShown;\n\t\t\t}\n\t\t});\n\n\t\treturn this.parseCondition(shownRule.when, partialShownMap);\n\t}\n\n\tcomputeProperty(property, defaultValue, fieldConfig, shownMap) {\n\t\tconst rule = (fieldConfig.rules || []).find(rule => rule.property === property);\n\n\t\tif (!rule) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn this.parseCondition(rule.when, shownMap);\n\t}\n\n\t/**\n\t* TODO make this functional\n\t*\n\t* Recursively find the dependencies of a condition.\n\t*\n\t* In this context, a field is a dependency of a condition if the field's path is referenced in the condition.\n\t*\n\t* @param {Object} condition - the condition\n\t* @param {Object} found - The partial list of dependencies found so far\n\t*/\n\tgetConditionDependencies(condition, found) {\n\t\tconst type = getConditionType(condition, this.registeredRuleCondtions);\n\n\t\tswitch (type) {\n\t\t\tcase conditionTypes.ALL:\n\t\t\tcase conditionTypes.ANY:\n\t\t\t\tconst args = condition[type];\n\t\t\t\t(args || []).forEach(arg => {\n\t\t\t\t\tthis.getConditionDependencies(arg, found);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase conditionTypes.NOT:\n\t\t\t\tconst arg = condition[type];\n\t\t\t\tthis.getConditionDependencies(arg, found);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconst params = condition[type];\n\n\t\t\t\tif (params && params.fieldPath) {\n\t\t\t\t\tfound.add(params.fieldPath);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Takes a condition object, evaluates the condition against the current form values and returns a\n\t * boolean value.\n\t *\n\t * If a field is hidden, checking equality with that field should always return false. For this\n\t * reason, any field that is referenced in a condition must be evaluated first.\n\t *\n\t * @param {Object} condition - the condition to evaluate\n\t * @param {Object} formValues - The current values of the form\n\t * @param {Object} shownMap - The current visibility of fields in the form\n\t *\n\t * @returns {boolean}\n\t */\n\tparseCondition(condition, shownMap) {\n\t\tif (typeof condition === 'boolean') {\n\t\t\treturn condition;\n\t\t}\n\n\t\tconst type = getConditionType(condition, this.registeredRuleCondtions);\n\n\t\tswitch (type) {\n\t\t\tcase conditionTypes.ALL:\n\t\t\t\treturn this.all(shownMap)(...condition[conditionTypes.ALL]);\n\t\t\tcase conditionTypes.ANY:\n\t\t\t\treturn this.any(shownMap)(...condition[conditionTypes.ANY]);\n\t\t\tcase conditionTypes.NOT:\n\t\t\t\treturn this.not(shownMap)(condition[conditionTypes.NOT]);\n\t\t\tdefault: {\n\t\t\t\tconst params = condition[type];\n\n\t\t\t\tif (!type || !params) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tlet fieldValue;\n\t\t\t\tlet isFieldShown = true;\n\n\t\t\t\t// IF PATH CORRESPONDS TO A FIELD IN THIS FORM:\n\t\t\t\t// \t\tContinue normally\n\t\t\t\t// IF PATH IS NOT IN FORM:\n\t\t\t\t// \t\tGet that value from 'context', value is undefined if not found\n\t\t\t\tif (this.pathsToTreeMap[params.fieldPath]) {\n\t\t\t\t\tif (typeof params.fieldPath !== 'undefined') {\n\t\t\t\t\t\tfieldValue = getIn(this.formValues, params.fieldPath);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shownMap && !shownMap[params.fieldPath]) {\n\t\t\t\t\t\tfieldValue = undefined;\n\t\t\t\t\t\tisFieldShown = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfieldValue = getIn(this.config.context, params.fieldPath);\n\t\t\t\t}\n\n\t\t\t\tconst conditionFn = this.registeredRuleCondtions[type];\n\n\t\t\t\tif (conditionFn) {\n\t\t\t\t\treturn conditionFn({\n\t\t\t\t\t\tfieldValue,\n\t\t\t\t\t\tisFieldShown,\n\t\t\t\t\t\tparams,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Implements the 'all' condition.\n\t *\n\t * Returns a function that evaluates each condition and returns true if all provided conditions evalute to true.\n\t *\n\t * @param {Object} formValues - The current values of the form\n\t * @param {Object} shownMap - The current visibility of fields in the form\n\t *\n\t * @returns {function} - Takes n conditions and returns a boolean\n\t */\n\tall(shownMap) {\n\t\treturn (...conditions) => {\n\t\t\treturn conditions.reduce((acc, currentCondition) => {\n\t\t\t\treturn acc && this.parseCondition(currentCondition, shownMap); // eslint-disable-line no-use-before-define\n\t\t\t}, true);\n\t\t};\n\t}\n\n\t/**\n\t * Implements the 'any' condition.\n\t *\n\t * Returns a function that evaluates each condition and returns true if at least one of the provided conditions evalutes to true.\n\t *\n\t * @param {Object} formValues - The current values of the form\n\t * @param {Object} shownMap - The current visibility of fields in the form\n\t *\n\t * @returns {function} - Takes n conditions and returns a boolean\n\t */\n\tany(shownMap) {\n\t\treturn (...conditions) => {\n\t\t\treturn conditions.reduce((acc, currentCondition) => {\n\t\t\t\treturn acc || this.parseCondition(currentCondition, shownMap); // eslint-disable-line no-use-before-define\n\t\t\t}, false);\n\t\t};\n\t}\n\n\t/**\n\t * Implements the 'not' condition.\n\t *\n\t * Returns a function that evaluates to the negation of the provided condition.\n\t *\n\t * @param {Object} formValues - The current values of the form\n\t * @param {Object} shownMap - The current visibility of fields in the form\n\t *\n\t * @returns {function} - Takes a condition and returns a boolean\n\t */\n\tnot(shownMap) {\n\t\treturn condition => {\n\t\t\treturn !this.parseCondition(condition, shownMap); // eslint-disable-line no-use-before-define\n\t\t};\n\t}\n}\n\n\nexport const parseRules = (config, pathsToTreeMap, formValues, registeredRuleCondtions) => {\n\tconst parser = new RulesParser(config, pathsToTreeMap, formValues, registeredRuleCondtions);\n\treturn parser.parseRules();\n};\n","import cloneDeep from 'lodash.clonedeep';\nimport {setIn} from 'formik';\nimport unset from 'lodash.unset';\nimport {getComputedProperties} from './rules';\n\nexport const getComponent = (registeredComponents, componentName) => {\n\tif (!registeredComponents || !registeredComponents[componentName] || !registeredComponents[componentName].component) {\n\t\tconsole.warn(`SchematikForms: No component of type '${componentName}' is registered`);\n\t\treturn undefined;\n\t}\n\n\treturn registeredComponents[componentName].component;\n};\n\nexport const getValidator = (registeredValidators, validatorName) => {\n\tif (!registeredValidators || !registeredValidators[validatorName]) {\n\t\tconsole.warn(`SchematikForms: No validator of type '${validatorName}' is registered`);\n\t\treturn undefined;\n\t}\n\n\treturn registeredValidators[validatorName];\n};\n\nconst _iterateFieldsAux = function* (config, partialTreePath = '') {\n\tif (!config || !config.fields) {\n\t\treturn;\n\t}\n\n\tfor (const fieldConfig of config.fields) {\n\t\tconst treePath = partialTreePath ? `${partialTreePath}.${fieldConfig.id}` : fieldConfig.id;\n\n\t\tyield{\n\t\t\ttreePath: treePath,\n\t\t\tfieldConfig: fieldConfig,\n\t\t};\n\n\t\tyield* _iterateFieldsAux(fieldConfig, treePath);\n\t}\n};\n\n/**\n * Creates an iterator which loops over each field in the form config.\n *\n * Nested fields will be iterated over depth first.\n *\n * @param {object} config\n */\nexport const iterateFields = function* (config) {\n\t// Use a private auxilary function to hide implementation detail, user shouldn't have\n\t// to worry about specifying the path in the tree.\n\tyield* _iterateFieldsAux(config, '');\n};\n\n/**\n * Create a map of paths to 'treePaths'\n *\n * @param {*} config\n */\nexport const mapPathsToTree = config => {\n\tconst mapping = {};\n\n\tfor (const {fieldConfig, treePath} of iterateFields(config)) {\n\t\tmapping[fieldConfig.path] = mapping[fieldConfig.path] || [];\n\n\t\tmapping[fieldConfig.path].push({fieldConfig, treePath});\n\t}\n\n\treturn mapping;\n};\n\n/**\n * Filter out values from fields that are disabled or have the doNotSubmit flag\n *\n * @param {*} values - form values\n * @param {*} computed - map of computed properties\n */\nexport const filterFormValues = (values, config, computed, pathsToTreeMap) => {\n\tconst valuesClone = cloneDeep(values);\n\n\tfor (const {treePath, fieldConfig} of iterateFields(config)) {\n\t\tlet shouldFilter = fieldConfig.doNotSubmit || computed[treePath].disabled;\n\n\t\tif (shouldFilter) {\n\t\t\tconst fieldsWithThisPath = pathsToTreeMap[fieldConfig.path];\n\n\t\t\tshouldFilter = (fieldsWithThisPath || []).reduce((acc, field) => {\n\t\t\t\t// Don't check this field\n\t\t\t\tif (field.treePath === treePath) {\n\t\t\t\t\treturn acc;\n\t\t\t\t}\n\n\t\t\t\tconst fieldComputedProperties = getComputedProperties(computed, field.treePath);\n\n\t\t\t\treturn acc && (field.fieldConfig.doNotSubmit || fieldComputedProperties.disabled);\n\t\t\t}, true);\n\t\t}\n\n\t\tif (shouldFilter) {\n\t\t\tunset(valuesClone, fieldConfig.path);\n\t\t}\n\t}\n\n\treturn valuesClone;\n};\n\nexport const getDefaultValues = (config, registeredComponents) => {\n\tlet defaultValues = {};\n\n\tfor (const {fieldConfig} of iterateFields(config)) {\n\t\tconst type = fieldConfig.type;\n\t\tconst path = fieldConfig.path;\n\n\t\tif (!path) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet defaultVal = undefined;\n\n\t\tif (registeredComponents[type] && typeof registeredComponents[type].defaultValue !== 'undefined') {\n\t\t\tdefaultVal = registeredComponents[type].defaultValue;\n\t\t}\n\n\t\tif (fieldConfig && typeof fieldConfig.defaultValue !== 'undefined') {\n\t\t\tdefaultVal = fieldConfig.defaultValue;\n\t\t}\n\n\t\tdefaultValues = setIn(defaultValues, path, defaultVal);\n\t}\n\n\treturn defaultValues;\n};\n","import React from 'react';\nimport {getIn} from 'formik';\n\nconst types = {\n\tTEXT: 'text',\n\tRICH_TEXT: 'richtext',\n};\n\nconst renderTextNode = (node, WrappingTag = 'div', context = {}) => {\n\tif (typeof node === 'string') {\n\t\treturn node;\n\t}\n\n\tlet content;\n\n\tif (node && node.content) {\n\t\tcontent = node.content;\n\t}\n\n\tif (node && node.contentPath) {\n\t\tcontent = getIn(context, node.contentPath);\n\t}\n\n\tif (node && node.type === types.TEXT) {\n\t\treturn content;\n\t}\n\n\tif (node && node.type === types.RICH_TEXT) {\n\t\treturn ;\n\t}\n\n\treturn undefined;\n};\n\nexport default renderTextNode;\n","import {getIn} from 'formik';\nimport {iterateFields} from './utils';\nimport renderTextNode from './renderTextNode';\nimport {getComputedProperties} from './rules';\n\nexport const getFieldErrors = (path, internal, external) => {\n\tlet internalErrors = getIn(internal, path) || [];\n\tlet externalErrors = getIn(external, path) || [];\n\n\tif (typeof internalErrors === 'string') {\n\t\tinternalErrors = [internalErrors];\n\t}\n\n\tif (typeof externalErrors === 'string') {\n\t\texternalErrors = [externalErrors];\n\t}\n\n\treturn [\n\t\t...externalErrors,\n\t\t...internalErrors,\n\t];\n};\n\nconst getErrorSummaryFieldLabel = (fieldConfig, context) => {\n\tif (fieldConfig.errorSummaryLabel) {\n\t\treturn fieldConfig.errorSummaryLabel;\n\t}\n\n\t// Attempt to use the field's 'label', this is just a convention.\n\tif (fieldConfig.data && fieldConfig.data.label) {\n\t\treturn renderTextNode(fieldConfig.data.label, 'span', context);\n\t}\n\n\treturn '';\n};\n\nexport const getErrorSummaryData = (config, internalErrors, externalErrors, computedProperties) => {\n\tconst errorSummaryData = [];\n\n\tfor (const {treePath, fieldConfig} of iterateFields(config)) {\n\t\tlet fieldErrors = null;\n\n\t\tconst fieldComputedProperties = getComputedProperties(computedProperties, treePath);\n\n\t\tif (fieldConfig.path && fieldComputedProperties.shown) {\n\t\t\tfieldErrors = getFieldErrors(fieldConfig.path, internalErrors, externalErrors);\n\t\t}\n\n\t\tif (fieldErrors && fieldErrors.length) {\n\t\t\terrorSummaryData.push({\n\t\t\t\tfieldId: `${config.id}.${treePath}`,\n\t\t\t\tlabel: getErrorSummaryFieldLabel(fieldConfig, config.context),\n\t\t\t\terrors: fieldErrors,\n\t\t\t});\n\t\t}\n\t}\n\n\treturn errorSummaryData;\n};\n\nconst getFieldErrorToDisplay = (errors, externalErrors, touched) => {\n\tif (externalErrors && externalErrors.length) {\n\t\treturn externalErrors[0];\n\t}\n\n\tif (touched && errors && errors.length) {\n\t\treturn errors[0];\n\t}\n\n\treturn undefined;\n};\n\n\nexport const renderFieldError = (errors, externalErrors, touched) => {\n\tconst error = getFieldErrorToDisplay(errors, externalErrors, touched);\n\n\tif (error && typeof error === 'string') {\n\t\treturn error;\n\t}\n\n\tif (error && error.message) {\n\t\treturn error.message;\n\t}\n\n\treturn undefined;\n};\n\n\nexport const renderChildError = (childName, errors, externalErrors, touched) => {\n\tconst error = getFieldErrorToDisplay(errors, externalErrors, touched);\n\tlet childError;\n\n\tif (error && error.children && error.children.length) {\n\t\tchildError = error.children.find(child => {\n\t\t\treturn child.name === childName;\n\t\t});\n\t}\n\n\treturn childError ? childError.message : undefined;\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'react-fast-compare';\n\nexport default class OptimiseField extends React.Component {\n\tstatic propTypes = {\n\t\tshouldOptimise: PropTypes.bool.isRequired,\n\t\tchildren: PropTypes.node.isRequired,\n\t}\n\n\tshouldComponentUpdate(nextProps) {\n\t\tif (!nextProps.shouldOptimise) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !isEqual(this.props, nextProps);\n\t}\n\n\trender() {\n\t\treturn this.props.children;\n\t}\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'react-fast-compare';\nimport { getIn, setIn } from 'formik';\nimport { getComponent } from '../utils';\nimport { getComputedProperties } from '../rules';\nimport { renderFieldError, renderChildError } from '../errors';\nimport renderTextNode from '../renderTextNode';\nimport OptimiseField from './OptimiseField';\n\nexport default class FormBuilderField extends React.Component {\n\tstatic propTypes = {\n\t\tformId: PropTypes.string.isRequired,\n\n\t\tpath: PropTypes.string,\n\n\t\ttreePath: PropTypes.string.isRequired,\n\n\t\t/***\n\t\t * The form config object used to build the form\n\t\t */\n\t\tconfig: PropTypes.object.isRequired,\n\n\t\tconfigTimestamp: PropTypes.number.isRequired,\n\n\t\t/***\n\t\t * A key-value mapping of custom field types to the components that should render them.\n\t\t *\n\t\t * This mapping would usually be passed down from FormBuilder.js, see that component for more details.\n\t\t */\n\t\tregisteredComponents: PropTypes.object.isRequired,\n\n\t\tregisteredActions: PropTypes.object.isRequired,\n\n\t\tregisteredRuleConditions: PropTypes.object.isRequired,\n\n\t\texternalErrors: PropTypes.object.isRequired,\n\n\t\tclearExternalError: PropTypes.func.isRequired,\n\n\t\tcomputed: PropTypes.object.isRequired,\n\n\t\t/***\n\t\t * Props passed from Formik\n\t\t */\n\t\tformik: PropTypes.object.isRequired,\n\n\t\tonTriggerCallback: PropTypes.func.isRequired,\n\n\t\tpathsToTreeMap: PropTypes.object.isRequired,\n\n\t\trunAction: PropTypes.func.isRequired,\n\n\t\tcontext: PropTypes.object.isRequired,\n\t};\n\n\tstatic defaultProps = {\n\t\tpath: undefined,\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tvalue: getIn(props.formik.values, props.path),\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.props.formik.setFieldTouched(this.props.path, false, false);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst nextFieldValue = getIn(this.props.formik.values, this.props.path);\n\t\tconst prevFieldValue = getIn(prevProps.formik.values, prevProps.path);\n\n\t\tif (!isEqual(nextFieldValue, prevFieldValue)) {\n\t\t\tthis.setState({ value: nextFieldValue }); // eslint-disable-line react/no-did-update-set-state\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// When a field unmounts (usually because of a show/hide rule), we need to clear it's value.\n\t\tthis._checkAndClearValue();\n\t}\n\n\t_checkAndClearValue() {\n\t\t// Here we are getting every field that has the same path as this field.\n\t\tconst fields = this.props.pathsToTreeMap[this.props.path];\n\n\t\t// Before we remove this fields value, we first need to check if there are any other fields with the\n\t\t// same path still visible. If there is another field visible, we don't want to remove the value.\n\t\tconst isPathShown = (fields || []).reduce((acc, field) => {\n\t\t\t// Don't check this field\n\t\t\tif (field.treePath === this.props.treePath) {\n\t\t\t\treturn acc;\n\t\t\t}\n\n\t\t\tconst fieldComputedProperties = getComputedProperties(this.props.computed, field.treePath);\n\n\t\t\treturn acc || fieldComputedProperties.shown;\n\t\t}, false);\n\n\n\t\t// If we are safe to remove the value: set the field as untouched and reset back\n\t\t// to the fields defaultValue.\n\t\tif (!isPathShown) {\n\t\t\tlet defaultValue;\n\n\t\t\tif (typeof this.props.config.defaultValue !== 'undefined') {\n\t\t\t\tdefaultValue = this.props.config.defaultValue;\n\t\t\t} else {\n\t\t\t\tdefaultValue = this.props.registeredComponents[this.props.config.type].defaultValue;\n\t\t\t}\n\n\t\t\tconst currentValue = this.state.value;\n\n\t\t\tthis.props.formik.setFieldTouched(this.props.path, false, false);\n\n\t\t\tif (!this.props.config.retainValue && currentValue !== defaultValue) {\n\t\t\t\tthis.props.formik.setFieldValue(this.props.path, defaultValue, false);\n\t\t\t}\n\t\t}\n\t}\n\n\trunActions = value => {\n\t\t// Unfortunately this action happens before Formik updates the state of the form.\n\t\t// In order to ensure that the all values are sent with this request, we manually add\n\t\t// the field value of the changed field.\n\t\tconst formValues = setIn(this.props.formik.values, this.props.config.path, value);\n\n\t\t(this.props.config.actions || []).forEach(action => {\n\t\t\tthis.props.runAction(action, value, formValues);\n\t\t});\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tformId,\n\t\t\ttreePath,\n\t\t\tpath,\n\t\t\tconfig,\n\t\t\tconfigTimestamp,\n\t\t\tcontext,\n\t\t\tregisteredComponents,\n\t\t\tregisteredRuleConditions,\n\t\t\tonTriggerCallback,\n\t\t\tregisteredActions,\n\t\t\tcomputed,\n\t\t\tformik,\n\t\t\texternalErrors,\n\t\t\tclearExternalError,\n\t\t\tpathsToTreeMap,\n\t\t} = this.props;\n\n\t\tconst Component = getComponent(registeredComponents, config.type);\n\n\t\tif (!Component) {\n\t\t\tthrow new Error(`FormBuilderField: Could not find component of type \"${config.type}\".`);\n\t\t}\n\n\t\tif (!formId) {\n\t\t\tthrow new Error('FormBuilderField: \"config.id\" is a required prop.');\n\t\t}\n\n\t\tconst fieldComputedProperties = getComputedProperties(computed, treePath);\n\n\t\tconst fieldTouched = !!getIn(formik.touched, path); // Ensure this is a boolean to keep prop-type warnings away\n\t\tconst fieldErrors = path ? getIn(formik.errors, path) : undefined;\n\t\tlet fieldExternalErrors = path ? getIn(externalErrors, path) : undefined;\n\n\t\tif (typeof fieldExternalErrors === 'string') {\n\t\t\tfieldExternalErrors = [fieldExternalErrors];\n\t\t}\n\n\t\tconst dependsOnOtherFields = this.props.registeredComponents[this.props.config.type].dependsOnOtherFields;\n\n\t\tconst shouldOptimise = !dependsOnOtherFields && (!config || !config.fields || !config.fields.length);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tclearExternalError(path);\n\t\t\t\t\t\tthis.runActions(value);\n\n\t\t\t\t\t\tif (triggersTouched) {\n\t\t\t\t\t\t\tformik.setFieldTouched(path, true, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tformik.setFieldValue(path, value, true);\n\t\t\t\t\t}}\n\t\t\t\t\thandleBlur={(/* e */) => {\n\t\t\t\t\t\tclearExternalError(path);\n\t\t\t\t\t\tformik.setFieldTouched(path, true, true);\n\t\t\t\t\t}}\n\t\t\t\t\thandleChangeFast={value => {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\thandleBlurFast={(/* e */) => {\n\t\t\t\t\t\tclearExternalError(path);\n\t\t\t\t\t\tthis.runActions(this.state.value);\n\t\t\t\t\t\tformik.setFieldValue(path, this.state.value, false);\n\t\t\t\t\t\tformik.setFieldTouched(path, true, true);\n\t\t\t\t\t}}\n\t\t\t\t\thandleKeyPressFast={event => {\n\t\t\t\t\t\tif (event.key === 'Enter') {\n\t\t\t\t\t\t\tformik.setFieldValue(path, this.state.value, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tcomputed={fieldComputedProperties}\n\t\t\t\t\tvalue={this.state.value}\n\t\t\t\t\terrors={fieldErrors}\n\t\t\t\t\texternalErrors={fieldExternalErrors}\n\t\t\t\t\ttouched={fieldTouched}\n\t\t\t\t\tgetDisplayError={() => {\n\t\t\t\t\t\treturn renderFieldError(fieldErrors, fieldExternalErrors, fieldTouched);\n\t\t\t\t\t}}\n\t\t\t\t\tgetChildError={childName => {\n\t\t\t\t\t\treturn renderChildError(childName, fieldErrors, fieldExternalErrors, fieldTouched);\n\t\t\t\t\t}}\n\t\t\t\t\trenderTextNode={(node, wrappingTag) => renderTextNode(node, wrappingTag, context)}\n\t\t\t\t\tsetValues={formik.setValues}\n\t\t\t\t\tformValues={formik.values}\n\t\t\t\t>\n\t\t\t\t\t{(config.fields || []).map(nestedField => {\n\t\t\t\t\t\tconst nestedFieldTreePath = `${treePath}.${nestedField.id}`;\n\t\t\t\t\t\tconst nestedFieldComputedProperties = getComputedProperties(computed, nestedFieldTreePath);\n\n\t\t\t\t\t\t// Don't render if not shown :)\n\t\t\t\t\t\tif (!nestedFieldComputedProperties.shown) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst focusField = fieldId => {\n\tconst element = document.getElementById(fieldId);\n\n\tif (element && element.focus) {\n\t\telement.focus();\n\n\t\tconst rect = element.getBoundingClientRect();\n\t\twindow.scrollTo(0, rect.y);\n\t}\n};\n\nconst renderItem = (id, label, message) => {\n\treturn (\n\t\t
  • \n\t\t\t {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tfocusField(id);\n\t\t\t\t}}\n\t\t\t\thref={`#${id}`}\n\t\t\t>\n\t\t\t\t{label}: {message}\n\t\t\t\n\t\t
  • \n\t);\n};\n\nconst renderField = field => {\n\tif (!field.errors || !field.errors.length) {\n\t\treturn null;\n\t}\n\n\tconst error = field.errors[0];\n\n\tif (error && typeof error === 'string') {\n\t\treturn [renderItem(field.fieldId, field.label, error)];\n\t}\n\n\tconst items = [];\n\n\tif (error && error.message) {\n\t\titems.push(renderItem(field.fieldId, field.label, error.message));\n\t}\n\n\tif (error && error.children && error.children.length) {\n\t\terror.children.forEach(child => {\n\t\t\titems.push(renderItem(field.fieldId, child.summaryLabel, child.message));\n\t\t});\n\t}\n\n\treturn items;\n};\n\nclass ErrorSummary extends React.Component {\n\tstatic propTypes = {\n\t\tsubmitCount: PropTypes.number.isRequired,\n\t\tsummaryData: PropTypes.array.isRequired,\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tsubmitCount: this.props.submitCount,\n\t\t\tsummaryData: this.props.summaryData,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tif (props.submitCount !== state.submitCount) {\n\t\t\treturn {\n\t\t\t\tsubmitCount: props.submitCount,\n\t\t\t\tsummaryData: props.summaryData,\n\t\t\t};\n\t\t}\n\n\t\treturn null;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
      \n\t\t\t\t{this.state.summaryData.reduce((items, field) => {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...items,\n\t\t\t\t\t\t...renderField(field),\n\t\t\t\t\t];\n\t\t\t\t}, [])}\n\t\t\t
    \n\t\t);\n\t};\n}\n\n/* eslint-disable react/prop-types */\nconst defaultRenderErrorSummary = ({summaryData, submitCount}) => {\n\treturn (\n\t\t\n\t);\n};\n/* eslint-enable react/prop-types */\n\nexport default defaultRenderErrorSummary;\n","/* eslint-disable react/prop-types */\nimport React from 'react';\n\nconst defaultRenderForm = ({\n\tchildren,\n\tbuttons,\n\thandleSubmit,\n\terrorSummary,\n}) => {\n\treturn (\n\t\t
    \n\t\t\t{errorSummary}\n\t\t\t{children}\n\t\t\t{buttons}\n\t\t
    \n\t);\n};\n\nexport default defaultRenderForm;\n/* eslint-enable react/prop-types */\n","import {getIn, setIn} from 'formik';\nimport {getValidator} from './utils';\nimport {getComputedProperties} from './rules';\n\nexport const REQUIRED_VALIDATOR_KEY = 'required';\n\nexport const defaultRequiredFn = ({fieldValue, message = 'This field is required', falseCountsAsNoValue}) => {\n\tif (!fieldValue && typeof fieldValue !== 'boolean') {\n\t\treturn message;\n\t}\n\n\tif (falseCountsAsNoValue && fieldValue === false) {\n\t\treturn message;\n\t}\n\n\tif ((typeof fieldValue === 'string' || fieldValue instanceof String) && !fieldValue.trim()) {\n\t\treturn message;\n\t}\n\n\tif (Array.isArray(fieldValue) && !fieldValue.length) {\n\t\treturn message;\n\t}\n\n\treturn undefined;\n};\n\nexport const makeFieldValidationFunction = (registeredValidators, formValues, computedProperties, registeredComponents = {}) => {\n\tconst validateField = (fieldConfig, partialId = '', partialErrors = {}) => {\n\t\tconst fieldIsShown = !computedProperties || !partialId || (computedProperties && computedProperties[partialId] && computedProperties[partialId].shown);\n\t\tif (!fieldIsShown) {\n\t\t\treturn partialErrors;\n\t\t}\n\n\t\tconst fieldComputedProperties = getComputedProperties(computedProperties, partialId);\n\n\t\tconst componentDefinition = registeredComponents[fieldConfig.type] || {};\n\n\t\t// Some component may have boolean values, and some components may wish that `false` be treated as an empty\n\t\t// value so that it gets picked up by the required validator\n\t\tlet falseCountsAsNoValue = false;\n\t\tif (typeof componentDefinition.falseCountsAsNoValue === 'boolean') {\n\t\t\tfalseCountsAsNoValue = componentDefinition.falseCountsAsNoValue;\n\t\t}\n\n\t\tlet validators = [];\n\n\t\tif (fieldConfig.validators) {\n\t\t\tvalidators = [...fieldConfig.validators];\n\t\t}\n\n\t\t// A required validator is just a validator, but it's added to the config differently.\n\t\t// Here we add a required validator to the top of the existing list of validators.\n\t\t// In this way we can treat it the same way as the rest of the validation rules applied\n\t\t// to this field.\n\t\tif (fieldComputedProperties.required) {\n\t\t\tvalidators = [\n\t\t\t\t{\n\t\t\t\t\ttype: REQUIRED_VALIDATOR_KEY,\n\t\t\t\t\tmessage: fieldConfig.requiredMessage || undefined,\n\t\t\t\t},\n\t\t\t\t...validators,\n\t\t\t];\n\t\t}\n\n\t\t// Loop through each validator on the field\n\t\tconst fieldErrors = validators.reduce((errorsAccumulator, validatorConfig) => {\n\t\t\tconst validationFn = getValidator(registeredValidators, validatorConfig.type);\n\n\t\t\tif (typeof validationFn !== 'function') {\n\t\t\t\tthrow Error(`SchematikForms: No validation function found for type '${validatorConfig.type}'`);\n\t\t\t}\n\n\t\t\t// Call the validation function\n\t\t\tconst error = validationFn({\n\t\t\t\tfieldConfig,\n\t\t\t\tfieldValue: getIn(formValues, fieldConfig.path),\n\t\t\t\tformValues,\n\t\t\t\tmessage: validatorConfig.message,\n\t\t\t\toptions: validatorConfig.options,\n\t\t\t\tfalseCountsAsNoValue,\n\t\t\t});\n\n\t\t\tif (error) {\n\t\t\t\treturn [\n\t\t\t\t\t...errorsAccumulator,\n\t\t\t\t\terror,\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\treturn errorsAccumulator;\n\t\t\t}\n\t\t}, []);\n\n\t\tlet errors = partialErrors;\n\n\t\t// Populate the errors object if there were errors\n\t\tif (fieldErrors.length) {\n\t\t\terrors = setIn(errors, fieldConfig.path, fieldErrors);\n\t\t}\n\n\t\tif (fieldConfig.fields && fieldConfig.fields.length) {\n\t\t\tfor (const field of fieldConfig.fields) {\n\t\t\t\tconst fullId = partialId ? `${partialId}.${field.id}` : field.id;\n\t\t\t\terrors = validateField(field, fullId, errors);\n\t\t\t}\n\t\t}\n\n\t\treturn errors;\n\t};\n\n\treturn validateField;\n};\n\nexport const validateForm = (config, registeredValidators, formValues, computedProperties, registeredComponents) => {\n\t// Add the default required validation function to the custom validation functions.\n\t// The default will be overridden by a custom 'required' validation function.\n\tconst validationFunctions = {\n\t\t[REQUIRED_VALIDATOR_KEY]: defaultRequiredFn,\n\t\t...registeredValidators,\n\t};\n\n\tconst validateFieldFn = makeFieldValidationFunction(validationFunctions, formValues, computedProperties, registeredComponents);\n\n\treturn validateFieldFn(config);\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Formik, setIn } from 'formik';\nimport FormBuilderField from './components/FormBuilderField';\nimport { parseRules, getComputedProperties } from './rules';\nimport { mapPathsToTree, filterFormValues, getDefaultValues } from './utils';\nimport { getErrorSummaryData } from './errors';\nimport defaultRenderErrorSummary from './defaultRenderErrorSummary';\nimport defaultRenderForm from './defaultRenderForm';\nimport { validateForm } from './validation';\nimport { JSON_SPEC_VERSION } from './constants';\n\nexport default class FormBuilder extends React.Component {\n\tstatic propTypes = {\n\t\t/***\n * The form config object used to build the form\n */\n\t\tconfig: PropTypes.object.isRequired,\n\n\t\t/***\n * A timestamp of the last time a new config was provided.\n *\n * This is important for letting the form builder know when the config has changed, failure to\n * update the timestamp will result in unexpected results.\n *\n * This is an alternative to performing a deep equality check on `config`, which would affect\n * performance.\n */\n\t\tconfigTimestamp: PropTypes.number.isRequired,\n\n\t\t/***\n * A key-value mapping of custom field types to the components that should render them.\n *\n * See DOCS.md for more details\n *\n * @example\n * {\n * 'my-custom-type': {\n * component: MyComponentThatImplementsIt,\n * defaultValue: ''\n * }\n * }\n */\n\t\tregisteredComponents: PropTypes.object,\n\n\t\t/***\n * A key-value mapping of custom validation functions.\n *\n * See DOCS.md for more details\n *\n * @example\n * {\n * 'my-custom-validator': ({fieldValue, formValues, options, message=\"Default message\"}) => {\n * if (... thing is valid) {\n * return undefined;\n * } else {\n * return message;\n * }\n * }\n * }\n */\n\t\tregisteredValidators: PropTypes.object,\n\n\t\t/***\n * A key-value mapping of custom action functions.\n\t\t *\n\t\t * Actions are called when a field changes, and are referenced by a 'type'.\n\t\t *\n\t\t * The action function is passed a number of parameters for use in acheiving the action.\n *\n * See DOCS.md for more details\n *\n * @example\n * {\n * 'my-custom-action': ({fieldValue, formValues, action, setFieldValue}) => {\n * // Do whatever your action required here\n\t\t * \t\t// No return value is expected\n * }\n * }\n */\n\t\tregisteredActions: PropTypes.object,\n\n\t\t/***\n * @example\n * {\n * 'my-custom-action': ({fieldValue, formValues, action, setFieldValue}) => {\n * // Do whatever your action required here\n\t\t * \t\t// No return value is expected\n * }\n * }\n */\n\t\tregisteredRuleConditions: PropTypes.object,\n\n\t\t/***\n * A render prop you can use to render your form's buttons (submit, cancel etc.)\n *\n * See DOCS.md for more details\n */\n\t\trenderButtons: PropTypes.func,\n\n\t\t/***\n * A render prop you can use to customise the rendering of the error summary.\n *\n * The error summary is passed an array of objects in the following format:\n * {\n * fieldId: string,\n * label: node,\n * errors: Array\n * }\n */\n\t\trenderErrorSummary: PropTypes.func,\n\n\t\t/***\n * A render prop you can use to customise the rendering of your form, by default your form is\n * rendered as a simple
    tag.\n *\n * See DOCS.md for more details\n */\n\t\trenderForm: PropTypes.func,\n\n\t\t/***\n * Called on successful (no validation errors) submission with the form values\n *\n * @param {Object} values - The forms values\n */\n\t\tonSubmit: PropTypes.func,\n\n\t\t/**\n * Initial values of the form\n *\n * The form config itself can also hold initial values.\n *\n * If values are passed to this prop, the config value will be ignored.\n */\n\t\tinitialValues: PropTypes.object,\n\n\t\tonActionCallback: PropTypes.func,\n\n\t\tformikRef: PropTypes.func,\n\t};\n\n\tstatic defaultProps = {\n\t\tonSubmit: () => {},\n\t\tinitialValues: undefined,\n\t\trenderForm: defaultRenderForm,\n\t\trenderErrorSummary: defaultRenderErrorSummary,\n\t\trenderButtons: () => {},\n\t\tregisteredComponents: {},\n\t\tregisteredRuleConditions: {},\n\t\tregisteredValidators: {},\n\t\tregisteredActions: {},\n\t\tonActionCallback: () => {},\n\t\tformikRef: () => {},\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\texternalErrors: this.getInitialErrors(),\n\t\t};\n\n\t\tthis.formCallbackRef = this.formCallbackRef.bind(this);\n\n\t\tthis.formikRef = null;\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (prevProps.configTimestamp !== this.props.configTimestamp) {\n\t\t\tthis.formikRef.setValues(this.getInitialValues());\n\n\t\t\t/* eslint-disable-next-line react/no-did-update-set-state */\n\t\t\tthis.setState({\n\t\t\t\texternalErrors: this.getInitialErrors(),\n\t\t\t});\n\t\t}\n\t}\n\n\tclearAllExternalErrors() {\n\t\tthis.setState({\n\t\t\texternalErrors: {},\n\t\t});\n\t}\n\n\tgetInitialValues() {\n\t\tconst initial = this.props.initialValues ? this.props.initialValues : this.props.config.initialValues;\n\n\t\treturn {\n\t\t\t...getDefaultValues(this.props.config, this.props.registeredComponents),\n\t\t\t...initial,\n\t\t};\n\t}\n\n\tgetInitialErrors() {\n\t\treturn (this.props.config && this.props.config.initialErrors) || {};\n\t}\n\n\trunAction = (action, fieldValue, formValues) => {\n\t\tconst setFieldValue = (path, val) => {\n\t\t\tthis.formikRef.setFieldValue(path, val, false);\n\t\t};\n\n\t\tconst triggerCallback = (...params) => {\n\t\t\tthis.props.onActionCallback(...params, formValues);\n\t\t};\n\n\t\tconst availableActions = {\n\t\t\t...this.props.registeredActions,\n\t\t};\n\n\t\tif (action.when && action.when.eq && action.when.eq !== fieldValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (availableActions.hasOwnProperty(action.type)) {\n\t\t\tavailableActions[action.type]({\n\t\t\t\taction,\n\t\t\t\tformValues,\n\t\t\t\tfieldValue,\n\t\t\t\tsetFieldValue,\n\t\t\t\ttriggerCallback,\n\t\t\t\tsubmitForm: () => {\n\t\t\t\t\tthis.formikRef.submitForm();\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tformCallbackRef(node) {\n\t\tthis.formikRef = node;\n\t\tthis.props.formikRef(node);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tconfig,\n\t\t\tconfigTimestamp,\n\t\t\tregisteredComponents,\n\t\t\tregisteredActions,\n\t\t\tregisteredRuleConditions,\n\t\t\tregisteredValidators,\n\t\t\trenderForm,\n\t\t\trenderButtons,\n\t\t\trenderErrorSummary,\n\t\t} = this.props;\n\n\t\t// Don't render anything if no config is provided.\n\t\tif (!config) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (config.version !== JSON_SPEC_VERSION) {\n\t\t\tthrow new Error(`JSON forms spec version mismatch. Was: ${config.version}, expected: ${JSON_SPEC_VERSION}`);\n\t\t}\n\n\t\tconst pathsToTreeMap = mapPathsToTree(config);\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tconst computed = parseRules(config, pathsToTreeMap, values, registeredRuleConditions);\n\n\t\t\t\t\tconst filteredValues = filterFormValues(values, config, computed, pathsToTreeMap);\n\n\t\t\t\t\tthis.props.onSubmit(filteredValues);\n\t\t\t\t}}\n\t\t\t\tinitialValues={this.getInitialValues()}\n\t\t\t\tvalidate={values => {\n\t\t\t\t\tconst computed = parseRules(config, pathsToTreeMap, values, registeredRuleConditions);\n\n\t\t\t\t\treturn validateForm(config, registeredValidators, values, computed, registeredComponents);\n\t\t\t\t}}\n\t\t\t\trender={formikProps => {\n\t\t\t\t\tconst computed = parseRules(config, pathsToTreeMap, formikProps.values, registeredRuleConditions);\n\n\t\t\t\t\t// Start a recursive loop through each field in the config\n\t\t\t\t\tconst fields = (config.fields || []).map(field => {\n\t\t\t\t\t\tconst fieldComputedProperties = getComputedProperties(computed, field.id);\n\n\t\t\t\t\t\t// Don't render if not shown :)\n\t\t\t\t\t\tif (!fieldComputedProperties.shown) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState(prevState => ({\n\t\t\t\t\t\t\t\t\t\texternalErrors: setIn(prevState.externalErrors, errorPath, undefined),\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\texternalErrors={this.state.externalErrors}\n\t\t\t\t\t\t\t\tpathsToTreeMap={pathsToTreeMap}\n\t\t\t\t\t\t\t\tonTriggerCallback={this.props.onActionCallback}\n\t\t\t\t\t\t\t\trunAction={this.runAction}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\n\t\t\t\t\t// TODO pass correct props to renderButtons()\n\t\t\t\t\tconst buttons = renderButtons();\n\n\t\t\t\t\tconst errorSummaryData = getErrorSummaryData(config, formikProps.errors, this.state.externalErrors, computed);\n\t\t\t\t\tconst errorSummary = renderErrorSummary({\n\t\t\t\t\t\tsummaryData: errorSummaryData,\n\t\t\t\t\t\tsubmitCount: formikProps.submitCount,\n\t\t\t\t\t\tisValidating: formikProps.isValidating,\n\t\t\t\t\t});\n\n\t\t\t\t\treturn renderForm({\n\t\t\t\t\t\tchildren: fields,\n\t\t\t\t\t\tbuttons: buttons,\n\t\t\t\t\t\terrorSummary: errorSummary,\n\t\t\t\t\t\t// TODO: form error summary might go in here\n\t\t\t\t\t\thandleSubmit: event => {\n\t\t\t\t\t\t\tthis.clearAllExternalErrors();\n\t\t\t\t\t\t\tformikProps.handleSubmit(event);\n\t\t\t\t\t\t},\n\t\t\t\t\t\trunAction: action => {\n\t\t\t\t\t\t\tthis.runAction(action, undefined, formikProps.values);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tformValues: formikProps.values,\n\t\t\t\t\t});\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n}\n","/* eslint-disable-next-line import/prefer-default-export */\nexport const JSON_SPEC_VERSION = 0;\n","import FormBuilder from './FormBuilder';\nimport {iterateFields} from './utils';\n\nexport {\n\titerateFields,\n};\n\nexport default FormBuilder;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nvar ReCAPTCHA =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ReCAPTCHA, _React$Component);\n\n function ReCAPTCHA() {\n var _this;\n\n _this = _React$Component.call(this) || this;\n _this.handleExpired = _this.handleExpired.bind(_assertThisInitialized(_this));\n _this.handleErrored = _this.handleErrored.bind(_assertThisInitialized(_this));\n _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n _this.handleRecaptchaRef = _this.handleRecaptchaRef.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = ReCAPTCHA.prototype;\n\n _proto.getValue = function getValue() {\n if (this.props.grecaptcha && this._widgetId !== undefined) {\n return this.props.grecaptcha.getResponse(this._widgetId);\n }\n\n return null;\n };\n\n _proto.getWidgetId = function getWidgetId() {\n if (this.props.grecaptcha && this._widgetId !== undefined) {\n return this._widgetId;\n }\n\n return null;\n };\n\n _proto.execute = function execute() {\n var grecaptcha = this.props.grecaptcha;\n\n if (grecaptcha && this._widgetId !== undefined) {\n return grecaptcha.execute(this._widgetId);\n } else {\n this._executeRequested = true;\n }\n };\n\n _proto.executeAsync = function executeAsync() {\n var _this2 = this;\n\n return new Promise(function (resolve, reject) {\n _this2.executionResolve = resolve;\n _this2.executionReject = reject;\n\n _this2.execute();\n });\n };\n\n _proto.reset = function reset() {\n if (this.props.grecaptcha && this._widgetId !== undefined) {\n this.props.grecaptcha.reset(this._widgetId);\n }\n };\n\n _proto.handleExpired = function handleExpired() {\n if (this.props.onExpired) {\n this.props.onExpired();\n } else {\n this.handleChange(null);\n }\n };\n\n _proto.handleErrored = function handleErrored() {\n if (this.props.onErrored) {\n this.props.onErrored();\n }\n\n if (this.executionReject) {\n this.executionReject();\n delete this.executionResolve;\n delete this.executionReject;\n }\n };\n\n _proto.handleChange = function handleChange(token) {\n if (this.props.onChange) {\n this.props.onChange(token);\n }\n\n if (this.executionResolve) {\n this.executionResolve(token);\n delete this.executionReject;\n delete this.executionResolve;\n }\n };\n\n _proto.explicitRender = function explicitRender() {\n if (this.props.grecaptcha && this.props.grecaptcha.render && this._widgetId === undefined) {\n var wrapper = document.createElement(\"div\");\n this._widgetId = this.props.grecaptcha.render(wrapper, {\n sitekey: this.props.sitekey,\n callback: this.handleChange,\n theme: this.props.theme,\n type: this.props.type,\n tabindex: this.props.tabindex,\n \"expired-callback\": this.handleExpired,\n \"error-callback\": this.handleErrored,\n size: this.props.size,\n stoken: this.props.stoken,\n hl: this.props.hl,\n badge: this.props.badge\n });\n this.captcha.appendChild(wrapper);\n }\n\n if (this._executeRequested && this.props.grecaptcha && this._widgetId !== undefined) {\n this._executeRequested = false;\n this.execute();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.explicitRender();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.explicitRender();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._widgetId !== undefined) {\n this.delayOfCaptchaIframeRemoving();\n this.reset();\n }\n };\n\n _proto.delayOfCaptchaIframeRemoving = function delayOfCaptchaIframeRemoving() {\n var temporaryNode = document.createElement(\"div\");\n document.body.appendChild(temporaryNode);\n temporaryNode.style.display = \"none\"; // move of the recaptcha to a temporary node\n\n while (this.captcha.firstChild) {\n temporaryNode.appendChild(this.captcha.firstChild);\n } // delete the temporary node after reset will be done\n\n\n setTimeout(function () {\n document.body.removeChild(temporaryNode);\n }, 5000);\n };\n\n _proto.handleRecaptchaRef = function handleRecaptchaRef(elem) {\n this.captcha = elem;\n };\n\n _proto.render = function render() {\n // consume properties owned by the reCATPCHA, pass the rest to the div so the user can style it.\n\n /* eslint-disable no-unused-vars */\n var _this$props = this.props,\n sitekey = _this$props.sitekey,\n onChange = _this$props.onChange,\n theme = _this$props.theme,\n type = _this$props.type,\n tabindex = _this$props.tabindex,\n onExpired = _this$props.onExpired,\n onErrored = _this$props.onErrored,\n size = _this$props.size,\n stoken = _this$props.stoken,\n grecaptcha = _this$props.grecaptcha,\n badge = _this$props.badge,\n hl = _this$props.hl,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"sitekey\", \"onChange\", \"theme\", \"type\", \"tabindex\", \"onExpired\", \"onErrored\", \"size\", \"stoken\", \"grecaptcha\", \"badge\", \"hl\"]);\n /* eslint-enable no-unused-vars */\n\n\n return React.createElement(\"div\", _extends({}, childProps, {\n ref: this.handleRecaptchaRef\n }));\n };\n\n return ReCAPTCHA;\n}(React.Component);\n\nexport { ReCAPTCHA as default };\nReCAPTCHA.displayName = \"ReCAPTCHA\";\nReCAPTCHA.propTypes = {\n sitekey: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n grecaptcha: PropTypes.object,\n theme: PropTypes.oneOf([\"dark\", \"light\"]),\n type: PropTypes.oneOf([\"image\", \"audio\"]),\n tabindex: PropTypes.number,\n onExpired: PropTypes.func,\n onErrored: PropTypes.func,\n size: PropTypes.oneOf([\"compact\", \"normal\", \"invisible\"]),\n stoken: PropTypes.string,\n hl: PropTypes.string,\n badge: PropTypes.oneOf([\"bottomright\", \"bottomleft\", \"inline\"])\n};\nReCAPTCHA.defaultProps = {\n onChange: function onChange() {},\n theme: \"light\",\n type: \"image\",\n tabindex: 0,\n size: \"normal\",\n badge: \"bottomright\"\n};","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nimport { Component, createElement, forwardRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nvar SCRIPT_MAP = {}; // A counter used to generate a unique id for each component that uses the function\n\nvar idCount = 0;\nexport default function makeAsyncScript(getScriptURL, options) {\n options = options || {};\n return function wrapWithAsyncScript(WrappedComponent) {\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \"Component\";\n\n var AsyncScriptLoader =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(AsyncScriptLoader, _Component);\n\n function AsyncScriptLoader(props, context) {\n var _this;\n\n _this = _Component.call(this, props, context) || this;\n _this.state = {};\n _this.__scriptURL = \"\";\n return _this;\n }\n\n var _proto = AsyncScriptLoader.prototype;\n\n _proto.asyncScriptLoaderGetScriptLoaderID = function asyncScriptLoaderGetScriptLoaderID() {\n if (!this.__scriptLoaderID) {\n this.__scriptLoaderID = \"async-script-loader-\" + idCount++;\n }\n\n return this.__scriptLoaderID;\n };\n\n _proto.setupScriptURL = function setupScriptURL() {\n this.__scriptURL = typeof getScriptURL === \"function\" ? getScriptURL() : getScriptURL;\n return this.__scriptURL;\n };\n\n _proto.asyncScriptLoaderHandleLoad = function asyncScriptLoaderHandleLoad(state) {\n var _this2 = this;\n\n // use reacts setState callback to fire props.asyncScriptOnLoad with new state/entry\n this.setState(state, function () {\n return _this2.props.asyncScriptOnLoad && _this2.props.asyncScriptOnLoad(_this2.state);\n });\n };\n\n _proto.asyncScriptLoaderTriggerOnScriptLoaded = function asyncScriptLoaderTriggerOnScriptLoaded() {\n var mapEntry = SCRIPT_MAP[this.__scriptURL];\n\n if (!mapEntry || !mapEntry.loaded) {\n throw new Error(\"Script is not loaded.\");\n }\n\n for (var obsKey in mapEntry.observers) {\n mapEntry.observers[obsKey](mapEntry);\n }\n\n delete window[options.callbackName];\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this3 = this;\n\n var scriptURL = this.setupScriptURL();\n var key = this.asyncScriptLoaderGetScriptLoaderID();\n var _options = options,\n globalName = _options.globalName,\n callbackName = _options.callbackName,\n scriptId = _options.scriptId; // check if global object already attached to window\n\n if (globalName && typeof window[globalName] !== \"undefined\") {\n SCRIPT_MAP[scriptURL] = {\n loaded: true,\n observers: {}\n };\n } // check if script loading already\n\n\n if (SCRIPT_MAP[scriptURL]) {\n var entry = SCRIPT_MAP[scriptURL]; // if loaded or errored then \"finish\"\n\n if (entry && (entry.loaded || entry.errored)) {\n this.asyncScriptLoaderHandleLoad(entry);\n return;\n } // if still loading then callback to observer queue\n\n\n entry.observers[key] = function (entry) {\n return _this3.asyncScriptLoaderHandleLoad(entry);\n };\n\n return;\n }\n /*\n * hasn't started loading\n * start the \"magic\"\n * setup script to load and observers\n */\n\n\n var observers = {};\n\n observers[key] = function (entry) {\n return _this3.asyncScriptLoaderHandleLoad(entry);\n };\n\n SCRIPT_MAP[scriptURL] = {\n loaded: false,\n observers: observers\n };\n var script = document.createElement(\"script\");\n script.src = scriptURL;\n script.async = true;\n\n for (var attribute in options.attributes) {\n script.setAttribute(attribute, options.attributes[attribute]);\n }\n\n if (scriptId) {\n script.id = scriptId;\n }\n\n var callObserverFuncAndRemoveObserver = function callObserverFuncAndRemoveObserver(func) {\n if (SCRIPT_MAP[scriptURL]) {\n var mapEntry = SCRIPT_MAP[scriptURL];\n var observersMap = mapEntry.observers;\n\n for (var obsKey in observersMap) {\n if (func(observersMap[obsKey])) {\n delete observersMap[obsKey];\n }\n }\n }\n };\n\n if (callbackName && typeof window !== \"undefined\") {\n window[callbackName] = function () {\n return _this3.asyncScriptLoaderTriggerOnScriptLoaded();\n };\n }\n\n script.onload = function () {\n var mapEntry = SCRIPT_MAP[scriptURL];\n\n if (mapEntry) {\n mapEntry.loaded = true;\n callObserverFuncAndRemoveObserver(function (observer) {\n if (callbackName) {\n return false;\n }\n\n observer(mapEntry);\n return true;\n });\n }\n };\n\n script.onerror = function () {\n var mapEntry = SCRIPT_MAP[scriptURL];\n\n if (mapEntry) {\n mapEntry.errored = true;\n callObserverFuncAndRemoveObserver(function (observer) {\n observer(mapEntry);\n return true;\n });\n }\n };\n\n document.body.appendChild(script);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n // Remove tag script\n var scriptURL = this.__scriptURL;\n\n if (options.removeOnUnmount === true) {\n var allScripts = document.getElementsByTagName(\"script\");\n\n for (var i = 0; i < allScripts.length; i += 1) {\n if (allScripts[i].src.indexOf(scriptURL) > -1) {\n if (allScripts[i].parentNode) {\n allScripts[i].parentNode.removeChild(allScripts[i]);\n }\n }\n }\n } // Clean the observer entry\n\n\n var mapEntry = SCRIPT_MAP[scriptURL];\n\n if (mapEntry) {\n delete mapEntry.observers[this.asyncScriptLoaderGetScriptLoaderID()];\n\n if (options.removeOnUnmount === true) {\n delete SCRIPT_MAP[scriptURL];\n }\n }\n };\n\n _proto.render = function render() {\n var globalName = options.globalName; // remove asyncScriptOnLoad from childProps\n\n var _this$props = this.props,\n asyncScriptOnLoad = _this$props.asyncScriptOnLoad,\n forwardedRef = _this$props.forwardedRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"asyncScriptOnLoad\", \"forwardedRef\"]); // eslint-disable-line no-unused-vars\n\n\n if (globalName && typeof window !== \"undefined\") {\n childProps[globalName] = typeof window[globalName] !== \"undefined\" ? window[globalName] : undefined;\n }\n\n childProps.ref = forwardedRef;\n return createElement(WrappedComponent, childProps);\n };\n\n return AsyncScriptLoader;\n }(Component); // Note the second param \"ref\" provided by React.forwardRef.\n // We can pass it along to AsyncScriptLoader as a regular prop, e.g. \"forwardedRef\"\n // And it can then be attached to the Component.\n\n\n var ForwardedComponent = forwardRef(function (props, ref) {\n return createElement(AsyncScriptLoader, _extends({}, props, {\n forwardedRef: ref\n }));\n });\n ForwardedComponent.displayName = \"AsyncScriptLoader(\" + wrappedComponentName + \")\";\n ForwardedComponent.propTypes = {\n asyncScriptOnLoad: PropTypes.func\n };\n return hoistStatics(ForwardedComponent, WrappedComponent);\n };\n}","import ReCAPTCHA from \"./recaptcha\";\nimport makeAsyncScriptLoader from \"react-async-script\";\nvar callbackName = \"onloadcallback\";\nvar globalName = \"grecaptcha\";\n\nfunction getOptions() {\n return typeof window !== \"undefined\" && window.recaptchaOptions || {};\n}\n\nfunction getURL() {\n var dynamicOptions = getOptions();\n var hostname = dynamicOptions.useRecaptchaNet ? \"recaptcha.net\" : \"www.google.com\";\n return \"https://\" + hostname + \"/recaptcha/api.js?onload=\" + callbackName + \"&render=explicit\";\n}\n\nexport default makeAsyncScriptLoader(getURL, {\n callbackName: callbackName,\n globalName: globalName\n})(ReCAPTCHA);","import RecaptchaWrapper from \"./recaptcha-wrapper\";\nimport ReCAPTCHA from \"./recaptcha\";\nexport default RecaptchaWrapper;\nexport { ReCAPTCHA };","import React from 'react';\nexport default React.createContext(null);","export default {\n disabled: false\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
    \n * I'm a fade Transition!\n *
    \n * )}\n *
    \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
    \n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
    \n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\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 return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","module.exports = require(\"regenerator-runtime\");\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = cloneDeep;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n object = parent(object, path);\n\n var key = toKey(last(path));\n return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array ? array.length : 0;\n return length ? array[length - 1] : undefined;\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\nfunction unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n}\n\nmodule.exports = unset;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
    \n * \n *
    \n * {\"I'll receive my-node-* classes\"}\n *
    \n *
    \n * \n *
    \n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
    ` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
    ` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;"],"sourceRoot":""}