create a 20 slide downloadable powerpoint presentation according to the topics in the pdf including images
cd /home/daytona/workspace && python3 -c " import pdfplumber with pdfplumber.open('attachments/cec08ce8-4a5b-4b93-b4c7-cd36318efa47/Edc from uptodate.PDF') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- Page {i+1} ---') print(text[:2000]) print() "
endocrine disrupting chemicals BPA phthalates molecular mechanism diagram
ls /home/daytona/workspace/ && ls /home/daytona/skills/shared/scripts/
endocrine disrupting chemicals health effects reproductive thyroid cancer infographic
ls /home/daytona/skills/shared/scripts/
mkdir -p /home/daytona/workspace/edc-presentation && ls /home/daytona/workspace/edc-presentation/
~/edc-presentation/create_pptx.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images as base64
const imageUrls = [
"https://www.researchgate.net/publication/353755907/figure/fig1/AS:11431281105459755@1670420979546/The-mechanism-of-action-of-endocrine-disrupting-chemicals-on-a-human-cell-a-Multiple.png",
"https://www.niehs.nih.gov/sites/default/files/health/assets/images/bpa_topic.jpg",
"https://www.ese-hormones.org/media/rhljmoxm/world-hormone-day-edc-graphic.jpg?rmode=max&width=500&height=500",
"https://www.researchgate.net/publication/291952062/figure/fig3/AS:322164738805770@1453821467600/A-schematic-mechanism-on-the-effects-of-phthalate-esters-and-organochlorines-on.png",
"https://www.env-health.org/wp-content/uploads/2020/03/Untitled-design-40.png",
];
let images = [];
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map((u) => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
images = JSON.parse(result);
console.log("Images fetched:", images.map((i) => ({ url: i.url, error: i.error, hasBase64: !!i.base64 })));
} catch (e) {
console.log("Image fetch error:", e.message);
}
const getImg = (idx) => {
if (images[idx] && !images[idx].error && images[idx].base64) {
return images[idx].base64;
}
return null;
};
// Color palette - dark teal/navy theme
const DARK = "0D2137"; // deep navy - dominant
const MID = "1A4A6E"; // mid blue
const ACCENT = "00B4D8"; // bright cyan accent
const LIGHT_BG = "EAF6FB"; // very light blue bg
const WHITE = "FFFFFF";
const YELLOW = "FFD166";
const ORANGE = "EF6C35";
const GREEN_ACCENT = "06D6A0";
const TEXT_DARK = "0D2137";
const GRAY_LIGHT = "D9EBF5";
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Medical Education";
pres.title = "Endocrine-Disrupting Chemicals (EDCs)";
// ─────────────────────────────────────────────
// HELPER: section label strip at top
function addSectionLabel(slide, label) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: 0.42,
fill: { color: ACCENT },
});
slide.addText(label.toUpperCase(), {
x: 0.3, y: 0, w: 9.4, h: 0.42,
fontSize: 10, bold: true, color: DARK,
valign: "middle", charSpacing: 3, margin: 0,
});
}
function addFooter(slide) {
slide.addText("Source: UpToDate – Endocrine-Disrupting Chemicals | Hall JM, Korach KS, Hall JE | Updated Mar 2026", {
x: 0, y: 5.35, w: "100%", h: 0.28,
fontSize: 7, color: "888888", align: "center", italic: true,
});
}
// ─────────────────────────────────────────────
// SLIDE 1: TITLE SLIDE
{
let s = pres.addSlide();
// Full dark background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
// Accent bar left
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: "100%", fill: { color: ACCENT } });
// Accent bar bottom
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.9, w: "100%", h: 0.73, fill: { color: MID } });
s.addText("ENDOCRINE-DISRUPTING", {
x: 0.5, y: 0.7, w: 9, h: 0.9,
fontSize: 38, bold: true, color: ACCENT, fontFace: "Calibri",
charSpacing: 2,
});
s.addText("CHEMICALS (EDCs)", {
x: 0.5, y: 1.55, w: 9, h: 0.9,
fontSize: 38, bold: true, color: WHITE, fontFace: "Calibri",
charSpacing: 2,
});
s.addShape(pres.ShapeType.rect, { x: 0.5, y: 2.5, w: 4.5, h: 0.06, fill: { color: YELLOW } });
s.addText("A Comprehensive Clinical Review", {
x: 0.5, y: 2.7, w: 9, h: 0.5,
fontSize: 18, color: GRAY_LIGHT, fontFace: "Calibri", italic: true,
});
s.addText("Mechanisms • Health Effects • Prevention Strategies", {
x: 0.5, y: 3.25, w: 9, h: 0.4,
fontSize: 13, color: ACCENT, fontFace: "Calibri",
});
s.addText("Based on UpToDate Clinical Topic | Authors: Hall, Korach & Hall | Updated March 2026", {
x: 0.5, y: 5.0, w: 9, h: 0.35,
fontSize: 9.5, color: GRAY_LIGHT, italic: true,
});
const img1 = getImg(0);
if (img1) {
s.addImage({ data: img1, x: 7.0, y: 1.0, w: 2.8, h: 2.4 });
}
}
// ─────────────────────────────────────────────
// SLIDE 2: TABLE OF CONTENTS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: LIGHT_BG } });
addSectionLabel(s, "Overview");
s.addText("Presentation Outline", {
x: 0.4, y: 0.55, w: 9.2, h: 0.65,
fontSize: 26, bold: true, color: DARK, fontFace: "Calibri",
});
const topics = [
["01", "Introduction & Historical Context"],
["02", "Types of EDCs & Sources"],
["03", "Molecular Mechanisms of Action"],
["04", "Human Exposure Routes & Detection"],
["05", "Effects on Children & Puberty"],
["06", "Effects on Female Reproduction"],
["07", "Effects on Male Reproduction"],
["08", "Hormone-Related Cancers"],
["09", "Effects on Nonreproductive Systems"],
["10", "Prevention Strategies & Summary"],
];
topics.forEach(([num, text], i) => {
const col = i < 5 ? 0 : 1;
const row = i < 5 ? i : i - 5;
const x = col === 0 ? 0.4 : 5.1;
const y = 1.35 + row * 0.76;
s.addShape(pres.ShapeType.rect, {
x, y: y - 0.02, w: 0.5, h: 0.52,
fill: { color: ACCENT },
line: { color: ACCENT },
});
s.addText(num, {
x, y: y - 0.02, w: 0.5, h: 0.52,
fontSize: 13, bold: true, color: DARK, align: "center", valign: "middle", margin: 0,
});
s.addShape(pres.ShapeType.rect, {
x: x + 0.5, y: y - 0.02, w: 4.2, h: 0.52,
fill: { color: MID },
});
s.addText(text, {
x: x + 0.55, y: y - 0.02, w: 4.1, h: 0.52,
fontSize: 12, color: WHITE, valign: "middle", margin: 0,
});
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 3: INTRODUCTION
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "Introduction");
s.addText("What Are Endocrine-Disrupting Chemicals?", {
x: 0.4, y: 0.55, w: 9.2, h: 0.65,
fontSize: 24, bold: true, color: DARK,
});
// Definition box
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.3, w: 9.2, h: 1.0, fill: { color: MID }, line: { color: MID } });
s.addText([
{ text: "Definition: ", options: { bold: true, color: YELLOW } },
{ text: "Exogenous agents that disrupt normal endocrine physiology by interfering with hormone synthesis, metabolism, and/or cellular actions.", options: { color: WHITE } }
], { x: 0.5, y: 1.3, w: 9.0, h: 1.0, fontSize: 13, valign: "middle" });
const bullets = [
"Over 1,000 individual EDCs have been identified worldwide (source: The Endocrine Disruptor Exchange - TEDX)",
"Found in air, water, soil, household products, personal care items, and medical devices - making them ubiquitous",
"Can cross the placenta - implicated in developmental origins of obesity, diabetes, and infertility",
"Rising rates of diabetes, cancer, and infertility over the past 2-3 decades may be partly attributable to EDC exposure",
"First gained attention from high-level industrial contamination effects on wildlife (fish, birds, aquatic animals)",
];
s.addText(
bullets.map((b, i) => [
{ text: ` ${b}`, options: { bullet: { indent: 15 }, breakLine: i < bullets.length - 1, color: TEXT_DARK, fontSize: 12.5 } }
]).flat(),
{ x: 0.4, y: 2.4, w: 9.2, h: 2.7, valign: "top" }
);
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 4: TYPES OF EDCs
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Types of EDCs");
s.addText("Categories of Endocrine-Disrupting Chemicals", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
const categories = [
{ title: "Plant-Derived\n(Phytoestrogens)", examples: "Genistein, Daidzein\nFlaxseed, Soy, Legumes", color: GREEN_ACCENT },
{ title: "Industrial\nChemicals", examples: "Pesticides, PFAS, PCBs\nDioxins, PAHs", color: ORANGE },
{ title: "Household &\nPersonal Care", examples: "Cosmetics, Sunscreens\nHair relaxers, BPA plastics", color: ACCENT },
{ title: "Medical\nSupplies", examples: "IV tubing, Gloves\nPlastic bags (BPA, phthalates)", color: YELLOW },
{ title: "Pharmaceuticals", examples: "DES (diethylstilbestrol)\nSynthetic steroids, Estradiol", color: "#E040FB" },
];
categories.forEach((cat, i) => {
const x = 0.3 + i * 1.88;
s.addShape(pres.ShapeType.rect, { x, y: 1.35, w: 1.72, h: 3.6, fill: { color: MID }, line: { color: cat.color, w: 2.5 } });
s.addShape(pres.ShapeType.rect, { x, y: 1.35, w: 1.72, h: 0.55, fill: { color: cat.color } });
s.addText(`0${i + 1}`, { x, y: 1.35, w: 1.72, h: 0.55, fontSize: 18, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addText(cat.title, { x, y: 1.9, w: 1.72, h: 0.8, fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle" });
s.addShape(pres.ShapeType.line, { x: x + 0.15, y: 2.72, w: 1.42, h: 0, line: { color: cat.color, w: 1.5 } });
s.addText(cat.examples, { x, y: 2.8, w: 1.72, h: 1.8, fontSize: 10.5, color: GRAY_LIGHT, align: "center", valign: "top" });
});
s.addText("Note: Some EDCs appear in multiple categories", {
x: 0.4, y: 5.1, w: 9.2, h: 0.3, fontSize: 9, color: ACCENT, italic: true,
});
}
// ─────────────────────────────────────────────
// SLIDE 5: MOLECULAR MECHANISMS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: LIGHT_BG } });
addSectionLabel(s, "Molecular Mechanisms");
s.addText("How EDCs Disrupt Endocrine Function", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
const mechanisms = [
{
icon: "1",
title: "Classic Nuclear Receptor Pathway",
desc: "EDCs bind to ligand pockets of hormone receptors (ER, AR, PR, TR) to mimic or block cellular activities. Recruits coactivators/corepressors altering gene expression.",
color: ACCENT,
},
{
icon: "2",
title: "Nongenomic Receptor Signaling",
desc: "EDCs (BPA, Genistein) bind GPR30 transmembrane ER, triggering rapid non-nuclear signaling. Effective at picomolar-nanomolar concentrations found in human blood.",
color: YELLOW,
},
{
icon: "3",
title: "Epigenetic Modifications",
desc: "Developmental reprogramming via histone methylation and CpG DNA methylation. Changes induced prenatally can persist into adulthood and transmit to future generations.",
color: ORANGE,
},
{
icon: "4",
title: "Hormone Production & Transport",
desc: "EDCs alter synthesis and metabolism of endogenous hormones, disrupt peripheral transport to target tissues, and interfere with kisspeptin/GnRH signaling.",
color: GREEN_ACCENT,
},
];
mechanisms.forEach((m, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.3 : 5.1;
const y = 1.3 + row * 1.85;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.65, fill: { color: WHITE }, line: { color: m.color, w: 2 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h: 1.65, fill: { color: m.color } });
s.addText(m.icon, { x, y, w: 0.55, h: 1.65, fontSize: 20, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addText(m.title, { x: x + 0.6, y: y + 0.08, w: 3.85, h: 0.45, fontSize: 12.5, bold: true, color: DARK });
s.addText(m.desc, { x: x + 0.6, y: y + 0.5, w: 3.85, h: 1.05, fontSize: 10.5, color: TEXT_DARK });
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 6: HUMAN EXPOSURES
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Human Exposures");
s.addText("Routes of Exposure & Detection", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
// Key stat highlight
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 9.2, h: 0.9, fill: { color: ACCENT }, line: { color: ACCENT } });
s.addText([
{ text: "93%", options: { fontSize: 28, bold: true, color: DARK } },
{ text: " of urine samples in NHANES 2003-2004 (age ≥6) had detectable BPA levels — CDC", options: { fontSize: 13, color: DARK } }
], { x: 0.5, y: 1.25, w: 9.0, h: 0.9, valign: "middle" });
const routes = [
{ route: "Ingestion", detail: "Food, water, dust\nContaminated seafood, produce" },
{ route: "Inhalation", detail: "Gases, airborne particles\nRoadway & industrial pollution" },
{ route: "Skin Contact", detail: "Cosmetics, sunscreens\nTopical creams, lotions" },
{ route: "Placental\nTransfer", detail: "Prenatal exposure\nAmniotic fluid, cord blood" },
{ route: "Breast Milk", detail: "Postnatal transfer to\nnewborns and infants" },
];
routes.forEach((r, i) => {
const x = 0.3 + i * 1.88;
s.addShape(pres.ShapeType.rect, { x, y: 2.3, w: 1.72, h: 2.5, fill: { color: MID } });
s.addShape(pres.ShapeType.rect, { x, y: 2.3, w: 1.72, h: 0.6, fill: { color: YELLOW } });
s.addText(r.route, { x, y: 2.3, w: 1.72, h: 0.6, fontSize: 11, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addText(r.detail, { x, y: 2.9, w: 1.72, h: 1.85, fontSize: 10.5, color: WHITE, align: "center", valign: "top" });
});
s.addText("Many EDCs are lipophilic - accumulate in adipose tissue and are released into bloodstream over time. PFAS chemicals are ubiquitous in human blood worldwide.", {
x: 0.4, y: 4.95, w: 9.2, h: 0.4,
fontSize: 9.5, color: GRAY_LIGHT, italic: true,
});
}
// ─────────────────────────────────────────────
// SLIDE 7: EFFECTS ON CHILDREN
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "Reproductive Disorders — Children");
s.addText("EDC Effects in Children & Puberty", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 5.8, h: 3.8, fill: { color: LIGHT_BG }, line: { color: ACCENT, w: 1.5 } });
s.addText("Precocious Puberty", { x: 0.5, y: 1.35, w: 5.5, h: 0.45, fontSize: 15, bold: true, color: MID });
const childPoints = [
"Pubertal onset trending earlier in the US and developed countries",
"Higher phthalate serum levels found in girls from Puerto Rico with premature thelarche",
"High p,p'-DDE (DDT metabolite) levels in immigrant girls in Belgium with sexual precocity",
"BPA and tributyltin (TBT) can promote neuroinflammation, disrupting appetite regulation and reproductive maturation",
"Lavender & tea tree oils (weak estrogen/anti-androgen) linked to gynecomastia in prepubertal males and premature thelarche in girls",
"Feminization & virilization from inadvertent topical estrogen/androgen exposure (creams, sprays)",
];
s.addText(
childPoints.map((p, i) => ({ text: p, options: { bullet: { indent: 12 }, breakLine: i < childPoints.length - 1, fontSize: 11.5, color: TEXT_DARK } })),
{ x: 0.5, y: 1.85, w: 5.5, h: 3.1, valign: "top" }
);
// Side panel
s.addShape(pres.ShapeType.rect, { x: 6.35, y: 1.25, w: 3.2, h: 1.4, fill: { color: MID } });
s.addText("Critical Windows", { x: 6.45, y: 1.3, w: 3.0, h: 0.4, fontSize: 13, bold: true, color: ACCENT });
s.addText("Prenatal\nPerinatal\nNeonatal\nPuberty", { x: 6.45, y: 1.7, w: 3.0, h: 0.9, fontSize: 12, color: WHITE });
s.addShape(pres.ShapeType.rect, { x: 6.35, y: 2.8, w: 3.2, h: 2.2, fill: { color: ORANGE }, line: { color: ORANGE } });
s.addText("No Safe Dose", { x: 6.45, y: 2.85, w: 3.0, h: 0.4, fontSize: 13, bold: true, color: WHITE });
s.addText("EDCs frequently do not show traditional dose-response. Effects seen at very low exposures during critical developmental windows.", {
x: 6.45, y: 3.3, w: 3.0, h: 1.6, fontSize: 10.5, color: WHITE,
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 8: FEMALE REPRODUCTIVE EFFECTS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: LIGHT_BG } });
addSectionLabel(s, "Female Reproductive Disorders");
s.addText("EDC Effects on Female Reproduction", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
const conditions = [
{
name: "PCOS",
detail: "Higher BPA serum levels in women with PCOS; BPA correlates with hyperandrogenemia and insulin resistance",
color: ACCENT,
},
{
name: "Endometriosis",
detail: "Dioxins & other EDCs associated with endometriosis; alter immune-mediated ERα and IL-6 signaling",
color: ORANGE,
},
{
name: "Uterine Fibroids",
detail: "DES in utero exposure elevates fibroid risk; epigenetic hypersensitization of estrogen-responsive genes",
color: YELLOW,
},
{
name: "Ovarian / Fertility",
detail: "BPA, phthalates, PCBs deplete primordial follicles and disrupt folliculogenesis; impaired IVF implantation",
color: GREEN_ACCENT,
},
];
conditions.forEach((c, i) => {
const y = 1.3 + i * 0.92;
s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 0.6, h: 0.75, fill: { color: c.color } });
s.addText(String(i + 1), { x: 0.4, y, w: 0.6, h: 0.75, fontSize: 20, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 1.1, y, w: 8.5, h: 0.75, fill: { color: WHITE }, line: { color: c.color, w: 2 } });
s.addText(c.name, { x: 1.2, y: y + 0.05, w: 1.5, h: 0.35, fontSize: 13, bold: true, color: c.color === YELLOW ? MID : c.color });
s.addText(c.detail, { x: 1.2, y: y + 0.38, w: 8.2, h: 0.32, fontSize: 10.5, color: TEXT_DARK });
});
// DES box
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 5.0, w: 9.2, h: 0.45, fill: { color: MID } });
s.addText("DES Legacy: Diethylstilbestrol (DES) daughters show increased uterine fibroids, vaginal adenosis, cervical sarcoma, and 2.1x greater breast cancer incidence at age ≥40", {
x: 0.5, y: 5.0, w: 9.0, h: 0.45, fontSize: 10, color: WHITE, valign: "middle",
});
}
// ─────────────────────────────────────────────
// SLIDE 9: MALE REPRODUCTIVE EFFECTS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Male Reproductive Disorders");
s.addText("EDC Effects on Male Reproduction", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
// TDS box
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 9.2, h: 0.85, fill: { color: ACCENT } });
s.addText([
{ text: "Testicular Dysgenesis Syndrome (TDS): ", options: { bold: true, color: DARK, fontSize: 13 } },
{ text: "Triad of (1) altered fetal reproductive development, (2) decreased semen quality, and (3) testicular germ cell cancer (TGCC) — all sharing a common environmental-genetic pathway.", options: { color: DARK, fontSize: 12 } }
], { x: 0.5, y: 1.25, w: 9.0, h: 0.85, valign: "middle" });
const chemicals = [
{ chem: "DDT / DDE", effect: "Decreased semen volume, sperm concentration, motility & morphology — especially in Mexico, South Africa where DDT still used", color: ORANGE },
{ chem: "BPA", effect: "Correlates with decline in multiple sperm quality parameters; activates nongenomic estrogen signaling (GPR30) at nM concentrations in human serum", color: ACCENT },
{ chem: "Phthalates", effect: "Anti-androgenic activity; suppresses LH, FSH, testosterone, and inhibin B; effects may reverse after exposure removal (except with >3 years high exposure)", color: YELLOW },
{ chem: "PCBs", effect: "PCB concentration inversely proportional to semen quality and sperm motility in adult males; persistent in environment since ban", color: GREEN_ACCENT },
];
chemicals.forEach((c, i) => {
const x = i < 2 ? 0.4 : 5.05;
const y = i < 2 ? 2.25 + i * 1.35 : 2.25 + (i - 2) * 1.35;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.45, h: 1.2, fill: { color: MID }, line: { color: c.color, w: 2 } });
s.addText(c.chem, { x: x + 0.1, y: y + 0.07, w: 4.2, h: 0.35, fontSize: 13, bold: true, color: c.color });
s.addText(c.effect, { x: x + 0.1, y: y + 0.42, w: 4.2, h: 0.7, fontSize: 10.5, color: WHITE });
});
s.addText("Undescended testes positively correlated with pesticide levels in adipose tissue of surgical patients (organochlorides)", {
x: 0.4, y: 4.98, w: 9.2, h: 0.35, fontSize: 9.5, color: GRAY_LIGHT, italic: true,
});
}
// ─────────────────────────────────────────────
// SLIDE 10: HORMONE-RELATED CANCERS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "Hormone-Related Cancers");
s.addText("EDCs & Cancer Risk", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
const cancers = [
{
type: "Breast Cancer",
key: [
"DES daughters (age ≥40): 2.1x greater breast cancer incidence",
"In utero DDT exposure linked to ~4x increase in daughters' breast cancer risk",
"Hair dyes & straighteners associated with increased risk, especially in African American women",
],
color: ORANGE,
},
{
type: "Testicular Cancer (TGCC)",
key: [
"Rising incidence observed over past decades worldwide",
"Persistent organochloride pesticide levels correlate with TGCC risk",
"Shares developmental pathway with TDS (fetal testis dysgenesis)",
],
color: ACCENT,
},
{
type: "Endometrial & Ovarian",
key: [
"Hair straightener chemicals (phenols, phthalates, parabens, cyclosiloxanes) associated with increased risk",
"EDCs promote ovarian cancer growth via ER-CXCL12-CXCR4 signaling axis",
],
color: YELLOW,
},
{
type: "Prostate Cancer",
key: [
"Methyl bromide (fungicide) and 6 pesticides: direct, significant correlation with prostate cancer incidence",
"BPA promotes prostate stem-progenitor cell self-renewal and carcinogenesis",
"Oral contraceptive use by mothers correlated with prostate cancer in male offspring",
],
color: GREEN_ACCENT,
},
];
cancers.forEach((c, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.3 : 5.1;
const y = 1.3 + row * 2.05;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.85, fill: { color: LIGHT_BG }, line: { color: c.color, w: 2.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 0.42, fill: { color: c.color } });
s.addText(c.type, { x: x + 0.08, y, w: 4.4, h: 0.42, fontSize: 13, bold: true, color: DARK, valign: "middle", margin: 0 });
s.addText(
c.key.map((k, ki) => ({ text: k, options: { bullet: { indent: 10 }, breakLine: ki < c.key.length - 1, fontSize: 10.5, color: TEXT_DARK } })),
{ x: x + 0.08, y: y + 0.48, w: 4.38, h: 1.32, valign: "top" }
);
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 11: OBESITY & DIABETES
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Nonreproductive Effects — Metabolic");
s.addText("EDCs, Obesity & Diabetes Mellitus", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
const metPoints = [
{ stat: "54,000", label: "estimated cases of obesity in older European women linked to phthalate exposure", color: ORANGE },
{ stat: "BPA", label: "linked to insulin resistance, T2DM in reproductive-age and pregnant women; elevates Th-17 immune cells", color: ACCENT },
{ stat: "PFAS", label: "associated with childhood and adolescent obesity; a particular area of recent research concern", color: YELLOW },
{ stat: "PCBs &\nPFAS", label: "associated with metabolic dysfunction-associated steatotic liver disease (MASLD) — affects 30-40% of the world population", color: GREEN_ACCENT },
];
metPoints.forEach((p, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.4 : 5.1;
const y = 1.35 + row * 1.7;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.45, h: 1.5, fill: { color: MID }, line: { color: p.color, w: 2.5 } });
s.addText(p.stat, { x: x + 0.1, y: y + 0.1, w: 4.2, h: 0.55, fontSize: 22, bold: true, color: p.color });
s.addText(p.label, { x: x + 0.1, y: y + 0.65, w: 4.2, h: 0.75, fontSize: 11, color: WHITE });
});
s.addText("'Chemical Obesogens' — a term coined for pro-adipogenic EDCs that promote fat cell development and metabolic disruption", {
x: 0.4, y: 4.9, w: 9.2, h: 0.45, fontSize: 10, color: ACCENT, italic: true, align: "center",
});
}
// ─────────────────────────────────────────────
// SLIDE 12: CARDIOVASCULAR & RESPIRATORY
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "Nonreproductive Effects — Cardiovascular & Respiratory");
s.addText("Cardiovascular & Respiratory Effects", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
// Left: CV
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.65, h: 3.7, fill: { color: LIGHT_BG }, line: { color: ORANGE, w: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.65, h: 0.45, fill: { color: ORANGE } });
s.addText("Cardiovascular Health", { x: 0.5, y: 1.25, w: 4.45, h: 0.45, fontSize: 14, bold: true, color: WHITE, valign: "middle", margin: 0 });
const cvPoints = [
"Children of mothers with high 2nd-trimester BPA → significantly higher diastolic BP at age 4",
"Meta-analysis of 33 studies: BPA linked to increased coronary artery disease and hypertension risk",
"Serum BPA may predict chronic kidney disease progression in primary hypertension",
"Phytoestrogens may exert cardioprotective effects; lower CVD incidence in high phytoestrogen-consuming populations",
];
s.addText(
cvPoints.map((p, i) => ({ text: p, options: { bullet: { indent: 12 }, breakLine: i < cvPoints.length - 1, fontSize: 11, color: TEXT_DARK } })),
{ x: 0.5, y: 1.78, w: 4.45, h: 3.05, valign: "top" }
);
// Right: Respiratory
s.addShape(pres.ShapeType.rect, { x: 5.25, y: 1.25, w: 4.35, h: 3.7, fill: { color: LIGHT_BG }, line: { color: ACCENT, w: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.25, y: 1.25, w: 4.35, h: 0.45, fill: { color: ACCENT } });
s.addText("Respiratory Disease", { x: 5.35, y: 1.25, w: 4.15, h: 0.45, fontSize: 14, bold: true, color: DARK, valign: "middle", margin: 0 });
const respPoints = [
"Analysis of 200+ commercial products found 50+ EDCs associated with asthma (BPA, phthalates, benzophenone-3)",
"PVC (polyvinyl chloride) associated with asthma and respiratory symptoms",
"PVC used in pipes, floors, doors, windows — exposure is ubiquitous",
"Household cleansers, soaps, cosmetics contain agents with adverse respiratory effects",
];
s.addText(
respPoints.map((p, i) => ({ text: p, options: { bullet: { indent: 12 }, breakLine: i < respPoints.length - 1, fontSize: 11, color: TEXT_DARK } })),
{ x: 5.35, y: 1.78, w: 4.15, h: 3.05, valign: "top" }
);
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 13: NEUROLOGICAL EFFECTS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Nonreproductive Effects — Neurological");
s.addText("EDCs & Neurological / Brain Development", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
const neuroData = [
{ disorder: "ADHD", finding: "Cohort of 205 adolescents: higher urinary phthalates → increased ADHD-related behaviors (JAMA Network Open 2020)", color: ACCENT },
{ disorder: "Autism (ASD)", finding: "Agriculture pesticide proximity in utero → 6x increased ASD risk (Central California Valley). Road proximity also linked.", color: ORANGE },
{ disorder: "Cognitive Deficits", finding: "PELAGIE cohort: in utero glycol ether exposure → neurocognitive deficits in 6-year-olds. PCBs linked to lower IQ.", color: YELLOW },
{ disorder: "Academic Performance", finding: "BPA, phthalates, other EDC exposures associated with lower grade-point averages in children", color: GREEN_ACCENT },
{ disorder: "Social Impairment", finding: "Mount Sinai study (n=404): prenatal phthalate exposure associated with childhood social impairment", color: "#E040FB" },
{ disorder: "Behavioral Issues", finding: "Pyrethroid insecticide exposure linked to cognitive disabilities and behavioral disorders in 6-year-old children (PELAGIE)", color: GRAY_LIGHT },
];
neuroData.forEach((n, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.4 : 5.1;
const y = 1.3 + row * 1.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.45, h: 1.1, fill: { color: MID }, line: { color: n.color, w: 2 } });
s.addText(n.disorder, { x: x + 0.1, y: y + 0.05, w: 4.2, h: 0.38, fontSize: 13, bold: true, color: n.color });
s.addText(n.finding, { x: x + 0.1, y: y + 0.43, w: 4.2, h: 0.6, fontSize: 9.8, color: WHITE });
});
s.addText("Increase in cognitive, psychiatric & behavioral disorders over past decades raises concern about EDC neurotoxicity", {
x: 0.4, y: 5.12, w: 9.2, h: 0.25, fontSize: 9, color: ACCENT, italic: true,
});
}
// ─────────────────────────────────────────────
// SLIDE 14: THYROID DISEASE
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "Nonreproductive Effects — Thyroid");
s.addText("EDCs & Thyroid Disruption", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 9.2, h: 0.75, fill: { color: MID } });
s.addText("Thyroid hormones are essential for normal development. Even transient/mild fluctuations in maternal or fetal thyroid hormones cause impaired neurodevelopment in offspring.", {
x: 0.5, y: 1.25, w: 9.0, h: 0.75, fontSize: 12, color: WHITE, valign: "middle",
});
const thyroidItems = [
{ agent: "PBDEs (Flame Retardants)", effect: "Associated with hypothyroidism (prevalence ratio 1.7, 95% CI 1-3)", mech: "Structural thyroid hormone mimicry" },
{ agent: "Perchlorate", effect: "Inhibits iodide transporter → impairs T3/T4 biosynthesis; found in drinking water and leafy vegetables", mech: "NIS transporter inhibition" },
{ agent: "Phthalates", effect: "Higher urinary phthalate concentrations correlated with elevated TSH levels in multiple human studies", mech: "Disrupts thyroid transport proteins" },
{ agent: "PFAS Chemicals", effect: "Associated with abnormal thyroid function in infants, children, and adults; may alter thyroid autoimmunity", mech: "Disrupts synthesis & possibly autoimmunity" },
];
thyroidItems.forEach((item, i) => {
const y = 2.15 + i * 0.78;
s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 2.8, h: 0.65, fill: { color: ACCENT } });
s.addText(item.agent, { x: 0.5, y, w: 2.7, h: 0.65, fontSize: 11.5, bold: true, color: DARK, valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 3.3, y, w: 3.9, h: 0.65, fill: { color: LIGHT_BG }, line: { color: ACCENT, w: 1 } });
s.addText(item.effect, { x: 3.4, y, w: 3.7, h: 0.65, fontSize: 10.5, color: TEXT_DARK, valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 7.3, y, w: 2.3, h: 0.65, fill: { color: MID } });
s.addText(item.mech, { x: 7.4, y, w: 2.1, h: 0.65, fontSize: 10, color: WHITE, valign: "middle", italic: true });
});
s.addText("EDCs disrupt thyroid function via: hormone biosynthesis, transport, metabolism, and thyroid hormone receptor (TR) activity", {
x: 0.4, y: 5.25, w: 9.2, h: 0.28, fontSize: 9.5, color: ACCENT, italic: true,
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 15: EPIGENETICS & TRANSGENERATIONAL
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Epigenetics & Transgenerational Inheritance");
s.addText("Epigenetic Effects & Multigenerational Impact", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 9.2, h: 0.8, fill: { color: ACCENT } });
s.addText("Developmental Reprogramming: Alterations in the epigenome occurring during the prenatal and early postnatal periods that can persist into adulthood and transmit to future generations", {
x: 0.5, y: 1.25, w: 9.0, h: 0.8, fontSize: 12, color: DARK, valign: "middle",
});
// Timeline-style flow
const epigenetics = [
{ title: "DES Legacy", body: "In utero DES exposure → significant reproductive abnormalities and rare cancers in offspring. A landmark example of transgenerational EDC harm.", color: ORANGE },
{ title: "Prostate Reprogramming", body: "BPA and estradiol benzoate cause DNA methylome changes linking early-life EDC exposure to prostate cancer risk (via MLL1 epigenetic remodeling)", color: ACCENT },
{ title: "Uterine Fibroids", body: "DES and genistein alter histone methylation patterns → estrogen-responsive genes in the adult myometrium become hyper-responsive to hormones", color: YELLOW },
{ title: "Obesity Epigenetics", body: "PAH exposure in utero → altered methylation of PPAR-gamma (primary regulator of adipogenesis) → increased obesity risk", color: GREEN_ACCENT },
{ title: "Sperm Epimutations", body: "BPA, DEHP, and DBP (plastics) induce transgenerational inheritance of obesity, reproductive disease, and sperm epimutations (Manikkam et al., PLoS One 2013)", color: "#E040FB" },
{ title: "Immune Reprogramming", body: "Very low BPA doses increase T17 immune cells — associated with pathogenesis of obesity and autoimmune diseases", color: GRAY_LIGHT },
];
epigenetics.forEach((ep, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.4 : 5.1;
const y = 2.2 + row * 1.05;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.45, h: 0.88, fill: { color: MID }, line: { color: ep.color, w: 2 } });
s.addText(ep.title, { x: x + 0.1, y: y + 0.04, w: 4.2, h: 0.3, fontSize: 12, bold: true, color: ep.color });
s.addText(ep.body, { x: x + 0.1, y: y + 0.34, w: 4.2, h: 0.5, fontSize: 9.5, color: WHITE });
});
}
// ─────────────────────────────────────────────
// SLIDE 16: KEY EDCs SPOTLIGHT — BPA
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "EDC Spotlight — Bisphenol A (BPA)");
s.addText("Bisphenol A (BPA): Key Facts", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
// Large stat
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 2.5, h: 3.9, fill: { color: MID } });
s.addText("93%", { x: 0.4, y: 1.4, w: 2.5, h: 1.0, fontSize: 42, bold: true, color: ACCENT, align: "center" });
s.addText("of Americans\nhave detectable\nBPA in urine\n(NHANES)", { x: 0.4, y: 2.4, w: 2.5, h: 1.5, fontSize: 12, color: WHITE, align: "center" });
s.addShape(pres.ShapeType.line, { x: 0.6, y: 3.92, w: 2.1, h: 0, line: { color: ACCENT, w: 1 } });
s.addText("BPA detected in amniotic\nfluid, cord blood,\nbreast milk, fetal serum", { x: 0.4, y: 4.0, w: 2.5, h: 1.0, fontSize: 10, color: GRAY_LIGHT, align: "center" });
const bpaEffects = [
{ title: "Reproductive", body: "Ovarian cysts, IVF implantation failure, PCOS hyperandrogenism, uterine polyps, mammary adenocarcinoma (animal models)" },
{ title: "Metabolic", body: "Insulin resistance, type 2 diabetes risk, waist circumference, childhood and adult obesity via Th-17 immune activation" },
{ title: "Cardiovascular", body: "Higher diastolic BP in children, increased CAD and hypertension risk, CKD progression predictor" },
{ title: "Neurodevelopmental", body: "Lower grade-point averages in children, behavioral disorders; activates nongenomic ER signaling at picomolar-nanomolar concentrations" },
];
bpaEffects.forEach((e, i) => {
const y = 1.25 + i * 0.98;
s.addShape(pres.ShapeType.rect, { x: 3.1, y, w: 6.5, h: 0.85, fill: { color: LIGHT_BG }, line: { color: ACCENT, w: 1.5 } });
s.addShape(pres.ShapeType.rect, { x: 3.1, y, w: 1.4, h: 0.85, fill: { color: ACCENT } });
s.addText(e.title, { x: 3.1, y, w: 1.4, h: 0.85, fontSize: 12, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addText(e.body, { x: 4.58, y: y + 0.05, w: 4.95, h: 0.75, fontSize: 10.5, color: TEXT_DARK, valign: "middle" });
});
s.addText("EU Food Safety Authority: recommended 20,000-fold reduction in tolerable daily BPA intake → essentially banning BPA in food packaging", {
x: 0.4, y: 5.2, w: 9.2, h: 0.3, fontSize: 9.5, color: ORANGE, italic: true,
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 17: KEY EDCs SPOTLIGHT — PFAS, PCBs, Pesticides
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "EDC Spotlight — PFAS, PCBs & Pesticides");
s.addText("PFAS, PCBs & Pesticides: Persistent Threats", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
const persistents = [
{
name: "PFAS\n(Per/Polyfluoroalkyl Substances)",
subtitle: '"Forever Chemicals"',
points: [
"Ubiquitous in human blood worldwide",
"Thyroid disruption in infants, children, adults",
"Associated with childhood obesity",
"MASLD (liver disease) risk",
"Disrupts breastfeeding (reduces prolactin)",
"Drinking water contamination — filter with NSF/ANSI certified filters",
],
color: ACCENT,
},
{
name: "PCBs\n(Polychlorinated Biphenyls)",
subtitle: "Banned in US 1978, globally 2004",
points: [
"Still persist in soil and sediment worldwide",
"Accumulate in fatty tissue of seafood and livestock",
"Longer menstrual cycles, reduced fertility",
"Linked to TGCC, testicular cancer",
"Associated with MASLD, lower IQ in exposed children",
"Main route: fatty food consumption",
],
color: YELLOW,
},
{
name: "Pesticides\n(DDT, Organochlorides, etc.)",
subtitle: "DDT still used in parts of Africa, Asia, South America",
points: [
"DDT: decreased semen quality in exposed men",
"Trichlorfon: 73% congenital anomaly rate in contaminated fish study",
"6 pesticides directly correlated with prostate cancer incidence",
"In utero proximity to agricultural pesticides → 6x ASD risk",
"Linked to precocious puberty in girls",
"Reduce with baking soda wash or peeling produce",
],
color: ORANGE,
},
];
persistents.forEach((p, i) => {
const x = 0.3 + i * 3.22;
s.addShape(pres.ShapeType.rect, { x, y: 1.25, w: 3.0, h: 3.95, fill: { color: MID }, line: { color: p.color, w: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 1.25, w: 3.0, h: 0.6, fill: { color: p.color } });
s.addText(p.name, { x: x + 0.05, y: 1.25, w: 2.9, h: 0.6, fontSize: 11.5, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addText(p.subtitle, { x: x + 0.05, y: 1.88, w: 2.9, h: 0.3, fontSize: 9.5, color: p.color, align: "center", italic: true });
s.addText(
p.points.map((pt, pi) => ({ text: pt, options: { bullet: { indent: 10 }, breakLine: pi < p.points.length - 1, fontSize: 10, color: WHITE } })),
{ x: x + 0.08, y: 2.2, w: 2.85, h: 2.85, valign: "top" }
);
});
}
// ─────────────────────────────────────────────
// SLIDE 18: PREVENTION — SPECIFIC STRATEGIES
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: WHITE } });
addSectionLabel(s, "Prevention of EDC Exposure");
s.addText("Prevention Strategies for Clinicians & Patients", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: DARK,
});
const strategies = [
{ icon: "BPA", tip: "Use BPA-free labeled products; store food in glass. Especially important for infants, children, and pregnant women.", color: ACCENT },
{ icon: "H₂O", tip: "Filter drinking water (NSF/ANSI certified filters). Test well water annually. Extra caution during pregnancy for perchlorate and PFAS.", color: MID },
{ icon: "SUN", tip: "Use mineral-based sunscreens (titanium dioxide, zinc oxide). Avoid oxybenzone (benzophenone/BP-3) — it is an EDC with substantial systemic absorption.", color: YELLOW },
{ icon: "FOOD", tip: "Minimize plastic in food prep/storage. Soak produce 15 min in baking soda solution or peel. Avoid high-EDC coastal European seafood.", color: GREEN_ACCENT },
{ icon: "PFTHA", tip: "Reduce phthalate exposure: use filtered water, avoid fragrance-containing products, choose phthalate-free cosmetics and detergents.", color: ORANGE },
{ icon: "KIDS", tip: "Avoid lavender and tea tree oils for infants/children/adolescents. Consult pediatrician before using topical products on children.", color: "#E040FB" },
{ icon: "DIOX", tip: "Replace bleached paper products (diapers, paper towels, tissues) with unbleached or cloth alternatives to minimize dioxin exposure.", color: GRAY_LIGHT },
{ icon: "PREG", tip: "During pregnancy: BPA-free products, filtered water, mineral sunscreen, avoid hair relaxers/dyes — critical developmental windows for the fetus.", color: DARK },
];
strategies.forEach((str, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.4 : 5.1;
const y = 1.3 + row * 1.0;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.45, h: 0.85, fill: { color: LIGHT_BG }, line: { color: str.color, w: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.7, h: 0.85, fill: { color: str.color } });
s.addText(str.icon, { x, y, w: 0.7, h: 0.85, fontSize: 8, bold: true, color: str.color === YELLOW || str.color === GRAY_LIGHT ? DARK : WHITE, align: "center", valign: "middle", margin: 0 });
s.addText(str.tip, { x: x + 0.75, y: y + 0.05, w: 3.6, h: 0.75, fontSize: 9.8, color: TEXT_DARK, valign: "middle" });
});
addFooter(s);
}
// ─────────────────────────────────────────────
// SLIDE 19: REGULATORY LANDSCAPE
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
addSectionLabel(s, "Regulatory Framework & Endocrine Society Guidance");
s.addText("Regulatory Actions & Scientific Consensus", {
x: 0.4, y: 0.55, w: 9.2, h: 0.6,
fontSize: 24, bold: true, color: WHITE,
});
const regData = [
{
org: "Endocrine Society\nScientific Statement",
year: "EDC-2, 2015",
action: "Regulatory guidelines must evaluate safety considering endpoint choice and temporal/spatial aspects of exposure — not traditional toxicology thresholds",
color: ACCENT,
},
{
org: "European Union (REACH)",
year: "Active",
action: "Instituted ban on certain established EDC-containing products. EU EFSA recommended 20,000-fold reduction in BPA tolerable daily intake",
color: YELLOW,
},
{
org: "US FDA",
year: "2012–2013",
action: "BPA banned in infant feeding bottles, spill-proof cups (2012), and as coatings in packaging for infant formula (2013)",
color: ORANGE,
},
{
org: "US Consumer Product\nSafety Improvement Act",
year: "2008",
action: "DBP, DEHP, and BBP banned in children's toys at concentrations >0.1%",
color: GREEN_ACCENT,
},
{
org: "Stockholm Convention",
year: "2004",
action: "Worldwide ban on PCBs (following US ban in 1978). Despite ban, PCBs persist strongly in soil and sediment globally",
color: "#E040FB",
},
{
org: "WHO / UNEP\nState of the Science",
year: "2013",
action: "Comprehensive review of EDC evidence; highlighted rising cancer, reproductive disorder, and metabolic disease burden linked to environmental chemicals",
color: GRAY_LIGHT,
},
];
regData.forEach((r, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.4 : 5.1;
const y = 1.3 + row * 1.25;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.45, h: 1.1, fill: { color: MID }, line: { color: r.color, w: 2 } });
s.addText(r.org, { x: x + 0.1, y: y + 0.05, w: 3.5, h: 0.4, fontSize: 11, bold: true, color: r.color });
s.addText(r.year, { x: x + 3.65, y: y + 0.05, w: 0.7, h: 0.4, fontSize: 10, color: WHITE, align: "right" });
s.addText(r.action, { x: x + 0.1, y: y + 0.45, w: 4.25, h: 0.6, fontSize: 9.8, color: WHITE });
});
}
// ─────────────────────────────────────────────
// SLIDE 20: SUMMARY & KEY TAKEAWAYS
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK } });
// Decorative accent
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: "100%", fill: { color: ACCENT } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.85, w: "100%", h: 0.78, fill: { color: MID } });
s.addText("Key Takeaways", {
x: 0.45, y: 0.2, w: 9.1, h: 0.55,
fontSize: 28, bold: true, color: ACCENT, charSpacing: 2,
});
s.addText("Endocrine-Disrupting Chemicals — Summary", {
x: 0.45, y: 0.75, w: 9.1, h: 0.35,
fontSize: 14, color: WHITE, italic: true,
});
const takeaways = [
{ num: "01", text: "EDCs are exogenous agents disrupting hormone synthesis, metabolism, and action — over 1,000 identified, ubiquitous in environment", color: ACCENT },
{ num: "02", text: "No safe dose: effects occur at very low exposures, especially during critical developmental windows (prenatal, perinatal, puberty)", color: YELLOW },
{ num: "03", text: "Reproductive impacts in both sexes: PCOS, endometriosis, fibroids, TDS, decreased semen quality, infertility", color: ORANGE },
{ num: "04", text: "Cancer risk: breast, testicular, endometrial, ovarian, and prostate cancers linked to specific EDC exposures", color: GREEN_ACCENT },
{ num: "05", text: "Systemic effects: obesity, T2DM, cardiovascular disease, asthma, neurological/behavioral disorders, thyroid dysfunction", color: "#E040FB" },
{ num: "06", text: "Prevention is possible: BPA-free products, filtered water, mineral sunscreens, minimizing plastics, fresh produce washing", color: GRAY_LIGHT },
];
takeaways.forEach((t, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.4 : 5.1;
const y = 1.22 + row * 1.15;
s.addShape(pres.ShapeType.rect, { x, y, w: 0.52, h: 0.9, fill: { color: t.color } });
s.addText(t.num, { x, y, w: 0.52, h: 0.9, fontSize: 16, bold: true, color: DARK, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: x + 0.52, y, w: 3.93, h: 0.9, fill: { color: MID } });
s.addText(t.text, { x: x + 0.6, y: y + 0.05, w: 3.77, h: 0.8, fontSize: 10.8, color: WHITE, valign: "middle" });
});
s.addText("Source: UpToDate — Endocrine-Disrupting Chemicals | Hall JM, Korach KS, Hall JE | Last updated: March 2026", {
x: 0.45, y: 4.92, w: 9.1, h: 0.33,
fontSize: 9, color: GRAY_LIGHT, italic: true, align: "center",
});
}
// ─────────────────────────────────────────────
// Write file
pres.writeFile({ fileName: "/home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx" })
.then(() => console.log("Presentation saved successfully!"))
.catch(err => console.error("Error:", err));
cd /home/daytona/workspace/edc-presentation && node create_pptx.js 2>&1
~/edc-presentation/create_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/edc-presentation/create_pptx.js'
~/edc-presentation/create_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/edc-presentation/create_pptx.js'
cd /home/daytona/workspace/edc-presentation && timeout 90 node create_pptx.js 2>&1
cd /home/daytona/workspace/edc-presentation && ls -lh *.pptx
cd /home/daytona/workspace/edc-presentation && \ wget -q --timeout=20 --tries=2 -O img_mechanism.png "https://www.researchgate.net/publication/353755907/figure/fig1/AS:11431281105459755@1670420979546/The-mechanism-of-action-of-endocrine-disrupting-chemicals-on-a-human-cell-a-Multiple.png" && \ echo "mechanism img: $(ls -lh img_mechanism.png)" || echo "mechanism failed" wget -q --timeout=20 --tries=2 -O img_edc_health.jpg "https://www.ese-hormones.org/media/rhljmoxm/world-hormone-day-edc-graphic.jpg" && \ echo "edc health img: $(ls -lh img_edc_health.jpg)" || echo "edc health failed" wget -q --timeout=20 --tries=2 -O img_bpa.jpg "https://www.niehs.nih.gov/sites/default/files/health/assets/images/bpa_topic.jpg" && \ echo "bpa img: $(ls -lh img_bpa.jpg)" || echo "bpa failed" ls -lh img_*.* 2>/dev/null || echo "no images downloaded"
cd /home/daytona/workspace/edc-presentation && \ wget -q --timeout=20 --tries=2 -O img_pcos.jpg "https://www.endocrine.org/-/media/endocrine/images/patient-engagement-webpage/pdf-images-and-download-buttons/pdf-buttons/hormones-and-series/edcs_hs_button.jpg" && \ echo "endocrine img: $(ls -lh img_pcos.jpg)" || echo "endocrine failed" wget -q --timeout=25 --tries=2 -O img_infographic.png "https://www.env-health.org/wp-content/uploads/2020/03/FREIA-launch-v6-TW-2.png" && \ echo "infographic: $(ls -lh img_infographic.png)" || echo "infographic failed" ls -lh img_*.* 2>/dev/null
~/edc-presentation/add_images.js
const pptxgen = require("pptxgenjs");
const fs = require("fs");
const path = require("path");
// Read images as base64
function readImgAsBase64(filename) {
const fullPath = path.join(__dirname, filename);
if (!fs.existsSync(fullPath) || fs.statSync(fullPath).size === 0) return null;
const buf = fs.readFileSync(fullPath);
const ext = path.extname(filename).slice(1).toLowerCase();
const mime = ext === "png" ? "image/png" : "image/jpeg";
return `${mime};base64,${buf.toString("base64")}`;
}
const imgEDCHealth = readImgAsBase64("img_edc_health.jpg");
const imgBPA = readImgAsBase64("img_bpa.jpg");
const imgEndocrine = readImgAsBase64("img_pcos.jpg");
const imgInfographic = readImgAsBase64("img_infographic.png");
console.log("Images loaded:", {
edcHealth: !!imgEDCHealth,
bpa: !!imgBPA,
endocrine: !!imgEndocrine,
infographic: !!imgInfographic
});
// We'll re-create the presentation with images embedded on specific slides
// Load the existing pptx and add images using python-pptx instead
// Actually, re-generate with pptxgenjs adding images on targeted slides
// We need to add images to slides. Since we can't edit in-place with pptxgenjs,
// we'll create a standalone patch that generates a new file with images included.
// Use python-pptx to inject images into the existing file
const { execSync } = require("child_process");
const pythonScript = `
import sys
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
import base64
import io
prs = Presentation("/home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx")
def add_img_to_slide(slide_idx, img_path, left, top, width, height):
if slide_idx >= len(prs.slides):
return
slide = prs.slides[slide_idx]
try:
slide.shapes.add_picture(img_path, Inches(left), Inches(top), Inches(width), Inches(height))
print(f"Added image to slide {slide_idx + 1}")
except Exception as e:
print(f"Error adding image to slide {slide_idx + 1}: {e}")
# Slide 1 (index 0): Title slide - add EDC health graphic on right
add_img_to_slide(0, "/home/daytona/workspace/edc-presentation/img_edc_health.jpg", 7.1, 1.0, 2.7, 2.7)
# Slide 3 (index 2): Introduction - add endocrine button image
add_img_to_slide(2, "/home/daytona/workspace/edc-presentation/img_endocrine.jpg", 7.8, 1.3, 1.9, 2.7)
# Slide 16 (index 15): BPA spotlight - add BPA image
add_img_to_slide(15, "/home/daytona/workspace/edc-presentation/img_bpa.jpg", 0.35, 1.25, 2.5, 2.0)
# Slide 19 (index 18): Regulatory - add infographic
add_img_to_slide(18, "/home/daytona/workspace/edc-presentation/img_infographic.png", 8.3, 1.3, 1.5, 2.0)
prs.save("/home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx")
print("Saved successfully with images!")
`;
fs.writeFileSync("/home/daytona/workspace/edc-presentation/inject_images.py", pythonScript);
console.log("Python inject script written");
~/edc-presentation/inject_images.py
from pptx import Presentation
from pptx.util import Inches, Pt
import os
prs = Presentation("/home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx")
BASE = "/home/daytona/workspace/edc-presentation/"
def add_img(slide_idx, img_file, left, top, width, height):
img_path = os.path.join(BASE, img_file)
if slide_idx >= len(prs.slides):
print(f"Slide {slide_idx+1} out of range")
return
if not os.path.exists(img_path) or os.path.getsize(img_path) == 0:
print(f"Image not found or empty: {img_path}")
return
slide = prs.slides[slide_idx]
try:
slide.shapes.add_picture(img_path, Inches(left), Inches(top), Inches(width), Inches(height))
print(f"Added {img_file} to slide {slide_idx+1}")
except Exception as e:
print(f"Error adding {img_file} to slide {slide_idx+1}: {e}")
# Slide 1 (index 0) - Title: EDC world health day graphic, right side
add_img(0, "img_edc_health.jpg", 6.95, 0.95, 2.8, 2.8)
# Slide 6 (index 5) - Human Exposures: BPA/chemicals image
add_img(5, "img_bpa.jpg", 7.8, 2.3, 1.85, 1.85)
# Slide 15 (index 14) - Epigenetics: endocrine logo/concept
add_img(14, "img_pcos.jpg", 8.3, 3.8, 1.5, 1.5)
# Slide 17 (index 16) - PFAS/PCBs: infographic
add_img(16, "img_infographic.png", 0.38, 4.88, 9.2, 0.6)
# Slide 20 (index 19) - Summary: edc health image small
add_img(19, "img_edc_health.jpg", 8.5, 1.2, 1.3, 1.3)
prs.save("/home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx")
print(f"Total slides: {len(prs.slides)}")
print("Saved successfully with images!")
cd /home/daytona/workspace/edc-presentation && python3 inject_images.py 2>&1
pip install --user python-pptx --quiet 2>&1 | tail -3 && cd /home/daytona/workspace/edc-presentation && python3 inject_images.py 2>&1
what happened
EDC Endocrine Disrupting Chemicals
Presentation · PPTX
cant download
ls -lh /home/daytona/workspace/edc-presentation/ && echo "---" && ls -lh /home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx
cp /home/daytona/workspace/edc-presentation/EDC_Endocrine_Disrupting_Chemicals.pptx /home/daytona/workspace/EDC_Endocrine_Disrupting_Chemicals.pptx && ls -lh /home/daytona/workspace/EDC_Endocrine_Disrupting_Chemicals.pptx
EDC Endocrine Disrupting Chemicals
Presentation · PPTX