"use strict";

exports.__esModule = true;
exports.variantPropertyMapKvaSelector = exports.variantPropertyKeyValuesSelector = exports.selectCurrentLookupDetails = exports.productPropertyValuesSelector = exports.productPropertyValueSelector = exports.productPropertyMapSelector = exports.orderLookupsNextPageToLoad = exports.orderLookupsListCurrentInfo = exports.newProfileDefinitionNameSelector = exports.newProfileDefinitionInstanceSelector = exports.namedLookupsValuesSelector = exports.namedLookupValuesSelector = exports.namedLookupSelector = exports.namedLookupLocalizedValuesSelector = exports.namedLookupLocalizedSelector = exports.moduleAttributeGroupsSelector = exports.mappedOrderLookupsListSelector = exports.mappedLookupsListSelector = exports.mappedLookupListSelector = exports.mappedDefinitionsListSelector = exports.mappedDefinitionEntity = exports.mappedDefinitionAttributesSelector = exports.mappedCustomDefinitionsListSelector = exports.mappedBaseDefinitionsListSelector = exports.lookupsNextPageToLoad = exports.lookupsListSelector = exports.lookupsListCurrentInfo = exports.lookupSelector = exports.lookupExistAndIsActiveSelector = exports.lookupByNameSelector = exports.groupedCustomAttributesDefinitionSelector = exports.definitionEntityCustomAttributesSelector = exports.definitionEntityBaseAttributesSelector = exports.definitionEntity = exports.customProfileTypesSelector = exports.customAttributesSelector = exports.customAttributesDefinitionSelector = exports.baseAttributesSelector = void 0;
var _reselect = require("reselect");
var _immutable = _interopRequireDefault(require("immutable"));
var _utils = require("../utils");
var _setTranslationWithFallback = require("../utils/setTranslationWithFallback");
var _locale = require("../selectors/locale");
var _localizationHelper = require("../utils/localizationHelper");
var _propertyHelper = require("../utils/propertyHelper");
var _metadata = require("../reducers/metadata");
var _constants = require("../constants");
var _lodash = require("lodash");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var metadata = function metadata(state) {
  return state.get("metadata");
};
var lookups = (0, _reselect.createSelector)(metadata, function (meta) {
  return meta.get("lookups");
});
var lookupsModule = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookups, function (lookups) {
    return lookups.get(moduleName);
  });
});
var lookupSelector = exports.lookupSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookupsModule(moduleName), function (module) {
    return module.get("index");
  });
});
var mappedLookupsListSelector = exports.mappedLookupsListSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookupSelector(moduleName), _locale.currentLocaleOrDefault, function (lookups, locale) {
    return lookups.map(function (lookup) {
      return lookup.set("displayName", (0, _localizationHelper.getLocalization)(lookup.get("displayName"), locale, lookup.get("lookupName"))).delete("values");
    });
  });
});
var lookupValuesSelector = (0, _utils.memoize)(function (moduleName, lookupName) {
  return (0, _reselect.createSelector)(lookups, function (lookups) {
    return lookups.getIn([moduleName.toLowerCase(), "index", lookupName]) || _immutable.default.Map();
  });
});
var lookupByNameSelector = exports.lookupByNameSelector = (0, _utils.memoize)(function (moduleName, lookupName) {
  return (0, _reselect.createSelector)(lookups, function (lookups) {
    return lookups.getIn([moduleName, "index", lookupName]) || null;
  });
});
var namedLookupSelector = exports.namedLookupSelector = (0, _utils.memoize)(function (moduleName, lookupName) {
  return (0, _reselect.createSelector)(lookupSelector(moduleName), _locale.currentLocaleOrDefault, function (lookups, locale) {
    return (0, _utils.setTranslation)(locale, lookups.get(lookupName), "displayName") || _immutable.default.Map();
  });
});
var namedLookupValuesSelector = exports.namedLookupValuesSelector = (0, _utils.memoize)(function (moduleName, lookupName) {
  return (0, _reselect.createSelector)(namedLookupSelector(moduleName, lookupName), _locale.currentLocaleOrDefault, function (lookup, locale) {
    return (lookup.get("values") || _immutable.default.Map()).map(function (lookupValue) {
      return (0, _setTranslationWithFallback.setTranslationWithFallbackField)(locale, lookupValue, "name", "displayName");
    });
  });
});
var namedLookupsValuesSelector = exports.namedLookupsValuesSelector = (0, _utils.memoize)(function (moduleName, lookupNames) {
  return (0, _reselect.createSelector)(lookupSelector(moduleName), _locale.currentLocaleOrDefault, function (lookups, locale) {
    var lookupsValues = {};
    (0, _lodash.each)(lookupNames, function (name) {
      var lookup = lookups.get(name);
      if (!lookup) return;
      lookupsValues[name] = lookup.get("values", _immutable.default.Map()).map(function (lookupValue) {
        return (0, _setTranslationWithFallback.setTranslationWithFallbackField)(locale, lookupValue, "name", "displayName");
      });
    });
    return _immutable.default.fromJS(lookupsValues);
  });
});
var selectCurrentLookupDetails = exports.selectCurrentLookupDetails = (0, _utils.memoize)(function (moduleName, lookupName) {
  return namedLookupSelector(moduleName, lookupName);
});
var namedLookupLocalizedSelector = exports.namedLookupLocalizedSelector = (0, _utils.memoize)(function (moduleName, lookupName, key, defaultValue) {
  if (defaultValue === void 0) {
    defaultValue = key;
  }
  return (0, _reselect.createSelector)(lookupValuesSelector(moduleName, lookupName), _locale.currentLocaleOrDefault, function (lookups, locale) {
    var values = lookups.get("values");
    if (values == null || key == null) return (0, _localizationHelper.getLocalization)(null, locale, defaultValue);
    var value = (0, _propertyHelper.getPropertyOrDefault)(values.toJS(), key, defaultValue, true);
    return (0, _localizationHelper.getLocalization)(value == null ? void 0 : value.displayName, locale, defaultValue);
  });
});
var lookupExistAndIsActiveSelector = exports.lookupExistAndIsActiveSelector = (0, _utils.memoize)(function (moduleName, lookupName, key) {
  return (0, _reselect.createSelector)(lookupValuesSelector(moduleName, lookupName), function (lookups) {
    var values = lookups.get("values");
    if (values == null || key == null) return false;
    var value = values.get(key);
    return (value == null ? void 0 : value.get("isActive")) === true;
  });
});
var namedLookupLocalizedValuesSelector = exports.namedLookupLocalizedValuesSelector = (0, _utils.memoize)(function (moduleName, lookupName) {
  return (0, _reselect.createSelector)(lookupValuesSelector(moduleName, lookupName), _locale.currentLocaleOrDefault, function (lookup, locale) {
    return (lookup.get("values") || _immutable.default.Map()).map(function (lookupValue) {
      return (0, _localizationHelper.getLocalization)(lookupValue.get("displayName"), locale, lookupValue.get("value"));
    });
  });
});
var lookupsListCurrentInfo = exports.lookupsListCurrentInfo = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookupsModule(moduleName), function (data) {
    var _data$get;
    return {
      currentPage: (_data$get = data.get("currentPage")) != null ? _data$get : 1,
      totalCount: data.get("index").size
    };
  });
});
var lookupsNextPageToLoad = exports.lookupsNextPageToLoad = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookupsModule(moduleName), function (data) {
    return data.get("nextPageToLoad");
  });
});
var lookupsListSelector = exports.lookupsListSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookupsModule(moduleName), function (module) {
    return module.get("list");
  });
});
var mappedLookupListSelector = exports.mappedLookupListSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(lookupSelector(moduleName), lookupsListSelector(moduleName), function (index, list) {
    return list.map(function (id) {
      return index.get(id);
    }).filter(Boolean).map(function (item) {
      return item.set("id", item.get("lookupName"));
    });
  });
});
var orderLookupsListCurrentInfo = exports.orderLookupsListCurrentInfo = lookupsListCurrentInfo(_metadata.ORDER_MODULE_NAME);
var orderLookupsNextPageToLoad = exports.orderLookupsNextPageToLoad = lookupsNextPageToLoad(_metadata.ORDER_MODULE_NAME);
var mappedOrderLookupsListSelector = exports.mappedOrderLookupsListSelector = mappedLookupListSelector(_metadata.ORDER_MODULE_NAME);

