/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkwoocommerce_rtm_custom_emails"] = self["webpackChunkwoocommerce_rtm_custom_emails"] || []).push([["defaultVendors-1011~1013-c8772e4f6b8b86b1aa1975418400d157-index.js"],{

/***/ 19830:
/*!***********************************************************!*\
  !*** ./node_modules/json-schema-merge-allof/src/index.js ***!
  \***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

eval("const cloneDeep = __webpack_require__(/*! lodash/cloneDeep */ 50361)\nconst compare = __webpack_require__(/*! json-schema-compare */ 36602)\nconst computeLcm = __webpack_require__(/*! compute-lcm */ 61735)\nconst defaultsDeep = __webpack_require__(/*! lodash/defaultsDeep */ 66913)\nconst flatten = __webpack_require__(/*! lodash/flatten */ 85564)\nconst flattenDeep = __webpack_require__(/*! lodash/flattenDeep */ 42348)\nconst intersection = __webpack_require__(/*! lodash/intersection */ 25325)\nconst intersectionWith = __webpack_require__(/*! lodash/intersectionWith */ 33856)\nconst isEqual = __webpack_require__(/*! lodash/isEqual */ 18446)\nconst isPlainObject = __webpack_require__(/*! lodash/isPlainObject */ 68630)\nconst pullAll = __webpack_require__(/*! lodash/pullAll */ 45604)\nconst sortBy = __webpack_require__(/*! lodash/sortBy */ 89734)\nconst uniq = __webpack_require__(/*! lodash/uniq */ 44908)\nconst uniqWith = __webpack_require__(/*! lodash/uniqWith */ 87185)\n\nconst propertiesResolver = __webpack_require__(/*! ./complex-resolvers/properties */ 11915)\nconst itemsResolver = __webpack_require__(/*! ./complex-resolvers/items */ 51016)\n\nconst contains = (arr, val) => arr.indexOf(val) !== -1\nconst isSchema = (val) => isPlainObject(val) || val === true || val === false\nconst isFalse = (val) => val === false\nconst isTrue = (val) => val === true\nconst schemaResolver = (compacted, key, mergeSchemas) => mergeSchemas(compacted)\nconst stringArray = (values) => sortBy(uniq(flattenDeep(values)))\nconst notUndefined = (val) => val !== undefined\nconst allUniqueKeys = (arr) => uniq(flattenDeep(arr.map(keys)))\n\n// resolvers\nconst first = compacted => compacted[0]\nconst required = compacted => stringArray(compacted)\nconst maximumValue = compacted => Math.max.apply(Math, compacted)\nconst minimumValue = compacted => Math.min.apply(Math, compacted)\nconst uniqueItems = compacted => compacted.some(isTrue)\nconst examples = compacted => uniqWith(flatten(compacted), isEqual)\n\nfunction compareProp(key) {\n  return function(a, b) {\n    return compare({\n      [key]: a\n    }, { [key]: b })\n  }\n}\n\nfunction getAllOf(schema) {\n  let { allOf = [], ...copy } = schema\n  copy = isPlainObject(schema) ? copy : schema // if schema is boolean\n  return [copy, ...allOf.map(getAllOf)]\n}\n\nfunction getValues(schemas, key) {\n  return schemas.map(schema => schema && schema[key])\n}\n\nfunction tryMergeSchemaGroups(schemaGroups, mergeSchemas) {\n  return schemaGroups.map(function(schemas, index) {\n    try {\n      return mergeSchemas(schemas, index)\n    } catch (e) {\n      return undefined\n    }\n  }).filter(notUndefined)\n}\n\nfunction keys(obj) {\n  if (isPlainObject(obj) || Array.isArray(obj)) {\n    return Object.keys(obj)\n  } else {\n    return []\n  }\n}\n\nfunction getAnyOfCombinations(arrOfArrays, combinations) {\n  combinations = combinations || []\n  if (!arrOfArrays.length) {\n    return combinations\n  }\n\n  const values = arrOfArrays.slice(0).shift()\n  const rest = arrOfArrays.slice(1)\n  if (combinations.length) {\n    return getAnyOfCombinations(rest, flatten(combinations.map(combination => values.map(item => ([item].concat(combination))))))\n  }\n  return getAnyOfCombinations(rest, values.map(item => (item)))\n}\n\nfunction throwIncompatible(values, paths) {\n  let asJSON\n  try {\n    asJSON = values.map(function(val) {\n      return JSON.stringify(val, null, 2)\n    }).join('\\n')\n  } catch (variable) {\n    asJSON = values.join(', ')\n  }\n  throw new Error('Could not resolve values for path:\"' + paths.join('.') + '\". They are probably incompatible. Values: \\n' + asJSON)\n}\n\nfunction callGroupResolver(complexKeywords, resolverName, schemas, mergeSchemas, options, parents) {\n  if (complexKeywords.length) {\n    const resolverConfig = options.complexResolvers[resolverName]\n    if (!resolverConfig || !resolverConfig.resolver) {\n      throw new Error('No resolver found for ' + resolverName)\n    }\n\n    // extract all keywords from all the schemas that have one or more\n    // then remove all undefined ones and not unique\n    const extractedKeywordsOnly = schemas.map(schema => complexKeywords.reduce((all, key) => {\n      if (schema[key] !== undefined) all[key] = schema[key]\n      return all\n    }, {}))\n    const unique = uniqWith(extractedKeywordsOnly, compare)\n\n    // create mergers that automatically add the path of the keyword for use in the complex resolver\n    const mergers = resolverConfig.keywords.reduce((all, key) => ({\n      ...all,\n      [key]: (schemas, extraKey = []) => mergeSchemas(schemas, null, parents.concat(key, extraKey))\n    }), {})\n\n    const result = resolverConfig.resolver(unique, parents.concat(resolverName), mergers, options)\n\n    if (!isPlainObject(result)) {\n      throwIncompatible(unique, parents.concat(resolverName))\n    }\n\n    return result\n  }\n}\n\nfunction createRequiredMetaArray(arr) {\n  return { required: arr }\n}\n\nconst schemaGroupProps = ['properties', 'patternProperties', 'definitions', 'dependencies']\nconst schemaArrays = ['anyOf', 'oneOf']\nconst schemaProps = [\n  'additionalProperties',\n  'additionalItems',\n  'contains',\n  'propertyNames',\n  'not',\n  'items'\n]\n\nconst defaultResolvers = {\n  type(compacted) {\n    if (compacted.some(Array.isArray)) {\n      const normalized = compacted.map(function(val) {\n        return Array.isArray(val)\n          ? val\n          : [val]\n      })\n      const common = intersection.apply(null, normalized)\n\n      if (common.length === 1) {\n        return common[0]\n      } else if (common.length > 1) {\n        return uniq(common)\n      }\n    }\n  },\n  dependencies(compacted, paths, mergeSchemas) {\n    const allChildren = allUniqueKeys(compacted)\n\n    return allChildren.reduce(function(all, childKey) {\n      const childSchemas = getValues(compacted, childKey)\n      let innerCompacted = uniqWith(childSchemas.filter(notUndefined), isEqual)\n\n      // to support dependencies\n      const innerArrays = innerCompacted.filter(Array.isArray)\n\n      if (innerArrays.length) {\n        if (innerArrays.length === innerCompacted.length) {\n          all[childKey] = stringArray(innerCompacted)\n        } else {\n          const innerSchemas = innerCompacted.filter(isSchema)\n          const arrayMetaScheams = innerArrays.map(createRequiredMetaArray)\n          all[childKey] = mergeSchemas(innerSchemas.concat(arrayMetaScheams), childKey)\n        }\n        return all\n      }\n\n      innerCompacted = uniqWith(innerCompacted, compare)\n\n      all[childKey] = mergeSchemas(innerCompacted, childKey)\n      return all\n    }, {})\n  },\n  oneOf(compacted, paths, mergeSchemas) {\n    const combinations = getAnyOfCombinations(cloneDeep(compacted))\n    const result = tryMergeSchemaGroups(combinations, mergeSchemas)\n    const unique = uniqWith(result, compare)\n\n    if (unique.length) {\n      return unique\n    }\n  },\n  not(compacted) {\n    return { anyOf: compacted }\n  },\n  pattern(compacted) {\n    return compacted.map(r => '(?=' + r + ')').join('')\n  },\n  multipleOf(compacted) {\n    let integers = compacted.slice(0)\n    let factor = 1\n    while (integers.some(n => !Number.isInteger(n))) {\n      integers = integers.map(n => n * 10)\n      factor = factor * 10\n    }\n    return computeLcm(integers) / factor\n  },\n  enum(compacted) {\n    const enums = intersectionWith.apply(null, compacted.concat(isEqual))\n    if (enums.length) {\n      return sortBy(enums)\n    }\n  }\n}\n\ndefaultResolvers.$id = first\ndefaultResolvers.$ref = first\ndefaultResolvers.$schema = first\ndefaultResolvers.additionalItems = schemaResolver\ndefaultResolvers.additionalProperties = schemaResolver\ndefaultResolvers.anyOf = defaultResolvers.oneOf\ndefaultResolvers.contains = schemaResolver\ndefaultResolvers.default = first\ndefaultResolvers.definitions = defaultResolvers.dependencies\ndefaultResolvers.description = first\ndefaultResolvers.examples = examples\ndefaultResolvers.exclusiveMaximum = minimumValue\ndefaultResolvers.exclusiveMinimum = maximumValue\ndefaultResolvers.items = itemsResolver\ndefaultResolvers.maximum = minimumValue\ndefaultResolvers.maxItems = minimumValue\ndefaultResolvers.maxLength = minimumValue\ndefaultResolvers.maxProperties = minimumValue\ndefaultResolvers.minimum = maximumValue\ndefaultResolvers.minItems = maximumValue\ndefaultResolvers.minLength = maximumValue\ndefaultResolvers.minProperties = maximumValue\ndefaultResolvers.properties = propertiesResolver\ndefaultResolvers.propertyNames = schemaResolver\ndefaultResolvers.required = required\ndefaultResolvers.title = first\ndefaultResolvers.uniqueItems = uniqueItems\n\nconst defaultComplexResolvers = {\n  properties: propertiesResolver,\n  items: itemsResolver\n}\n\nfunction merger(rootSchema, options, totalSchemas) {\n  totalSchemas = totalSchemas || []\n  options = defaultsDeep(options, {\n    ignoreAdditionalProperties: false,\n    resolvers: defaultResolvers,\n    complexResolvers: defaultComplexResolvers,\n    deep: true\n  })\n\n  const complexResolvers = Object.entries(options.complexResolvers)\n\n  function mergeSchemas(schemas, base, parents) {\n    schemas = cloneDeep(schemas.filter(notUndefined))\n    parents = parents || []\n    const merged = isPlainObject(base)\n      ? base\n      : {}\n\n    // return undefined, an empty schema\n    if (!schemas.length) {\n      return\n    }\n\n    if (schemas.some(isFalse)) {\n      return false\n    }\n\n    if (schemas.every(isTrue)) {\n      return true\n    }\n\n    // there are no false and we don't need the true ones as they accept everything\n    schemas = schemas.filter(isPlainObject)\n\n    const allKeys = allUniqueKeys(schemas)\n    if (options.deep && contains(allKeys, 'allOf')) {\n      return merger({\n        allOf: schemas\n      }, options, totalSchemas)\n    }\n\n    const complexKeysArr = complexResolvers.map(([mainKeyWord, resolverConf]) =>\n      allKeys.filter(k => resolverConf.keywords.includes(k)))\n\n    // remove all complex keys before simple resolvers\n    complexKeysArr.forEach(keys => pullAll(allKeys, keys))\n\n    // call all simple resolvers for relevant keywords\n    allKeys.forEach(function(key) {\n      const values = getValues(schemas, key)\n      const compacted = uniqWith(values.filter(notUndefined), compareProp(key))\n\n      // arrayprops like anyOf and oneOf must be merged first, as they contains schemas\n      // allOf is treated differently alltogether\n      if (compacted.length === 1 && contains(schemaArrays, key)) {\n        merged[key] = compacted[0].map(schema => mergeSchemas([schema], schema))\n        // prop groups must always be resolved\n      } else if (compacted.length === 1 && !contains(schemaGroupProps, key) && !contains(schemaProps, key)) {\n        merged[key] = compacted[0]\n      } else {\n        const resolver = options.resolvers[key] || options.resolvers.defaultResolver\n        if (!resolver) throw new Error('No resolver found for key ' + key + '. You can provide a resolver for this keyword in the options, or provide a default resolver.')\n\n        const merger = (schemas, extraKey = []) => mergeSchemas(schemas, null, parents.concat(key, extraKey))\n        merged[key] = resolver(compacted, parents.concat(key), merger, options)\n\n        if (merged[key] === undefined) {\n          throwIncompatible(compacted, parents.concat(key))\n        } else if (merged[key] === undefined) {\n          delete merged[key]\n        }\n      }\n    })\n\n    return complexResolvers.reduce((all, [resolverKeyword, config], index) => ({\n      ...all,\n      ...callGroupResolver(complexKeysArr[index], resolverKeyword, schemas, mergeSchemas, options, parents)\n    }), merged)\n  }\n\n  const allSchemas = flattenDeep(getAllOf(rootSchema))\n  const merged = mergeSchemas(allSchemas)\n\n  return merged\n}\n\nmerger.options = {\n  resolvers: defaultResolvers\n}\n\nmodule.exports = merger\n\n\n//# sourceURL=webpack://woocommerce-rtm-custom-emails/./node_modules/json-schema-merge-allof/src/index.js?");

/***/ })

}]);