<?php

declare(strict_types=1);

/*
 * Chill is a software for social workers
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace Chill\MainBundle\Tests\Export\Migrator;

use Chill\MainBundle\Export\Migrator\SavedExportOptionsMigrator;
use PHPUnit\Framework\TestCase;

/**
 * @internal
 *
 * @coversNothing
 */
class SavedExportOptionsMigratorTest extends TestCase
{
    private static ?string $defaultTimezone = null;

    public static function setUpBeforeClass(): void
    {
        self::$defaultTimezone = date_default_timezone_get();
        date_default_timezone_set('Europe/Brussels');
    }

    public static function tearDownAfterClass(): void
    {
        if (null !== self::$defaultTimezone) {
            date_default_timezone_set(self::$defaultTimezone);
        }
    }

    /**
     * @dataProvider generateMigrationOption
     */
    public function testMigrate(string $fromOptions, string $expected): void
    {
        $actual = SavedExportOptionsMigrator::migrate(json_decode($fromOptions, true, 512, JSON_THROW_ON_ERROR));
        self::assertEqualsCanonicalizing(json_decode($expected, true, 512, JSON_THROW_ON_ERROR), $actual);
    }

    public static function generateMigrationOption(): iterable
    {
        yield [
            <<<'JSON'
        {"alias": "count_accompanyingcourse", "export": {"_token": "2K4jh7_7ugldH1T-IAQrUmWYcbJWPcQZhnm_IsX2d80", "export": {"filters": {"person_age_filter": {"form": {"max_age": "120", "min_age": "0", "date_calc": {"roll": "today"}}}, "person_geog_filter": {"form": {"date_calc": {"roll": "today"}}}, "person_birthdate_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}, "person_deathdate_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}, "person_nationality_filter": {"form": {"nationalities": ""}}, "person_dead_or_alive_filter": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_step_filter": {"form": {"calc_date": {"roll": "today"}, "accepted_steps_multi": ["CONFIRMED", "CONFIRMED_INACTIVE_SHORT", "CONFIRMED_INACTIVE_LONG"]}}, "person_address_ref_status_filter": {"form": {"date_calc": {"roll": "today"}, "ref_statuses": ["to_review"]}}, "accompanyingcourse_creator_filter": {"form": {"accepted_creators": "null"}}, "accompanyingcourse_userjob_filter": {"form": {"jobs": ["13"]}, "enabled": "1"}, "accompanyingcourse_referrer_filter": {"form": {"date_calc": {"roll": "today"}, "accepted_referrers": "[]"}}, "accompanyingcourse_emergency_filter": {"form": {"accepted_emergency": "false"}}, "accompanyingcourse_intensity_filter": {"form": {"accepted_intensities": "occasional"}}, "accompanyingcourse_requestor_filter": {"form": {"accepted_choices": "participation"}}, "accompanyingcourse_userscope_filter": {"form": {"scopes": ["23"]}, "enabled": "1"}, "vendee_person_drivers_license_filter": {"form": {"isDriving": "false"}}, "accompanyingcourse_info_within_filter": {"form": {"end_date": {"roll": "fixed_date", "fixedDate": "2023-12-31"}, "start_date": {"roll": "fixed_date", "fixedDate": "2023-01-01"}}, "enabled": "1"}, "accompanyingcourse_activeondate_filter": {"form": {"on_date": {"roll": "today"}}}, "accompanyingcourse_confidential_filter": {"form": {"accepted_confidentials": "false"}}, "accompanyingcourse_socialaction_filter": {"form": {"end_date_after": {"roll": ""}, "end_date_before": {"roll": ""}, "start_date_after": {"roll": ""}, "start_date_before": {"roll": ""}, "accepted_socialactions": ["216"]}, "enabled": "1"}, "person_by_household_composition_filter": {"form": {"calc_date": {"roll": "today"}}}, "accompanyingcourse_job_working_on_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "activity_person_having_ac_bw_date_filter": {"form": {"date_to_rolling": {"roll": "today"}, "date_from_rolling": {"roll": "year_previous_start"}}}, "period_having_activity_betw_dates_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "accompanyingcourse_has_no_referrer_filter": {"form": {"calc_date": {"roll": "today"}}}, "accompanyingcourse_user_working_on_filter": {"form": {"users": "[{\"type\":\"user\",\"id\":554,\"username\":\"ABIROTHEAU\",\"text\":\"BIROTHEAU Armelle (CESF) (SIPAS)\",\"text_without_absent\":\"BIROTHEAU Armelle (CESF) (SIPAS)\",\"label\":\"BIROTHEAU Armelle\",\"email\":\"armelle.birotheau@vendee.fr\",\"phonenumber\":null,\"user_job\":{\"id\":13,\"label\":{\"fr\":\"CESF\"},\"type\":\"user_job\"},\"main_center\":null,\"main_scope\":{\"id\":23,\"name\":{\"fr\":\"SIPAS\"},\"type\":\"scope\"},\"isAbsent\":false}]", "end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}, "enabled": "1"}, "person_residential_address_at_user_filter": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_openbetweendates_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "month_previous_start"}}}, "accompanyingcourse_scope_working_on_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "person_without_household_composition_filter": {"form": {"calc_date": {"roll": "today"}}}, "accompanyingcourse_step_filter_between_dates": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_current_start"}, "accepted_steps_multi": ["CONFIRMED", "CONFIRMED_INACTIVE_SHORT", "CONFIRMED_INACTIVE_LONG"]}}, "accompanyingcourse_geographicalunitstat_filter": {"form": {"date_calc": {"roll": "today"}}}, "person_residential_address_at_thirdparty_filter": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_has_temporary_location_filter": {"form": {"calc_date": {"roll": "today"}, "having_temporarily": "1"}}, "accompanyingcourse_activeonedaybetweendates_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}}, "aggregators": {"person_age_aggregator": {"form": {"date_age_calculation": {"roll": "today"}}}, "person_geog_aggregator": {"form": {"date_calc": {"roll": "today"}}}, "person_center_aggregator": {"form": {"at_date": {"roll": "today"}}}, "person_nationality_aggregator": {"form": {"group_by_level": "country"}}, "person_postal_code_aggregator": {"form": {"calc_date": {"roll": "today"}}}, "acp_by_activity_type_aggregator": {"form": {"after_date": {"roll": ""}, "before_date": {"roll": ""}}}, "person_household_compo_aggregator": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_step_aggregator": {"form": {"on_date": {"roll": "today"}}}, "person_household_position_aggregator": {"form": {"date_position": {"roll": "today"}}}, "accompanyingcourse_referrer_aggregator": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_geographicalunitstat_aggregator": {"form": {"date_calc": {"roll": "today"}}}}, "pick_formatter": {"alias": "spreadsheet"}}, "submit": ""}, "centers": [], "formatter": {"_token": "2K4jh7_7ugldH1T-IAQrUmWYcbJWPcQZhnm_IsX2d80", "submit": "", "formatter": {"format": "xlsx"}}}
        JSON,
            <<<'JSON'
            {
              "aggregators": {
                "person_age_aggregator": {
                  "enabled": false
                },
                "person_geog_aggregator": {
                  "enabled": false
                },
                "person_center_aggregator": {
                  "enabled": false
                },
                "person_nationality_aggregator": {
                  "enabled": false
                },
                "person_postal_code_aggregator": {
                  "enabled": false
                },
                "acp_by_activity_type_aggregator": {
                  "enabled": false
                },
                "person_household_compo_aggregator": {
                  "enabled": false
                },
                "accompanyingcourse_step_aggregator": {
                  "enabled": false
                },
                "person_household_position_aggregator": {
                  "enabled": false
                },
                "accompanyingcourse_referrer_aggregator": {
                  "enabled": false
                },
                "accompanyingcourse_geographicalunitstat_aggregator": {
                  "enabled": false
                }
              },
              "filters": {
                "person_age_filter": {
                  "enabled": false
                },
                "person_geog_filter": {
                  "enabled": false
                },
                "person_birthdate_filter": {
                  "enabled": false
                },
                "person_deathdate_filter": {
                  "enabled": false
                },
                "person_nationality_filter": {
                  "enabled": false
                },
                "person_dead_or_alive_filter": {
                  "enabled": false
                },
                "accompanyingcourse_step_filter": {
                  "enabled": false
                },
                "person_address_ref_status_filter": {
                  "enabled": false
                },
                "accompanyingcourse_creator_filter": {
                  "enabled": false
                },
                "accompanyingcourse_userjob_filter": {
                  "form": {
                    "jobs": [
                      "13"
                    ]
                  },
                  "version": 1,
                  "enabled": true
                },
                "accompanyingcourse_referrer_filter": {
                  "enabled": false
                },
                "accompanyingcourse_emergency_filter": {
                  "enabled": false
                },
                "accompanyingcourse_intensity_filter": {
                  "enabled": false
                },
                "accompanyingcourse_requestor_filter": {
                  "enabled": false
                },
                "accompanyingcourse_userscope_filter": {
                  "form": {
                    "scopes": [
                      "23"
                    ]
                  },
                  "version": 1,
                  "enabled": true
                },
                "vendee_person_drivers_license_filter": {
                  "enabled": false
                },
                "accompanyingcourse_info_within_filter": {
                  "form": {
                    "end_date": {
                      "roll": "fixed_date",
                      "fixedDate": "2023-12-31-00:00:00.000000 Europe/Brussels",
                      "pivotDate": null,
                      "v": 1
                    },
                    "start_date": {
                      "roll": "fixed_date",
                      "fixedDate": "2023-01-01-00:00:00.000000 Europe/Brussels",
                      "pivotDate": null,
                      "v": 1
                    }
                  },
                  "version": 1,
                  "enabled": true
                },
                "accompanyingcourse_activeondate_filter": {
                  "enabled": false
                },
                "accompanyingcourse_confidential_filter": {
                  "enabled": false
                },
                "accompanyingcourse_socialaction_filter": {
                  "form": {
                    "end_date_after": null,
                    "end_date_before": null,
                    "start_date_after": null,
                    "start_date_before": null,
                    "accepted_socialactions": [
                      "216"
                    ]
                  },
                  "version": 1,
                  "enabled": true
                },
                "person_by_household_composition_filter": {
                  "enabled": false
                },
                "accompanyingcourse_job_working_on_filter": {
                  "enabled": false
                },
                "activity_person_having_ac_bw_date_filter": {
                  "enabled": false
                },
                "period_having_activity_betw_dates_filter": {
                  "enabled": false
                },
                "accompanyingcourse_has_no_referrer_filter": {
                  "enabled": false
                },
                "accompanyingcourse_user_working_on_filter": {
                  "form": {
                    "users": [554],
                    "end_date": {
                      "roll": "today",
                      "pivotDate": null,
                      "fixedDate": null,
                      "v": 1
                    },
                    "start_date": {
                      "roll": "year_current_start",
                      "pivotDate": null,
                      "fixedDate": null,
                      "v": 1
                    }
                  },
                  "version": 1,
                  "enabled": true
                },
                "person_residential_address_at_user_filter": {
                  "enabled": false
                },
                "accompanyingcourse_openbetweendates_filter": {
                  "enabled": false
                },
                "accompanyingcourse_scope_working_on_filter": {
                  "enabled": false
                },
                "person_without_household_composition_filter": {
                  "enabled": false
                },
                "accompanyingcourse_step_filter_between_dates": {
                  "enabled": false
                },
                "accompanyingcourse_geographicalunitstat_filter": {
                  "enabled": false
                },
                "person_residential_address_at_thirdparty_filter": {
                  "enabled": false
                },
                "accompanyingcourse_has_temporary_location_filter": {
                  "enabled": false
                },
                "accompanyingcourse_activeonedaybetweendates_filter": {
                  "enabled": false
                }
              },
              "export": {
                "form": [],
                "version": 1
              },
              "pick_formatter": "spreadsheet",
              "centers": {"centers": [], "regroupments": []},
              "formatter": {
                "form": {
                  "format": "xlsx"
                },
                "version": 1
              }
            }
        JSON,
        ];

        yield [
            <<<'JSON'
            {"alias": "list_person", "export": {"_token": "dsNZOduIYeS27ubhWs0b02-61qsALRW1qG7DJuqYHbY", "export": {"export": {"fields": ["id", "civility", "firstName", "lastName", "birthdate", "center", "deathdate", "placeOfBirth", "gender", "genderComment", "maritalStatus", "maritalStatusComment", "maritalStatusDate", "memo", "email", "phonenumber", "mobilenumber", "numberOfChildren", "contactInfo", "countryOfBirth", "nationality", "address_fields", "spokenLanguages", "household_id", "lifecycleUpdate"], "address_date": "2023-01-17"}, "filters": {"person_age_filter": {"form": {"max_age": "", "min_age": "", "date_calc": {"roll": "today"}}}, "person_geog_filter": {"form": {"date_calc": {"roll": "today"}}}, "person_birthdate_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}, "person_deathdate_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}, "person_nationality_filter": {"form": {"nationalities": ""}}, "person_dead_or_alive_filter": {"form": {"date_calc": {"roll": "today"}}}, "vendee_person_drivers_license_filter": {"form": {"isDriving": "0"}}, "person_by_household_composition_filter": {"form": {"calc_date": {"roll": "today"}}}, "activity_person_having_ac_bw_date_filter": {"form": {"date_to": "17-01-2023", "date_from": "17-01-2023"}}, "person_residential_address_at_user_filter": {"form": {"date_calc": {"roll": "today"}}}, "person_without_household_composition_filter": {"form": {"calc_date": {"roll": "today"}}}, "person_residential_address_at_thirdparty_filter": {"form": {"date_calc": {"roll": "today"}}}}, "pick_formatter": {"alias": "spreadlist"}}, "submit": ""}, "centers": {"_token": "dsNZOduIYeS27ubhWs0b02-61qsALRW1qG7DJuqYHbY", "submit": "", "centers": {"c": ["4"]}}, "formatter": {"_token": "dsNZOduIYeS27ubhWs0b02-61qsALRW1qG7DJuqYHbY", "submit": "", "formatter": {"format": "xlsx", "numerotation": "1"}}}
            JSON,
            <<<'JSON'
{
  "aggregators": {},
  "filters": {
    "person_age_filter": {
      "enabled": false
    },
    "person_geog_filter": {
      "enabled": false
    },
    "person_birthdate_filter": {
      "enabled": false
    },
    "person_deathdate_filter": {
      "enabled": false
    },
    "person_nationality_filter": {
      "enabled": false
    },
    "person_dead_or_alive_filter": {
      "enabled": false
    },
    "vendee_person_drivers_license_filter": {
      "enabled": false
    },
    "person_by_household_composition_filter": {
      "enabled": false
    },
    "activity_person_having_ac_bw_date_filter": {
      "enabled": false
    },
    "person_residential_address_at_user_filter": {
      "enabled": false
    },
    "person_without_household_composition_filter": {
      "enabled": false
    },
    "person_residential_address_at_thirdparty_filter": {
      "enabled": false
    }
  },
  "export": {
    "form": {
      "fields": [
        "id",
        "civility",
        "firstName",
        "lastName",
        "birthdate",
        "center",
        "deathdate",
        "placeOfBirth",
        "gender",
        "genderComment",
        "maritalStatus",
        "maritalStatusComment",
        "maritalStatusDate",
        "memo",
        "email",
        "phonenumber",
        "mobilenumber",
        "numberOfChildren",
        "contactInfo",
        "countryOfBirth",
        "nationality",
        "address_fields",
        "spokenLanguages",
        "household_id",
        "lifecycleUpdate"
      ],
      "address_date": "2023-01-17"
    },
    "version": 1
  },
  "pick_formatter": "spreadlist",
  "centers": {
    "centers": [4],
    "regroupments": []
  },
  "formatter": {
    "form": {
      "format": "xlsx",
      "numerotation": "1"
    },
    "version": 1
  }
}
JSON,
        ];

        yield [
            <<<'JSON'
{"alias": "amli_sh", "export": {"_token": "KNmFyZgW-V3_uduq_QjhLRWt74zvMhSLYNFbxWKXvy0", "export": {"export": {"end_date": "2024-02-29", "start_date": "2023-01-01"}}, "submit": ""}, "centers": {"_token": "KNmFyZgW-V3_uduq_QjhLRWt74zvMhSLYNFbxWKXvy0", "submit": "", "centers": {"center": ["159"]}}, "formatter": []}
JSON,
            <<<'JSON'
{
  "aggregators": [],
  "filters": [],
  "export": {
    "form": {
        "end_date": "2024-02-29",
        "start_date": "2023-01-01"
    },
    "version": 1
  },
  "centers": {
      "centers": [
        159
      ],
      "regroupments": []
  },
  "pick_formatter": null,
  "formatter": {
      "form": {},
      "version": 1
  }
}
JSON,
        ];

        yield [
            <<<'JSON'
{"alias": "count_accompanyingcourse", "export": {"_token": "bz3riiMJnNy8LRnfWZliIVeN5-sPxf_cK5jKjYgdoLk", "export": {"filters": {"person_age_filter": {"form": {"max_age": "120", "min_age": "0", "date_calc": {"roll": "today"}}}, "person_geog_filter": {"form": {"date_calc": {"roll": "today"}}}, "person_birthdate_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}, "person_deathdate_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_previous_start"}}}, "person_nationality_filter": {"form": {"nationalities": ""}}, "person_dead_or_alive_filter": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_step_filter": {"form": {"calc_date": {"roll": "today"}, "accepted_steps_multi": ["CONFIRMED", "CONFIRMED_INACTIVE_SHORT", "CONFIRMED_INACTIVE_LONG"]}}, "person_address_ref_status_filter": {"form": {"date_calc": {"roll": "today"}, "ref_statuses": ["to_review"]}}, "accompanyingcourse_creator_filter": {"form": {"accepted_creators": "null"}}, "accompanyingcourse_referrer_filter": {"form": {"date_calc": {"roll": "today"}, "accepted_referrers": "[]"}}, "accompanyingcourse_emergency_filter": {"form": {"accepted_emergency": "false"}}, "accompanyingcourse_intensity_filter": {"form": {"accepted_intensities": "occasional"}}, "accompanyingcourse_requestor_filter": {"form": {"accepted_choices": "participation"}}, "accompanyingcourse_info_within_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "today"}}}, "accompanyingcourse_activeondate_filter": {"form": {"on_date": {"roll": "today"}}}, "accompanyingcourse_activitytype_filter": {"form": {"date_after": {"roll": ""}, "date_before": {"roll": ""}}}, "accompanyingcourse_confidential_filter": {"form": {"accepted_confidentials": "false"}}, "accompanyingcourse_socialaction_filter": {"form": {"end_date_after": {"roll": ""}, "end_date_before": {"roll": ""}, "start_date_after": {"roll": ""}, "start_date_before": {"roll": ""}}}, "person_by_household_composition_filter": {"form": {"calc_date": {"roll": "today"}}}, "accompanyingcourse_job_working_on_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "activity_person_having_ac_bw_date_filter": {"form": {"date_to_rolling": {"roll": "today"}, "date_from_rolling": {"roll": "year_previous_start"}}}, "period_having_activity_betw_dates_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "accompanyingcourse_has_no_referrer_filter": {"form": {"calc_date": {"roll": "today"}}}, "accompanyingcourse_user_working_on_filter": {"form": {"users": "[]", "end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "person_residential_address_at_user_filter": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_openbetweendates_filter": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "month_previous_start"}}}, "accompanyingcourse_scope_working_on_filter": {"form": {"end_date": {"roll": "today"}, "start_date": {"roll": "year_current_start"}}}, "person_without_household_composition_filter": {"form": {"calc_date": {"roll": "today"}}}, "accompanyingcourse_step_filter_between_dates": {"form": {"date_to": {"roll": "today"}, "date_from": {"roll": "year_current_start"}, "accepted_steps_multi": ["CONFIRMED", "CONFIRMED_INACTIVE_SHORT", "CONFIRMED_INACTIVE_LONG"]}}, "accompanyingcourse_geographicalunitstat_filter": {"form": {"date_calc": {"roll": "today"}}}, "person_residential_address_at_thirdparty_filter": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_has_temporary_location_filter": {"form": {"calc_date": {"roll": "today"}, "having_temporarily": "1"}}, "accompanyingcourse_activeonedaybetweendates_filter": {"form": {"date_to": {"roll": "month_current_start"}, "date_from": {"roll": "year_current_start"}}, "enabled": "1"}}, "aggregators": {"person_age_aggregator": {"form": {"date_age_calculation": {"roll": "today"}}}, "person_geog_aggregator": {"form": {"date_calc": {"roll": "today"}}}, "person_center_aggregator": {"form": {"at_date": {"roll": "today"}}, "enabled": "1"}, "person_nationality_aggregator": {"form": {"group_by_level": "country"}}, "person_postal_code_aggregator": {"form": {"calc_date": {"roll": "today"}}}, "acp_by_activity_type_aggregator": {"form": {"after_date": {"roll": ""}, "before_date": {"roll": ""}}}, "person_household_compo_aggregator": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_step_aggregator": {"form": {"on_date": {"roll": "today"}}}, "person_household_position_aggregator": {"form": {"date_position": {"roll": "today"}}}, "accompanyingcourse_referrer_aggregator": {"form": {"date_calc": {"roll": "today"}}}, "accompanyingcourse_geographicalunitstat_aggregator": {"form": {"date_calc": {"roll": "today"}}}}, "pick_formatter": {"alias": "spreadsheet"}}, "submit": ""}, "centers": {"_token": "bz3riiMJnNy8LRnfWZliIVeN5-sPxf_cK5jKjYgdoLk", "submit": "", "centers": {"regroupment": ["5", "4", "3", "1", "2"]}}, "formatter": {"_token": "bz3riiMJnNy8LRnfWZliIVeN5-sPxf_cK5jKjYgdoLk", "submit": "", "formatter": {"format": "xlsx", "person_center_aggregator": {"order": "1"}}}}
JSON,
            <<<'JSON'
{

  "aggregators": {
    "person_age_aggregator": {
      "enabled": false
    },
    "person_geog_aggregator": {
      "enabled": false
    },
    "person_center_aggregator": {
      "form": {
        "at_date": {
          "roll": "today",
          "fixed_date": null,
          "pivot_date": null,
          "v": 1
        }
      },
      "version": 1,
      "enabled": true
    },
    "person_nationality_aggregator": {
      "enabled": false
    },
    "person_postal_code_aggregator": {
      "enabled": false
    },
    "acp_by_activity_type_aggregator": {
      "enabled": false
    },
    "person_household_compo_aggregator": {
      "enabled": false
    },
    "accompanyingcourse_step_aggregator": {
      "enabled": false
    },
    "person_household_position_aggregator": {
      "enabled": false
    },
    "accompanyingcourse_referrer_aggregator": {
      "enabled": false
    },
    "accompanyingcourse_geographicalunitstat_aggregator": {
      "enabled": false
    }
  },
  "filters": {
    "person_age_filter": {
      "enabled": false
    },
    "person_geog_filter": {
      "enabled": false
    },
    "person_birthdate_filter": {
      "enabled": false
    },
    "person_deathdate_filter": {
      "enabled": false
    },
    "person_nationality_filter": {
      "enabled": false
    },
    "person_dead_or_alive_filter": {
      "enabled": false
    },
    "accompanyingcourse_step_filter": {
      "enabled": false
    },
    "person_address_ref_status_filter": {
      "enabled": false
    },
    "accompanyingcourse_creator_filter": {
      "enabled": false
    },
    "accompanyingcourse_referrer_filter": {
      "enabled": false
    },
    "accompanyingcourse_emergency_filter": {
      "enabled": false
    },
    "accompanyingcourse_intensity_filter": {
      "enabled": false
    },
    "accompanyingcourse_requestor_filter": {
      "enabled": false
    },
    "accompanyingcourse_info_within_filter": {
      "enabled": false
    },
    "accompanyingcourse_activeondate_filter": {
      "enabled": false
    },
    "accompanyingcourse_activitytype_filter": {
      "enabled": false
    },
    "accompanyingcourse_confidential_filter": {
      "enabled": false
    },
    "accompanyingcourse_socialaction_filter": {
      "enabled": false
    },
    "person_by_household_composition_filter": {
      "enabled": false
    },
    "accompanyingcourse_job_working_on_filter": {
      "enabled": false
    },
    "activity_person_having_ac_bw_date_filter": {
      "enabled": false
    },
    "period_having_activity_betw_dates_filter": {
      "enabled": false
    },
    "accompanyingcourse_has_no_referrer_filter": {
      "enabled": false
    },
    "accompanyingcourse_user_working_on_filter": {
      "enabled": false
    },
    "person_residential_address_at_user_filter": {
      "enabled": false
    },
    "accompanyingcourse_openbetweendates_filter": {
      "enabled": false
    },
    "accompanyingcourse_scope_working_on_filter": {
      "enabled": false
    },
    "person_without_household_composition_filter": {
      "enabled": false
    },
    "accompanyingcourse_step_filter_between_dates": {
      "enabled": false
    },
    "accompanyingcourse_geographicalunitstat_filter": {
      "enabled": false
    },
    "person_residential_address_at_thirdparty_filter": {
      "enabled": false
    },
    "accompanyingcourse_has_temporary_location_filter": {
      "enabled": false
    },
    "accompanyingcourse_activeonedaybetweendates_filter": {
      "form": {
        "date_to": {
          "roll": "month_current_start",
          "fixed_date": null,
          "pivot_date": null,
          "v": 1
        },
        "date_from": {
          "roll": "year_current_start",
          "fixed_date": null,
          "pivot_date": null,
          "v": 1
        }
      },
      "version": 1,
      "enabled": true
    }
  },
  "export": {
    "form": [],
    "version": 1
  },
  "pick_formatter": "spreadsheet",
  "centers": {
      "centers": [],
      "regroupments": [
        5,
        4,
        3,
        1,
        2
      ]
  },
  "formatter": {
    "form": {
      "format": "xlsx",
      "person_center_aggregator": {
        "order": "1"
      }
    },
    "version": 1
  }
}
JSON,
        ];
    }
}
