<commit_before>(function () {
    'use strict';

    angular
        .module('atlas')
        .factory('homeReducers', homeReducersFactory);

    homeReducersFactory.$inject = ['ACTIONS', 'stateUrlConverter'];

    function homeReducersFactory (ACTIONS, stateUrlConverter) {
        var reducers = {};

        reducers[ACTIONS.SHOW_HOME.id] = showHomeReducer;

        return reducers;

        /**
         * @param {Object} oldState
         *
         * @returns {Object} newState
         */
        function showHomeReducer (oldState) {
            var newState = angular.copy(stateUrlConverter.getDefaultState());

            newState.atlas.isPrintMode = oldState.atlas.isPrintMode;
            newState.atlas.isEmbedPreview = oldState.atlas.isEmbedPreview;
            newState.atlas.isEmbed = oldState.atlas.isEmbed;

            return newState;
        }
    }
})();
<commit_msg>refactored angular copy in home reducer tg-4293<commit_after>(function () {
    'use strict';

    angular
        .module('atlas')
        .factory('homeReducers', homeReducersFactory);

    homeReducersFactory.$inject = ['ACTIONS', 'stateUrlConverter'];

    function homeReducersFactory (ACTIONS, stateUrlConverter) {
        var reducers = {};

        reducers[ACTIONS.SHOW_HOME.id] = showHomeReducer;

        return reducers;

        /**
         * @param {Object} oldState
         *
         * @returns {Object} newState
         */
        function showHomeReducer (state) {
            return {
                ...stateUrlConverter.getDefaultState(),
                atlas: {
                    ...state.atlas,
                    isPrintMode: state.atlas.isPrintMode,
                    isEmbedPreview: state.atlas.isEmbedPreview,
                    isEmbed: state.atlas.isEmbed
                }
            };
        }
    }
})();
{'fraction_non_alphanumeric': 0.1092391304347826, 'fraction_numerical': 0.002173913043478261, 'mean_word_length': 1.9037854889589905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4891755', 'n_tokens_mistral': 540, 'n_tokens_neox': 506, 'n_words': 85}