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ACX,OAAQ,KACR,UAAW,KACX,QAAS,KACT,WAAY,KACZ,OAAQ,KACR,UAAW,KACX,OAAQ,KACR,UAAW,KACX,OAAQ,KACR,UAAW,KACX,UAAW,KACX,aAAc,KACd,QAAS,KACT,WAAY,KACZ,OAAQ,KACR,UAAW,KACX,QAAS,KACT,WAAY,KACZ,QAAS,KACT,aAAc,IACd,gBAAiB,IACjB,WAAY,KACZ,UAAW,KACX,aAAc,KACd,OAAQ,KACR,UAAW,KACX,OAAQ,KACR,UAAW,KACX,OAAQ,KACR,YAAa,IACb,eAAgB,IAChB,UAAW,KACX,OAAQ,KACR,UAAW,KACX,aAAc,KACd,gBAAiB,KACjB,OAAQ,KACR,UAAW,KACX,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,MAIf,SAAS8pB,EAAeC,GACvB,IAAIjnB,EAAKknB,EAAsBD,GAC/B,OAAOE,EAAoBnnB,EAC5B,CACA,SAASknB,EAAsBD,GAC9B,IAAIE,EAAoBC,EAAElqB,EAAK+pB,GAAM,CACpC,IAAI5oB,EAAI,IAAIgpB,MAAM,uBAAyBJ,EAAM,KAEjD,MADA5oB,EAAE4B,KAAO,mBACH5B,CACP,CACA,OAAOnB,EAAI+pB,EACZ,CACAD,EAAeM,KAAO,WACrB,OAAOC,OAAOD,KAAKpqB,EACpB,EACA8pB,EAAeQ,QAAUN,EACzBO,EAAOC,QAAUV,EACjBA,EAAehnB,GAAK,I","sources":["webpack://territoires-zan/./app/javascript/src/constants/defaultValues.js","webpack://territoires-zan/./app/javascript/src/components/common/custom-select/CustomSelect.jsx","webpack://territoires-zan/./app/javascript/src/components/common/custom-autocomplete/CustomAutocomplete.jsx","webpack://territoires-zan/./app/javascript/src/helpers/axios.js","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/territoireActions.js","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/communeActions.js","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/epciActions.js","webpack://territoires-zan/./app/javascript/src/components/ formulaire-typologie-admin/FormulaireTypologieAdmin.jsx","webpack://territoires-zan/./app/javascript/src/redux/slices/formulaireCommande.js","webpack://territoires-zan/./app/javascript/src/redux/reducers.js","webpack://territoires-zan/./app/javascript/src/redux/index.js","webpack://territoires-zan/./app/javascript/src/helpers/_format_number.js","webpack://territoires-zan/./app/javascript/src/components/common/switch-input/SwitchInput.jsx","webpack://territoires-zan/./app/javascript/src/components/maps/GeoJson.jsx","webpack://territoires-zan/./app/javascript/src/components/maps/GeoJsonContainer.jsx","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/zonePersoActions.js","webpack://territoires-zan/./app/javascript/src/components/maps/ZonePerso.jsx","webpack://territoires-zan/./app/javascript/src/helpers/pad.js","webpack://territoires-zan/./app/javascript/src/components/maps/SelectCenterAreaLayer.jsx","webpack://territoires-zan/./app/javascript/src/components/maps/TunnelCommandMapContainer.jsx","webpack://territoires-zan/./app/javascript/src/components/footer-formulaire-commande/FooterFormlaierCommande.jsx","webpack://territoires-zan/./app/javascript/src/components/common/controlled-textfield/controlledTextfield.jsx","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/pageAction.js","webpack://territoires-zan/./app/javascript/src/helpers/_api.js","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/orderAction.js","webpack://territoires-zan/./app/javascript/src/hooks/useProvideAuth.jsx","webpack://territoires-zan/./app/javascript/src/providers/AuthProvider.jsx","webpack://territoires-zan/./app/javascript/src/hooks/useAuth.jsx","webpack://territoires-zan/./app/javascript/src/components/common/alert/Alert.jsx","webpack://territoires-zan/./app/javascript/src/components/common/more-info/MoreInfo.jsx","webpack://territoires-zan/./app/javascript/src/components/commande-recap/CommandeRecap.jsx","webpack://territoires-zan/./app/javascript/src/components/common/navbar/Navbar.jsx","webpack://territoires-zan/./app/javascript/src/layouts/CommandTunnelLayout.jsx","webpack://territoires-zan/./app/javascript/src/components/territoire-card/TerritoireCard.jsx","webpack://territoires-zan/./app/javascript/src/hooks/useDebounce.js","webpack://territoires-zan/./app/javascript/src/components/common/slider-input/SliderInput.jsx","webpack://territoires-zan/./app/javascript/src/redux/actions/formulaireCommande/isochroneActions.js","webpack://territoires-zan/./app/javascript/src/components/formulaire-isochrone-filter/FormulaireIsochroneFilter.jsx","webpack://territoires-zan/./app/javascript/src/components/formulaire-territoire/FormulaireTerritoire.jsx","webpack://territoires-zan/./app/javascript/src/components/formulaire-zone-etude-zan/FormulaireZoneEtudeZan.jsx","webpack://territoires-zan/./app/javascript/src/components/formulaire-segmentation/FormulaireSegmentation.jsx","webpack://territoires-zan/./app/javascript/src/components/select-segmentation-mos/SelectSegmentationMos.jsx","webpack://territoires-zan/./app/javascript/src/components/select-date-interval/SelectDateInterval.jsx","webpack://territoires-zan/./app/javascript/src/components/formulaire-definition-etude/FormulaireDefinitionEtude.jsx","webpack://territoires-zan/./app/javascript/src/components/formulaire-commande-tunnel/FormulaireCommandeTunnel.jsx","webpack://territoires-zan/./app/javascript/src/pages/Home.jsx","webpack://territoires-zan/./app/javascript/src/pages/LoginPage.jsx","webpack://territoires-zan/./app/javascript/src/pages/SignupPage.jsx","webpack://territoires-zan/./app/javascript/src/pages/ForgottenPasswordPage.jsx","webpack://territoires-zan/./app/javascript/src/pages/NewPasswordPage.jsx","webpack://territoires-zan/./app/javascript/src/App.jsx","webpack://territoires-zan/./app/javascript/packs/application.js","webpack://territoires-zan/./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["export const TRANSPORTMODE = [\n { value: \"walk\", label: \"A pied\" },\n { value: \"bike\", label: \"Vélo\" },\n { value: \"transit\", label: \"Transport en commun\" },\n { value: \"car\", label: \"Voiture\" },\n];\n\nexport const TRANSPORT_DURATION_MIN = 0;\nexport const TRANSPORT_DURATION_MAX = 45;\n\nexport const INDEX_DB_NAME = \"territoireszan\";\n","import React, { useEffect, useState } from \"react\";\nimport { ChevronDownIcon, ChevronUpIcon } from \"@heroicons/react/solid\";\nimport cx from \"classnames\";\nimport \"./styles.css\";\n\nexport default function CustomSelect({\n placeholder,\n options,\n value,\n keyValue,\n keyLabel,\n onChange,\n errors = [],\n}) {\n const [open, setOpen] = useState(false);\n\n const handleClick = () => {\n setTimeout(() => {\n setOpen(!open);\n }, 100);\n };\n\n useEffect(() => {\n const closeSelect = () => {\n setOpen(false);\n };\n window.addEventListener(\"click\", closeSelect);\n return () => {\n window.removeEventListener(\"click\", closeSelect);\n };\n }, []);\n\n return (\n
\n \n
\n \n {value ? value[keyLabel] : placeholder}\n \n {open ? (\n \n ) : (\n \n )}\n
\n \n {options.map((item) => (\n onChange && onChange(item)}\n className=\"font-normal w-full text-xs font-poppins hover:bg-gray-100 p-3 border-b\"\n key={item[keyValue]}\n >\n {item[keyLabel]}\n
\n ))}\n \n \n {errors.length\n ? errors.map((item) => (\n
\n {item}\n
\n ))\n : null}\n \n );\n}\n","import React, {\n useEffect,\n useState,\n forwardRef,\n useImperativeHandle,\n} from \"react\";\nimport { XCircleIcon } from \"@heroicons/react/solid\";\nimport cx from \"classnames\";\nimport levenshtein from \"fast-levenshtein\";\nimport \"./styles.css\";\n\nconst CustomAutocomplete = forwardRef(\n (\n {\n placeholder = \"\",\n options,\n value,\n keyValue,\n keyLabel,\n onChange,\n onChangeInputValue,\n serverSide = false,\n name,\n },\n ref\n ) => {\n const [open, setOpen] = useState(false);\n const [valueText, setValueText] = useState(\"\");\n const [filteredOptions, setFilterOptions] = useState(options);\n const [first, setFirst] = useState(false);\n\n useImperativeHandle(ref, () => ({\n setEmptyValueText() {\n setValueText(\"\");\n },\n }));\n\n const handleChange = (e) => {\n setValueText(e.target.value);\n const keyword = e.target.value.trim().toLowerCase();\n if (keyword.length) {\n setOpen(true);\n } else {\n setOpen(false);\n }\n if (!serverSide) {\n setFilterOptions(\n (options || [])\n .filter((item) => {\n const testIndexOf =\n (item[keyLabel] || \"\").trim().toLowerCase().indexOf(keyword) >=\n 0;\n const levenshteinTest =\n levenshtein.get(\n (item[keyLabel] || \"\").trim().toLowerCase(),\n keyword\n ) <= 1;\n return testIndexOf || levenshteinTest;\n })\n .sort((a, b) => {\n levenshtein.get(\n (b[keyLabel] || \"\").trim().toLowerCase(),\n keyword\n ) -\n levenshtein.get(\n (a[keyLabel] || \"\").trim().toLowerCase(),\n keyword\n );\n })\n );\n }\n };\n\n const handleClick = () => {\n setTimeout(() => {\n setOpen(!open);\n }, 100);\n };\n\n const handleClickRemove = () => {\n setValueText(\"\");\n setFilterOptions(options);\n onChange && onChange(null, name);\n setTimeout(() => {\n setOpen(false);\n }, 101);\n };\n\n useEffect(() => {\n const closeSelect = () => {\n setOpen(false);\n };\n window.addEventListener(\"click\", closeSelect);\n return () => {\n window.removeEventListener(\"click\", closeSelect);\n };\n }, []);\n\n useEffect(() => {\n setValueText(value ? value[keyLabel] : \"\");\n }, [value]);\n\n useEffect(() => {\n const fnDebounce = setTimeout(() => {\n if (first) {\n onChangeInputValue && onChangeInputValue(valueText);\n }\n setFirst(true);\n }, 1000);\n return () => clearTimeout(fnDebounce);\n }, [valueText]);\n\n return (\n \n
\n \n {valueText.length ? (\n \n ) : null}\n
\n {!!valueText.length && (\n \n {(serverSide ? options : filteredOptions).map((item) => (\n {\n onChange && onChange(item, name);\n setValueText(item[keyLabel]);\n }}\n className=\"font-normal w-full text-xs font-poppins hover:bg-gray-100 p-3 border-b\"\n key={item[keyValue]}\n >\n {item[keyLabel]}\n \n ))}\n\n {(serverSide ? options : filteredOptions).length === 0 && (\n
\n Aucuns résultats\n
\n )}\n \n )}\n \n );\n }\n);\n\nexport default CustomAutocomplete;\n","import axios from \"axios\";\n\nexport default axios.create({\n baseURL: process.env.REACT_APP_API_URL,\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { formulaireCommandeSlice } from \"../../slices/formulaireCommande\";\nimport Axios from \"../../../helpers/axios\";\n\nexport const getTerritoiresDuCiblage = createAsyncThunk(\n \"formulaireCommande/getTerritoiresDuCiblage\",\n async ({ keyword, type = \"epci\" }, { dispatch }) => {\n try {\n const { data } = await Axios.get(\n `/v4/territoires_zan/${type}_search?q=${keyword}`\n );\n dispatch(\n formulaireCommandeSlice.actions.set_territoire_du_ciblage(\n data.data.map(({ attributes, type, id }) => ({\n code: id,\n name: attributes.name,\n type: type,\n }))\n )\n );\n } catch (e) {\n dispatch(formulaireCommandeSlice.actions.set_territoire_du_ciblage([]));\n }\n }\n);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport {\n formulaireCommandeActions,\n formulaireCommandeSlice,\n} from \"../../slices/formulaireCommande\";\nimport Axios from \"../../../helpers/axios\";\n\nexport const getCommunesByBBox = createAsyncThunk(\n \"formulaireCommande\",\n async ({ xmin, ymin, xmax, ymax }, { dispatch, getState }) => {\n const nationalCode = getState().formulaireCommande.nationalCode;\n try {\n const {\n data: { features },\n } = await Axios.get(\n `/v4/territoires_zan/region/communes_by_bbox?xmin=${xmin}&ymin=${ymin}&xmax=${xmax}&ymax=${ymax}&filter_region_national_code=${nationalCode}`\n );\n dispatch(\n formulaireCommandeSlice.actions.set_communes(\n features.filter((item) => item.id != \"75056\")\n )\n );\n } catch (e) {\n console.log(e);\n }\n }\n);\n\nexport const getCommunes = createAsyncThunk(\n \"formulaireCommande/getCommunes\",\n async ({ code, type = \"epci\" }, { dispatch, getState }) => {\n const { data } = await Axios.get(\n `/v4/territoires_zan/${type}/communes?${\n [\"epci\"].includes(type) ? \"national_code\" : \"scot_id\"\n }=${code}`\n );\n const currentValuesTerritoire =\n getState().formulaireCommande.valueTerritoire;\n dispatch(formulaireCommandeSlice.actions.set_communes_without_layer([]));\n dispatch(\n formulaireCommandeSlice.actions.set_value_territoire({\n ...currentValuesTerritoire,\n typologieAdminData: {\n ...currentValuesTerritoire.typologieAdminData,\n selectedCommunes: [],\n },\n })\n );\n if (data?.features) {\n dispatch(formulaireCommandeSlice.actions.set_communes(data?.features));\n } else {\n dispatch(formulaireCommandeSlice.actions.set_communes([]));\n }\n }\n);\n\nexport const getCommunesByIsochrone = createAsyncThunk(\n \"formulaireCommande/getCommunesByIsochrone\",\n (_, { dispatch, getState }) => {\n const {\n valueIsochroneFilter: {\n isoChroneAddress,\n transportDuration,\n transportMode,\n },\n } = getState().formulaireCommande;\n\n dispatch(formulaireCommandeActions.set_selected_communes([]));\n dispatch(formulaireCommandeActions.set_loading({ communes: true }));\n Axios.get(\n `/v4/eval_parcel/ciblage/zones_by_isochrone?transport_mode=${\n transportMode.value\n }&transport_time_max=${transportDuration * 60}&lon=${\n isoChroneAddress.lon\n }&lat=${isoChroneAddress.lat}`\n )\n .then(({ data: { features } }) => {\n const dataToSave = (features || []).map((item) => ({\n ...item,\n properties: {\n ...item.properties,\n population: item.properties.population_2018,\n },\n }));\n dispatch(formulaireCommandeActions.set_communes(dataToSave));\n })\n .finally(() => {\n dispatch(formulaireCommandeActions.set_loading({ communes: false }));\n });\n }\n);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { formulaireCommandeSlice } from \"../../slices/formulaireCommande\";\nimport Axios from \"../../../helpers/axios\";\n\nexport const getEpcis = createAsyncThunk(\n \"formulaireCommande/getEpcis\",\n async (code, { dispatch }) => {\n Axios.get(\n `/v4/territoires_zan/region/communes_list?national_code=${code}`\n ).then(({ data }) => {\n dispatch(\n formulaireCommandeSlice.actions.set_communes_without_layer(\n data?.features || []\n )\n );\n });\n dispatch(formulaireCommandeSlice.actions.set_national_code(code));\n return await Axios.get(\n `/v4/territoires_zan/region/epci?national_code=${code}`\n ).then(({ data }) => {\n dispatch(formulaireCommandeSlice.actions.set_epci(data?.features || []));\n return data;\n });\n }\n);\n","import React, {\n useState,\n useEffect,\n useCallback,\n useRef,\n useMemo,\n} from \"react\";\nimport CustomSelect from \"../common/custom-select/CustomSelect\";\nimport CustomAutocomplete from \"../common/custom-autocomplete/CustomAutocomplete\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport { getTerritoiresDuCiblage } from \"../../redux/actions/formulaireCommande/territoireActions\";\nimport { getCommunes } from \"../../redux/actions/formulaireCommande/communeActions\";\nimport { getEpcis } from \"../../redux/actions/formulaireCommande/epciActions\";\nimport \"./styles.css\";\n\nexport const structuresterritoriales = [\n {\n code: \"epci\",\n label: \"EPCI\",\n },\n {\n code: \"scot\",\n label: \"SCOT\",\n },\n {\n code: \"region\",\n label: \"Région\",\n },\n];\n\nexport const CommunesSelect = ({ options, onChange, value }) => {\n const [mappedOptions, setMappedOption] = useState([]);\n const [selectAll, setSelectAll] = useState(true);\n\n const handleClickCommune = (id) => {\n const mappedArray = mappedOptions.map((item) => {\n if (item.id == id) {\n return { ...item, checked: !item.checked };\n }\n return item;\n });\n setMappedOption(mappedArray);\n onChange && onChange(mappedArray.filter((item) => item.checked));\n };\n\n const handleClickAll = () => {\n const mappedArray = options.map((item) => ({\n ...item,\n checked: selectAll,\n }));\n onChange && onChange(mappedArray.filter((item) => item.checked));\n setMappedOption(mappedArray);\n setSelectAll(!selectAll);\n };\n\n useEffect(() => {\n const mappedArray = options.map((item) => {\n if (\n value &&\n value.length &&\n value.map((item) => item.id).includes(item.id)\n ) {\n return value.find((el) => el.id === item.id);\n }\n return { ...item, checked: false };\n });\n setMappedOption(mappedArray);\n setSelectAll(value?.length !== options.length);\n }, [value, options]);\n\n return (\n
\n {!!options.length && (\n
\n \n {mappedOptions.filter((item) => item.checked).length} communes\n sélectionnées\n \n \n {selectAll ? \"Tout sélectionner\" : \"Tout désélectionner\"}\n \n
\n )}\n
\n
\n {(mappedOptions || []).map((item) => (\n handleClickCommune(item.id)}\n className=\"commune_item flex flex-row items-center cursor-pointer border rounded-md bg-white mb-1 pl-3 hover:bg-gray-50\"\n >\n
\n \n
\n
\n {item.properties.name} ({item.id})\n
\n
\n ))}\n
\n
\n \n );\n};\n\nexport default function FormulaireTypologieAdmin({ onChange, value }) {\n const { territoiresDuCiblage, communes, communesWithoutLayer } = useSelector(\n (state) => state.formulaireCommande\n );\n\n const communesOptions = useMemo(\n () => (communesWithoutLayer.length ? communesWithoutLayer : communes),\n [communes, communesWithoutLayer]\n );\n\n const autocompleteRef = useRef();\n const dispatch = useDispatch();\n\n const [formData, setFormData] = useState({\n structureTerritorial: structuresterritoriales[0],\n territoireCiblage: null,\n selectedCommunes: [],\n });\n\n const [loading, setLoading] = useState(false);\n\n const handleOnChange = (key) => async (value) => {\n const currentValue = { ...formData, [key]: value };\n onChange && onChange(currentValue);\n setFormData(currentValue);\n\n // get communes\n if (key === \"territoireCiblage\") {\n dispatch(formulaireCommandeSlice.actions.set_communes([]));\n dispatch(formulaireCommandeSlice.actions.set_communes_without_layer([]));\n dispatch(formulaireCommandeSlice.actions.set_epci([]));\n setLoading(true);\n if (formData.structureTerritorial.code === \"region\") {\n await dispatch(getEpcis(value?.code || \"\"));\n } else {\n await dispatch(\n getCommunes({\n code: value?.code || \"\",\n type: formData.structureTerritorial.code,\n })\n );\n }\n\n setLoading(false);\n setFormData((state) => ({ ...state, selectedCommunes: [] }));\n }\n\n if (key === \"structureTerritorial\") {\n dispatch(formulaireCommandeSlice.actions.set_territoire_du_ciblage([]));\n dispatch(formulaireCommandeSlice.actions.set_communes([]));\n dispatch(formulaireCommandeSlice.actions.set_communes_without_layer([]));\n if (autocompleteRef.current) {\n autocompleteRef.current.setEmptyValueText();\n }\n }\n };\n\n const handleChangeInputValueAutocomplete = useCallback(\n (keyword) => {\n if (formData.structureTerritorial) {\n dispatch(\n getTerritoiresDuCiblage({\n keyword,\n type: formData.structureTerritorial.code,\n })\n );\n }\n },\n [formData.structureTerritorial]\n );\n\n useEffect(() => {\n setFormData({\n structureTerritorial: value?.structureTerritorial || null,\n territoireCiblage: value?.territoireCiblage || null,\n selectedCommunes: value?.selectedCommunes || null,\n });\n }, [value]);\n\n return (\n
\n
\n \n
\n \n \n
\n
\n \n {loading && (\n
\n Chargement en cours...\n
\n )}\n
\n \n
\n
\n \n );\n}\n","import { createSlice } from \"@reduxjs/toolkit\";\nimport { structuresterritoriales } from \"../../components/ formulaire-typologie-admin/FormulaireTypologieAdmin\";\nimport { DateTime } from \"luxon\";\nimport {\n TRANSPORTMODE,\n TRANSPORT_DURATION_MAX,\n} from \"../../constants/defaultValues\";\n\nconst currentYear = parseInt(\n DateTime.now().toLocaleString({ year: \"numeric\" })\n);\n\nexport const transform = (state) => JSON.parse(JSON.stringify(state));\n\nexport const imagerieProviders = [\n {\n code: \"airbus\",\n label: \"Airbus Pléiades Neo\",\n },\n {\n code: \"custom\",\n label: \"Utilisez vos propres imageries\",\n },\n];\n\nexport const segmentation = [\n {\n id: 1,\n name: \"Segmentation / MOS - 5 élements\",\n },\n {\n id: 2,\n name: \"Segmentation sur mesure\",\n },\n];\n\nexport const typologieAdminDataDefaultValue = {\n structureTerritorial: structuresterritoriales[0],\n territoireCiblage: null,\n isochroneFilter: null,\n selectedCommunes: [],\n};\n\nexport const valueZoneEtudeDefaultValue = {\n type: null,\n personalizedZones: [],\n selectedPersonalizedZones: [],\n};\n\nexport const valueDefinitionEtudeDefaultValue = {\n segmentationMos: segmentation[0],\n imagerieProvider: imagerieProviders[0],\n selectedYears: [2011, 2021],\n frequency: 12,\n};\n\nexport const valueIsochroneFilterDefault = {\n isoChroneAddress: null,\n transportDuration: TRANSPORT_DURATION_MAX,\n transportMode: TRANSPORTMODE.find((item) => item.value === \"car\"),\n};\n\nconst initialState = {\n loading: null,\n centerMap: {\n id: 1,\n coord: [46.483229, 2.660239],\n zoom: 6,\n },\n territoiresDuCiblage: [],\n communes: [],\n communesWithoutLayer: [],\n epci: [],\n nationalCode: null,\n valueTerritoire: {\n territoire: null,\n typologieAdminData: typologieAdminDataDefaultValue,\n },\n valueZoneEtudeZan: valueZoneEtudeDefaultValue,\n valueDefinitionEtude: valueDefinitionEtudeDefaultValue,\n valueSegmentation: \"seleleted_segmentations\",\n activeBtnNext: false,\n nextPage: \"form_zone_etude_zan\",\n currentPage: \"form_territoire\",\n zoneToEdit: null,\n createdAt: null,\n returnToEditTerritoire: false,\n valueIsochroneFilter: valueIsochroneFilterDefault,\n addresses: [],\n};\n\nexport const formulaireCommandeSlice = createSlice({\n name: \"formulaireCommande\",\n initialState,\n reducers: {\n set_territoire_du_ciblage(state, action) {\n state.territoiresDuCiblage = action.payload;\n },\n set_value_territoire_territoire(state, action) {\n state.valueTerritoire = {\n territoire: action.payload,\n typologieAdminData: typologieAdminDataDefaultValue,\n };\n state.valueZoneEtudeZan = valueZoneEtudeDefaultValue;\n state.valueDefinitionEtude = valueDefinitionEtudeDefaultValue;\n state.returnToEditTerritoire = false;\n state.territoiresDuCiblage = [];\n state.epci = [];\n state.nationalCode = null;\n state.communesWithoutLayer = [];\n state.communes = [];\n state.valueIsochroneFilter = valueIsochroneFilterDefault;\n state.addresses = [];\n },\n set_communes(state, action) {\n state.communes = action.payload;\n },\n set_addresses(state, action) {\n // state.valueIsochroneFilter = valueIsochroneFilterDefault;\n state.addresses = action.payload;\n },\n setReturnToEditTerritoire(state, action) {\n state.returnToEditTerritoire = action.payload;\n },\n set_value_territoire(state, action) {\n state.valueTerritoire = action.payload;\n },\n set_value_selectedCommunes(state, action) {\n const current = transform(state.valueTerritoire);\n state.valueTerritoire = {\n ...current,\n typologieAdminData: {\n ...current.typologieAdminData,\n selectedCommunes: action.payload,\n },\n };\n },\n set_active_btn_next(state, action) {\n state.activeBtnNext = action.payload;\n },\n set_next_page(state, action) {\n state.nextPage = action.payload;\n },\n set_current_page(state, action) {\n state.currentPage = action.payload;\n },\n set_value_zone_etude_zan(state, action) {\n state.valueZoneEtudeZan = action.payload;\n },\n set_zone_to_edit(state, action) {\n state.zoneToEdit = action.payload;\n },\n set_value_definition_etude(state, action) {\n state.valueDefinitionEtude = action.payload;\n },\n set_value_segmentation(state, action) {\n state.valueSegmentation = action.payload;\n },\n set_center_map(state, action) {\n state.centerMap = action.payload;\n },\n set_created_at(state, action) {\n state.createdAt = action.payload;\n },\n set_epci(state, action) {\n state.epci = action.payload;\n },\n set_selected_communes(state, action) {\n const current = transform(state.valueTerritoire);\n state.valueTerritoire = {\n ...current,\n typologieAdminData: {\n ...current.typologieAdminData,\n selectedCommunes: action.payload,\n },\n };\n },\n set_communes_without_layer(state, action) {\n state.communesWithoutLayer = action.payload;\n },\n set_national_code(state, action) {\n state.nationalCode = action.payload;\n },\n set_value_isochorone(state, action) {\n state.valueIsochroneFilter = action.payload;\n },\n set_loading(state, action) {\n state.loading = action.payload;\n },\n reset: () => initialState,\n },\n});\n\nexport const formulaireCommandeActions = formulaireCommandeSlice.actions;\n\nexport default formulaireCommandeSlice.reducer;\n","import { combineReducers } from \"@reduxjs/toolkit\";\nimport { persistReducer } from \"redux-persist\";\nimport localforage from \"localforage\";\nimport { INDEX_DB_NAME } from \"../constants/defaultValues\";\n\nlocalforage.config({\n name: INDEX_DB_NAME,\n driver: localforage.INDEXEDDB,\n});\n\n// reducers\nimport formulaireCommandeReducer from \"./slices/formulaireCommande\";\n\nexport const persistConfigformulaireCommande = {\n key: \"formulaireCommande\",\n storage: localforage,\n};\n\nexport const combinedReducer = combineReducers({\n formulaireCommande: persistReducer(\n persistConfigformulaireCommande,\n formulaireCommandeReducer\n ),\n});\n","import { configureStore, getDefaultMiddleware } from \"@reduxjs/toolkit\";\nimport { combinedReducer } from \"./reducers\";\nimport { persistStore } from \"redux-persist\";\n\nexport const store = configureStore({\n reducer: combinedReducer,\n middleware: getDefaultMiddleware({\n serializableCheck: false,\n }),\n});\n\nexport const persistor = persistStore(store);\n","export function spacingThousands(number) {\n return number.toLocaleString('en').replace(/,/g, ' ')\n}","import React from \"react\";\nimport { Switch } from \"@headlessui/react\";\n\nfunction classNames(...classes) {\n return classes.filter(Boolean).join(\" \");\n}\n\nexport default function SwitchInput({ label, enabled, setEnabled }) {\n return (\n \n \n {label} \n \n \n \n \n \n );\n}\n","import { GeoJSON, Tooltip } from \"react-leaflet\";\nimport { spacingThousands } from \"../../helpers/_format_number\";\nimport SwitchInput from \"../common/switch-input/SwitchInput\";\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useSelector } from \"react-redux\";\n\nconst PopupGeoJsonCommune = ({\n properties: {\n population,\n part_logement_collectif,\n surface_commune_meter_square,\n name,\n },\n onChangeEnable,\n id,\n}) => {\n const [enabled, setEnabled] = useState(false);\n\n const {\n valueTerritoire: { typologieAdminData },\n } = useSelector((state) => state.formulaireCommande);\n\n const handleChangeSwitch = useCallback(\n (value) => {\n onChangeEnable && onChangeEnable(value, id);\n },\n [id]\n );\n\n useEffect(() => {\n setEnabled(\n typologieAdminData.selectedCommunes.find((item) => item.id == id)\n );\n }, [typologieAdminData.selectedCommunes, id]);\n\n return (\n
\n
\n

