{
  "version": 3,
  "sources": ["../app/campaign.ts", "../app/midnight.ts", "../app/client.css", "../app/copy.ts", "../app/shared/teaser-geometry.json", "../app/shared/tile-layout.ts", "../app/client.ts"],
  "sourcesContent": ["const DEFAULT_SUBLINE = 'Extra sparen bei Touren, Tickets und Erlebnissen';\nconst TUESDAY_SUBLINE = 'Travel Tuesday: Deals buchen und bis zu 55 % sparen';\n\nconst COUNTDOWN_AFTER_TUESDAY: Record<string, readonly [string, string]> = {\n  '2026-12-02': ['Nur noch ', '4 Tage'],\n  '2026-12-03': ['Nur noch ', '3 Tage'],\n  '2026-12-04': ['Nur noch ', '2 Tage'],\n  '2026-12-05': ['Nur noch ', 'heute & morgen'],\n  '2026-12-06': ['Nur noch ', 'heute'],\n};\n\nconst BERLIN_DAY = new Intl.DateTimeFormat('en-CA', {\n  timeZone: 'Europe/Berlin',\n  year: 'numeric',\n  month: '2-digit',\n  day: '2-digit',\n});\n\nexport type CampaignMarkup = {\n  subline: string;\n  countdown: string | null;\n};\n\nconst escapeHtml = (value: string) => value.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;');\n\nconst berlinDay = (now: Date) => BERLIN_DAY.format(now);\n\nexport const campaignMarkup = (now: Date): CampaignMarkup => {\n  const day = berlinDay(now);\n\n  if (day === '2026-12-01') {\n    return { subline: escapeHtml(TUESDAY_SUBLINE), countdown: null };\n  }\n\n  const scheduled = COUNTDOWN_AFTER_TUESDAY[day];\n  // Through 1 Dec the line stays \"Nur bis 06.12.\" From 7 Dec, and in any later year, it is gone.\n  const pair = scheduled ?? (day < '2026-12-01' ? (['Nur bis ', '06.12.'] as const) : null);\n\n  if (pair == null) {\n    return { subline: escapeHtml(DEFAULT_SUBLINE), countdown: null };\n  }\n\n  const lead = pair[0];\n  const strong = pair[1];\n\n  return {\n    subline: escapeHtml(DEFAULT_SUBLINE),\n    countdown: `${escapeHtml(lead)}<strong>${escapeHtml(strong)}</strong>`,\n  };\n};\n", "const BERLIN_CLOCK = new Intl.DateTimeFormat('en-GB', {\n  timeZone: 'Europe/Berlin',\n  hour: '2-digit',\n  minute: '2-digit',\n  second: '2-digit',\n  hourCycle: 'h23',\n});\n\nexport const msUntilNextBerlinDay = (now: Date): number => {\n  const parts = BERLIN_CLOCK.formatToParts(now);\n  const read = (type: Intl.DateTimeFormatPartTypes) => Number(parts.find((entry) => entry.type === type)?.value ?? '0');\n  const hour = read('hour') % 24;\n  const minute = read('minute');\n  const second = read('second');\n\n  return ((23 - hour) * 3600 + (59 - minute) * 60 + (60 - second)) * 1000;\n};\n", "/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */@layer properties{@supports(((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer utilities{.fixed{position:fixed}.relative{position:relative}.static{position:static}.contents{display:contents}.resize{resize:both}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}}:host{box-sizing:border-box;pointer-events:none;background:0 0;width:fit-content;max-width:100%;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;display:block}.exp-root{box-sizing:border-box;color:#fff;text-align:center;width:308px;height:400px;text-shadow:none;pointer-events:none;background:0 0;border-radius:32px;flex-direction:column;align-items:center;margin:0;padding:16px;display:flex;overflow:hidden}:host([data-promotion=top]) .exp-root{width:460px;height:598px}.countdown,.headline,.subline{width:100%;margin:0}.headline,.subline{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.headline{font-size:22px;font-weight:700;line-height:26px}.subline{margin-top:4px;font-size:16px;font-weight:400;line-height:20px}:host([data-promotion=top]) .headline{font-size:34px;line-height:40px}:host([data-promotion=top]) .subline{margin-top:8px;font-size:24px;line-height:30px}.countdown{white-space:nowrap;margin-top:auto;font-size:16px;font-weight:400;line-height:20px}.countdown strong{font-weight:700}:host([data-promotion=top]) .countdown{font-size:24px;line-height:30px}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}", "/**\n * Headline and subline for the live overlay. server.ts repeats the same words\n * in the skeleton string; importing this module there would ship it inside the\n * 50 KB server bundle.\n */\nexport const copy = {\n  'de-DE': {\n    headline: 'Erlebnisse',\n    subline: 'Extra sparen bei Touren, Tickets und Erlebnissen',\n  },\n} as const;\n", "{\n  \"tile\": { \"width\": 308, \"height\": 400, \"radius\": 32 },\n  \"hero\": { \"width\": 460, \"height\": 598, \"radius\": 32 },\n  \"detect\": { \"desktopMinPx\": 769, \"heroSlotMinPx\": 400, \"heroSlotMaxPx\": 560 }\n}\n", "import geometry from './teaser-geometry.json';\n\n/** Tile-only. A classic teaser and a widget do not use these boxes. */\nexport const TILE_WIDTH = geometry.tile.width;\nexport const TILE_HEIGHT = geometry.tile.height;\nexport const HERO_WIDTH = geometry.hero.width;\nexport const HERO_HEIGHT = geometry.hero.height;\nexport const TILE_RADIUS = geometry.tile.radius;\n\nconst { desktopMinPx, heroSlotMinPx, heroSlotMaxPx } = geometry.detect;\n\n/**\n * The host does not say whether this tile is the large slot. The caller measures the\n * slot (the parent), never the element: `data-promotion` changes the element's own width.\n */\nexport const isHeroSlot = (viewportWidth: number, slotWidth: number): boolean => {\n  return viewportWidth >= desktopMinPx && slotWidth >= heroSlotMinPx && slotWidth < heroSlotMaxPx;\n};\n\nexport interface TileLayoutController {\n  sync: () => void;\n  disconnect: () => void;\n}\n\nconst slotWidthOf = (host: HTMLElement): number => {\n  const parent = host.assignedSlot?.parentElement ?? host.parentElement;\n\n  return parent ? parent.clientWidth : host.clientWidth;\n};\n\nconst syncPromotion = (host: HTMLElement) => {\n  if (isHeroSlot(window.innerWidth, slotWidthOf(host))) {\n    host.setAttribute('data-promotion', 'top');\n\n    return;\n  }\n\n  host.removeAttribute('data-promotion');\n};\n\n/**\n * Keeps `data-promotion` in step with the slot. `ResizeObserver` covers a row reflow that\n * does not resize the window. Image tiles must not dispatch `vanilla-home-teaser-snap`.\n */\nexport const attachTileLayout = (host: HTMLElement): TileLayoutController => {\n  let frame = 0;\n\n  const sync = () => {\n    cancelAnimationFrame(frame);\n    frame = requestAnimationFrame(() => {\n      frame = 0;\n      syncPromotion(host);\n    });\n  };\n\n  const breakpoint = window.matchMedia(`(min-width: ${desktopMinPx}px)`);\n  const slot = host.assignedSlot?.parentElement ?? host.parentElement;\n  const resizeObserver = new ResizeObserver(sync);\n  if (slot) {\n    resizeObserver.observe(slot);\n  }\n\n  window.addEventListener('resize', sync);\n  breakpoint.addEventListener('change', sync);\n  sync();\n\n  return {\n    sync,\n    disconnect() {\n      cancelAnimationFrame(frame);\n      window.removeEventListener('resize', sync);\n      breakpoint.removeEventListener('change', sync);\n      resizeObserver.disconnect();\n    },\n  };\n};\n", "import { campaignMarkup } from './campaign';\nimport { msUntilNextBerlinDay } from './midnight';\nimport styles from './client.css';\nimport { copy } from './copy';\nimport { type TileLayoutController, attachTileLayout } from './shared/tile-layout';\n\n/**\n * Overlay only. The host paints the video and the click-through (`extraVars.href`).\n * A `<video>` child would be media fallback and would not paint while the clip plays.\n */\nclass BlackdealVideoTile extends HTMLElement {\n  private readonly root: ShadowRoot;\n  private layout: TileLayoutController | null = null;\n  private midnight = 0;\n\n  constructor() {\n    super();\n    this.root = this.attachShadow({ mode: 'closed' });\n  }\n\n  /** Nothing to react to. The click-through is host-owned, not `vanilla-home-env`. */\n  static get observedAttributes() {\n    return [];\n  }\n\n  connectedCallback() {\n    this.render();\n    this.layout ??= attachTileLayout(this);\n    this.scheduleMidnight();\n  }\n\n  disconnectedCallback() {\n    window.clearTimeout(this.midnight);\n    this.layout?.disconnect();\n    this.layout = null;\n  }\n\n  private scheduleMidnight() {\n    window.clearTimeout(this.midnight);\n    this.midnight = window.setTimeout(() => {\n      this.render();\n      this.scheduleMidnight();\n    }, msUntilNextBerlinDay(new Date()));\n  }\n\n  private render() {\n    const text = copy['de-DE'];\n    const campaign = campaignMarkup(new Date());\n    const countdown = campaign.countdown == null ? '' : `<p class=\"countdown\">${campaign.countdown}</p>`;\n\n    this.root.innerHTML = `\n      <style>${styles}</style>\n      <div class=\"exp-root\">\n        <p class=\"headline\">${text.headline}</p>\n        <p class=\"subline\">${campaign.subline}</p>\n        ${countdown}\n      </div>\n    `;\n  }\n}\n\ncustomElements.define(__COMPONENT_TAG__, BlackdealVideoTile);\n"],
  "mappings": "oKAAA,IAAMA,EAAkB,mDAClBC,EAAkB,sDAElBC,EAAqE,CACzE,aAAc,CAAC,YAAa,QAAQ,EACpC,aAAc,CAAC,YAAa,QAAQ,EACpC,aAAc,CAAC,YAAa,QAAQ,EACpC,aAAc,CAAC,YAAa,gBAAgB,EAC5C,aAAc,CAAC,YAAa,OAAO,CACrC,EAEMC,EAAa,IAAI,KAAK,eAAe,QAAS,CAClD,SAAU,gBACV,KAAM,UACN,MAAO,UACP,IAAK,SACP,CAAC,EAOKC,EAAcC,GAAkBA,EAAM,WAAW,IAAK,OAAO,EAAE,WAAW,IAAK,MAAM,EAAE,WAAW,IAAK,MAAM,EAE7GC,EAAaC,GAAcJ,EAAW,OAAOI,CAAG,EAEzCC,EAAkBD,GAA8B,CAC3D,IAAME,EAAMH,EAAUC,CAAG,EAEzB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AO,CAAC,CACV,CAEA,mBAAoB,CAClB,KAAK,OAAO,EACZ,KAAK,SAAL,KAAK,OAAWC,EAAiB,IAAI,GACrC,KAAK,iBAAiB,CACxB,CAEA,sBAAuB,CACrB,OAAO,aAAa,KAAK,QAAQ,EACjC,KAAK,QAAQ,WAAW,EACxB,KAAK,OAAS,IAChB,CAEQ,kBAAmB,CACzB,OAAO,aAAa,KAAK,QAAQ,EACjC,KAAK,SAAW,OAAO,WAAW,IAAM,CACtC,KAAK,OAAO,EACZ,KAAK,iBAAiB,CACxB,EAAGC,EAAqB,IAAI,IAAM,CAAC,CACrC,CAEQ,QAAS,CACf,IAAMC,EAAOC,EAAK,OAAO,EACnBC,EAAWC,EAAe,IAAI,IAAM,EACpCC,EAAYF,EAAS,WAAa,KAAO,GAAK,wBAAwBA,EAAS,SAAS,OAE9F,KAAK,KAAK,UAAY;AAAA,eACXG,CAAM;AAAA;AAAA,8BAESL,EAAK,QAAQ;AAAA,6BACdE,EAAS,OAAO;AAAA,UACnCE,CAAS;AAAA;AAAA,KAGjB,CACF,EAEA,eAAe,OAAO,8BAAmBR,CAAkB",
  "names": ["DEFAULT_SUBLINE", "TUESDAY_SUBLINE", "COUNTDOWN_AFTER_TUESDAY", "BERLIN_DAY", "escapeHtml", "value", "berlinDay", "now", "campaignMarkup", "day", "pair", "lead", "strong", "BERLIN_CLOCK", "msUntilNextBerlinDay", "now", "parts", "read", "type", "entry", "hour", "minute", "second", "client_default", "copy", "teaser_geometry_default", "TILE_WIDTH", "teaser_geometry_default", "TILE_HEIGHT", "HERO_WIDTH", "HERO_HEIGHT", "TILE_RADIUS", "desktopMinPx", "heroSlotMinPx", "heroSlotMaxPx", "isHeroSlot", "viewportWidth", "slotWidth", "slotWidthOf", "host", "parent", "syncPromotion", "attachTileLayout", "frame", "sync", "breakpoint", "slot", "resizeObserver", "BlackdealVideoTile", "__publicField", "attachTileLayout", "msUntilNextBerlinDay", "text", "copy", "campaign", "campaignMarkup", "countdown", "client_default"]
}
