{"version":3,"file":"sidebar-ads.DZwC57Rs.js","sources":["../../../src/components/layout/sidebar/sidebar-ad-container.tsx","../../../src/components/integrations/ad-slot-container.tsx","../../../src/lib/model.ts","../../../src/components/layout/sidebar/sidebar-ads.tsx"],"sourcesContent":["import { cn } from '@lib/utils'\nimport type { ReactNode } from 'react'\n\ninterface Props {\n children?: ReactNode\n hasBackground?: boolean\n}\n\nexport default function SidebarAdContainer({ children, hasBackground = true }: Props) {\n return (\n \n {children}\n \n )\n}\n","import { AdSlotId, adSlots } from '@lib/ads'\n\nexport function AdSlotContainer({\n adSlotId,\n divId,\n height,\n width,\n index = undefined\n}: {\n adSlotId: AdSlotId\n divId?: string\n height?: number\n width?: number\n index?: number\n}) {\n const adDivId = divId || (index ? `slot-${adSlotId}-${index}` : `slot-${adSlotId}`)\n const adSlot = adSlots.find((slot) => slot.id === adSlotId)!\n\n return (\n \n )\n}\n\n/**\n * Determine minimum width and height values for an ad slot container\n * based on the configured slot sizes.\n *\n * This function is only provided for example purposes. See\n * [Minimize layout shift](https://developers.google.com/publisher-tag/guides/minimize-layout-shift)\n * to learn more about strategies for sizing ad slot containers.\n */\nfunction getMinimumSlotSize(size: googletag.GeneralSize): React.CSSProperties {\n const maxValue = Number.MAX_VALUE\n\n let minW = Number.MAX_VALUE\n let minH = Number.MAX_VALUE\n\n if (typeof size === 'number') {\n // Handle SingleSize (number)\n minW = size\n minH = size\n } else if (Array.isArray(size)) {\n // Handle MultiSize (array of SingleSize or FluidSize)\n for (const sizeEntry of size) {\n if (typeof sizeEntry === 'number') {\n minW = Math.min(sizeEntry, minW)\n minH = Math.min(sizeEntry, minH)\n } else if (Array.isArray(sizeEntry) && sizeEntry.length === 2) {\n minW = Math.min(sizeEntry[0], minW)\n minH = Math.min(sizeEntry[1], minH)\n } else if (Array.isArray(sizeEntry) && sizeEntry[0] === 'fluid') {\n // Handle fluid size (e.g., ['fluid'])\n return { minWidth: '50%' }\n }\n }\n }\n\n return minW < maxValue && minH < maxValue\n ? { minWidth: `${minW}px`, minHeight: `${minH}px` }\n : { minWidth: '50%' }\n}\n","export enum PageCategory {\n CollegeSavings = 'college-savings',\n StudentLoan = 'student-loan'\n}\n","import SidebarAdContainer from './sidebar-ad-container'\nimport { AdSlotContainer } from '@components/integrations/ad-slot-container'\nimport { AdSlotId } from '@lib/ads'\nimport { PageCategory } from '@lib/model'\n\ninterface Props {\n isCompact?: boolean\n pageCategory?: PageCategory\n addStickyAd?: boolean\n}\n\nexport default function SidebarAds({\n isCompact = false,\n addStickyAd = false,\n pageCategory = PageCategory.CollegeSavings\n}: Props) {\n return (\n
\n \n
\n {pageCategory === PageCategory.CollegeSavings && (\n <>\n \n
\n \n \n \n
\n {!isCompact && (\n <>\n
\n Sponsor Center\n \n \n \n
\n \n \n )}\n \n )}\n {pageCategory === PageCategory.StudentLoan && (\n <>\n \n \n )}\n
\n
\n {addStickyAd && (\n \n {pageCategory === PageCategory.CollegeSavings && (\n \n )}\n {pageCategory === PageCategory.StudentLoan && (\n <>\n \n \n \n )}\n
\n )}\n \n )\n}\n"],"names":["SidebarAdContainer","children","hasBackground","jsx","cn","AdSlotContainer","adSlotId","divId","height","width","index","adDivId","adSlot","adSlots","slot","getMinimumSlotSize","size","maxValue","minW","minH","sizeEntry","PageCategory","SidebarAds","isCompact","addStickyAd","pageCategory","jsxs","Fragment","AdSlotId"],"mappings":"ueAQA,SAAwBA,EAAmB,CAAE,SAAAC,EAAU,cAAAC,EAAgB,IAAe,CAElF,OAAAC,EAAA,IAAC,MAAA,CACC,oBAAmB,GACnB,UAAWC,EACT,mEACAF,GAAiB,+CACnB,EAEC,SAAAD,CAAA,CAAA,CAGP,CClBO,SAASI,EAAgB,CAC9B,SAAAC,EACA,MAAAC,EACA,OAAAC,EACA,MAAAC,EACA,MAAAC,EAAQ,MACV,EAMG,CACK,MAAAC,EAAUJ,IAAUG,EAAQ,QAAQJ,CAAQ,IAAII,CAAK,GAAK,QAAQJ,CAAQ,IAC1EM,EAASC,EAAQ,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