{"version":3,"file":"Article_Rich_Text.DAcAtiac.mjs","names":["p","useRef","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/VmlfxO2pS1BSf2kTTdf9/n3Y3aivUrwOyRlmFDkje/Article_Rich_Text.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";// ─────────────────────────────────────────────\n//  EQWIRE Article Custom CSS Shortcodes\n//  Usage in CMS content: [aa class-name]...[/aa]\n//\n//  Available classes:\n//  [aa key-takeaways] — Key Takeaways block with teal border\n//  [aa disclaimer]    — Legal Disclaimer V1, teal tint bg (#F7FAFA)\n//  [aa disclaimer-2]  — Legal Disclaimer V2, warm tint bg (#FFFBFA)\n//  [aa fast-fact]     — Fast Fact, light teal bg (#EBF9FA)\n//  [aa cta]           — CTA Article block, brand bg (#EAF9FA)\n//  [aa btn]           — Teal pill button — nest INSIDE other blocks\n//\n//  Specificity notes:\n//  - .aa-cta h3, h3.framer-text, h3 .framer-text  →  0-2-1  (wins over body text)\n//  - .aa-cta p.framer-text, p .framer-text         →  0-2-1  (only targets <p>)\n//  - Style tag appended AFTER Framer styles → source order wins on ties\n//\n//  Image sizing note:\n//  CSS width: 100% overrides the HTML width attribute (no JS needed).\n//  width/height attributes are intentionally preserved — browsers use them\n//  to pre-calculate aspect ratio before load, preventing CLS (layout shift).\n// ─────────────────────────────────────────────\nconst AA_STYLES=`\n/* ============================================================\n   EQWIRE Article Shortcode Components — v16\n   ============================================================ */\n\n/* ── ARTICLE IMAGES — full width via CSS only (preserves width/height attrs for CLS) ── */\n.aa-body img {\n  width: 100%;\n  height: auto;\n  display: block;\n  border-radius: 12px;\n  box-sizing: border-box;\n}\n/* Framer wraps CMS images in <p> — zero out its line-height so no gap below */\n.aa-body p:has(> img:only-child) {\n  margin: 0;\n  padding: 0;\n  line-height: 0;\n  font-size: 0;\n}\n\n/* ── HIDE EMPTY PARAGRAPHS inside all shortcode blocks ── */\n.aa-key-takeaways > p:empty,\n.aa-disclaimer > p:empty,\n.aa-disclaimer-2 > p:empty,\n.aa-fast-fact > p:empty,\n.aa-cta > p:empty {\n  display: none;\n  margin: 0;\n  padding: 0;\n  height: 0;\n  line-height: 0;\n}\n\n/* ── SHARED BASE ── */\n.aa-key-takeaways,\n.aa-disclaimer,\n.aa-disclaimer-2,\n.aa-fast-fact,\n.aa-cta {\n  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;\n  margin: 0;\n  border-radius: 20px;\n  box-sizing: border-box;\n  padding: 32px;\n}\n\n/* ── KEY TAKEAWAYS ── */\n.aa-key-takeaways {\n  background: #F7FAFA;\n  border: 1px solid #2ABACB;\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n.aa-key-takeaways h3,\n.aa-key-takeaways h3.framer-text,\n.aa-key-takeaways h3 .framer-text {\n  font-size: 24px;\n  font-weight: 700;\n  color: #000000;\n  letter-spacing: -0.04em;\n  line-height: 1.2;\n  margin: 0;\n  padding: 0;\n}\n.aa-key-takeaways p,\n.aa-key-takeaways p.framer-text,\n.aa-key-takeaways p .framer-text {\n  margin: 0;\n  padding: 0;\n}\n.aa-key-takeaways ol {\n  padding-left: 22px;\n  margin: 0;\n}\n.aa-key-takeaways li,\n.aa-key-takeaways li .framer-text {\n  font-size: 16px;\n  font-weight: 400;\n  color: #000000;\n  letter-spacing: -0.02em;\n  line-height: 1.6;\n  margin-bottom: 10px;\n}\n.aa-key-takeaways li:last-child { margin-bottom: 0; }\n\n/* Content links inside list items only — NOT the button */\n.aa-key-takeaways li a,\n.aa-key-takeaways li .framer-text[href] {\n  color: #087885;\n  text-decoration: underline;\n}\n\n/* ── LEGAL DISCLAIMER V1 — all italic teal ── */\n.aa-disclaimer {\n  background: #F7FAFA;\n  font-size: 14px;\n  color: #087885;\n  font-style: italic;\n  line-height: 1.4;\n}\n.aa-disclaimer p { margin: 0; padding: 0; }\n.aa-disclaimer .framer-text {\n  font-size: 14px;\n  color: #087885;\n  font-style: italic;\n  line-height: 1.4;\n  margin: 0;\n  padding: 0;\n}\n.aa-disclaimer strong,\n.aa-disclaimer strong.framer-text {\n  font-weight: 700;\n  font-style: italic;\n  color: #087885;\n}\n\n/* ── LEGAL DISCLAIMER V2 — regular black ── */\n.aa-disclaimer-2 {\n  background: #FFFBFA;\n  font-size: 14px;\n  color: #000000;\n  font-style: normal;\n  line-height: 1.4;\n}\n.aa-disclaimer-2 p { margin: 0; padding: 0; }\n.aa-disclaimer-2 .framer-text {\n  font-size: 14px;\n  color: #000000;\n  font-style: normal;\n  font-weight: 400;\n  line-height: 1.4;\n  margin: 0;\n  padding: 0;\n}\n.aa-disclaimer-2 strong,\n.aa-disclaimer-2 strong.framer-text {\n  font-weight: 700;\n  color: #000000;\n}\n\n/* ── FAST FACT ── */\n.aa-fast-fact {\n  background: #EBF9FA;\n  font-size: 16px;\n  color: #000000;\n  line-height: 1.6;\n}\n.aa-fast-fact p { margin: 0; padding: 0; }\n.aa-fast-fact .framer-text {\n  font-size: 16px;\n  font-weight: 400;\n  color: #000000;\n  letter-spacing: -0.02em;\n  line-height: 1.6;\n  margin: 0;\n  padding: 0;\n}\n.aa-fast-fact strong,\n.aa-fast-fact strong.framer-text {\n  font-weight: 700;\n}\n\n/* ── CTA ARTICLE ── */\n.aa-cta {\n  background: #EAF9FA;\n  text-align: center;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 16px;\n}\n\n/* H3 — high specificity (0-2-1) covers all Framer rendering patterns:\n   <h3>, <h3 class=\"framer-text\">, <h3><span class=\"framer-text\"> */\n.aa-cta h3,\n.aa-cta h3.framer-text,\n.aa-cta h3 .framer-text {\n  font-size: 24px;\n  font-weight: 700;\n  color: #000000;\n  letter-spacing: -0.04em;\n  line-height: 1.2;\n  text-align: center;\n  margin: 0;\n  padding: 0;\n}\n\n/* Body text — scoped to <p> only, does NOT bleed into h3\n   <p class=\"framer-text\">, <p><span class=\"framer-text\"> */\n.aa-cta p {\n  margin: 0;\n  padding: 0;\n}\n.aa-cta p.framer-text,\n.aa-cta p .framer-text {\n  font-size: 16px;\n  font-weight: 400;\n  color: #000000;\n  letter-spacing: -0.02em;\n  line-height: 1.6;\n  text-align: center;\n  margin: 0;\n  padding: 0;\n}\n\n/* ── RESPONSIVE ── */\n@media (max-width: 991px) {\n  .aa-key-takeaways h3,\n  .aa-key-takeaways h3.framer-text,\n  .aa-cta h3,\n  .aa-cta h3.framer-text { font-size: 22px; }\n}\n\n/* ── BUTTON ──\n   Specificity .aa-[block] .aa-btn a = 0-2-1\n   beats content link .aa-[block] li a = 0-1-2\n   ── */\n.aa-btn {\n  display: flex;\n  justify-content: center;\n  margin: 0;\n  padding: 0;\n}\n.aa-btn p { margin: 0; padding: 0; }\n\n.aa-key-takeaways .aa-btn a,\n.aa-disclaimer .aa-btn a,\n.aa-disclaimer-2 .aa-btn a,\n.aa-fast-fact .aa-btn a,\n.aa-cta .aa-btn a,\n.aa-btn a {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  background: #2ABACB;\n  color: #ffffff;\n  border-radius: 100px;\n  padding: 16px 24px;\n  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;\n  font-size: 16px;\n  font-weight: 600;\n  line-height: 1;\n  text-decoration: none;\n  transition: opacity 0.2s ease;\n  cursor: pointer;\n  white-space: nowrap;\n  letter-spacing: normal;\n  margin: 0;\n}\n\n.aa-key-takeaways .aa-btn a:hover,\n.aa-disclaimer .aa-btn a:hover,\n.aa-disclaimer-2 .aa-btn a:hover,\n.aa-fast-fact .aa-btn a:hover,\n.aa-cta .aa-btn a:hover,\n.aa-btn a:hover {\n  opacity: 0.8;\n  color: #ffffff;\n  text-decoration: none;\n}\n\n.aa-key-takeaways .aa-btn a:active,\n.aa-cta .aa-btn a:active,\n.aa-btn a:active {\n  transform: scale(0.98);\n}\n\n.aa-btn-icon {\n  display: inline-flex;\n  align-items: center;\n  flex-shrink: 0;\n}\n`;const ARROW=`<svg class=\"aa-btn-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 19 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 16L17 1M17 1H6M17 1V12\" stroke=\"white\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;/** Remove empty <p> elements (no text, only optional <br>) from a block */function removeEmptyParagraphs(block){block.querySelectorAll(\"p\").forEach(p=>{if((p.textContent??\"\").trim()!==\"\")return;const hasRealContent=Array.from(p.children).some(child=>child.tagName!==\"BR\");if(!hasRealContent)p.remove();});}export function BlockWithCustomAA(){const ref=useRef(null);useEffect(()=>{const ex=document.getElementById(\"aa-custom-styles\");if(ex)ex.remove();const s=document.createElement(\"style\");s.id=\"aa-custom-styles\";s.textContent=AA_STYLES;document.head.appendChild(s);if(ref.current){const el=ref.current;// Mark root for scoped image and body styles\nel.classList.add(\"aa-body\");let h=el.innerHTML;h=h.replace(/\\[aa\\s([^\\]]+)\\]/g,(_,c)=>`<div class=\"aa-${c.trim()}\">`).replace(/\\[\\/aa\\]/g,\"</div>\").replace(/<p>\\s*(<div class=\"aa-)/g,\"$1\").replace(/(<\\/div>)\\s*<\\/p>/g,\"$1\");el.innerHTML=h;el.querySelectorAll(\".aa-key-takeaways, .aa-disclaimer, .aa-disclaimer-2, .aa-fast-fact, .aa-cta\").forEach(block=>{// Remove leading BRs\nwhile(block.firstChild&&block.firstChild.nodeName===\"BR\"){block.firstChild.remove();}// Remove trailing BRs\nwhile(block.lastChild&&block.lastChild.nodeName===\"BR\"){block.lastChild.remove();}// Remove ALL empty <p> elements throughout the block\nremoveEmptyParagraphs(block);});// Inject arrow icon + open in new tab for every .aa-btn link\nel.querySelectorAll(\".aa-btn a\").forEach(a=>{a.setAttribute(\"target\",\"_blank\");a.setAttribute(\"rel\",\"noopener noreferrer\");if(!a.querySelector(\".aa-btn-icon\"))a.insertAdjacentHTML(\"beforeend\",ARROW);});}},[]);return{ref};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withBlockWithCustomAA(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...BlockWithCustomAA(props)});};}withBlockWithCustomAA.displayName=\"BlockWithCustomAA\";\nexport const __FramerMetadata__ = {\"exports\":{\"BlockWithCustomAA\":{\"type\":\"override\",\"name\":\"BlockWithCustomAA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBlockWithCustomAA\":{\"type\":\"reactHoc\",\"name\":\"withBlockWithCustomAA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Article_Rich_Text.map"],"mappings":"iLAwS2U,SAAS,EAAsB,EAAM,CAAC,EAAM,iBAAiB,IAAI,CAAC,QAAQ,GAAG,EAAKA,EAAE,aAAa,IAAI,MAAM,GAAG,KAA+B,MAAM,KAAKA,EAAE,SAAS,CAAC,KAAK,GAAO,EAAM,UAAU,KAAK,EAAoB,EAAE,QAAQ,GAAG,CAAE,SAAgB,GAAmB,CAAC,IAAM,EAAIC,EAAO,KAAK,CAK5Z,OAL6Z,MAAc,CAAC,IAAM,EAAG,SAAS,eAAe,mBAAmB,CAAI,GAAG,EAAG,QAAQ,CAAC,IAAM,EAAE,SAAS,cAAc,QAAQ,CAA8E,GAA7E,EAAE,GAAG,mBAAmB,EAAE,YAAY,EAAU,SAAS,KAAK,YAAY,EAAE,CAAI,EAAI,QAAQ,CAAC,IAAM,EAAG,EAAI,QACt1B,EAAG,UAAU,IAAI,UAAU,CAAC,IAAI,EAAE,EAAG,UAAU,EAAE,EAAE,QAAQ,qBAAqB,EAAE,IAAI,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,YAAY,SAAS,CAAC,QAAQ,2BAA2B,KAAK,CAAC,QAAQ,qBAAqB,KAAK,CAAC,EAAG,UAAU,EAAE,EAAG,iBAAiB,8EAA8E,CAAC,QAAQ,G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