PageSourceSearch

https://www.aafp.org/_next/static/chunks/350.8a06175386580c05.js

js aafp.org collected 2026-10-01 07:53:50 UTC 8,091 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[350],{10350:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var a=n(73365),r=n(7805),o=n(25365),l=n(1521),s=n(19889),d=n(85864),c=n(56702),i=n.n(c),u=n(93980),m=n(15047);function f({id:e,label:t,onHide:n}){let{setClose:o,setSessionStorage:l}=(0,s.g)();return(0,a.jsx)(r.A,{variant:"secondary",className:"custom-modal__permanent-disable-btn",onClick:()=>{o?.(e),l?.(e),n?.()},children:t})}let h=(0,l.forwardRef)(function({id:e,className:t,title:n,description:c,permanentDismissLabel:h,dismissLabel:_,displayOnPageLoad:x,onHide:v,frequency:b,suppressionTimeframe:y,startDateTime:p,endDateTime:g,onShow:j,children:k,analyticsElementId:w,footerInBody:E=!1,compactHeaderOnScroll:C=!1},N){let{openModals:R,setClose:A,setSessionStorage:$}=(0,s.g)(),L=R.has(e),S=(0,l.useRef)(null),I=(0,l.useRef)(null),D=(0,l.useRef)(null),[T,O]=(0,l.useState)(!1),{showIfEligible:H,dataAttributes:P,updateSuppressionTimeframe:q,registerImpression:F}=function(e,{displayOnPageLoad:t,frequency:n=3,suppressionTimeframe:a=3,startDateTime:r,endDateTime:o}){let c=`${e}-frequency-count`,i=`${e}-suppress-until`,u=parseInt((0,d.Ri)(c)||"0",10),m=(0,l.useRef)(isNaN(u)?0:u),f=Math.max(a??0,1),{setOpen:h,hasSessionStorage:_}=(0,s.g)(),x=(0,l.useCallback)(()=>{if(-1!==n&&(m.current+=1,(0,d.TV)(c,m.current.toString(),{maxAge:86400*f}),a&&n&&-1!==n&&m.current>=n)){let e=new Date;e.setDate(e.getDate()+a),(0,d.TV)(i,e.toISOString(),{maxAge:86400*a})}},[c,n,i,a,f]);return{showIfEligible:(0,l.useCallback)(()=>{if(!t||_?.(e))return;let a=parseInt((0,d.Ri)(c)||"0",10);m.current=isNaN(a)?0:a;let l=new Date,s=r?new Date(r):void 0,u=o?new Date(o):void 0,f=(0,d.Ri)(i),x=n&&(-1===n||m.current<n);!f&&x&&(!s||l>s)&&(!u||l<u)&&h?.(e)},[t,_,e,r,o,i,n,c,h]),registerImpression:x,updateSuppressionTimeframe:()=>{let e=new Date;e.setDate(e.getDate()+365),(0,d.TV)(i,e.toISOString(),{maxAge:31536e3})},dataAttributes:{"data-frequency":n,"data-frequency-count":m.current||void 0,"data-suppression-days":a}}}(e,{displayOnPageLoad:x,frequency:b,suppressionTimeframe:y,startDateTime:p,endDateTime:g});(0,l.useEffect)(()=>{H(),x&&L&&F()},[x,L,F,H]),(0,u.P)(I,"--custom-modal-header-height",L),(0,l.useEffect)(()=>{if(!L||!C)return void O(!1);let e=[S.current?.querySelector(".modal__dialog"),D.current].filter(e=>!!e);if(!e.length)return;let t=()=>{O(e.some(e=>e.scrollTop>8))};return t(),e.forEach(e=>e.addEventListener("scroll",t)),()=>{e.forEach(e=>e.removeEventListener("scroll",t))}},[C,L]);let V=()=>{let t=document.activeElement?.closest(".modal")?.id;t?.includes(e)&&(A?.(e),v?.(),$?.(e))};return(0,a.jsxs)(o.Ay,{id:`custom-modal-${e}`,ref:e=>{S.current=e,"function"==typeof N?N(e):N&&(N.current=e)},className:i()("custom-modal",t),show:L,onHide:V,onShow:j,...P,children:[(0,a.jsx)(o.Ay.Header,{ref:I,className:i()("custom-modal__header",{"custom-modal__header--scrolled":T}),closeBtnLabel:"Close",children:(n||c||x&&h)&&(0,a.jsxs)("div",{className:"custom-modal__header-content",children:[(0,a.jsxs)("div",{className:"custom-modal__header-content-text text-container",children:[n&&(0,a.jsx)(o.Ay.Title,{className:"type-h2",children:n}),c&&(0,a.jsx)("div",{className:"type-body has-rich-text mt-1",children:c})]}),x&&h&&(0,a.jsx)(f,{id:e,label:h,onHide:()=>{A?.(e),v?.(),q()}})]})}),(0,a.jsxs)(o.Ay.Body,{ref:D,onClick:t=>{let n=t.target.closest("a, button");if(!n)return;let a=n.textContent?.trim()||"";a&&(0,m.d)({event:"content_click",action_type:"cta_click",element_category:"custom_modal",element_id:w||`modal-${e}`,element_name:a,element_location:"modal_content_area"})},children:[k,E&&_&&(0,a.jsx)("div",{className:"custom-modal__body-footer",children:(0,a.jsx)(r.A,{type:"button",onClick:V,children:_})})]}),!E&&_&&(0,a.jsx)(o.Ay.Footer,{className:"custom-modal__footer",children:(0,a.jsx)(r.A,{type:"button",onClick:V,children:_})})]})})},15047:(e,t,n)=>{n.d(t,{d:()=>r});var a=n(74623);function r(e){{var t;if(t=e.event,window.__aafp?.disabledDataLayerEvents?.[t])return;let n=window;n.dataLayer=n.dataLayer||[],n.dataLayer.push({...e,element_name:(0,a.Q)(e.element_name).toLowerCase()})}}},25365:(e,t,n)=>{n.d(t,{Ay:()=>y});var a=n(73365),r=n(1521),o=n(98196),l=n(56702),s=n.n(l),d=n(5269),c=n(15079);let i=(0,r.forwardRef)(function({className:e,children:t,...n},r){return(0,a.jsx)("div",{ref:r,className:s()("modal__dialog",e),...n,"data-testid":"modal-dialog",children:t})});var u=n(6834);let m=(0,r.createContext)({onHide:function(){}}),f=(0,r.forwardRef)(function({className:e,children:t,closeBtnLabel:n,...o},l){let{onHide:d}=(0,r.useContext)(m)||{};return(0,a.jsxs)("div",{ref:l,className:s()("modal__header",e),...o,children:[t,(0,a.jsx)("button",{type:"button",className:"modal__header-close-btn","aria-label":n,onClick:d,"data-testid":"close-button",children:(0,a.jsx)(u.A,{name:"close"})})]})}),h=(0,r.forwardRef)(function({className:e,children:t,...n},r){return(0,a.jsx)("div",{ref:r,className:s()("modal__body",e),...n,"data-testid":"modal-body",tabIndex:-1,
1children:t})}),_=(0,r.forwardRef)(function({className:e,children:t,...n},r){return(0,a.jsx)("div",{ref:r,className:s()("modal__footer",e),...n,"data-testid":"modal-footer",children:t})}),x=(0,r.forwardRef)(function({className:e,as:t="div",ariaLevel:n=2,children:r,...o},l){return(0,a.jsx)(t,{ref:l,role:"heading","aria-level":n,className:s()("modal__title",e),...o,children:r})}),v=(0,r.forwardRef)(function({className:e,show:t,onShow:n,onShown:l,onHide:i,onHidden:u,children:f,...h},_){let x=(0,r.useId)(),v=h?.id?`modal-${h.id}`:`modal-${x}`,y=(0,r.useRef)(null),p=(0,r.useRef)(null),[g,j]=(0,r.useState)(!1),k=(0,r.useCallback)(()=>{n?.()},[n]),w=(0,r.useCallback)(()=>{let e=y.current?.querySelector(".modal__title");document.documentElement.classList.add("no-scroll"),e&&(e.id||(e.id=`${v}__title`),y.current?.setAttribute("aria-labelledby",e.id)),j(!0),l?.()},[v,l]),E=(0,r.useCallback)(()=>{i?.()},[i]),C=(0,r.useCallback)(()=>{document.documentElement.classList.remove("no-scroll"),j(!1),u?.()},[u]),N=(0,r.useCallback)(e=>{p.current&&!p.current.contains(e.target)&&i?.()},[i]);return(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&i?.()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[i,t]),(0,r.useEffect)(()=>()=>{document.documentElement.classList.remove("no-scroll")},[]),(0,o.createPortal)((0,a.jsx)(a.Fragment,{children:(0,a.jsx)(m.Provider,{value:{onHide:i},children:(0,a.jsx)(d.A,{in:t,nodeRef:y,timeout:{enter:400,exit:400},classNames:"modal-",onEnter:k,onEntered:w,onExit:E,onExited:C,mountOnEnter:!1,unmountOnExit:!0,children:(0,a.jsx)(c.FocusTrap,{focusTrapOptions:{fallbackFocus:()=>y.current??document.body,allowOutsideClick:!0},active:g,children:(0,a.jsxs)("div",{ref:e=>{y.current=e,"function"==typeof _?_(e):_&&(_.current=e)},id:v,className:s()(e,"modal"),tabIndex:-1,role:"dialog","aria-modal":"true",...h,onClick:N,"data-testid":"modal",children:[(0,a.jsx)(b,{ref:p,children:f}),(0,a.jsx)("div",{className:"modal__backdrop","data-testid":"modal-backdrop"})]})})})})}),document.body)}),b=i,y=Object.assign(v,{Header:f,Title:x,Dialog:b,Body:h,Footer:_})},85864:(e,t,n)=>{function a(e){for(let t of document.cookie.split("; ")){let[n,a]=t.split("=");if(n===e)return decodeURIComponent(a)}}function r(e,t,n={}){let{path:a="/",maxAge:o,secure:l=!1,sameSite:s="Lax",expires:d}=n,c=`${e}=${encodeURIComponent(t)}; path=${a}`;void 0!==o&&(c+=`; max-age=${o}`),d&&(c+=`; expires=${d.toUTCString()}`),s&&(c+=`; samesite=${s}`),l&&(c+="; secure"),document.cookie=c}n.d(t,{Ri:()=>a,TV:()=>r})},93980:(e,t,n)=>{n.d(t,{P:()=>r});var a=n(1521);let r=(e,t,n)=>{(0,a.useEffect)(()=>{if(!e.current)return;if(!t.startsWith("--"))return void console.warn(`Invalid CSS variable name: "${t}". It should start with "--".`);document.documentElement.style.setProperty(t,`${e.current.offsetHeight}px`);let n=new ResizeObserver(e=>{for(let n of e){let e=n.target,a=e?.offsetHeight??n.contentRect.height;document.documentElement.style.setProperty(t,`${a}px`)}});return n.observe(e.current),()=>n.disconnect()},[t,e,n])}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.