/***  DEFINITIONS  ***/
var definitions = (0, _reselect.createSelector)(metadata, function (meta) {
  return meta.get("definitions");
});
var definitionsModule = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(definitions, function (definitions) {
    var _definitions$get;
    return (_definitions$get = definitions.get(moduleName)) != null ? _definitions$get : _immutable.default.Map();
  });
});
var mappedDefinitionsListSelector = exports.mappedDefinitionsListSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(definitionsModule(moduleName), _locale.currentLocaleOrDefault, function (definitions, locale) {
    return definitions.map(function (definition) {
      return definition.set("type", definition.get("isSharedEntity") === true ? _constants.definitionType.shared : _constants.definitionType.embedded).set("displayName", (0, _localizationHelper.getLocalization)(definition.get("displayName"), locale, definition.get("entityTypeName"))).delete("attributes");
    });
  });
});
var mappedCustomDefinitionsListSelector = exports.mappedCustomDefinitionsListSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(mappedDefinitionsListSelector(moduleName), function (definitions) {
    return definitions.filter(function (a) {
      return a.get("isBuiltIn") === false;
    });
  });
});
var mappedBaseDefinitionsListSelector = exports.mappedBaseDefinitionsListSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(mappedDefinitionsListSelector(moduleName), function (definitions) {
    return definitions.filter(function (a) {
      return a.get("isBuiltIn") === true;
    });
  });
});
var newProfileDefinitionInstanceSelector = exports.newProfileDefinitionInstanceSelector = (0, _reselect.createSelector)(definitions, function (definitions) {
  return definitions.get("newInstance") || null;
});
var newProfileDefinitionNameSelector = exports.newProfileDefinitionNameSelector = (0, _reselect.createSelector)(definitions, function (definitions) {
  return definitions.get("newInstanceId");
});
var definitionEntity = exports.definitionEntity = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(definitionsModule(moduleName), function (definition) {
    return definition.getIn([entityName]) || _immutable.default.Map();
  });
});
var mappedDefinitionEntity = exports.mappedDefinitionEntity = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(definitionEntity(moduleName, entityName), _locale.currentLocaleOrDefault, function (definition, locale) {
    return (0, _setTranslationWithFallback.setTranslationWithFallbackField)(locale, definition, "entityTypeName", "displayName");
  });
});
var definitionEntityAttributes = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(definitionEntity(moduleName, entityName), function (definition) {
    return definition.get("attributes") || _immutable.default.List();
  });
});
var filterIsBuiltInAttributes = function filterIsBuiltInAttributes(isBuiltIn) {
  return function (attributes) {
    return attributes.filter(function (a) {
      return a.get("isBuiltIn") === isBuiltIn;
    }).sortBy(function (x) {
      return x.get("displayOrder");
    });
  };
};
var definitionEntityCustomAttributesSelector = exports.definitionEntityCustomAttributesSelector = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(definitionEntityAttributes(moduleName, entityName), filterIsBuiltInAttributes(false));
});
var definitionEntityBaseAttributesSelector = exports.definitionEntityBaseAttributesSelector = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(definitionEntityAttributes(moduleName, entityName), filterIsBuiltInAttributes(true));
});
var mappedDefinitionAttributesSelector = exports.mappedDefinitionAttributesSelector = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(definitionEntityAttributes(moduleName, entityName), _locale.currentLocaleOrDefault, function (attributes, locale) {
    return attributes.map(function (a) {
      return (0, _setTranslationWithFallback.setTranslationWithFallbackField)(locale, a, "name", "displayName");
    });
  });
});
var customAttributesSelector = exports.customAttributesSelector = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(mappedDefinitionAttributesSelector(moduleName, entityName), filterIsBuiltInAttributes(false));
});
var baseAttributesSelector = exports.baseAttributesSelector = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(mappedDefinitionAttributesSelector(moduleName, entityName), filterIsBuiltInAttributes(true));
});
var moduleAttributeGroupsSelector = exports.moduleAttributeGroupsSelector = (0, _utils.memoize)(function (moduleName) {
  return (0, _reselect.createSelector)(metadata, _locale.currentLocaleOrDefault, function (meta, locale) {
    var metaDataGroupName = moduleName === "order" ? "orderAttributeGroups" : "profileAttributeGroups";
    var groups = meta.get(metaDataGroupName);
    return !(groups != null && groups.size) ? null : groups == null ? void 0 : groups.map(function (x) {
      return (0, _setTranslationWithFallback.setTranslationWithFallbackField)(locale, x, "name", "displayName");
    });
  });
});
var groupedCustomAttributesDefinitionSelector = exports.groupedCustomAttributesDefinitionSelector = (0, _utils.memoize)(function (moduleName, entityName) {
  return (0, _reselect.createSelector)(moduleAttributeGroupsSelector(moduleName), customAttributesSelector(moduleName, entityName), _locale.currentLocaleOrDefault, function (allAttributeGroups, attributes) {
    return attributes.groupBy(function (item) {
      return item.get("groupId");
    }).map(function (group) {
      var groupId = group.first().get("groupId");
      var attributeGroup = allAttributeGroups == null ? void 0 : allAttributeGroups.get(groupId);
      return _immutable.default.fromJS({
        id: groupId,
        name: attributeGroup == null ? void 0 : attributeGroup.get("displayName"),
        displayOrder: attributeGroup == null ? void 0 : attributeGroup.get("displayOrder")
      }).set("baseAttributes", group.filter(function (i) {
        return i.get("dataType") !== _constants.attributeDataType.entityReference;
      }).sortBy(function (x) {
        return x.get("displayOrder");
      })).set("profileAttributes", group.filter(function (i) {
        return i.get("dataType") === _constants.attributeDataType.entityReference;
      }).sortBy(function (x) {
        return x.get("displayOrder");
      }));
    }).sortBy(function (x) {
      return x.get("displayOrder");
    });
  });
});
var customAttributesDefinitionSelector = exports.customAttributesDefinitionSelector = (0, _utils.memoize)(function (moduleName, profileEntityName) {
  return (0, _reselect.createSelector)(mappedDefinitionEntity(moduleName, profileEntityName), customAttributesSelector(moduleName, profileEntityName), function (definition, attributes) {
    var profileAttributes = attributes == null ? void 0 : attributes.filter(function (a) {
      return a.get("dataType") === _constants.attributeDataType.entityReference;
    }).sortBy(function (x) {
      return x.get("displayOrder");
    });
    var baseAttributes = attributes == null ? void 0 : attributes.filter(function (a) {
      return a.get("dataType") !== _constants.attributeDataType.entityReference;
    }).sortBy(function (x) {
      return x.get("displayOrder");
    });
    return definition.set("baseAttributes", baseAttributes).set("profileAttributes", profileAttributes);
  });
});
var customProfileTypesSelector = exports.customProfileTypesSelector = (0, _utils.memoize)(function () {
  return (0, _reselect.createSelector)(definitionsModule("customer"), function (types) {
    return types.filter(function (t) {
      return t.get("isBuiltIn") === false && t.get("isSharedEntity") === true;
    });
  });
});
var productPropertyMapSelector = exports.productPropertyMapSelector = (0, _utils.memoize)(function (definitionName) {
  return (0, _reselect.createSelector)(definitionEntity("product", definitionName), function (immutableProductDefinition) {
    var productDefinition = immutableProductDefinition.toJS();
    var propertyMap = {};
    (0, _lodash.each)(productDefinition.properties, function (property) {
      var name = (0, _lodash.camelCase)(property.propertyName);
      propertyMap[name] = property;
    });
    (0, _lodash.each)(productDefinition.propertyGroups, function (group) {
      (0, _lodash.each)(group.properties, function (property) {
        var name = (0, _lodash.camelCase)(property.propertyName);
        propertyMap[name] = property;
      });
    });
    (0, _lodash.each)(productDefinition.variantProperties, function (property) {
      var name = (0, _lodash.camelCase)(property.propertyName);
      propertyMap[name] = property;
    });
    return propertyMap;
  });
});
var variantPropertyMapKvaSelector = exports.variantPropertyMapKvaSelector = (0, _utils.memoize)(function (definitionName) {
  return (0, _reselect.createSelector)(definitionEntity("product", definitionName), function (immutableProductDefinition) {
    var productDefinition = immutableProductDefinition.toJS();
    var propertyMap = {};
    (0, _lodash.each)(productDefinition.variantProperties, function (property) {
      if (property.isKeyVariant) {
        var name = (0, _lodash.camelCase)(property.propertyName);
        propertyMap[name] = property;
      }
    });
    return propertyMap;
  });
});
var productPropertyValueSelector = exports.productPropertyValueSelector = (0, _utils.memoize)(function (_ref, propertyName, propertyValue) {
  var definitionName = _ref.definitionName;
  return (0, _reselect.createSelector)(productPropertyMapSelector(definitionName), lookupSelector("product"), _locale.currentLocaleOrDefault, function (propertyMap, lookups, locale) {
    var property = propertyMap[(0, _lodash.camelCase)(propertyName)];
    return resolveProductPropertyValue(property, propertyValue, locale, lookups);
  });
});
var productPropertyValuesSelector = exports.productPropertyValuesSelector = (0, _utils.memoize)(function (_ref2, propertyBag) {
  var definitionName = _ref2.definitionName;
  return (0, _reselect.createSelector)(productPropertyMapSelector(definitionName), lookupSelector("product"), _locale.currentLocaleOrDefault, function (propertyMap, lookups, locale) {
    if (propertyBag != null) {
      return Object.keys(propertyBag).reduce(function (acc, rec) {
        return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, rec, resolveProductPropertyValue(propertyMap[(0, _lodash.camelCase)(rec)], propertyBag[rec], locale, lookups)));
      }, {});
    }
    return null;
  });
});
var variantPropertyKeyValuesSelector = exports.variantPropertyKeyValuesSelector = (0, _utils.memoize)(function (_ref3, propertyBag) {
  var definitionName = _ref3.definitionName;
  return (0, _reselect.createSelector)(variantPropertyMapKvaSelector(definitionName), lookupSelector("product"), _locale.currentLocaleOrDefault, function (propertyMap, lookups, locale) {
    if (propertyBag != null) {
      return Object.keys(propertyBag).reduce(function (acc, rec) {
        return propertyMap[(0, _lodash.camelCase)(rec)] ? _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, rec, resolveProductPropertyValue(propertyMap[(0, _lodash.camelCase)(rec)], propertyBag[rec], locale, lookups))) : acc;
      }, {});
    }
    return null;
  });
});
var resolveProductPropertyValue = function resolveProductPropertyValue(property, propertyValue, locale, lookups) {
  var _property$lookupDefin, _lookup$get;
  if (property != null) {
    switch (property.dataType) {
      case "Lookup":
        var lookupName = (_property$lookupDefin = property.lookupDefinition) == null ? void 0 : _property$lookupDefin.lookupName;
        var lookup = lookups == null ? void 0 : lookups.get(lookupName);
        var lookupValue = lookup == null || (_lookup$get = lookup.get("values")) == null ? void 0 : _lookup$get.get(propertyValue);
        return (0, _localizationHelper.getLocalization)(lookupValue == null ? void 0 : lookupValue.get("displayName"), locale, lookupValue == null ? void 0 : lookupValue.get("value"));
      default:
        return propertyValue;
    }
  }
  return propertyValue;
};
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(metadata, "metadata", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookups, "lookups", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsModule, "lookupsModule", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupSelector, "lookupSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedLookupsListSelector, "mappedLookupsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupValuesSelector, "lookupValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupByNameSelector, "lookupByNameSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupSelector, "namedLookupSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupValuesSelector, "namedLookupValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupsValuesSelector, "namedLookupsValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(selectCurrentLookupDetails, "selectCurrentLookupDetails", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupLocalizedSelector, "namedLookupLocalizedSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupExistAndIsActiveSelector, "lookupExistAndIsActiveSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupLocalizedValuesSelector, "namedLookupLocalizedValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsListCurrentInfo, "lookupsListCurrentInfo", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsNextPageToLoad, "lookupsNextPageToLoad", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsListSelector, "lookupsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedLookupListSelector, "mappedLookupListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(orderLookupsListCurrentInfo, "orderLookupsListCurrentInfo", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(orderLookupsNextPageToLoad, "orderLookupsNextPageToLoad", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedOrderLookupsListSelector, "mappedOrderLookupsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitions, "definitions", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionsModule, "definitionsModule", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedDefinitionsListSelector, "mappedDefinitionsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedCustomDefinitionsListSelector, "mappedCustomDefinitionsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedBaseDefinitionsListSelector, "mappedBaseDefinitionsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(newProfileDefinitionInstanceSelector, "newProfileDefinitionInstanceSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(newProfileDefinitionNameSelector, "newProfileDefinitionNameSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntity, "definitionEntity", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedDefinitionEntity, "mappedDefinitionEntity", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntityAttributes, "definitionEntityAttributes", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(filterIsBuiltInAttributes, "filterIsBuiltInAttributes", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntityCustomAttributesSelector, "definitionEntityCustomAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntityBaseAttributesSelector, "definitionEntityBaseAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedDefinitionAttributesSelector, "mappedDefinitionAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(customAttributesSelector, "customAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(baseAttributesSelector, "baseAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(moduleAttributeGroupsSelector, "moduleAttributeGroupsSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(groupedCustomAttributesDefinitionSelector, "groupedCustomAttributesDefinitionSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(customAttributesDefinitionSelector, "customAttributesDefinitionSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(customProfileTypesSelector, "customProfileTypesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(productPropertyMapSelector, "productPropertyMapSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(variantPropertyMapKvaSelector, "variantPropertyMapKvaSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(productPropertyValueSelector, "productPropertyValueSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(productPropertyValuesSelector, "productPropertyValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(variantPropertyKeyValuesSelector, "variantPropertyKeyValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(resolveProductPropertyValue, "resolveProductPropertyValue", "/home/vsts/work/1/s/src/selectors/metadata.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(metadata, "metadata", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookups, "lookups", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsModule, "lookupsModule", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupSelector, "lookupSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedLookupsListSelector, "mappedLookupsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupValuesSelector, "lookupValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupByNameSelector, "lookupByNameSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupSelector, "namedLookupSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupValuesSelector, "namedLookupValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupsValuesSelector, "namedLookupsValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(selectCurrentLookupDetails, "selectCurrentLookupDetails", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupLocalizedSelector, "namedLookupLocalizedSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupExistAndIsActiveSelector, "lookupExistAndIsActiveSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(namedLookupLocalizedValuesSelector, "namedLookupLocalizedValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsListCurrentInfo, "lookupsListCurrentInfo", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsNextPageToLoad, "lookupsNextPageToLoad", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(lookupsListSelector, "lookupsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedLookupListSelector, "mappedLookupListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(orderLookupsListCurrentInfo, "orderLookupsListCurrentInfo", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(orderLookupsNextPageToLoad, "orderLookupsNextPageToLoad", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedOrderLookupsListSelector, "mappedOrderLookupsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitions, "definitions", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionsModule, "definitionsModule", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedDefinitionsListSelector, "mappedDefinitionsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedCustomDefinitionsListSelector, "mappedCustomDefinitionsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedBaseDefinitionsListSelector, "mappedBaseDefinitionsListSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(newProfileDefinitionInstanceSelector, "newProfileDefinitionInstanceSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(newProfileDefinitionNameSelector, "newProfileDefinitionNameSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntity, "definitionEntity", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedDefinitionEntity, "mappedDefinitionEntity", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntityAttributes, "definitionEntityAttributes", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(filterIsBuiltInAttributes, "filterIsBuiltInAttributes", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntityCustomAttributesSelector, "definitionEntityCustomAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(definitionEntityBaseAttributesSelector, "definitionEntityBaseAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(mappedDefinitionAttributesSelector, "mappedDefinitionAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(customAttributesSelector, "customAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(baseAttributesSelector, "baseAttributesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(moduleAttributeGroupsSelector, "moduleAttributeGroupsSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(groupedCustomAttributesDefinitionSelector, "groupedCustomAttributesDefinitionSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(customAttributesDefinitionSelector, "customAttributesDefinitionSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(customProfileTypesSelector, "customProfileTypesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(productPropertyMapSelector, "productPropertyMapSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(variantPropertyMapKvaSelector, "variantPropertyMapKvaSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(productPropertyValueSelector, "productPropertyValueSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(productPropertyValuesSelector, "productPropertyValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(variantPropertyKeyValuesSelector, "variantPropertyKeyValuesSelector", "/home/vsts/work/1/s/src/selectors/metadata.js");
  reactHotLoader.register(resolveProductPropertyValue, "resolveProductPropertyValue", "/home/vsts/work/1/s/src/selectors/metadata.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();