(function($) {
$(document).on('facetwp-refresh', function() {
if ( 'undefined' !== typeof FWP.facets['facet_1'] && FWP.facets['facet_1'].length > 0 ) {
FWP.facets['facet_2'] = FWP.facets['facet_1'];
FWP.facets['facet_1'] = [];
}
});
})(jQuery);