merge(sPersistencyKey, mCompData, oStandardVariantInput) {
			var aVariants = mCompData.nonPersistedVariants.concat(mCompData.variants);
			var mChanges = getChangesMappedByVariant(mCompData);

			// check for an overwritten standard variant
			var oStandardVariant;
			aVariants.forEach(function(oVariant) {
				if (oVariant.getContent() && oVariant.getContent().standardvariant) {
					oStandardVariant = oVariant;
				}
			});

			if (!oStandardVariant) {
				// create a new standard variant with the passed input
				oStandardVariant = createVariant(sPersistencyKey, oStandardVariantInput);
			} else {
				// remove all standard variant entries
				aVariants = aVariants.filter(function(oVariant) {
					return !oVariant.getContent() || !oVariant.getContent().standardvariant;
				});
			}

			// with setting the state to persisted it is made sure that they not show up as a dirty flex object
			(mCompData.nonPersistedVariants.concat([oStandardVariant])).forEach((oVariant) => {
				oVariant.setState(States.LifecycleState.PERSISTED);
			});

			// apply all changes on non-standard variants
			aVariants.forEach(applyChangesOnVariant.bind(undefined, mChanges));

			// Remove all invisible variants
			aVariants = aVariants.filter(function(oVariant) {
				var bVisible = oVariant.getVisible();
				if (!bVisible) {
					var sVariantId = oVariant.getId();
					delete mChanges[sVariantId];
					delete mCompData.byId[sVariantId];
				}
				return bVisible;
			});

			// the standard must always be visible
			oStandardVariant.setFavorite(true);
			oStandardVariant.setStandardVariant(true);
			mCompData.byId[oStandardVariant.getVariantId()] = oStandardVariant;

			var oStandardVariantChange = mCompData.standardVariantChange;
			if (oStandardVariantChange) {
				mChanges[oStandardVariant.getVariantId()] = mChanges[oStandardVariant.getVariantId()] || [];
				mChanges[oStandardVariant.getVariantId()].push(oStandardVariantChange);
				mChanges[oStandardVariant.getVariantId()].sort(function(a, b) {
					if (a.getCreation() < b.getCreation()) {
						return -1;
					}
					if (a.getCreation() > b.getCreation()) {
						return 1;
					}
					return 0;
				});
			}
			applyChangesOnVariant(mChanges, oStandardVariant);

			mCompData.standardVariant = oStandardVariant;

			// the default variant must always be a favorite
			// e.g. end user sets variant to default, then key user removes it from favorites
			const sDefaultVariantId = CompVariantUtils.getDefaultVariantId(mCompData);
			aVariants.some((oVariant) => {
				if (!oVariant.getFavorite() && oVariant.getId() === sDefaultVariantId) {
					oVariant.setFavorite(true);
				}
			});

			return {
				standardVariant: oStandardVariant,
				variants: aVariants
			};
		}
Class in charge of applying changes.
This includes combining the variants passed on the <code>merge</code> call, sorting and applying changes.

@namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
@since 1.86
@version ${version}
@private
@ui5-restricted sap.ui.fl