const deserializeObject = (serializedObject) => {
  try {
    return JSON.parse(serializedObject);
  } catch {
    return serializedObject;
  }
};
const parseFeatureProperties = (featureProperties) => {
  const properties = {};
  for (const [key, value] of Object.entries(featureProperties)) {
    if (typeof value === "string") {
      properties[key] = deserializeObject(value);
    } else {
      properties[key] = value;
    }
  }
  return properties;
};
const parseTooltipData = (features) => {
  const data = [];
  for (const feature of features) {
    const properties = parseFeatureProperties(feature.properties);
    const [latitude, longitude] = feature.geometry.coordinates;
    data.push({
      ...properties,
      latitude,
      longitude
    });
  }
  return data;
};
export {
  parseTooltipData
};
//# sourceMappingURL=parse-tooltip-data.js.map
