{"version":3,"mappings":"sqgCAAeA,GAAA,CACX,KAAM,8BACN,OAAQ,yBACR,uBAAwB,sCACxB,OAASC,GAAgB,0BAA0BA,CAAE,GACrD,OAASA,GAAgB,0BAA0BA,CAAE,EACzD,ECDaC,GAA2B,MAAOC,EAAaC,IACjD,MAAMC,EAAW,6BAA6BF,CAAG,cAAcC,CAAG,GAAIE,EAAe,GAAG,EAGtFC,GAA6B,MAAOC,GACtC,MAAMH,EAAWL,GAAqB,KAAMM,EAAe,KAAME,CAAI,EAGnEC,GAA0B,MAAOD,GACnC,MAAMH,EAAWL,GAAqB,OAAQM,EAAe,KAAME,CAAI,EAGrEE,GAA0B,MAAOT,EAAYO,IAC/C,MAAMH,EAAWL,GAAqB,OAAOC,CAAE,EAAGK,EAAe,IAAKE,CAAI,EAGxEG,GAA0B,MAAOV,GACnC,MAAMI,EAAWL,GAAqB,OAAOC,CAAE,EAAGK,EAAe,MAAM,EAGrEM,GAA6B,MAAOJ,GACtC,MAAMH,EAAWL,GAAqB,uBAAwBM,EAAe,KAAME,CAAI,w53DCpBlG,MAAMK,GAAOC,EAAU,aAAe,cAAyB,cAAgB,QAAU,GAEzFC,GACK,IAAIC,EAAW,EACf,IAAIC,EAAgB,EAAE,KAAK,CAC5B,IAAKC,GAAe,EACpB,YAAa,KAEb,cAAe,CACX,YAAa,EACjB,EACA,QAAS,CACL,SAAU,GAAGL,EAAI,6BAA6BC,EAAU,WAAW,EACvE,CACJ,CAAC","names":["UserAddressConstants","id","PointToAddressApiRequest","lat","lng","ApiRequest","RequestMethods","GetAddressesListApiRequest","data","CreateAddressApiRequest","UpdateAddressApiRequest","RemoveAddressApiRequest","CalculateAddressApiRequest","host","constants","i18n","i18nBackend","initReactI18next","getCurrentLang"],"sources":["../../src/features/profile/UserAddressConstants.ts","../../src/features/profile/services/UserAddressesService.ts","../../src/i18n.ts"],"sourcesContent":["export default {\n List: `/api/profile/addresses/list`,\n Create: `/api/profile/addresses`,\n CalculateDeliveryPrice: `/api/factors/calculateDeliveryPrice`,\n Update: (id: number) => `/api/profile/addresses/${id}`,\n Delete: (id: number) => `/api/profile/addresses/${id}`,\n}","import {ApiRequest} from \"../../../services/RequestService.tsx\";\nimport RequestMethods from \"../../../commons/enums/RequestMethods.tsx\";\nimport UserAddressConstants from \"../UserAddressConstants.ts\";\nimport AddressModel from \"../models/AddressModel.ts\";\n\nexport const PointToAddressApiRequest = async (lat: number, lng: number) => {\n return await ApiRequest(`/api/map/address?latitude=${lat}&longitude=${lng}`, RequestMethods.GET);\n}\n\nexport const GetAddressesListApiRequest = async (data: { page: number, count: number }) => {\n return await ApiRequest(UserAddressConstants.List, RequestMethods.POST, data);\n}\n\nexport const CreateAddressApiRequest = async (data: AddressModel) => {\n return await ApiRequest(UserAddressConstants.Create, RequestMethods.POST, data);\n}\n\nexport const UpdateAddressApiRequest = async (id: number, data: AddressModel) => {\n return await ApiRequest(UserAddressConstants.Update(id), RequestMethods.PUT, data);\n}\n\nexport const RemoveAddressApiRequest = async (id: number) => {\n return await ApiRequest(UserAddressConstants.Delete(id), RequestMethods.DELETE);\n}\n\nexport const CalculateAddressApiRequest = async (data: any) => {\n return await ApiRequest(UserAddressConstants.CalculateDeliveryPrice, RequestMethods.POST, data);\n}","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport {getCurrentLang} from \"./services/StorageService.tsx\";\nimport i18nBackend from \"i18next-http-backend\";\nimport {constants} from \"./general/constants.tsx\";\n\nconst host = constants.APP_BASE_URL + import.meta.env.MODE === \"development\" ? ':5172' : '';\n\ni18n\n .use(i18nBackend)\n .use(initReactI18next).init({\n lng: getCurrentLang(),\n fallbackLng: \"fa\",\n\n interpolation: {\n escapeValue: false,\n },\n backend: {\n loadPath: `${host}/languages/{{lng}}.json?v=${constants.APP_VERSION}`\n }\n});\n\nexport default i18n;"],"file":"assets/entry-index.865954f3.js"}