{name}

\n

\n
\n
\n
    \n
  • \n {spacingThousands(\n Math.floor((surface_commune_meter_square || 0) / 1000000)\n )}{\" \"}\n km²\n
  • \n
  • \n {spacingThousands(population || 0)} habitants\n
  • \n
  • \n {part_logement_collectif && part_logement_collectif.toFixed(1)}%\n log. collectifs\n
  • \n
\n
\n \n
\n
\n
\n );\n};\n\nfunction GeoJSONComp({\n feature,\n selectedMunicipalitiesIds,\n onChangeEnable,\n layerNeedPopup,\n}) {\n const geoJsonLayer = useRef(null);\n const {\n valueTerritoire: { typologieAdminData },\n currentPage,\n communesWithoutLayer,\n } = useSelector((state) => state.formulaireCommande);\n\n const properties = useMemo(() => {\n if (\n typologieAdminData.structureTerritorial.code === \"region\" &&\n feature.territoireType === \"commune\"\n ) {\n return (\n communesWithoutLayer.find((item) => item.id == feature.id)\n ?.properties || {}\n );\n }\n return feature.properties;\n }, [feature, typologieAdminData, communesWithoutLayer]);\n\n // show popup effect\n useEffect(() => {\n if (geoJsonLayer.current) {\n const layer = geoJsonLayer.current;\n layer.on(\"click\", (e) => {\n if (\n currentPage === \"form_territoire\" &&\n feature.territoireType === \"commune\"\n ) {\n layerNeedPopup &&\n layerNeedPopup(\n e,\n \n );\n }\n });\n }\n }, []);\n\n return (\n \n {feature.territoireType === \"epci\" && (\n \n Zoomez sur les EPCI composant la région pour voir apparaître les\n communes sur la carte.\n \n )}\n \n );\n}\n\nexport default GeoJSONComp;\n","import React, { useCallback, useEffect } from \"react\";\nimport _, { uniqueId } from \"lodash\";\nimport GeoJson from \"./GeoJson\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { useState } from \"react\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport { useMap } from \"react-leaflet\";\nimport { checkPropTypes } from \"prop-types\";\n\nfunction GeoJsonContainer({ layers, layerNeedPopup, needFitBound }) {\n const [layerToShow, setLayerToShow] = useState([]);\n const { valueTerritoire, currentPage, communesWithoutLayer, communes, epci } =\n useSelector((state) => state.formulaireCommande);\n const dispatch = useDispatch();\n\n const map = useMap();\n\n const [selectedMunicipalitiesIds, setSelectedMunicipalitiesIds] = useState(\n []\n );\n\n // communes switch select\n const handleChangeEnable = useCallback(\n (checked, id) => {\n let _layer = [];\n if (\n valueTerritoire.typologieAdminData.structureTerritorial.code ===\n \"region\"\n ) {\n _layer = communesWithoutLayer;\n } else {\n _layer = layers;\n }\n\n const arrayToMap =\n valueTerritoire.typologieAdminData?.selectedCommunes || [];\n\n const mappedArray = [...arrayToMap.filter((item) => item.id !== id)];\n if (checked) {\n mappedArray.push({\n ..._layer.find((item) => item.id == id),\n checked: true,\n });\n }\n\n dispatch(\n formulaireCommandeSlice.actions.set_value_selectedCommunes(mappedArray)\n );\n },\n [layers, valueTerritoire]\n );\n\n useEffect(() => {\n if (needFitBound) {\n const layer = communes.length ? communes : epci;\n const geojsonLayer = L.geoJSON(layer);\n if (geojsonLayer && geojsonLayer.getBounds().isValid()) {\n map.fitBounds(geojsonLayer.getBounds());\n }\n }\n }, [communes, epci, needFitBound]);\n\n useEffect(() => {\n setSelectedMunicipalitiesIds(\n (valueTerritoire.typologieAdminData?.selectedCommunes || []).map(\n (commune) => {\n return commune.id;\n }\n )\n );\n setLayerToShow(layers);\n }, [valueTerritoire, currentPage, layers]);\n\n return (\n <>\n {_.map(layerToShow, (feature) => {\n return (\n \n );\n })}\n \n );\n}\n\nexport default GeoJsonContainer;\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { formulaireCommandeSlice } from \"../../slices/formulaireCommande\";\nimport uniqid from \"uniqid\";\nimport pad from \"../../../helpers/pad\";\n\nexport const addNewZonePerso = (newLayer) => (dispatch, getState) => {\n const valueZoneEtudeZan = getState().formulaireCommande.valueZoneEtudeZan;\n const _code = uniqid();\n const personalizedZones = [\n ...valueZoneEtudeZan.personalizedZones,\n { ...newLayer, _code, checked: true },\n ].map((item, key) => {\n if (item._code == _code) {\n return { ...item, name: `ZonePerso ${pad(key + 1)}` };\n }\n return item;\n });\n dispatch(\n formulaireCommandeSlice.actions.set_value_zone_etude_zan({\n ...valueZoneEtudeZan,\n personalizedZones,\n selectedPersonalizedZones: personalizedZones.filter(\n (item) => item.checked\n ),\n })\n );\n};\n\nexport const updateZonePerso = (layer, _code) => (dispatch, getState) => {\n const valueZoneEtudeZan = getState().formulaireCommande.valueZoneEtudeZan;\n const _personalizedZones = valueZoneEtudeZan.personalizedZones.map((item) => {\n if (item._code === _code) {\n return {\n ...layer,\n name: layer.name || item.name,\n _code: item._code,\n checked: item.checked,\n };\n }\n return item;\n });\n dispatch(\n formulaireCommandeSlice.actions.set_value_zone_etude_zan({\n ...valueZoneEtudeZan,\n personalizedZones: _personalizedZones,\n selectedPersonalizedZones: _personalizedZones.filter(\n (item) => item.checked\n ),\n })\n );\n};\n\nexport const getZonePersoByCode = createAsyncThunk(\n \"formulaireCommande/getZoneByCode\",\n (_code, { getState }) => {\n const personalizedZones =\n getState().formulaireCommande.valueZoneEtudeZan.personalizedZones;\n return personalizedZones.find((item) => item._code == _code);\n }\n);\n","import React, { useEffect, useState } from \"react\";\nimport { useMap } from \"react-leaflet\";\nimport { EditControl } from \"react-leaflet-draw\";\nimport L from \"leaflet\";\nimport _ from \"lodash\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport { getZonePersoByCode } from \"../../redux/actions/formulaireCommande/zonePersoActions\";\nimport {\n addNewZonePerso,\n updateZonePerso,\n} from \"../../redux/actions/formulaireCommande/zonePersoActions\";\nimport \"leaflet-draw\";\nimport pointTurf from \"turf-point\";\nimport bufferTurf from \"turf-buffer\";\nimport turfArea from \"@turf/area\";\nimport { XCircleIcon } from \"@heroicons/react/solid\";\nimport cx from \"classnames\";\n\nexport function getRandomColor() {\n const letters = \"0123456789ABCDEF\";\n let color = \"#\";\n for (let i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n}\n\nconst PopupContent = ({ area, _code }) => {\n const dispatch = useDispatch();\n const [layerGeoJson, setLayerGeoJson] = useState(null);\n const [textValue, setTextValue] = useState(\"\");\n\n const handleChangeName = (e) => {\n setLayerGeoJson((state) => ({ ...state, name: e.target.value.trim() }));\n setTextValue(e.target.value);\n };\n\n const handleClick = () => {\n dispatch(updateZonePerso(layerGeoJson, _code));\n dispatch(formulaireCommandeSlice.actions.set_zone_to_edit(null));\n };\n\n useEffect(() => {\n const getlayerGeoJson = async (_code) => {\n const { payload } = await dispatch(getZonePersoByCode(_code));\n setLayerGeoJson(payload);\n setTextValue(payload.name);\n };\n getlayerGeoJson(_code);\n }, [_code]);\n\n return (\n
\n \n \n \n handleChangeName({\n target: {\n value: \"\",\n },\n })\n }\n >\n \n \n
\n

{area} km²

\n \n Sauvegarder la modification\n \n \n );\n};\n\nexport default function ZonePerso({ layerNeedsPopup }) {\n const [needClear, setNeedClear] = useState(false);\n const [myLayer, setMyLayer] = useState([]);\n const map = useMap();\n const { valueZoneEtudeZan, zoneToEdit } = useSelector(\n (state) => state.formulaireCommande\n );\n const dispatch = useDispatch();\n\n const handleOnCreatedLayer = (createEl) => {\n const geoJSONLayer = createEl.layer.toGeoJSON();\n dispatch(\n addNewZonePerso({\n ...geoJSONLayer,\n properties: {\n ...geoJSONLayer.properties,\n radius: createEl.layer._mRadius,\n color: getRandomColor(),\n },\n })\n );\n };\n\n const removeAllCreatedLayer = () => {\n const deleteBtn = document.querySelector(\".leaflet-draw-edit-remove\");\n const event = new Event(\"click\");\n if (deleteBtn) {\n deleteBtn.dispatchEvent(event);\n setTimeout(() => {\n const clearAll = document.querySelector('[title=\"Clear all layers\"]');\n if (clearAll && needClear) {\n clearAll.dispatchEvent(event);\n setNeedClear(false);\n }\n }, 100);\n }\n };\n\n const removeAllLayer = () => {\n myLayer.forEach((layer) => {\n map.closePopup();\n map.removeLayer(layer);\n });\n };\n\n const updateZone = (e, item) => {\n const layer = e.target;\n const geoJSONLayer = layer.toGeoJSON();\n dispatch(\n updateZonePerso(\n {\n ...geoJSONLayer,\n properties: {\n ...geoJSONLayer.properties,\n radius: layer._mRadius,\n color: item.properties.color,\n },\n },\n item._code\n )\n );\n };\n\n useEffect(() => {\n let _layers = [];\n\n removeAllLayer();\n removeAllCreatedLayer();\n\n (valueZoneEtudeZan.personalizedZones || [])\n .filter((item) => item.checked)\n .forEach((item) => {\n let layer = null;\n\n // create layer by geoJson\n const pane = map.createPane(\"pane\");\n let geoJSON = null;\n if (item.geometry.type === \"Point\") {\n layer = L.circle([...item.geometry.coordinates].reverse(), {\n radius: item.properties.radius,\n pane,\n });\n geoJSON = bufferTurf(\n pointTurf([...item.geometry.coordinates].reverse()),\n item.properties.radius,\n \"meters\"\n );\n } else {\n layer = L.polygon(\n [...item.geometry.coordinates].map((coor) =>\n coor.map((item) => [...item].reverse())\n ),\n {\n pane,\n }\n );\n geoJSON = layer.toGeoJSON();\n }\n\n const area = parseFloat(turfArea(geoJSON) / 1000000).toFixed(2);\n\n // edit zone\n if (zoneToEdit === item._code) {\n layer.editing.enable();\n layer.on(\"edit\", (e) => {\n setTimeout(() => {\n layer.editing.disable();\n }, 100);\n updateZone(e, item);\n });\n // popup save\n window.addEventListener(\"keydown\", (e) => {\n if (e.key === \"Enter\") {\n dispatch(formulaireCommandeSlice.actions.set_zone_to_edit(null));\n }\n });\n }\n\n // popup\n layer.addEventListener(\"click\", (e) => {\n layerNeedsPopup &&\n layerNeedsPopup(e, );\n });\n\n // display zone in the map\n layer.setStyle({\n fillColor: item.properties.color,\n color: item.properties.color,\n });\n layer.addTo(map);\n _layers.push(layer);\n });\n setMyLayer(_layers);\n }, [valueZoneEtudeZan, zoneToEdit]);\n\n useEffect(() => {\n const triggerEvent = (className) => () => {\n const els = document.getElementsByClassName(className);\n for (var i = 0; i < els.length; i++) {\n els[i].dispatchEvent(new Event(\"click\"));\n setNeedClear(true);\n }\n };\n\n setTimeout(() => {\n // hidde control\n const elsControl = document.getElementsByClassName(\"leaflet-control\");\n if (elsControl.item(1)) {\n elsControl.item(1).style.display = \"none\";\n }\n\n // trigger event\n const addCircleBtn = document.getElementById(\"add_cirle\");\n const addRectangle = document.getElementById(\"add_rectangle\");\n const addPolygone = document.getElementById(\"add_polygone\");\n if (addCircleBtn && addRectangle && addPolygone) {\n addCircleBtn.addEventListener(\n \"click\",\n triggerEvent(\"leaflet-draw-draw-circle\")\n );\n addRectangle.addEventListener(\n \"click\",\n triggerEvent(\"leaflet-draw-draw-rectangle\")\n );\n addPolygone.addEventListener(\n \"click\",\n triggerEvent(\"leaflet-draw-draw-polygon\")\n );\n }\n }, 100);\n }, []);\n\n return (\n \n );\n}\n","export default function pad(d) {\n return d < 10 ? \"0\" + d.toString() : d.toString();\n}\n","import React, { useEffect, useState } from \"react\";\nimport { useMap } from \"react-leaflet\";\nimport classNames from \"classnames\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\n\nconst legendItems = [\n {\n id: 1,\n coord: [46.483229, 2.660239],\n label: \"France métropolitaine\",\n zoom: 6,\n },\n { id: 2, coord: [16.1735, -61.4053], label: \"Guadeloupe\", zoom: 11 },\n { id: 3, coord: [3.946, -53.119], label: \"Guyane\", zoom: 8 },\n { id: 4, coord: [-21.131, 55.5266], label: \"La Réunion\", zoom: 11 },\n { id: 5, coord: [14.6369, -61.0194], label: \"Martinique\", zoom: 11 },\n { id: 6, coord: [-12.8288, 45.1591], label: \"Mayotte\", zoom: 11 },\n { id: 7, coord: [-20.479, 165.145], label: \"Nouvelle-Calédonie\", zoom: 7 },\n { id: 8, coord: [-18.177, -144.58], label: \"Polynésie française\", zoom: 6 },\n { id: 9, coord: [17.9225, -62.8701], label: \"Saint-Barthélemy\", zoom: 13 },\n { id: 10, coord: [18.0859, -63.0619], label: \"Saint-Martin\", zoom: 13 },\n {\n id: 11,\n coord: [46.95, -56.2685],\n label: \"Saint-Pierre-et Miquelon\",\n zoom: 11,\n },\n];\n\nconst SelectCenterAreaLayer = () => {\n const [activeItem, setActiveItem] = useState(null);\n const { centerMap, currentPage } = useSelector(\n (state) => state.formulaireCommande\n );\n const dispatch = useDispatch();\n\n const handleClickitem = (id, coord, zoom) => () => {\n setActiveItem(id);\n map.flyTo(coord, zoom, { duration: 1.75 });\n dispatch(\n formulaireCommandeSlice.actions.set_center_map({\n id,\n coord,\n zoom,\n })\n );\n };\n\n useEffect(() => {\n if (centerMap && currentPage === \"form_territoire\") {\n setActiveItem(centerMap.id);\n if (centerMap.coord && centerMap.zoom) {\n map.flyTo(centerMap.coord, centerMap.zoom, { duration: 1.75 });\n }\n }\n }, [centerMap, currentPage]);\n\n const map = useMap();\n if (!map) return null;\n\n return (\n <>\n \n {legendItems.map((item, index) => {\n return (\n \n \n {item.label}\n \n \n );\n })}\n \n \n );\n};\n\nexport default SelectCenterAreaLayer;\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport {\n FeatureGroup,\n MapContainer,\n Popup,\n TileLayer,\n LayersControl,\n} from \"react-leaflet\";\nimport L from \"leaflet\";\nimport \"leaflet/dist/leaflet.css\";\nimport GeoJsonContainer from \"./GeoJsonContainer\";\nimport ZonePerso from \"./ZonePerso\";\nimport marker from \"leaflet/dist/images/marker-icon.png\";\nimport marker2x from \"leaflet/dist/images/marker-icon-2x.png\";\nimport markerShadow from \"leaflet/dist/images/marker-shadow.png\";\nimport SelectCenterAreaLayer from \"./SelectCenterAreaLayer\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport { getCommunesByBBox } from \"../../redux/actions/formulaireCommande/communeActions\";\n\ndelete L.Icon.Default.prototype._getIconUrl;\n\nL.Icon.Default.mergeOptions({\n iconRetinaUrl: marker2x,\n iconUrl: marker,\n shadowUrl: markerShadow,\n});\n\nconst LayersControls = () => {\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst defaultZoomLevel = 11;\n\nfunction TunnelCommandMapContainer() {\n // states\n const [popup, setPopup] = useState(null);\n const [layers, setLayers] = useState([]);\n const [showCommunesEpci, setShowCommunesEpci] = useState(false);\n const [zoomLevel, setZoomLevel] = useState(5);\n const [first, setFirst] = useState(false);\n const [moved, setMoved] = useState(null);\n const [needFitBound, setNeedFitBound] = useState(true);\n const {\n communes,\n epci,\n valueTerritoire: {\n typologieAdminData: { structureTerritorial, territoireCiblage },\n },\n } = useSelector((state) => state.formulaireCommande);\n\n // refs\n const map = useRef(null);\n\n const dispatch = useDispatch();\n\n const handleLayerNeedsPopup = useCallback((e, children) => {\n setPopup({ postion: e.latlng, children });\n setTimeout(() => {\n const els = document.getElementsByClassName(\"leaflet-popup-close-button\");\n for (var i = 0; i < els.length; i++) {\n els[i].addEventListener(\"click\", () => {\n setPopup(null);\n });\n }\n }, 500);\n }, []);\n\n const getCommunes = async () => {\n if (structureTerritorial.code === \"region\") {\n const myMap = map.current;\n setNeedFitBound(false);\n if (zoomLevel >= defaultZoomLevel) {\n // get bounds\n const bounds = myMap.getBounds();\n const northEast = bounds.getNorthEast();\n const southWest = bounds.getSouthWest();\n\n document.body.className = \"waiting\";\n await dispatch(\n getCommunesByBBox({\n xmax: northEast.lng,\n ymax: northEast.lat,\n xmin: southWest.lng,\n ymin: southWest.lat,\n })\n );\n document.body.className = \"\";\n setShowCommunesEpci(true);\n } else {\n setShowCommunesEpci(false);\n dispatch(formulaireCommandeSlice.actions.set_communes([]));\n }\n }\n };\n\n // debounce effect\n useEffect(() => {\n const fnDebounce = setTimeout(() => {\n if (first) {\n getCommunes();\n }\n setFirst(true);\n }, 1000);\n return () => clearTimeout(fnDebounce);\n }, [zoomLevel, moved]);\n\n // map event\n useEffect(() => {\n if (structureTerritorial.code === \"region\") {\n setTimeout(() => {\n const myMap = map.current;\n myMap.on(\"zoom\", (e) => {\n // we call this to run the debounce effect\n setZoomLevel(e.target.getZoom());\n });\n myMap.on(\"move\", (e) => {\n // we call this to run the debounce effect\n setMoved(e.target.getBounds());\n });\n if (myMap.getZoom() >= defaultZoomLevel) {\n setZoomLevel(myMap.getZoom());\n }\n }, 2000);\n } else {\n setNeedFitBound(true);\n }\n }, [structureTerritorial.code]);\n\n useEffect(() => {\n setNeedFitBound(true);\n }, [territoireCiblage]);\n\n useEffect(() => {\n const mappedEpci = (epci || []).map((item) => ({\n ...item,\n territoireType: \"epci\",\n }));\n const mappedCommunes = (communes || []).map((item) => ({\n ...item,\n territoireType: \"commune\",\n }));\n setLayers(\n structureTerritorial.code === \"region\" && !showCommunesEpci\n ? mappedEpci\n : showCommunesEpci\n ? [...mappedEpci, ...mappedCommunes]\n : mappedCommunes\n );\n }, [structureTerritorial, epci, communes, showCommunesEpci]);\n\n return (\n \n \n \n \n {layers?.length ? null : }\n \n \n \n {popup && {popup.children}}\n \n \n \n \n );\n}\n\nexport default TunnelCommandMapContainer;\n","import React, { useEffect, useMemo } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { spacingThousands } from \"../../helpers/_format_number\";\nimport cx from \"classnames\";\nimport \"./styles.css\";\nimport classNames from \"classnames\";\n\nexport const Recap = () => {\n const { valueTerritoire, currentPage } = useSelector(\n (state) => state.formulaireCommande\n );\n\n const {\n population,\n selectedCommunesTotal,\n surface,\n logCollectif,\n selectedCommunes,\n } = useMemo(() => {\n return {\n population: (\n valueTerritoire.typologieAdminData?.selectedCommunes || []\n ).reduce(\n (prev, current) => prev + (current?.properties?.population || 0),\n 0\n ),\n selectedCommunesTotal: (\n valueTerritoire.typologieAdminData?.selectedCommunes || []\n ).length,\n surface: (\n valueTerritoire.typologieAdminData?.selectedCommunes || []\n ).reduce(\n (prev, current) =>\n prev + (current?.properties?.surface_commune_meter_square || 0),\n 0\n ),\n selectedCommunes:\n valueTerritoire.typologieAdminData?.selectedCommunes || [],\n logCollectif:\n (valueTerritoire.typologieAdminData?.selectedCommunes || []).reduce(\n (prev, current) =>\n prev + (current?.properties?.part_logement_collectif || 0),\n 0\n ) / (valueTerritoire.typologieAdminData?.selectedCommunes || []).length,\n };\n }, [valueTerritoire]);\n\n return (\n \n \n
\n
\n \n {spacingThousands(Math.floor(population))}\n \n habitants\n
\n
\n
\n
\n \n {Math.floor(isNaN(logCollectif) ? 0 : logCollectif)}\n %\n \n log. collectifs\n
\n
\n
\n
\n \n {selectedCommunesTotal}\n \n communes\n
\n
\n
\n
\n \n {spacingThousands(Math.floor(surface / 1000000))} km²\n \n de surface totale\n
\n
\n \n \n
\n \n \n
\n
\n \n \n
\n \n \n );\n};\n\nconst setWidthBtnInFooter = () => {\n const formulaireContainer = document.getElementById(\"formulaire-container\");\n const footer = document.getElementById(\"footer-form-commande\");\n if (formulaireContainer && footer) {\n footer.style.width = `${formulaireContainer.clientWidth}px`;\n formulaireContainer.style.paddingBottom = `${footer.clientHeight + 8}px`;\n }\n};\n\nexport default function FooterFormulaireCommande({ onClickNext }) {\n const { valueTerritoire, activeBtnNext, currentPage } = useSelector(\n (state) => state.formulaireCommande\n );\n\n useEffect(() => {\n setTimeout(() => {\n setWidthBtnInFooter();\n }, 0);\n setWidthBtnInFooter();\n window.addEventListener(\"resize\", setWidthBtnInFooter);\n return () => {\n window.removeEventListener(\"resize\", setWidthBtnInFooter);\n };\n }, [currentPage, valueTerritoire.typologieAdminData.selectedCommunes]);\n\n return (\n \n \n \n \n Suivant\n \n \n \n \n Demande de devis\n \n \n \n \n Valider ma sélection\n \n \n \n );\n}\n","import classNames from \"classnames\";\nimport React from \"react\";\nimport { XCircleIcon } from \"@heroicons/react/solid\";\n\nexport default function ControlledTextField({\n placeholder,\n type = \"text\",\n name,\n value,\n onChange,\n required = false,\n errors = [],\n withSetEmptyBtn = false,\n}) {\n const handleClickSetEmpty = () => {\n onChange && onChange(\"\");\n };\n\n return (\n
\n
\n onChange && onChange(e.target.value)}\n />\n {withSetEmptyBtn && (\n \n \n
\n )}\n
\n {errors.length\n ? errors.map((error) => (\n
\n {error}\n
\n ))\n : null}\n \n );\n}\n","import { formulaireCommandeSlice } from \"../../slices/formulaireCommande\";\n\nexport const updatePage =\n ({ current, next }) =>\n (dispatch) => {\n dispatch(formulaireCommandeSlice.actions.set_next_page(next));\n dispatch(formulaireCommandeSlice.actions.set_current_page(current));\n dispatch(formulaireCommandeSlice.actions.set_active_btn_next(false));\n };\n","import axios from 'axios';\nimport Rails from \"@rails/ujs\";\n\nlet config = {\n baseURL: process.env.BASE_URL,\n headers: {\n Accept: 'application/json',\n 'Access-Control-Allow-Origin': '*',\n 'X-CSRF-Token': Rails.csrfToken()\n },\n};\n\nlet Api = axios.create(config);\n\nexport default Api\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport Api from \"../../../helpers/_api\";\n\nexport const saveOrder = createAsyncThunk(\n \"formulaireCommande/saveOrder\",\n async (payload) => {\n const resp = await Api.post(\"/api/v1/orders\", payload);\n if (resp.status === 200) {\n return resp;\n }\n return null;\n }\n);\n","import {useState} from \"react\";\nimport {useNavigate} from \"react-router-dom\";\nimport Api from \"../helpers/_api\";\nimport axios from \"axios\";\n\nexport function useProvideAuth() {\n const [user, setUser] = useState(null);\n const [isAdmin, setIsAdmin] = useState(false);\n const loginEndpoint = process.env.BASE_URL + \"/api/v1/login\";\n const logOutEndpoint = process.env.BASE_URL + \"/api/v1/logout\";\n\n const saveSessionAuthHeader = (sessionAuthHeader) => {\n localStorage.setItem(\"tzn_token\", JSON.stringify(sessionAuthHeader));\n setSessionAuthHeader(sessionAuthHeader);\n };\n\n const getSessionAuthHeader = () => {\n const token = localStorage.getItem(\"tzn_token\");\n return JSON.parse(token);\n };\n const deleteSessionAuthHeader = () => {\n localStorage.removeItem(\"tzn_token\");\n };\n\n const [sessionAuthHeader, setSessionAuthHeader] = useState(\n getSessionAuthHeader()\n );\n\n const logIn = (credential, callback) => {\n return Api.post(loginEndpoint, {user: credential})\n .then((res) => res.data)\n .then(({user, authentication_token}) => {\n setUser({\n ...user,\n authentication_token: authentication_token,\n });\n\n saveSessionAuthHeader({\n token: authentication_token,\n email: user.email,\n });\n axios.interceptors.request.use(function (config) {\n config.headers[\"X-USER-EMAIL\"] = sessionAuthHeader?.email;\n config.headers[\"X-USER-TOKEN\"] = sessionAuthHeader?.token\n return config;\n }, function (error) {\n // Do something with request error\n return Promise.reject(error);\n });\n\n callback && callback();\n });\n };\n\n const logOut = (callback) => {\n return Api.delete(logOutEndpoint)\n .then((res) => res.data)\n .then((token) => {\n localStorage.removeItem(\"openModal\");\n deleteSessionAuthHeader();\n setUser(null);\n })\n .then(() => {\n callback();\n });\n };\n\n const navigate = useNavigate();\n\n const checkSession = () => {\n Api.get(\"/api/v1/me\", {\n headers: {\n \"X-USER-EMAIL\": sessionAuthHeader?.email,\n \"X-USER-TOKEN\": sessionAuthHeader?.token,\n },\n }).then((res) => {\n if (res.status !== 200) {\n logOut(() => {\n navigate(\"/users/sign_in\");\n }).then((r) => console.log(r));\n } else {\n setUser(res.data);\n }\n });\n };\n // const checkAdminSession = () => {\n // axios.get('/api/v1/me', {\n // headers: {\n // \"X-USER-EMAIL\": sessionAuthHeader?.email,\n // \"X-USER-TOKEN\": sessionAuthHeader?.token\n // }\n // }).then((res) => {\n // if (res.status !== 200 || res.data.role !== \"admin\") {\n // logOut(() => {\n // navigate('/users/sign_in')\n // }).then(r => console.log(r))\n // } else {\n // setUser(res.data)\n // setIsAdmin(res.data.role === \"admin\")\n // }\n // })\n // }\n\n return {\n user,\n logIn,\n logOut,\n sessionAuthHeader,\n checkSession,\n // checkAdminSession,\n // isAdmin\n };\n}\n","import React, {createContext} from \"react\";\nimport {useProvideAuth} from \"../hooks/useProvideAuth\";\n\nexport const authContext = createContext({})\n\nconst AuthProvider = ({children}) => {\n const auth = useProvideAuth();\n\n return \n {children}\n \n}\n\n\nexport default AuthProvider\n\n","import {useContext} from \"react\";\nimport {authContext} from \"../providers/AuthProvider\";\n\nexport function useAuth() {\n return useContext(authContext);\n}\n","import React from \"react\";\nimport { ExclamationCircleIcon } from \"@heroicons/react/solid\";\n\nexport default function ({ children, type = \"info\" }) {\n const color = type === \"info\" ? \"text-info\" : \"\";\n const colorIcon = type === \"info\" ? \"text-my-blue\" : \"\";\n const bgcolor = type === \"info\" ? \"bg-background-info\" : \"\";\n return (\n \n {type === \"info\" && (\n
\n \n
\n )}\n
{children}
\n \n );\n}\n","import React from \"react\";\nimport { Tooltip } from \"flowbite-react\";\nimport { ExclamationCircleIcon } from \"@heroicons/react/solid\";\nimport \"./styles.css\";\n\nexport default function MoreInfo({ content }) {\n return (\n \n \n \n \n \n );\n}\n","import React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport { Recap } from \"../footer-formulaire-commande/FooterFormlaierCommande\";\nimport { ExclamationCircleIcon } from \"@heroicons/react/solid\";\nimport ControlledTextField from \"../common/controlled-textfield/controlledTextfield\";\nimport CustomSelect from \"../common/custom-select/CustomSelect\";\nimport { useLocation } from \"react-router-dom\";\nimport classNames from \"classnames\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { updatePage } from \"../../redux/actions/formulaireCommande/pageAction\";\nimport { saveOrder } from \"../../redux/actions/formulaireCommande/orderAction\";\nimport bufferTurf from \"turf-buffer\";\nimport pointTurf from \"turf-point\";\nimport Api from \"../../helpers/_api\";\nimport { useAuth } from \"../../hooks/useAuth\";\nimport { Modal } from \"flowbite-react\";\nimport Alert from \"../common/alert/Alert\";\nimport { isEmpty } from \"lodash\";\nimport * as yup from \"yup\";\nimport { useFormik } from \"formik\";\nimport MoreInfo from \"../common/more-info/MoreInfo\";\nimport localforage from \"localforage\";\nimport \"./styles.css\";\n\nconst genders = [\n {\n code: \"null\",\n value: null,\n label: \"Civilité\",\n },\n {\n code: \"M\",\n value: \"monsieur\",\n label: \"Monsieur\",\n },\n {\n code: \"Mme\",\n value: \"madame\",\n label: \"Madame\",\n },\n];\n\nconst schemaClient = yup.object({\n gender: yup\n .object({\n code: yup.string(),\n value: yup.string(),\n label: yup.string(),\n })\n .default(genders[0]),\n nom: yup.string().required(\"Champ obligatoire.\"),\n prenom: yup.string().required(\"Champ obligatoire.\"),\n societe: yup.string().required(\"Champ obligatoire.\"),\n tel: yup.string().required(\"Champ obligatoire.\"),\n});\n\nconst schemaLogin = yup.object().shape({\n email: yup\n .string()\n .email(\"Ce n'est pas un adresse email.\")\n .required(\"Champ obligatoire.\"),\n password: yup\n .string()\n .min(8, \"Minimum 8 caractères\")\n .max(32, \"Maximum 32 caractères\")\n .required(\"Champ obligatoire.\"),\n passwordConfirmation: yup\n .string()\n .oneOf([yup.ref(\"password\"), null], \"Veuillez corriger votre confirmation\")\n .required(\"Champ obligatoire.\"),\n haveReadTerm: yup.boolean().not([false]),\n});\n\nexport default function CommandeRecap() {\n const {\n currentPage,\n valueTerritoire: {\n typologieAdminData: {\n structureTerritorial,\n territoireCiblage,\n selectedCommunes,\n },\n },\n valueZoneEtudeZan: { selectedPersonalizedZones },\n valueDefinitionEtude: {\n imagerieProvider,\n selectedYears,\n frequency,\n segmentationMos,\n },\n valueSegmentation,\n } = useSelector((state) => state.formulaireCommande);\n const dispatch = useDispatch();\n\n // refs elements\n const clientFormRef = useRef();\n\n const auth = useAuth();\n\n const location = useLocation();\n const [nameProject, setNameProject] = useState(\n !!territoireCiblage\n ? `Suivi du projet ${territoireCiblage.name}`\n : \"Donner un nom à votre projet\"\n );\n\n const estimatedPrice = useMemo(() => {\n const surfaceBefore =\n (selectedCommunes || []).reduce(\n (prev, current) =>\n prev + (current?.properties?.surface_commune_meter_square || 0),\n 0\n ) *\n selectedYears?.length *\n 0.01;\n\n const surfaceFuture =\n (selectedCommunes || []).reduce(\n (prev, current) =>\n prev + (current?.properties?.surface_commune_meter_square || 0),\n 0\n ) *\n frequency *\n 0.017;\n\n return Intl.NumberFormat(\"fr\", {\n style: \"currency\",\n currency: \"EUR\",\n maximumFractionDigits: 0,\n roundingMode: \"floor\",\n }).format(15000 + 7500 + surfaceBefore / 1000 + surfaceFuture / 1000);\n // return spacingThousands(parseFloat().toFixed(2)))\n }, [selectedCommunes]);\n\n const clientForm = useFormik({\n initialValues: {\n gender: genders[0],\n nom: \"\",\n prenom: \"\",\n societe: \"\",\n tel: \"\",\n },\n });\n\n const loginForm = useFormik({\n initialValues: {\n email: \"\",\n password: \"\",\n passwordConfirmation: \"\",\n haveReadTerm: false,\n },\n });\n\n const [userCreationErrors, setUserCreationErrors] = useState([]);\n\n const { checkSession } = useAuth();\n const [isLogged, setIsLogged] = useState(false);\n const [showModal, setShowModal] = useState(false);\n const [errorNameProject, setErrorNameProject] = useState(false);\n\n useEffect(() => {\n if (isLogged) {\n checkSession();\n }\n }, [isLogged]);\n\n const [errorsForms, setErrorsForms] = useState({\n gender: [],\n nom: [],\n prenom: [],\n societe: [],\n tel: [],\n email: [],\n password: [],\n passwordConfirmation: [],\n });\n\n const [isValidForms, setIsValidForms] = useState(false);\n\n const handleChange = (key, value, formFormik, schema) => {\n const currentValue = { ...formFormik.values, [key]: value };\n formFormik.setValues(currentValue);\n schema\n .validateAt(key, currentValue)\n .then(() => {\n setErrorsForms({ ...errorsForms, [key]: [] });\n })\n .catch((e) => {\n setErrorsForms({ ...errorsForms, [key]: e.errors });\n });\n schema\n .validate(currentValue)\n .then(() => {\n setIsValidForms(true);\n })\n .catch(() => {\n setIsValidForms(false);\n });\n };\n\n const handleChangeClient = (key) => (value) => {\n handleChange(key, value, clientForm, schemaClient);\n };\n\n const handleChangeLoginData = (key) => (value) => {\n handleChange(key, value, loginForm, schemaLogin);\n };\n\n const saveMyOrder = async () => {\n const orderObject = {\n order: {\n name: nameProject,\n imagery_type: imagerieProvider.code,\n default_mos_segmentation: false,\n mos_segments: segmentationMos.name,\n past_years: selectedYears,\n capture_frequency_number: frequency,\n communes_national_codes: selectedCommunes.map((item) =>\n parseInt(item.id)\n ),\n custom_zan_zones_attributes: selectedPersonalizedZones.map((item) => {\n if (item.geometry.type === \"Point\") {\n const geoJsonCircle = bufferTurf(\n pointTurf([...item.geometry.coordinates].reverse()),\n item.properties.radius,\n \"meters\"\n );\n return {\n name: item.name,\n geom: {\n type: geoJsonCircle.type,\n properties: geoJsonCircle.properties,\n geometry: geoJsonCircle.geometry,\n },\n };\n }\n return {\n name: item.name,\n geom: {\n type: item.type,\n properties: item.properties,\n geometry: item.geometry,\n },\n };\n }),\n },\n };\n const resp = await dispatch(saveOrder(orderObject));\n if (resp.payload) {\n return true;\n }\n return false;\n };\n\n const addNewUser = async () => {\n await Api.post(\"/api/v1/users/\", {\n user: {\n gender: clientForm.values.gender.value,\n first_name: clientForm.values.prenom,\n last_name: clientForm.values.nom,\n phone_number: clientForm.values.tel,\n organization: clientForm.values.societe,\n email: loginForm.values.email,\n password: loginForm.values.password,\n password_confirmation: loginForm.values.passwordConfirmation,\n },\n });\n };\n\n const submit = async () => {\n let errorAddUser = false;\n if (!isLogged) {\n await addNewUser().catch((e) => {\n setUserCreationErrors(e.response.data.message);\n errorAddUser = true;\n });\n if (!errorAddUser) {\n await auth.logIn({\n email: loginForm.values.email,\n password: loginForm.values.password,\n });\n }\n }\n\n let saved;\n if (!errorAddUser) {\n saved = await saveMyOrder();\n }\n\n if (saved && !errorAddUser) {\n // remove persist\n localforage.clear();\n setShowModal(true);\n }\n };\n\n const handleCLickFermer = () => {\n setShowModal(false);\n setTimeout(() => {\n window.location.assign(\"/\");\n }, 100);\n };\n\n const handleClickEditCommande = () => {\n dispatch(\n updatePage({\n current: \"form_territoire\",\n next: \"form_zone_etude_zan\",\n })\n );\n };\n\n const handleSubmitAllForms = () => {\n if (isValidForms) {\n submit();\n }\n };\n\n const handleChangeNameProject = (value) => {\n setNameProject(value);\n setErrorNameProject(value.length ? false : true);\n };\n\n useEffect(() => {\n const token = auth.sessionAuthHeader;\n setIsLogged(token ? true : false);\n }, [location.pathname]);\n\n useEffect(() => {\n const fixPriceContainer = () => {\n const recapContainer = document.getElementById(\"recap-container\");\n const priceContainer = document.getElementById(\"price-container\");\n if (priceContainer && recapContainer) {\n priceContainer.style.width = `${recapContainer.clientWidth}px`;\n }\n };\n fixPriceContainer();\n window.addEventListener(\"resize\", fixPriceContainer);\n return () => {\n window.removeEventListener(\"resize\", fixPriceContainer);\n };\n }, [currentPage]);\n\n return (\n <>\n \n
\n
\n \n

\n Nous avons bien reçu votre demande\n

\n
\n

\n Nous vous avons envoyé un lien de confirmation de compte par email\n

\n

\n La confirmation de création de votre compte est nécessaire pour vous\n adresser votre devis\n

\n \n Pensez à vérifier dans vos messages indésirables le cas échéant\n \n

\n Vous avez d’autres points importants à partager ?\n
\n Vous souhaitez en savoir plus sur les prochains développements, vous\n voulez simplement échanger ?\n

\n
\n \n

\n Des questions ?\n
Ecrivez-nous\n

\n {\"\"}\n \n \n

\n Prenons RDV \n
\n En ligne\n

\n {\"\"}\n \n
\n
\n \n Fermer\n \n
\n
\n
\n
\n \n
\n
\n

\n Récapitulatif\n
de votre demande\n

\n \n Modifier\n \n
\n
\n \n
\n

\n Territoire d'étude ZAN\n

\n

\n {structureTerritorial?.label}, {territoireCiblage?.name}\n

\n
\n \n
\n
\n {segmentationMos?.name === \"Segmentation / MOS - 5 élements\" ? (\n <>\n

\n {segmentationMos.name}\n

\n {/*{segmentationMosImage.map(({ label, code }) => (*/}\n {/*
*/}\n {/* */}\n {/* */}\n {/* {label}*/}\n {/* */}\n {/*
*/}\n {/*))}*/}\n \n ) : (\n <>\n

\n {segmentationMos.name}\n

\n

\n \n )}\n
\n
\n
\n
Imagerie :
\n
\n {imagerieProvider?.label}\n \n
\n
\n
\n
Années analysées :
\n
\n {selectedYears?.join(\", \")}\n \n
\n
\n {frequency > 0 && (\n
\n
Fréquence de passage :
\n
\n {frequency} passages par an\n \n
\n
\n )}\n
\n
\n \n
\n \n à partir de\n \n \n {estimatedPrice} HT\n \n
\n \n
\n \n
\n
\n \n

\n Vos informations\n

\n
\n \n \n \n \n \n
\n \n {!isLogged && (\n
\n

\n Création de votre espace\n

\n
\n \n
\n \n \n
\n
\n
\n \n handleChangeLoginData(\"haveReadTerm\")(e.target.checked)\n }\n id=\"terme\"\n />\n \n
\n
\n {!isEmpty(userCreationErrors) && (\n
\n \n
    \n {userCreationErrors.map((errorMessage) => {\n return (\n
  • \n {errorMessage}\n
  • \n );\n })}\n
\n
\n )}\n
\n )}\n \n Valider les informations et recevoir mon devis\n \n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport \"./styles.css\";\n\nexport default function Navbar() {\n return (\n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport TunnelCommandMapContainer from \"../components/maps/TunnelCommandMapContainer\";\nimport cx from \"classnames\";\nimport CommandeRecap from \"../components/commande-recap/CommandeRecap\";\nimport Navbar from \"../components/common/navbar/Navbar\";\n\nfunction CommandTunnelLayout({ children }) {\n const { currentPage } = useSelector((state) => state.formulaireCommande);\n\n const [heightPage, setHeightPage] = useState(\"100vh\");\n\n useEffect(() => {\n const resize = () => {\n const windowH = window.innerHeight;\n const documentH = document.documentElement.scrollHeight;\n const height = Math.max(windowH, documentH);\n setHeightPage(`${height}px`);\n };\n window.addEventListener(\"resize\", resize);\n window.addEventListener(\"scroll\", resize);\n return () => {\n window.removeEventListener(\"resize\", resize);\n window.removeEventListener(\"scroll\", resize);\n };\n }, []);\n\n return (\n <>\n \n \n
\n \n
\n
\n
\n
\n {children}\n
\n
\n \n \n \n \n \n );\n}\n\nexport default CommandTunnelLayout;\n","import React, { useRef } from \"react\";\nimport classNames from \"classnames\";\nimport { Fragment, useState } from \"react\";\nimport { Dialog, Transition } from \"@headlessui/react\";\nimport { LightBulbIcon } from \"@heroicons/react/outline\";\n\nexport default function ({ label, img, onClick, enabled, selected }) {\n let [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n {\n if (enabled) {\n onClick();\n } else {\n setIsOpen(!isOpen);\n }\n }}\n >\n \n {label}\n \n
\n \"icon\"\n
\n \n \n \n );\n}\n\nfunction ModalContact({ open, setOpen }) {\n const cancelButtonRef = useRef(null);\n\n function handleContact() {\n location.href =\n \"mailto:contact@territoireszan.com?&subject=Demande d'information sur la recherche avancée\";\n setOpen(false);\n }\n return (\n \n \n \n
\n \n\n
\n
\n \n \n
\n
\n \n
\n
\n \n La fonctionnalité vous interesse ?\n \n
\n

\n contactez nous pour savoir comment accéder à cette\n fonctionalité.\n

\n
\n
\n
\n
\n {\n handleContact();\n }}\n >\n Nous contacter\n \n setOpen(false)}\n ref={cancelButtonRef}\n >\n Annuler\n \n
\n
\n \n
\n
\n \n \n );\n}\n","import { useEffect, useState } from \"react\";\n\nexport default function useDebounce(callback, deps, delay = 500) {\n const [first, setFirst] = useState(false);\n\n useEffect(() => {\n const fn = setTimeout(() => {\n if (first) {\n callback && callback();\n }\n setFirst(true);\n }, delay);\n return () => clearTimeout(fn);\n }, deps);\n return null;\n}\n","import React, { useEffect, useState } from \"react\";\nimport Slider from \"rc-slider\";\nimport useDebounce from \"../../../hooks/useDebounce\";\n\nexport default function SliderInput({\n disabled,\n step = 1,\n min = 0,\n max,\n value,\n onChange,\n name,\n}) {\n const [valueSlider, setValueSlider] = useState(null);\n\n const handleChange = (_value) => {\n setValueSlider(_value);\n };\n\n useDebounce(\n () => {\n if (value !== valueSlider) {\n onChange && onChange(valueSlider, name);\n }\n },\n [valueSlider],\n 500\n );\n\n useEffect(() => {\n setValueSlider(value);\n }, [value]);\n\n const getValue = () => {\n return valueSlider !== null || valueSlider !== undefined\n ? valueSlider\n : max;\n };\n\n return (\n
\n \n {getValue()}\n
\n );\n}\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { formulaireCommandeActions } from \"../../slices/formulaireCommande\";\nimport Axios from \"../../../helpers/axios\";\n\nexport const getAddressesByKeyword = createAsyncThunk(\n \"getAddressesByKeyword\",\n (keyword, { dispatch }) => {\n dispatch(formulaireCommandeActions.set_addresses([]));\n dispatch(formulaireCommandeActions.set_communes([]));\n dispatch(formulaireCommandeActions.set_selected_communes([]));\n return Axios.get(`/v4/territoires_zan/bano_proxy/search?q=${keyword}`)\n .then(({ data: { features } }) => {\n const results = (features || []).map((item) => item?.properties);\n dispatch(formulaireCommandeActions.set_addresses(results));\n return results;\n })\n .catch((e) => {\n console.log(e);\n dispatch(formulaireCommandeActions.set_addresses([]));\n return [];\n });\n }\n);\n","import React, { useState } from \"react\";\nimport CustomAutocomplete from \"../common/custom-autocomplete/CustomAutocomplete\";\nimport {\n TRANSPORTMODE,\n TRANSPORT_DURATION_MIN,\n TRANSPORT_DURATION_MAX,\n} from \"../../constants/defaultValues\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport SliderInput from \"../common/slider-input/SliderInput\";\nimport { formulaireCommandeActions } from \"../../redux/slices/formulaireCommande\";\nimport { getAddressesByKeyword } from \"../../redux/actions/formulaireCommande/isochroneActions\";\nimport useDebounce from \"../../hooks/useDebounce\";\nimport { getCommunesByIsochrone } from \"../../redux/actions/formulaireCommande/communeActions\";\nimport { CommunesSelect } from \"../ formulaire-typologie-admin/FormulaireTypologieAdmin\";\n\nconst TransportMode = ({ value, onChange, name }) => {\n const handleChange = (e) => {\n onChange &&\n onChange(\n TRANSPORTMODE.find((item) => item.value === e.target.value),\n name\n );\n };\n\n return (\n <>\n \n
\n {TRANSPORTMODE.map(({ label, value: valueRadio }) => (\n \n ))}\n
\n \n );\n};\n\nconst FormulaireIsochroneFiler = () => {\n const {\n addresses,\n valueIsochroneFilter,\n valueTerritoire: {\n typologieAdminData: { selectedCommunes },\n },\n communes,\n loading,\n } = useSelector((state) => state.formulaireCommande);\n const dispatch = useDispatch();\n\n const handleChange = (value, name) => {\n dispatch(\n formulaireCommandeActions.set_value_isochorone({\n ...valueIsochroneFilter,\n [name]: value,\n })\n );\n };\n\n const handleChangeSelectedCommunes = (communes) => {\n dispatch(formulaireCommandeActions.set_selected_communes(communes));\n };\n\n const handleChangeAddressKeyword = (keyword) => {\n dispatch(getAddressesByKeyword(keyword));\n };\n\n useDebounce(\n () => {\n if (valueIsochroneFilter.isoChroneAddress) {\n dispatch(getCommunesByIsochrone());\n }\n },\n [valueIsochroneFilter],\n 500\n );\n\n return (\n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
min
\n
\n
\n
\n
\n {loading?.communes ? (\n
Chargement en cours...
\n ) : (\n \n )}\n
\n
\n );\n};\n\nexport default FormulaireIsochroneFiler;\n","import React, { useEffect } from \"react\";\nimport { ChevronUpIcon } from \"@heroicons/react/solid\";\nimport Alert from \"../common/alert/Alert\";\nimport TerritoireCard from \"../territoire-card/TerritoireCard\";\nimport FormulaireTypologieAdmin from \"../ formulaire-typologie-admin/FormulaireTypologieAdmin\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport FormulaireIsochroneFiler from \"../formulaire-isochrone-filter/FormulaireIsochroneFilter\";\n\nconst territoireOptions = [\n {\n code: \"typologie_administrative\",\n label: \"Par typologie administrative\",\n image: \"/images/typologie_admin.png\",\n enabled: true,\n },\n {\n code: \"isochrone\",\n label: \"Par Isochrones\",\n image: \"/images/isochrone.png\",\n enabled: true,\n },\n {\n code: \"import\",\n label: \"Par import de fichier\",\n image: \"/images/import.png\",\n enabled: false,\n },\n];\n\nconst TerritoireSelect = ({ onChange, value }) => {\n return (\n
\n {territoireOptions.map((item) => (\n onChange(item)}\n />\n ))}\n
\n );\n};\n\nconst FormulaireTerritoire = () => {\n const dispatch = useDispatch();\n const { valueTerritoire, returnToEditTerritoire, currentPage } = useSelector(\n (state) => state.formulaireCommande\n );\n\n const handleOnChange = (key) => (value) => {\n if (key === \"territoire\") {\n if (valueTerritoire.territoire?.code === value.code) {\n dispatch(\n formulaireCommandeSlice.actions.setReturnToEditTerritoire(false)\n );\n } else {\n dispatch(\n formulaireCommandeSlice.actions.set_value_territoire_territoire(value)\n );\n }\n } else {\n dispatch(\n formulaireCommandeSlice.actions.set_value_territoire({\n ...valueTerritoire,\n [key]: value,\n })\n );\n }\n };\n\n const handleOnClickEditTerritoire = () => {\n dispatch(formulaireCommandeSlice.actions.setReturnToEditTerritoire(true));\n };\n\n useEffect(() => {\n currentPage === \"form_territoire\" &&\n dispatch(\n formulaireCommandeSlice.actions.set_active_btn_next(\n !!valueTerritoire?.typologieAdminData?.selectedCommunes?.length\n )\n );\n }, [currentPage, valueTerritoire?.typologieAdminData?.selectedCommunes]);\n\n return (\n
\n
\n
\n

Etape 1/3 : Territoire

\n \n
\n \n Il s'agit de la zone spécifique du Territoire sur laquelle vous\n souhaitez avoir un suivi (historique: 2011-2020 et à venir) de\n l'artificialisation des sols.\n \n {(returnToEditTerritoire || !valueTerritoire.territoire) && (\n
\n

\n Choisissez comment sélectionner votre Territoire\n

\n \n
\n )}\n {!returnToEditTerritoire && valueTerritoire.territoire && (\n
\n \n Territoire {valueTerritoire.territoire?.label.toLowerCase()}\n \n \n Modifier\n \n
\n )}\n
\n
\n {!returnToEditTerritoire && valueTerritoire.territoire && (\n
\n {valueTerritoire.territoire?.code == \"typologie_administrative\" && (\n \n )}\n {valueTerritoire.territoire?.code == \"isochrone\" && (\n \n )}\n
\n )}\n
\n
\n );\n};\n\nexport default FormulaireTerritoire;\n","import React, { useEffect } from \"react\";\nimport Alert from \"../common/alert/Alert\";\nimport {\n ChevronUpIcon,\n ChevronDownIcon,\n ExclamationCircleIcon,\n TrashIcon,\n PencilIcon,\n} from \"@heroicons/react/solid\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport cx from \"classnames\";\nimport \"./styles.css\";\nimport { updatePage } from \"../../redux/actions/formulaireCommande/pageAction\";\n\nfunction ShapesList({ value, onChange, setZoneToEdit }) {\n const handleDeleteClick = (_code) => (e) => {\n e.stopPropagation();\n onChange && onChange(value.filter((item) => item._code != _code));\n };\n\n const handleClickZonePerson = (_code) => () => {\n onChange &&\n onChange(\n value.map((item) => {\n if (item._code == _code) {\n return {\n ...item,\n checked: item.checked === undefined ? true : !item.checked,\n };\n }\n return item;\n })\n );\n };\n\n return (\n <>\n

Zones perso

\n
\n {value.map(({ _code, name, checked, properties: { color } }) => (\n \n
\n \n \n
\n
{name}
\n
\n
\n {\n e.stopPropagation();\n setZoneToEdit && setZoneToEdit(_code);\n }}\n >\n \n \n \n \n \n
\n
\n ))}\n \n \n );\n}\n\nexport default function FormulaireZoneEtudeZan() {\n const dispatch = useDispatch();\n const {\n valueTerritoire,\n valueZoneEtudeZan, //{ type, personalizedZones },\n currentPage,\n } = useSelector((state) => state.formulaireCommande);\n\n const handleChangeZoneEtude = (value) => () => {\n dispatch(\n formulaireCommandeSlice.actions.set_value_zone_etude_zan({\n ...valueZoneEtudeZan,\n type: value,\n personalizedZones:\n value === \"tout_territoire\"\n ? []\n : valueZoneEtudeZan.personalizedZones,\n selectedPersonalizedZones:\n value === \"tout_territoire\"\n ? []\n : valueZoneEtudeZan.selectedPersonalizedZones,\n })\n );\n };\n\n const handleChangeZoneList = (personalizedZones) => {\n dispatch(\n formulaireCommandeSlice.actions.set_value_zone_etude_zan({\n ...valueZoneEtudeZan,\n personalizedZones,\n selectedPersonalizedZones: personalizedZones.filter(\n (item) => item.checked\n ),\n })\n );\n };\n\n const handleSetZoneToEdit = (_code) => {\n dispatch(formulaireCommandeSlice.actions.set_zone_to_edit(\"\"));\n setTimeout(() => {\n dispatch(formulaireCommandeSlice.actions.set_zone_to_edit(_code));\n }, 50);\n };\n\n const handleClickModifyFormTerritoire = () => {\n dispatch(\n updatePage({\n current: \"form_territoire\",\n next: \"form_zone_etude_zan\",\n })\n );\n const test = (valueTerritoire.typologieAdminData?.selectedCommunes || [])\n .length;\n dispatch(\n formulaireCommandeSlice.actions.set_active_btn_next(test ? true : false)\n );\n };\n\n useEffect(() => {\n const test =\n (valueZoneEtudeZan.type === \"tout_territoire\" ||\n (valueZoneEtudeZan.type === \"personnaliser\" &&\n valueZoneEtudeZan.selectedPersonalizedZones?.length)) &&\n currentPage === \"form_zone_etude_zan\";\n\n if (test) {\n dispatch(formulaireCommandeSlice.actions.set_active_btn_next(true));\n dispatch(\n formulaireCommandeSlice.actions.set_next_page(\"definition_etude\")\n );\n } else {\n if (currentPage === \"form_zone_etude_zan\") {\n dispatch(formulaireCommandeSlice.actions.set_active_btn_next(false));\n }\n }\n }, [valueZoneEtudeZan, currentPage]);\n\n return (\n
\n
\n
\n

Etape 1/3 : Territoire

\n \n Modifier\n
\n
\n \n
\n
\n
\n

\n Etape 2/3 : Zone d’étude ZAN\n

\n \n
\n \n Il s'agit de la zone spécifique du Territoire sur laquelle vous\n souhaitez avoir un suivi (historique: 2011-2020 et à venir) de\n l'artificialisation des sols.\n \n
\n \n Tout le territoire\n \n \n Personnaliser\n \n
\n \n
\n

\n Tracez vos zones directement sur la carte\n

\n \n \n \n
\n

\n Vous pouvez préciser des Zones ZAN à étudier dans le périmètre du\n territoire d'étude\n

\n
\n
\n
\n \"circle\"\n
\n
\n \"square\"\n
\n
\n \"polygone\"\n
\n
\n \n
\n
\n \n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { formulaireCommandeSlice } from \"../../redux/slices/formulaireCommande\";\nimport cx from \"classnames\";\nimport { updatePage } from \"../../redux/actions/formulaireCommande/pageAction\";\n\nexport const segmentationMos = [\n {\n code: \"asphalte\",\n label: \"Asphalte (routes et parking)\",\n },\n {\n code: \"batiment\",\n label: \"Bâtiments\",\n },\n {\n code: \"terre_nue\",\n label: \"Terre nue\",\n },\n {\n code: \"eau\",\n label: \"Eau\",\n },\n {\n code: \"vegetation\",\n label: \"Végétation\",\n },\n];\n\nexport default function FormulaireSegmentation() {\n const { valueDefinitionEtude, valueSegmentation } = useSelector(\n (state) => state.formulaireCommande\n );\n const dispatch = useDispatch();\n\n const handleUpdatePrevForm = () => {\n dispatch(\n updatePage({\n current: \"definition_etude\",\n next: \"segmentation\",\n })\n );\n };\n\n const handleChange = (value) => () => {\n dispatch(formulaireCommandeSlice.actions.set_value_segmentation(value));\n };\n\n return (\n
\n
\n \n Segmentation / MOS\n \n \n Modifier\n \n
\n
\n \n \n {segmentationMos.map(({ code, label }) => (\n
\n {code}\n \n {label}\n \n
\n ))}\n
\n \n \n

\n Selectionnez cette option pour une segmentation sur mesure. Nous\n vous contacterons pour définir ensemble votre besoin.\n

\n
\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport cx from \"classnames\";\nimport { segmentation } from \"../../redux/slices/formulaireCommande\";\nimport { segmentationMos } from \"../formulaire-segmentation/FormulaireSegmentation\";\n\nexport default function SelectSegmentationMos({ value, onChange }) {\n const [open, setOpen] = useState(false);\n\n const handleClick = () => {\n setOpen((state) => !state);\n };\n\n const handleClickValues = (id) => () => {\n onChange && onChange(segmentation.find((item) => item.id === id));\n };\n\n return (\n
\n \n
\n {value?.name || \"\"}\n
\n
\n {open ? \"Fermer\" : \"Modifier\"}\n
\n
\n