1import { g as gsapWithCSS, S as ScrollTrigger, D as Draggable, I as InertiaPlugin, a as Swiper, N as Navigation } from "./vendor.7c830806.js"; 2import "./react-vendor.bb2da738.js"; 3const scriptRel = "modulepreload"; 4const seen = {}; 5const base = "/Frontend-hyi/dist/"; 6const __vitePreload = function preload(baseModule, deps) { 7 if (!deps || deps.length === 0) { 8 return baseModule(); 9 } 10 return Promise.all(deps.map((dep) => { 11 dep = `${base}${dep}`; 12 if (dep in seen) 13 return; 14 seen[dep] = true; 15 const isCss = dep.endsWith(".css"); 16 const cssSelector = isCss ? '[rel="stylesheet"]' : ""; 17 if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) { 18 return; 19 } 20 const link = document.createElement("link"); 21 link.rel = isCss ? "stylesheet" : scriptRel; 22 if (!isCss) { 23 link.as = "script"; 24 link.crossOrigin = ""; 25 } 26 link.href = dep; 27 document.head.appendChild(link); 28 if (isCss) { 29 return new Promise((res, rej) => { 30 link.addEventListener("load", res); 31 link.addEventListener("error", () => rej(new Error(`Unable to preload CSS for ${dep}`))); 32 }); 33 } 34 })).then(() => baseModule()); 35}; 36function CorporateAccordionBlock(el) { 37 const items = el.querySelectorAll(".accordion-item"); 38 function setPanelHeight(item) { 39 const wrapper = item.querySelector(".accordion-content-wrapper"); 40 if (!wrapper) 41 return; 42 const isOpen = item.getAttribute("data-open") === "true"; 43 if (isOpen) { 44 wrapper.style.maxHeight; 45 wrapper.style.maxHeight = "none"; 46 const height = wrapper.scrollHeight; 47 wrapper.style.maxHeight = height + "px"; 48 } else { 49 if (getComputedStyle(wrapper).maxHeight === "none") { 50 wrapper.style.maxHeight = wrapper.scrollHeight + "px"; 51 wrapper.offsetHeight; 52 } 53 wrapper.style.maxHeight = "0px"; 54 } 55 } 56 items.forEach((item) => { 57 const toggle = item.querySelector(".accordion-toggle"); 58 if (!toggle) 59 return; 60 setPanelHeight(item); 61 toggle.addEventListener("click", () => { 62 const isOpen = item.getAttribute("data-open") === "true"; 63 items.forEach((other) => { 64 if (other !== item) { 65 other.setAttribute("data-open", "false"); 66 other.querySelector(".accordion-toggle")?.setAttribute("aria-expanded", "false"); 67 setPanelHeight(other); 68 } 69 }); 70 item.setAttribute("data-open", String(!isOpen)); 71 toggle.setAttribute("aria-expanded", String(!isOpen)); 72 setPanelHeight(item); 73 }); 74 const wrapper = item.querySelector(".accordion-content-wrapper"); 75 if (wrapper && "ResizeObserver" in window) { 76 const ro = new ResizeObserver(() => { 77 if (item.getAttribute("data-open") === "true") 78 setPanelHeight(item); 79 }); 80 ro.observe(wrapper); 81 } 82 wrapper?.querySelectorAll("img").forEach((img) => { 83 if (!img.complete) { 84 img.addEventListener("load", () => setPanelHeight(item), { once: true }); 85 img.addEventListener("error", () => setPanelHeight(item), { once: true }); 86 } 87 }); 88 }); 89 window.addEventListener("resize", () => items.forEach(setPanelHeight)); 90} 91var __glob_4_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 92 __proto__: null, 93 "default": CorporateAccordionBlock 94}, Symbol.toStringTag, { value: "Module" })); 95function enhanceCorporateFixedWidthPage(el) { 96 const dropdownBtn = el.querySelectorAll(".side-nav-title.button")[0]; 97 const sideNavList = el.querySelector(".side-nav-list"); 98 const sideNavListItems = sideNavList?.querySelectorAll(".side-nav-list-item > a"); 99 const arrowIcon = el.querySelector(".button-icon"); 100 dropdownBtn && dropdownBtn.addEventListener("click", () => { 101 if (sideNavList) { 102 if (sideNavList.classList.contains("closed")) { 103 sideNavList.classList.remove("closed"); 104 sideNavList.classList.add("open"); 105 dropdownBtn.setAttribute("aria-label", "Close Menu"); 106 arrowIcon.classList.remove("closed"); 107 arrowIcon.classList.add("open"); 108 } else { 109 sideNavList.classList.add("closed"); 110 sideNavList.classList.remove("open");
111 dropdownBtn.setAttribute("aria-label", "Open Menu"); 112 arrowIcon.classList.add("closed"); 113 arrowIcon.classList.remove("open"); 114 } 115 } 116 }); 117 function isMobile() { 118 return window.matchMedia("(max-width: 767px)").matches; 119 } 120 function setMobileNavClass() { 121 if (sideNavList) { 122 if (isMobile()) { 123 sideNavList.classList.add("mobile"); 124 } else { 125 sideNavList.classList.remove("mobile"); 126 } 127 } 128 } 129 function setTabAccessibility() { 130 if (sideNavList) { 131 if (isMobile() && sideNavList.classList.contains("closed")) { 132 sideNavListItems.forEach((item) => { 133 item.setAttribute("tabindex", "-1"); 134 }); 135 } else { 136 sideNavListItems.forEach((item) => { 137 item.setAttribute("tabindex", "0"); 138 }); 139 } 140 } 141 } 142 if (dropdownBtn) { 143 dropdownBtn.addEventListener("click", function(e) { 144 e.preventDefault(); 145 setTabAccessibility(); 146 }); 147 } 148 setMobileNavClass(); 149 setTabAccessibility(); 150 window.addEventListener("resize", () => { 151 setMobileNavClass(); 152 setTabAccessibility(); 153 }); 154} 155var __glob_4_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 156 __proto__: null, 157 "default": enhanceCorporateFixedWidthPage 158}, Symbol.toStringTag, { value: "Module" })); 159function enhanceCorporateHomeHero(el) { 160 const section = el; 161 const playButton = section.querySelector(".play-button"); 162 const brightcoveEls = section.querySelectorAll("[data-bc-video-id]"); 163 const videoEls = section.querySelectorAll("video"); 164 let brightcovePlayers = []; 165 function setupBrightcove() { 166 brightcoveEls.forEach((brightcove) => { 167 if (brightcove.tagName.toLowerCase() !== "video") 168 return; 169 const account = brightcove.getAttribute("data-bc-account"); 170 const player = brightcove.getAttribute("data-bc-player") || "default"; 171 const embed = brightcove.getAttribute("data-bc-embed") || "default"; 172 const videoId = brightcove.getAttribute("data-bc-video-id"); 173 brightcove.setAttribute("data-account", account); 174 brightcove.setAttribute("data-player", player); 175 brightcove.setAttribute("data-embed", embed); 176 brightcove.setAttribute("data-video-id", videoId); 177 brightcove.classList.add("video-js"); 178 const initPlayer = () => { 179 const brightcovePlayer = window.videojs(brightcove); 180 brightcovePlayers.push(brightcovePlayer); 181 brightcovePlayer.ready(() => { 182 brightcovePlayer.on("play", () => { 183 section.classList.add("playing"); 184 section.classList.remove("paused"); 185 }); 186 brightcovePlayer.on("pause", () => { 187 section.classList.remove("playing"); 188 section.classList.add("paused"); 189 }); 190 }); 191 }; 192 if (!window.videojs) { 193 const script = document.createElement("script"); 194 script.src = `https://players.brightcove.net/${account}/${player}_${embed}/index.min.js`; 195 script.onload = initPlayer; 196 document.body.appendChild(script); 197 } else { 198 initPlayer(); 199 } 200 }); 201 } 202 function setupNativeVideos() { 203 videoEls.forEach((video) => { 204 if (video.classList.contains("video-js")) 205 return; 206 video.addEventListener("play", () => { 207 section.classList.add("playing"); 208 section.classList.remove("paused"); 209 }); 210 video.addEventListener("pause", () => { 211 section.classList.remove("playing"); 212 section.classList.add("paused"); 213 }); 214 }); 215 } 216 function setupPlayButton() { 217 if (!playButton) 218 return; 219 playButton.addEventListener("click", () => { 220 if (brightcovePlayers.length > 0) { 221 brightcovePlayers.forEach((player) => { 222 player.paused() ? player.play() : player.pause(); 223 }); 224 } else if (videoEls.length > 0) { 225 videoEls.forEach((video) => { 226 if (!video.classList.contains("video-js")) { 227 video.paused ? video.play() : video.pause(); 228 } 229 }); 230 } 231 }); 232 } 233 setupBrightcove(); 234 setupNativeVideos(); 235 setupPlayButton(); 236} 237var __glob_4_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 238 __proto__: null, 239 "default": enhanceCorporateHomeHero 240}, Symbol.toStringTag, { value: "Module" })); 241function enhanceCorporateHomeHeroExtendedBlock(el) { 242 const section = el; 243 const playButton = section.querySelector(".play-button"); 244 const brightcoveEls = section.querySelectorAll("[data-bc-video-id]"); 245 const videoEls = section.querySelectorAll("video"); 246 let brightcovePlayers = []; 247 function setupBrightcove() {
248 brightcoveEls.forEach((brightcove) => { 249 if (brightcove.tagName.toLowerCase() !== "video") 250 return; 251 const account = brightcove.getAttribute("data-bc-account"); 252 const player = brightcove.getAttribute("data-bc-player") || "default"; 253 const embed = brightcove.getAttribute("data-bc-embed") || "default"; 254 const videoId = brightcove.getAttribute("data-bc-video-id"); 255 brightcove.setAttribute("data-account", account); 256 brightcove.setAttribute("data-player", player); 257 brightcove.setAttribute("data-embed", embed); 258 brightcove.setAttribute("data-video-id", videoId); 259 brightcove.classList.add("video-js"); 260 const initPlayer = () => { 261 const brightcovePlayer = window.videojs(brightcove); 262 brightcovePlayers.push(brightcovePlayer); 263 brightcovePlayer.ready(() => { 264 brightcovePlayer.on("play", () => { 265 section.classList.add("playing"); 266 section.classList.remove("paused"); 267 }); 268 brightcovePlayer.on("pause", () => { 269 section.classList.remove("playing"); 270 section.classList.add("paused"); 271 }); 272 }); 273 }; 274 if (!window.videojs) { 275 const script = document.createElement("script"); 276 script.src = `https://players.brightcove.net/${account}/${player}_${embed}/index.min.js`; 277 script.onload = initPlayer; 278 document.body.appendChild(script); 279 } else { 280 initPlayer(); 281 } 282 }); 283 } 284 function setupNativeVideos() { 285 videoEls.forEach((video) => { 286 if (video.classList.contains("video-js")) 287 return; 288 video.addEventListener("play", () => { 289 section.classList.add("playing"); 290 section.classList.remove("paused"); 291 }); 292 video.addEventListener("pause", () => { 293 section.classList.remove("playing"); 294 section.classList.add("paused"); 295 }); 296 }); 297 } 298 function setupPlayButton() { 299 if (!playButton) 300 return; 301 playButton.addEventListener("click", () => { 302 if (brightcovePlayers.length > 0) { 303 brightcovePlayers.forEach((player) => { 304 player.paused() ? player.play() : player.pause(); 305 }); 306 } else if (videoEls.length > 0) { 307 videoEls.forEach((video) => { 308 if (!video.classList.contains("video-js")) { 309 video.paused ? video.play() : video.pause(); 310 } 311 }); 312 } 313 }); 314 } 315 setupBrightcove(); 316 setupNativeVideos(); 317 setupPlayButton(); 318} 319var __glob_4_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 320 __proto__: null, 321 "default": enhanceCorporateHomeHeroExtendedBlock 322}, Symbol.toStringTag, { value: "Module" })); 323function enhanceCorporateImageVideo(el) { 324 const section = el; 325 const playButton = section.querySelector(".play-button"); 326 const brightcove = section.querySelectorAll("[data-bc-video-id]"); 327 const video = section.querySelectorAll("video"); 328 let brightcovePlayers = []; 329 function setUpBrightcoveVideos() { 330 brightcove.forEach((element) => { 331 let brightcovePlayer = null; 332 if (element && element.tagName.toLowerCase() === "video") { 333 const account = element.getAttribute("data-bc-account"); 334 const player = element.getAttribute("data-bc-player") || "default"; 335 const embed = element.getAttribute("data-bc-embed") || "default"; 336 const videoId = element.getAttribute("data-bc-video-id"); 337 element.setAttribute("data-account", account); 338 element.setAttribute("data-player", player); 339 element.setAttribute("data-embed", embed); 340 element.setAttribute("data-video-id", videoId); 341 element.classList.add("video-js"); 342 if (!window.videojs) { 343 const script = document.createElement("script"); 344 script.src = `https://players.brightcove.net/${account}/${player}_${embed}/index.min.js`; 345 script.onload = () => { 346 brightcovePlayer = window.videojs(element); 347 brightcovePlayers.push(brightcovePlayer); 348 wirePlayerEvents(brightcovePlayer); 349 }; 350 document.body.appendChild(script); 351 } else { 352 brightcovePlayer = window.videojs(element); 353 wirePlayerEvents(brightcovePlayer); 354 } 355 } 356 }); 357 } 358 setUpBrightcoveVideos(); 359 function wirePlayerEvents(player) { 360 player.ready(() => { 361 player.on("play", () => { 362 section.classList.add("playing"); 363 section.classList.remove("paused"); 364 updateAriaLabel(playButton, "pause"); 365 }); 366 player.on("pause", () => { 367 section.classList.remove("playing"); 368 section.classList.add("paused"); 369 updateAriaLabel(playButton, "play"); 370 }); 371 }); 372 } 373 function setupVideo() { 374 video.forEach((element) => { 375 if (element && !element.classList.contains("video-js")) { 376 element.addEventListener("play", () => { 377 console.log("[Native Video] play triggered"); 378 section.classList.add("playing"); 379 section.classList.remove("paused"); 380 updateAriaLabel(playButton, "pause"); 381 }); 382 element.addEventListener("pause", () => { 383 section.classList.remove("playing"); 384 section.classList.add("paused"); 385 updateAriaLabel(playButton, "play"); 386 }); 387 } 388 }); 389 } 390 setupVideo(); 391 if (playButton) { 392 playButton.addEventListener("click", () => { 393 if (brightcovePlayers.length > 0) {
394 brightcovePlayers.forEach((element) => { 395 element.paused() ? element.play() : element.pause(); 396 }); 397 } else if (video.length > 0) { 398 video.forEach((element) => { 399 element.paused ? element.play() : element.pause(); 400 }); 401 } 402 }); 403 } 404 function updateAriaLabel(button, state) { 405 if (!button) 406 return; 407 const playLabel = button.getAttribute("data-play-label") || "Play"; 408 const pauseLabel = button.getAttribute("data-pause-label") || "Pause"; 409 button.setAttribute("aria-label", state === "pause" ? pauseLabel : playLabel); 410 } 411 { 412 console.log("[CorporateImageVideoBlock] Initialized"); 413 } 414} 415var __glob_4_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 416 __proto__: null, 417 "default": enhanceCorporateImageVideo 418}, Symbol.toStringTag, { value: "Module" })); 419function enhanceCorporateInSectionAnchorNavigationBlock(el) { 420 const section = el; 421 const nav = section.querySelector("nav"); 422 const container = nav?.querySelector(".container"); 423 const scrollable = container?.querySelector(".items"); 424 const links = scrollable?.querySelectorAll('a[href^="#"]'); 425 const backBtn = container?.querySelector(".back"); 426 const forwardBtn = container?.querySelector(".forward"); 427 const scrollOffset = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--site-header-height"), 10) || 64; 428 const scrollStep = 150; 429 const tolerance = 16; 430 if (!nav || !container || !scrollable || !links?.length) 431 return; 432 function handleClick(e) { 433 const id = this.hash.slice(1); 434 const target = document.getElementById(id); 435 if (!target) 436 return; 437 e.preventDefault(); 438 window.isProgrammaticScroll = true; 439 const y = target.getBoundingClientRect().top + window.pageYOffset - scrollOffset; 440 window.scrollTo({ top: y, behavior: "smooth" }); 441 const onScrollEnd = () => { 442 window.isProgrammaticScroll = false; 443 updateActiveLink(); 444 updateScrollButtons(); 445 window.dispatchEvent(new Event("scroll")); 446 window.removeEventListener("scrollend", onScrollEnd); 447 }; 448 window.addEventListener("scrollend", onScrollEnd); 449 setTimeout(() => { 450 window.isProgrammaticScroll = false; 451 updateActiveLink(); 452 updateScrollButtons(); 453 window.dispatchEvent(new Event("scroll")); 454 window.removeEventListener("scrollend", onScrollEnd); 455 }, 800); 456 } 457 links.forEach((link) => link.addEventListener("click", handleClick)); 458 function updateActiveLink() { 459 let activeLink = null; 460 let lastAbove = null; 461 let firstBelow = null; 462 links.forEach((link, i) => { 463 const id = link.hash.slice(1); 464 const target = document.getElementById(id); 465 if (!target) 466 return; 467 const top = target.getBoundingClientRect().top - scrollOffset; 468 if (top <= tolerance) { 469 lastAbove = link; 470 } else if (!firstBelow) { 471 firstBelow = link; 472 } 473 }); 474 activeLink = lastAbove || firstBelow || links[0]; 475 links.forEach((link, i) => { 476 const isActive = link === activeLink; 477 link.classList.toggle("border-b-[3px]", isActive); 478 link.classList.toggle("border-secondary-gold", isActive); 479 link.classList.toggle("text-primary-navy", isActive); 480 link.classList.toggle("text-secondary-medium-blue", !isActive); 481 if (isActive && scrollable) { 482 const linkLeft = link.offsetLeft; 483 const linkRight = linkLeft + link.offsetWidth; 484 const visibleStart = scrollable.scrollLeft; 485 const visibleEnd = visibleStart + scrollable.offsetWidth; 486 const isFirst = i === 0; 487 i === links.length - 1; 488 if (isFirst) { 489 if (scrollable.scrollLeft !== 0) { 490 scrollable.scrollTo({ left: 0, behavior: "smooth" }); 491 } 492 } else if (linkLeft < visibleStart || linkRight > visibleEnd) { 493 scrollable.scrollTo({ 494 left: linkLeft - 16, 495 behavior: "smooth" 496 }); 497 } 498 } 499 }); 500 } 501 function updateScrollButtons() { 502 if (!scrollable || !backBtn || !forwardBtn) 503 return; 504 const maxScrollLeft = scrollable.scrollWidth - scrollable.clientWidth; 505 const buffer = 4;
506 const atStart = scrollable.scrollLeft <= buffer; 507 const atEnd = scrollable.scrollLeft >= maxScrollLeft - buffer; 508 backBtn.hidden = atStart; 509 forwardBtn.hidden = atEnd; 510 } 511 function observeStickyState(section2) { 512 const nav2 = section2.querySelector("nav.header"); 513 const sentinel = section2.querySelector(".sticky-sentinel"); 514 if (!nav2 || !sentinel) { 515 return; 516 } 517 const observer = new IntersectionObserver( 518 ([entry]) => { 519 const isSticky = !entry.isIntersecting; 520 nav2.classList.toggle("is-sticky", isSticky); 521 section2.classList.toggle("is-sticky", isSticky); 522 }, 523 { threshold: [0] } 524 ); 525 observer.observe(sentinel); 526 } 527 function debounce(fn, delay = 100) { 528 let timeout; 529 return (...args) => { 530 clearTimeout(timeout); 531 timeout = setTimeout(() => fn(...args), delay); 532 }; 533 } 534 if (backBtn) { 535 backBtn.addEventListener("click", () => { 536 scrollable.scrollBy({ left: -scrollStep, behavior: "smooth" }); 537 }); 538 } 539 if (forwardBtn) { 540 forwardBtn.addEventListener("click", () => { 541 scrollable.scrollBy({ left: scrollStep, behavior: "smooth" }); 542 }); 543 } 544 scrollable.addEventListener("scroll", updateScrollButtons); 545 window.addEventListener("resize", debounce(() => { 546 updateActiveLink(); 547 updateScrollButtons(); 548 })); 549 window.addEventListener("scroll", updateActiveLink); 550 updateActiveLink(); 551 updateScrollButtons(); 552 observeStickyState(section); 553} 554var __glob_4_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 555 __proto__: null, 556 "default": enhanceCorporateInSectionAnchorNavigationBlock 557}, Symbol.toStringTag, { value: "Module" })); 558gsapWithCSS.registerPlugin(ScrollTrigger); 559function animateCountUp(el, opts = {}) { 560 const text = el.textContent.trim(); 561 const isCurrency = text.startsWith("$"); 562 const isPercent = text.endsWith("%"); 563 const clean = text.replace(/[^\d.-]/g, ""); 564 const finalValue = parseFloat(clean); 565 if (isNaN(finalValue)) 566 return; 567 const obj = { val: 0 }; 568 ScrollTrigger.create({ 569 trigger: el, 570 start: "top 80%", 571 once: true, 572 onEnter: () => { 573 gsapWithCSS.to(obj, { 574 val: finalValue, 575 duration: opts.duration || 1.2, 576 ease: opts.ease || "power1.out", 577 onUpdate() { 578 const current = Number(obj.val); 579 if (!Number.isFinite(current)) { 580 el.textContent = text; 581 return; 582 } 583 el.textContent = `${isCurrency ? "$" : ""}${current.toFixed(2)}${isPercent ? "%" : ""}`; 584 } 585 }); 586 } 587 }); 588 ScrollTrigger.refresh(); 589} 590function initCountAnimations() { 591 const animatedEls = gsapWithCSS.utils.toArray(".count-up, .count-down, .count-up-repeat, .count-down-repeat"); 592 animatedEls.forEach((el) => { 593 const isRepeat = el.classList.contains("count-up-repeat") || el.classList.contains("count-down-repeat"); 594 el.classList.contains("count-up") || el.classList.contains("count-up-repeat"); 595 const isCountDown = el.classList.contains("count-down") || el.classList.contains("count-down-repeat"); 596 const rawText = el.textContent.trim(); 597 const clean = rawText.replace(/[^\d.-]/g, ""); 598 const targetValue = parseFloat(clean); 599 const isCurrency = rawText.startsWith("$"); 600 const isPercent = rawText.endsWith("%"); 601 if (isNaN(targetValue)) 602 return; 603 ScrollTrigger.create({ 604 trigger: el, 605 start: "top 80%", 606 toggleActions: isRepeat ? "restart none none reset" : "play none none none", 607 onEnter: () => { 608 const counter = { val: isCountDown ? targetValue : 0 }; 609 gsapWithCSS.to(counter, { 610 val: isCountDown ? 0 : targetValue, 611 duration: 1.5, 612 ease: "power1.out", 613 onUpdate() { 614 const current = Number(counter.val); 615 if (!Number.isFinite(current)) { 616 el.textContent = rawText; 617 return; 618 } 619 el.textContent = `${isCurrency ? "$" : ""}${Math.round(current)}${isPercent ? "%" : ""}`; 620 } 621 }); 622 dev?.log?.(`\u{1F522} Triggered ${isCountDown ? "count-down" : "count-up"} for`, el); 623 } 624 }); 625 }); 626 ScrollTrigger.refresh(); 627} 628var CountAnimator = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 629 __proto__: null, 630 animateCountUp, 631 initCountAnimations 632}, Symbol.toStringTag, { value: "Module" })); 633function CorporateInvestorResourcesBlock(container) { 634 const rawSymbol = container.getAttribute("data-symbol") || "HY"; 635 const symbol = rawSymbol.split(":").pop().trim().toUpperCase(); 636 let root = window.location.origin; 637 let endpoint = root + `/api/stockquote/${symbol.toLowerCase()}`; 638 if (!["AAPL", "MSFT"].includes(symbol)) 639 endpoint = root + "/api/stockquote/hy"; 640 const setState = (state) => { 641 container.classList.remove("is-loading", "has-error", "is-loaded"); 642 container.classList.add(state); 643 }; 644 const setData = ({ symbol: symbol2, price, change, percentChange, timestamp }) => { 645 const date = new Date(timestamp); 646 const dateLabel = `${date.toLocaleDateString("en-US", { 647 year: "numeric", 648 month: "long", 649 day: "numeric" 650 })}`; 651 const prefix = change < 0 ? "-" : "+"; 652 const changeValue = `${prefix}$${Math.abs(change).toFixed(2)} (${percentChange.toFixed(2)}%)`; 653 const setText = (selector, text) => { 654 const el2 = container.querySelector(selector); 655 if (el2) 656 el2.textContent = text; 657 }; 658 setText(".date-value", dateLabel);
659 setText(".stock-price", `$${price.toFixed(2)}`); 660 setText(".change-value", changeValue); 661 const el = container.querySelector(".stock-price"); 662 el.textContent = `$${price.toFixed(2)}`; 663 animateCountUp(el); 664 setState("is-loaded"); 665 }; 666 const fallback = () => { 667 setData({ 668 symbol, 669 price: 50.63, 670 change: -0.51, 671 percentChange: -0.99, 672 timestamp: new Date().toISOString() 673 }); 674 setState("has-error"); 675 }; 676 setState("is-loading"); 677 fetch(endpoint).then((res) => res.ok ? res.json() : Promise.reject("Fetch failed")).then(setData).catch((err) => { 678 console.error("\u274C Stock fetch failed:", err); 679 fallback(); 680 }); 681} 682var __glob_4_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 683 __proto__: null, 684 "default": CorporateInvestorResourcesBlock 685}, Symbol.toStringTag, { value: "Module" })); 686function enhanceCorporateLocationsMapBlock(blockElement) { 687 const initializeMap = () => { 688 __vitePreload(() => import("./CorporateLocationsMapController.10d56fbf.js"), true ? ["assets/CorporateLocationsMapController.10d56fbf.js","assets/vendor.7c830806.js","assets/vendor.e25f51f2.css"] : void 0).then(({ default: CorporateLocationsMapController }) => { 689 const controller = new CorporateLocationsMapController(blockElement); 690 controller.init(); 691 }).catch((error) => { 692 console.error("Failed to load CorporateLocationsMapController chunk:", error); 693 }); 694 }; 695 if (typeof IntersectionObserver !== "function") { 696 initializeMap(); 697 return; 698 } 699 const observer = new IntersectionObserver( 700 (entries, observerInstance) => { 701 entries.forEach((entry) => { 702 if (entry.isIntersecting) { 703 observerInstance.disconnect(); 704 initializeMap(); 705 } 706 }); 707 }, 708 { 709 rootMargin: "400px 0px", 710 threshold: 0 711 } 712 ); 713 observer.observe(blockElement); 714} 715var __glob_4_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 716 __proto__: null, 717 "default": enhanceCorporateLocationsMapBlock 718}, Symbol.toStringTag, { value: "Module" })); 719function enhanceCorporateNewsListingPage(el) { 720 const url = new URL(window.location.href); 721 const query = url.searchParams; 722 const defaultState = { 723 year: query.has("year") ? query.get("year") : el.dataset.defaultYear || null, 724 page: query.get("page") || "1", 725 size: query.get("size") || "12" 726 }; 727 const selects = { 728 year: el.querySelector('select[data-query="year"]'), 729 size: el.querySelector('select[data-query="size"]') 730 }; 731 const buttons = { 732 next: el.querySelector('[data-action="next"]'), 733 previous: el.querySelector('[data-action="previous"]') 734 }; 735 if (selects.year) { 736 const selectDefaultValue = selects.year.dataset?.defaultValue || ""; 737 const initialValue = defaultState.year || selectDefaultValue || ""; 738 selects.year.value = initialValue; 739 } 740 if (selects.size) 741 selects.size.value = defaultState.size; 742 function updateQuery(params = {}) { 743 const newParams = { 744 year: params.hasOwnProperty("year") ? params.year : query.has("year") ? query.get("year") : null, 745 page: params.page || query.get("page") || "1", 746 size: params.size || query.get("size") || "12" 747 }; 748 const newUrl = new URL(window.location.href); 749 if (newParams.year) { 750 newUrl.searchParams.set("year", newParams.year); 751 } else { 752 newUrl.searchParams.delete("year"); 753 } 754 newUrl.searchParams.set("page", newParams.page); 755 newUrl.searchParams.set("size", newParams.size); 756 window.location.href = newUrl.toString(); 757 } 758 selects.year?.addEventListener("change", (e) => { 759 const newYear = e.target.value || null; 760 updateQuery({ year: newYear, page: "1" }); 761 }); 762 selects.size?.addEventListener("change", (e) => { 763 const newSize = e.target.value; 764 updateQuery({ size: newSize, page: "1" }); 765 }); 766 buttons.previous?.addEventListener("click", () => { 767 const currentPage = parseInt(query.get("page") || "1", 10); 768 if (currentPage > 1) { 769 updateQuery({ page: (currentPage - 1).toString() }); 770 } 771 }); 772 buttons.next?.addEventListener("click", () => { 773 const currentPage = parseInt(query.get("page") || "1", 10); 774 const total = parseInt(el.querySelector(".pagination")?.dataset.total || "1", 10); 775 if (currentPage < total) { 776 updateQuery({ page: (currentPage + 1).toString() }); 777 } 778 }); 779 const paginationContainer = el.querySelector(".pagination"); 780 const statusEl = paginationContainer?.querySelector(".pagination-status"); 781 function updatePaginationStatus() { 782 const current = parseInt(paginationContainer?.dataset.current || "1", 10); 783 const total = parseInt(paginationContainer?.dataset.total || "1", 10); 784 const size = parseInt(defaultState.size, 10); 785 if (paginationContainer) { 786 const showAll = size === -1; 787 const singlePage = total <= 1; 788 paginationContainer.classList.toggle("hide-buttons", showAll || singlePage); 789 paginationContainer.classList.toggle("hide-status", showAll); 790 } 791 if (statusEl) { 792 statusEl.textContent = `${current} of ${total}`; 793 } 794 } 795 updatePaginationStatus(); 796} 797var __glob_4_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 798 __proto__: null, 799 "default": enhanceCorporateNewsListingPage 800}, Symbol.toStringTag, { value: "Module" })); 801function enhancePatentAccordion(el) { 802 console.log("\u{1F4C4} CorporatePatentsPage enhancer initialized:", el); 803 const accordions = Array.from(el.querySelectorAll(".CorporatePatentAccordionBlock")); 804 const searchInput = el.querySelector(".search"); 805 const noResultsEl = el.querySelector(".no-results"); 806 const controls = el.querySelector(".controls"); 807 const prevBtn = el.querySelector('[data-action="prev"]'); 808 const nextBtn = el.querySelector('[data-action="next"]'); 809 const statusEl = el.querySelector(".pagination-status"); 810 const state = { 811 page: 1, 812 itemsPerPage: 25, 813 filteredItems: [] 814 }; 815 if (!searchInput) 816 return; 817 console.log(`\u{1F50D} Found ${accordions.length} accordion(s)`); 818 console.log("\u{1F4CE} Found search input?", searchInput); 819 el.querySelectorAll(".accordion-toggle").forEach((toggle) => { 820 const parent = toggle.closest(".accordion-item"); 821 toggle.addEventListener("click", () => { 822 const isOpen = parent.getAttribute("data-open") === "true"; 823 const isHighlighting = el.querySelector(".line.highlighted"); 824 if (!isHighlighting) { 825 accordions.forEach((item) => { 826 if (item !== parent) { 827 item.setAttribute("data-open", "false"); 828 item.querySelector(".accordion-toggle")?.setAttribute("aria-expanded", "false"); 829 } 830 }); 831 } 832 parent.setAttribute("data-open", isOpen ? "false" : "true"); 833 toggle.setAttribute("aria-expanded", String(!isOpen)); 834 }); 835 }); 836 function renderPagination() { 837 if (!controls) 838 return; 839 const totalItems = state.filteredItems.length; 840 const totalPages = Math.ceil(totalItems / state.itemsPerPage); 841 if (totalItems === 0) { 842 controls.classList.add("hidden"); 843 return; 844 } 845 controls.classList.remove("hidden"); 846 if (statusEl) { 847 statusEl.textContent = `${state.page} of ${totalPages}`; 848 } 849 if (prevBtn) { 850 prevBtn.disabled = state.page <= 1; 851 prevBtn.classList.toggle("disabled", state.page <= 1); 852 } 853 if (nextBtn) { 854 nextBtn.disabled = state.page >= totalPages; 855 nextBtn.classList.toggle("disabled", state.page >= totalPages); 856 } 857 const start = (state.page - 1) * state.itemsPerPage; 858 const end = start + state.itemsPerPage;
859 state.filteredItems.forEach((item, index2) => { 860 if (index2 >= start && index2 < end) { 861 item.style.display = ""; 862 } else { 863 item.style.display = "none"; 864 } 865 }); 866 } 867 function runSearch(term, { initialLoad = false } = {}) { 868 const lower = term.toLowerCase().trim(); 869 state.filteredItems = []; 870 accordions.forEach((item) => { 871 const rawText = item.querySelector(".searchable")?.textContent?.toLowerCase() || ""; 872 const isMatch = rawText.includes(lower); 873 const toggle = item.querySelector(".accordion-toggle"); 874 const isInitiallyOpen = item.getAttribute("data-open") === "true"; 875 const shouldInclude = !lower || isMatch; 876 if (shouldInclude) { 877 state.filteredItems.push(item); 878 } else { 879 item.style.display = "none"; 880 } 881 item.querySelectorAll("[data-searchtext]").forEach((line) => { 882 const text = line.getAttribute("data-searchtext")?.toLowerCase() || ""; 883 const shouldHighlight = !!lower && text.includes(lower); 884 line.classList.toggle("highlighted", shouldHighlight); 885 }); 886 if (initialLoad) { 887 toggle?.setAttribute("aria-expanded", isInitiallyOpen); 888 return; 889 } 890 if (lower && isMatch) { 891 item.setAttribute("data-open", "true"); 892 toggle?.setAttribute("aria-expanded", "true"); 893 } 894 if (!lower) { 895 item.setAttribute("data-open", "false"); 896 toggle?.setAttribute("aria-expanded", "false"); 897 } 898 }); 899 state.page = 1; 900 renderPagination(); 901 if (noResultsEl) { 902 noResultsEl.classList.toggle("visible", state.filteredItems.length === 0 && !!lower); 903 } 904 } 905 searchInput.addEventListener("input", (e) => { 906 const term = e.target.value; 907 console.log("\u{1F9EA} Input triggered:", term); 908 runSearch(term); 909 }); 910 function scrollToTop() { 911 const searchForm = el.querySelector(".search-form"); 912 if (!searchForm) 913 return; 914 const header = document.querySelector("header.site-header--visible") || document.querySelector("header"); 915 let headerSpace = 150; 916 if (header) { 917 const rect = header.getBoundingClientRect(); 918 if (rect.bottom > 0) { 919 headerSpace = rect.bottom; 920 } 921 } 922 const offset = headerSpace + 20; 923 const elementPosition = searchForm.getBoundingClientRect().top; 924 const offsetPosition = elementPosition + window.pageYOffset - offset; 925 window.scrollTo({ 926 top: offsetPosition, 927 behavior: "smooth" 928 }); 929 } 930 if (prevBtn) { 931 prevBtn.addEventListener("click", () => { 932 if (state.page > 1) { 933 state.page--; 934 renderPagination(); 935 scrollToTop(); 936 } 937 }); 938 } 939 if (nextBtn) { 940 nextBtn.addEventListener("click", () => { 941 const totalPages = Math.ceil(state.filteredItems.length / state.itemsPerPage); 942 if (state.page < totalPages) { 943 state.page++; 944 renderPagination(); 945 scrollToTop(); 946 } 947 }); 948 } 949 runSearch("", { initialLoad: true }); 950} 951var __glob_4_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 952 __proto__: null, 953 "default": enhancePatentAccordion 954}, Symbol.toStringTag, { value: "Module" })); 955function enhanceCorporateSearchResultsPage(el) { 956 const url = new URL(window.location.href); 957 const query = url.searchParams; 958 const defaultState = { 959 q: query.get("q") || "", 960 page: query.get("page") || "1", 961 size: query.get("size") || "10" 962 }; 963 const input = el.querySelector(".SearchBar-input"); 964 const searchButton = el.querySelector(".SearchBar-toggle"); 965 const selects = { 966 size: el.querySelector('select[data-query="size"]') 967 }; 968 const buttons = { 969 next: el.querySelector('[data-action="next"]'), 970 previous: el.querySelector('[data-action="previous"]') 971 }; 972 if (input) { 973 input.value = defaultState.q; 974 const iconOpen = el.querySelector(".search-icon-open"); 975 const iconClose = el.querySelector(".search-icon-close"); 976 const hasValue = input.value.trim().length > 0; 977 iconOpen?.classList.toggle("hidden", hasValue); 978 iconClose?.classList.toggle("hidden", !hasValue); 979 } 980 if (selects.size) 981 selects.size.value = defaultState.size; 982 function updateQuery(params = {}) { 983 const newParams = { 984 q: typeof params.q !== "undefined" ? params.q : query.get("q") || "", 985 page: params.page || query.get("page") || "1", 986 size: params.size || query.get("size") || "10" 987 }; 988 const newUrl = new URL(window.location.href);
989 Object.entries(newParams).forEach(([key, value]) => { 990 newUrl.searchParams.set(key, value); 991 }); 992 window.location.href = newUrl.toString(); 993 } 994 if (input) { 995 input.addEventListener("input", () => { 996 const iconOpen = el.querySelector(".search-icon-open"); 997 const iconClose = el.querySelector(".search-icon-close"); 998 const hasValue = input.value.trim().length > 0; 999 iconOpen?.classList.toggle("hidden", hasValue); 1000 iconClose?.classList.toggle("hidden", !hasValue); 1001 }); 1002 input.addEventListener("keydown", (e) => { 1003 if (e.key === "Enter") { 1004 const searchValue = input.value.trim(); 1005 updateQuery({ q: searchValue, page: "1" }); 1006 } 1007 }); 1008 } 1009 searchButton?.addEventListener("click", () => { 1010 if (input?.value.trim().length > 0) { 1011 input.value = ""; 1012 input.focus(); 1013 const iconOpen = el.querySelector(".search-icon-open"); 1014 const iconClose = el.querySelector(".search-icon-close"); 1015 iconOpen?.classList.remove("hidden"); 1016 iconClose?.classList.add("hidden"); 1017 } 1018 }); 1019 selects.size?.addEventListener("change", (e) => { 1020 const newSize = e.target.value; 1021 updateQuery({ size: newSize, page: "1" }); 1022 }); 1023 buttons.previous?.addEventListener("click", () => { 1024 const currentPage = parseInt(query.get("page") || "1", 10); 1025 if (currentPage > 1) { 1026 updateQuery({ page: (currentPage - 1).toString() }); 1027 } 1028 }); 1029 buttons.next?.addEventListener("click", () => { 1030 const currentPage = parseInt(query.get("page") || "1", 10); 1031 const total = parseInt(el.querySelector(".pagination")?.dataset.total || "1", 10); 1032 if (currentPage < total) { 1033 updateQuery({ page: (currentPage + 1).toString() }); 1034 } 1035 }); 1036 const paginationContainer = el.querySelector(".pagination"); 1037 const statusEl = paginationContainer?.querySelector(".pagination-status"); 1038 function updatePaginationStatus() { 1039 const current = paginationContainer?.dataset.current || "1"; 1040 const total = paginationContainer?.dataset.total || "1"; 1041 if (statusEl) 1042 statusEl.textContent = `${current} of ${total}`; 1043 } 1044 function updateTotalStatus() { 1045 const totalsEl = el.querySelector(".totals"); 1046 if (!totalsEl) 1047 return; 1048 const searchTerm = defaultState.q?.trim(); 1049 if (!searchTerm) { 1050 totalsEl.style.display = "none"; 1051 return; 1052 } 1053 const count = parseInt(totalsEl.dataset.count || "0", 10); 1054 const noResultsTemplate = totalsEl.dataset.noResults; 1055 const resultsTemplate = totalsEl.dataset.results; 1056 totalsEl.style.display = ""; 1057 if (count > 0 && resultsTemplate) { 1058 totalsEl.textContent = resultsTemplate.replace("%d", count).replace("%q", searchTerm); 1059 } else if (noResultsTemplate) { 1060 totalsEl.textContent = noResultsTemplate.replace("%q", searchTerm); 1061 } else { 1062 totalsEl.textContent = ""; 1063 } 1064 } 1065 updatePaginationStatus(); 1066 updateTotalStatus(); 1067} 1068var __glob_4_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1069 __proto__: null, 1070 "default": enhanceCorporateSearchResultsPage 1071}, Symbol.toStringTag, { value: "Module" })); 1072function enhanceCorporateTabFeatureBlock(el) { 1073 const section = el; 1074 const nav = section.querySelector("nav.header"); 1075 const sentinel = section.querySelector(".sticky-sentinel"); 1076 const container = nav?.querySelector(".container"); 1077 const scrollable = container?.querySelector(".items"); 1078 const links = scrollable?.querySelectorAll('a[href^="#"]'); 1079 const backBtn = container?.querySelector(".back"); 1080 const forwardBtn = container?.querySelector(".forward"); 1081 const tabPanelContainer = section.querySelector(".tab-panels"); 1082 const panelElements = Array.from(tabPanelContainer?.children || []); 1083 const scrollStep = 150; 1084 const buffer = 4; 1085 if (!nav || !sentinel || !scrollable || !links?.length || !panelElements.length || !tabPanelContainer) 1086 return; 1087 if (backBtn) { 1088 backBtn.hidden = true; 1089 } 1090 if (forwardBtn) { 1091 forwardBtn.hidden = true; 1092 } 1093 function showTab(link, shouldScroll = true) { 1094 const id = link.hash.slice(1); 1095 const index2 = panelElements.findIndex((panel) => panel.id === id); 1096 if (index2 === -1) 1097 return; 1098 tabPanelContainer.setAttribute("data-tab", index2.toString());
1099 panelElements.forEach((panel) => panel.classList.remove("is-visible")); 1100 requestAnimationFrame(() => { 1101 const panel = panelElements[index2]; 1102 if (panel) 1103 panel.classList.add("is-visible"); 1104 }); 1105 updateActiveTab(link); 1106 if (shouldScroll) { 1107 requestAnimationFrame(() => { 1108 const scrollOffset = parseInt( 1109 getComputedStyle(document.documentElement).getPropertyValue("--site-header-height"), 1110 10 1111 ) || 64; 1112 const bounds = tabPanelContainer.getBoundingClientRect(); 1113 if (bounds.top < scrollOffset || bounds.bottom > window.innerHeight) { 1114 const topOfBlock = section.getBoundingClientRect().top + window.pageYOffset - scrollOffset; 1115 window.scrollTo({ top: topOfBlock, behavior: "smooth" }); 1116 } 1117 }); 1118 } 1119 } 1120 function handleClick(e) { 1121 e.preventDefault(); 1122 showTab(this); 1123 } 1124 function updateActiveTab(activeLink) { 1125 links.forEach((link, i) => { 1126 const isActive = link === activeLink; 1127 link.classList.toggle("border-b-[3px]", isActive); 1128 link.classList.toggle("border-secondary-gold", isActive); 1129 link.classList.toggle("text-primary-navy", isActive); 1130 link.classList.toggle("text-secondary-medium-blue", !isActive); 1131 if (isActive && scrollable) { 1132 const linkLeft = link.offsetLeft; 1133 const linkRight = linkLeft + link.offsetWidth; 1134 const visibleStart = scrollable.scrollLeft; 1135 const visibleEnd = visibleStart + scrollable.offsetWidth; 1136 if (i === 0 && scrollable.scrollLeft !== 0) { 1137 scrollable.scrollTo({ left: 0, behavior: "smooth" }); 1138 } else if (linkLeft < visibleStart || linkRight > visibleEnd) { 1139 scrollable.scrollTo({ 1140 left: linkLeft - 16, 1141 behavior: "smooth" 1142 }); 1143 } 1144 } 1145 }); 1146 updateScrollButtons(); 1147 } 1148 function updateScrollButtons() { 1149 if (!scrollable || !backBtn || !forwardBtn) 1150 return; 1151 const maxScrollLeft = scrollable.scrollWidth - scrollable.clientWidth; 1152 if (maxScrollLeft <= buffer) { 1153 backBtn.hidden = true; 1154 forwardBtn.hidden = true; 1155 return; 1156 } 1157 const atStart = scrollable.scrollLeft <= buffer; 1158 const atEnd = scrollable.scrollLeft >= maxScrollLeft - buffer; 1159 backBtn.hidden = atStart; 1160 forwardBtn.hidden = atEnd; 1161 } 1162 function observeStickyState(section2) { 1163 if (!nav || !sentinel) { 1164 return; 1165 } 1166 const observer = new IntersectionObserver( 1167 ([entry]) => { 1168 !entry.isIntersecting; 1169 }, 1170 { threshold: [0] } 1171 ); 1172 observer.observe(sentinel); 1173 } 1174 function debounce(fn, delay = 100) { 1175 let timeout; 1176 return (...args) => { 1177 clearTimeout(timeout); 1178 timeout = setTimeout(() => fn(...args), delay); 1179 }; 1180 } 1181 links.forEach((link) => link.addEventListener("click", handleClick)); 1182 if (backBtn) { 1183 backBtn.addEventListener("click", () => { 1184 scrollable.scrollBy({ left: -scrollStep, behavior: "smooth" }); 1185 }); 1186 } 1187 if (forwardBtn) { 1188 forwardBtn.addEventListener("click", () => { 1189 scrollable.scrollBy({ left: scrollStep, behavior: "smooth" }); 1190 }); 1191 } 1192 scrollable.addEventListener("scroll", updateScrollButtons); 1193 window.addEventListener("resize", debounce(() => { 1194 updateScrollButtons(); 1195 })); 1196 tabPanelContainer.setAttribute("data-tab", "0"); 1197 panelElements.forEach((panel, i) => { 1198 if (i === 0) { 1199 panel.classList.add("is-visible"); 1200 } else { 1201 panel.classList.remove("is-visible"); 1202 } 1203 }); 1204 updateActiveTab(links[0]); 1205 updateScrollButtons(); 1206 observeStickyState(); 1207 function handleInitialHash() { 1208 const hash = window.location.hash; 1209 if (hash) { 1210 const targetLink = scrollable.querySelector(`a[href="${hash}"]`); 1211 if (targetLink) { 1212 showTab(targetLink, true); 1213 } 1214 } 1215 } 1216 handleInitialHash(); 1217} 1218var __glob_4_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1219 __proto__: null, 1220 "default": enhanceCorporateTabFeatureBlock 1221}, Symbol.toStringTag, { value: "Module" })); 1222gsapWithCSS.registerPlugin(Draggable, InertiaPlugin); 1223function enhanceThumbnailCarousel(el) { 1224 const scrollable = el.querySelector(".carousel-scrollable"); 1225 if (!scrollable) 1226 return; 1227 const cards = scrollable.querySelector(".carousel-cards"); 1228 const cardEls = cards ? Array.from(cards.querySelectorAll(".carousel-card")) : []; 1229 const swiperHost = el.querySelector(".thumbnail-swiper"); 1230 if (!swiperHost) 1231 return; 1232 const slidesPerView = window.innerWidth >= 768 ? cardEls.length >= 3 ? 3 : 2 : 1.3; 1233 function updateNavVisibility() { 1234 const showNav = isMobile() ? cardEls.length > 1 : cardEls.length > 3; 1235 el.querySelector(".carousel-nav")?.classList.toggle("hidden", !showNav); 1236 } 1237 function isMobile() { 1238 return window.matchMedia("(max-width: 767px)").matches; 1239 } 1240 new Swiper(swiperHost, { 1241 modules: [Navigation], 1242 enabled: true, 1243 slidesPerView, 1244 spaceBetween: window.innerWidth >= 768 ? 20 : 16, 1245 navigation: { 1246 nextEl: ".swiper-button-next", 1247 prevEl: ".swiper-button-prev" 1248 }, 1249 simulateTouch: true, 1250 initialSlide: 0, 1251 allowTouchMove: true, 1252 centeredSlides: false 1253 }); 1254 updateNavVisibility(); 1255 window.addEventListener("resize", () => { 1256 updateNavVisibility(); 1257 }); 1258} 1259var __glob_4_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1260 __proto__: null, 1261 "default": enhanceThumbnailCarousel
1262}, Symbol.toStringTag, { value: "Module" })); 1263function enhanceCorporateVerticalListingBlock(el) { 1264 const section = el; 1265 const topicLinks = section.querySelectorAll(".topic-link"); 1266 const topicDetails = section.querySelectorAll(".topic-details"); 1267 let hoveredItemIndex = 0; 1268 function toggleHoverEffect() { 1269 topicDetails.forEach((detail, index2) => { 1270 if (index2 == hoveredItemIndex) { 1271 detail.style.opacity = "1"; 1272 } else { 1273 detail.style.opacity = "0"; 1274 } 1275 }); 1276 topicLinks.forEach((link, index2) => { 1277 let linkIcon = link.querySelector(".icon"); 1278 if (index2 == hoveredItemIndex) { 1279 linkIcon.style.opacity = "1"; 1280 } else { 1281 linkIcon.style.opacity = "0"; 1282 } 1283 }); 1284 } 1285 toggleHoverEffect(); 1286 topicLinks.forEach((link, index2) => { 1287 link.addEventListener("mouseenter", () => { 1288 hoveredItemIndex = index2; 1289 toggleHoverEffect(); 1290 }); 1291 }); 1292 topicLinks.forEach((link, index2) => { 1293 link.addEventListener("keyup", function(event) { 1294 event.preventDefault(); 1295 hoveredItemIndex = index2; 1296 if (event.keyCode === 9) { 1297 toggleHoverEffect(); 1298 return; 1299 } 1300 if (event.keyCode === 9) { 1301 if (event.shiftKey) { 1302 hoveredItemIndex = index2; 1303 toggleHoverEffect(); 1304 return; 1305 } 1306 } 1307 }); 1308 }); 1309} 1310var __glob_4_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1311 __proto__: null, 1312 "default": enhanceCorporateVerticalListingBlock 1313}, Symbol.toStringTag, { value: "Module" })); 1314function enhanceMultiCardBlock(el) { 1315 const cards = el.querySelectorAll(".card"); 1316 let heightOfCards = 0; 1317 function isMobile() { 1318 return window.matchMedia("(max-width: 767px)").matches; 1319 } 1320 function calculateHeightOfCards() { 1321 if (el && cards && !isMobile()) { 1322 if (cards.length <= 2) { 1323 heightOfCards = 722; 1324 return; 1325 } else if (cards.length === 3) { 1326 heightOfCards = 478; 1327 return; 1328 } else { 1329 heightOfCards = 458; 1330 return; 1331 } 1332 } else { 1333 heightOfCards = 381; 1334 } 1335 } 1336 function setHeightOfCards() { 1337 cards.forEach((element) => { 1338 element.style.height = heightOfCards + "px"; 1339 }); 1340 } 1341 const swiperEl = el.querySelector(".swiper"); 1342 const swiper = new Swiper(swiperEl, { 1343 enabled: true, 1344 slidesPerView: 1.3, 1345 spaceBetween: 16, 1346 simulateTouch: true, 1347 initialSlide: 0, 1348 allowTouchMove: true, 1349 centeredSlides: false, 1350 breakpoints: { 1351 1023: { 1352 enabled: false, 1353 spaceBetween: 8 1354 } 1355 } 1356 }); 1357 isMobile(); 1358 calculateHeightOfCards(); 1359 setHeightOfCards(); 1360 window.addEventListener("resize", () => { 1361 isMobile(); 1362 calculateHeightOfCards(); 1363 setHeightOfCards(); 1364 }); 1365 if (cards.length <= 1 && swiper && typeof swiper.destroy === "function") { 1366 swiper.destroy(true, true); 1367 } 1368} 1369var __glob_4_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1370 __proto__: null, 1371 "default": enhanceMultiCardBlock 1372}, Symbol.toStringTag, { value: "Module" })); 1373function enhanceHeader(el) { 1374 function getElementUnderHeader(x, y) { 1375 el.style.pointerEvents = "none"; 1376 const element = document.elementFromPoint(x, y); 1377 el.style.pointerEvents = ""; 1378 return element; 1379 } 1380 let lastScrollY = window.scrollY; 1381 let ticking = false; 1382 let headerHeight = el.offsetHeight; 1383 function updateHeaderState() { 1384 if (window.isProgrammaticScroll) { 1385 return; 1386 } 1387 const scrollY = window.scrollY; 1388 const nearTop = scrollY <= headerHeight * 2; 1389 const x = window.innerWidth / 2; 1390 const y = 5; 1391 const rawTarget = getElementUnderHeader(x, y); 1392 const heroSection = rawTarget?.closest('.hero, [data-component^="hero"]'); 1393 if (nearTop) { 1394 el.classList.remove("glass"); 1395 document.body.classList.remove("glass"); 1396 el.classList.add("site-header--visible"); 1397 document.body.classList.add("site-header--visible"); 1398 if (heroSection) { 1399 el.classList.add("hero"); 1400 document.body.classList.add("hero"); 1401 } else { 1402 el.classList.remove("hero"); 1403 document.body.classList.remove("hero"); 1404 } 1405 } else { 1406 el.classList.remove("hero"); 1407 el.classList.add("glass"); 1408 document.body.classList.remove("hero"); 1409 document.body.classList.add("glass"); 1410 if (scrollY > lastScrollY) { 1411 el.classList.remove("site-header--visible"); 1412 document.body.classList.remove("site-header--visible"); 1413 } else { 1414 el.classList.add("site-header--visible"); 1415 document.body.classList.add("site-header--visible"); 1416 } 1417 } 1418 lastScrollY = scrollY; 1419 ticking = false;
1420 } 1421 function onScroll() { 1422 if (!ticking) { 1423 requestAnimationFrame(updateHeaderState); 1424 ticking = true; 1425 } 1426 } 1427 window.addEventListener("scroll", onScroll); 1428 window.addEventListener("resize", () => { 1429 headerHeight = el.offsetHeight; 1430 }); 1431 const toggle = el.querySelector("[data-mobile-toggle]"); 1432 const searchToggle = el.querySelector("[data-search-toggle]"); 1433 const searchModal = el.querySelector("[data-search-modal]"); 1434 const searchClose = el.querySelector("[data-search-close]"); 1435 const searchPopout = el.querySelector("[data-search-popout]"); 1436 const iconOpen = searchToggle?.querySelector(".search-icon-open"); 1437 const iconClose = searchToggle?.querySelector(".search-icon-close"); 1438 const searchInput = searchPopout?.querySelector("input"); 1439 if (toggle) { 1440 toggle.addEventListener("click", () => { 1441 const header = document.querySelector('[data-component="SiteHeaderMobile"]'); 1442 document.body.classList.remove("menu-open"); 1443 header.classList.remove("menu-open", "is-sub"); 1444 }); 1445 } 1446 if (searchToggle && searchModal) { 1447 searchToggle.addEventListener("click", () => { 1448 searchModal.classList.add("open"); 1449 }); 1450 } 1451 if (searchClose && searchModal) { 1452 searchClose.addEventListener("click", () => { 1453 searchModal.classList.remove("open"); 1454 }); 1455 } 1456 if (searchToggle && searchPopout && iconOpen && iconClose) { 1457 let closeSearchPopout = function() { 1458 searchToggle.classList.remove("active"); 1459 searchPopout.classList.add("hidden"); 1460 iconOpen.classList.remove("hidden"); 1461 iconClose.classList.add("hidden"); 1462 }; 1463 searchToggle.addEventListener("click", (e) => { 1464 e.preventDefault(); 1465 const isOpen = searchToggle.classList.toggle("active"); 1466 searchPopout.classList.toggle("hidden", !isOpen); 1467 iconOpen.classList.toggle("hidden", isOpen); 1468 iconClose.classList.toggle("hidden", !isOpen); 1469 if (isOpen && searchInput) { 1470 setTimeout(() => searchInput.focus(), 100); 1471 } 1472 }); 1473 document.addEventListener("keydown", (e) => { 1474 if (e.key === "Escape" && searchToggle.classList.contains("active")) { 1475 closeSearchPopout(); 1476 } 1477 }); 1478 document.addEventListener("click", (e) => { 1479 const isClickInside = searchToggle.contains(e.target) || searchPopout.contains(e.target); 1480 if (!isClickInside && searchToggle.classList.contains("active")) { 1481 closeSearchPopout(); 1482 } 1483 }); 1484 } 1485} 1486var __glob_4_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1487 __proto__: null, 1488 "default": enhanceHeader 1489}, Symbol.toStringTag, { value: "Module" })); 1490const showLogs$1 = false; 1491dev.log("\u{1F4F1} Site Header Mobile module loaded", showLogs$1); 1492function enhanceSiteHeaderMobile(el) { 1493 dev.log("\u2705 enhanceSiteHeaderMobile initialized", el, showLogs$1); 1494 const toggleBtn = el.querySelector("[data-mobile-toggle]"); 1495 const searchToggle = el.querySelector("[data-search-toggle]"); 1496 const searchPopout = el.querySelector("[data-search-popout]"); 1497 const mainColumns = el.querySelector(".main-columns"); 1498 const subColumns = el.querySelector(".sub-columns"); 1499 const subColumnPanels = subColumns?.querySelectorAll(".column"); 1500 const backButtons = subColumns?.querySelectorAll(".close-column"); 1501 let activeSub = null; 1502 let scrollY = 0; 1503 function lockScroll() { 1504 scrollY = window.scrollY; 1505 document.body.classList.add("no-scroll"); 1506 document.body.style.position = "fixed"; 1507 document.body.style.top = `-${scrollY}px`; 1508 document.body.style.width = "100%"; 1509 } 1510 function unlockScroll() { 1511 document.body.classList.remove("no-scroll"); 1512 document.body.style.position = ""; 1513 document.body.style.top = ""; 1514 document.body.style.width = ""; 1515 window.scrollTo(0, scrollY); 1516 } 1517 function toggleNav(forceOpen = null) { 1518 const shouldOpen = forceOpen !== null ? forceOpen : !el.classList.contains("is-nav"); 1519 el.classList.remove("is-sub", "is-search"); 1520 el.classList.toggle("is-nav", shouldOpen); 1521 el.classList.toggle("menu-open", shouldOpen); 1522 if (shouldOpen) 1523 lockScroll(); 1524 else 1525 unlockScroll(); 1526 if (!shouldOpen) 1527 hideAllSubColumns(); 1528 dev.log("\u{1F4C2} Navigation toggled:", shouldOpen, showLogs$1); 1529 } 1530 function toggleSearch(forceOpen = null) { 1531 const shouldOpen = forceOpen !== null ? forceOpen : !el.classList.contains("is-search"); 1532 el.classList.remove("is-nav", "is-sub"); 1533 el.classList.toggle("is-search", shouldOpen); 1534 el.classList.toggle("menu-open", shouldOpen); 1535 if (shouldOpen) { 1536 lockScroll(); 1537 searchPopout.classList.remove("hidden"); 1538 searchPopout.querySelector("input")?.focus(); 1539 } else { 1540 unlockScroll(); 1541 searchPopout.classList.add("hidden"); 1542 } 1543 dev.log("\u{1F50D} Search toggled:", shouldOpen, showLogs$1); 1544 } 1545 function hideAllSubColumns() { 1546 subColumnPanels?.forEach((panel) => panel.classList.remove("visible")); 1547 activeSub = null; 1548 } 1549 mainColumns?.querySelectorAll(".column").forEach((col) => { 1550 const index2 = col.dataset.index; 1551 const subCol = index2 ? subColumns?.querySelector(`.column[data-index="${index2}
1551"]`) : null; 1552 const link = col.querySelector("a.nav-link"); 1553 if (!link) 1554 return; 1555 const hasChildren = !!subCol; 1556 link.addEventListener("click", (e) => { 1557 if (hasChildren) { 1558 e.preventDefault(); 1559 hideAllSubColumns(); 1560 subCol.classList.add("visible"); 1561 el.classList.remove("is-nav", "is-search"); 1562 el.classList.add("is-sub"); 1563 activeSub = subCol; 1564 subCol.querySelector(".close-column")?.focus(); 1565 dev.log(`\u27A1\uFE0F Opened sub column at index ${index2}`, showLogs$1); 1566 } 1567 }); 1568 link.addEventListener("keydown", (e) => { 1569 if ((e.key === "Enter" || e.key === " ") && hasChildren) { 1570 e.preventDefault(); 1571 link.click(); 1572 } 1573 }); 1574 }); 1575 backButtons?.forEach((btn) => { 1576 btn.addEventListener("click", () => { 1577 btn.closest(".column")?.classList.remove("visible"); 1578 el.classList.remove("is-sub"); 1579 el.classList.add("is-nav"); 1580 mainColumns?.querySelector("a.nav-link.active")?.focus(); 1581 }); 1582 btn.addEventListener("keydown", (e) => { 1583 if (e.key === "Escape") 1584 btn.click(); 1585 }); 1586 }); 1587 toggleBtn?.addEventListener("click", () => { 1588 if (el.classList.contains("is-sub")) { 1589 el.classList.remove("is-sub", "is-nav", "is-search", "menu-open"); 1590 unlockScroll(); 1591 hideAllSubColumns(); 1592 activeSub = null; 1593 dev.log("\u{1F519} Closed from sub level", showLogs$1); 1594 toggleBtn.setAttribute("aria-label", "Open main menu"); 1595 } else { 1596 toggleNav(); 1597 const isOpen = el.classList.contains("is-nav"); 1598 toggleBtn.setAttribute("aria-label", isOpen ? "Close main menu" : "Open main menu"); 1599 } 1600 }); 1601 searchToggle?.addEventListener("click", () => { 1602 toggleSearch(); 1603 const isSearchOpen = el.classList.contains("is-search"); 1604 searchToggle.setAttribute("aria-label", isSearchOpen ? "Close search" : "Open search"); 1605 }); 1606 document.addEventListener("keydown", (e) => { 1607 if (e.key === "Escape") { 1608 if (activeSub) { 1609 activeSub.classList.remove("visible"); 1610 activeSub = null; 1611 } else { 1612 toggleNav(false); 1613 toggleSearch(false); 1614 } 1615 } 1616 }); 1617 let touchStartX = 0; 1618 el.addEventListener("touchstart", (e) => { 1619 touchStartX = e.touches[0].clientX; 1620 }); 1621 el.addEventListener("touchend", (e) => { 1622 const delta = touchStartX - e.changedTouches[0].clientX; 1623 if (delta > 50 && activeSub) { 1624 activeSub.classList.remove("visible"); 1625 activeSub = null; 1626 } 1627 }); 1628 function getComputedBackgroundLuminance(element) { 1629 const bg = getComputedStyle(element).backgroundColor; 1630 const rgb = bg.match(/\d+/g)?.map(Number); 1631 if (!rgb || rgb.length < 3) 1632 return null; 1633 const [r, g, b] = rgb; 1634 return 0.299 * r + 0.587 * g + 0.114 * b; 1635 } 1636 function findBackgroundElement(el2) { 1637 let current = el2; 1638 while (current) { 1639 const tag = current.tagName; 1640 const bg = getComputedStyle(current).backgroundColor; 1641 if ((tag === "DIV" || tag === "SECTION") && bg !== "rgba(0, 0, 0, 0)") 1642 return current; 1643 if (current === document.documentElement) 1644 break; 1645 current = current.parentElement; 1646 } 1647 return null; 1648 } 1649 function pollUnderHeaderMobile() { 1650 const x = window.innerWidth / 2; 1651 const y = 5; 1652 el.style.pointerEvents = "none"; 1653 const target = document.elementFromPoint(x, y); 1654 el.style.pointerEvents = ""; 1655 if (!target) 1656 return requestAnimationFrame(pollUnderHeaderMobile); 1657 const heroAncestor = target.closest("div.hero, section.hero"); 1658 el.classList.toggle("hero", !!heroAncestor); 1659 const themeOverride = target.closest("[data-theme]")?.getAttribute("data-theme"); 1660 if (themeOverride === "dark") { 1661 el.classList.add("header--dark"); 1662 el.classList.remove("header--light"); 1663 } else if (themeOverride === "light") { 1664 el.classList.add("header--light"); 1665 el.classList.remove("header--dark"); 1666 } else { 1667 const backgroundEl = findBackgroundElement(target); 1668 if (backgroundEl) { 1669 const luminance = getComputedBackgroundLuminance(backgroundEl); 1670 if (luminance !== null) { 1671 if (luminance < 128) { 1672 el.classList.add("header--dark"); 1673 el.classList.remove("header--light"); 1674 } else { 1675 el.classList.add("header--light"); 1676 el.classList.remove("header--dark"); 1677 } 1678 } 1679 } 1680 } 1681 requestAnimationFrame(pollUnderHeaderMobile); 1682 } 1683 requestAnimationFrame(pollUnderHeaderMobile); 1684 let lastScrollY = window.scrollY; 1685 window.addEventListener("scroll", () => { 1686 const currentY = window.scrollY; 1687 if (currentY > lastScrollY) { 1688 el.classList.add("site-header--hidden"); 1689 } else { 1690 el.classList.remove("site-header--hidden"); 1691 } 1692 lastScrollY = currentY; 1693 }); 1694} 1695var __glob_4_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 1696 __proto__: null, 1697 "default": enhanceSiteHeaderMobile 1698}, Symbol.toStringTag, { value: "Module" })); 1699var index = ""; 1700function wrapRteTables(root = document) { 1701 root.querySelectorAll(".rich-text-field table").forEach((table) => { 1702 if (table.closest(".table-wrapper")) 1703 return; 1704 const wrapper = document.createElement("div"); 1705 wrapper.className = "table-wrapper"; 1706 const inner = document.createElement("div"); 1707 inner.className = "table-wrapper__inner"; 1708 table.parentNode.insertBefore(wrapper, table); 1709 inner.appendChild(table); 1710 wrapper.appendChild(inner); 1711 }); 1712} 1713const showLogs = false;
1714const enhancementModules = { "./data-components/CorporateAccordionBlock.js": __glob_4_0, "./data-components/CorporateFixedWidthPage.js": __glob_4_1, "./data-components/CorporateHomeHeroBlock.js": __glob_4_2, "./data-components/CorporateHomeHeroExtendedBlock.js": __glob_4_3, "./data-components/CorporateImageVideoBlock.js": __glob_4_4, "./data-components/CorporateInSectionAnchorNavigationBlock.js": __glob_4_5, "./data-components/CorporateInvestorResourcesBlock.js": __glob_4_6, "./data-components/CorporateLocationsMapBlock.js": __glob_4_7, "./data-components/CorporateNewsListingPage.js": __glob_4_8, "./data-components/CorporatePatentsPage.js": __glob_4_9, "./data-components/CorporateSearchResultsPage.js": __glob_4_10, "./data-components/CorporateTabFeatureBlock.js": __glob_4_11, "./data-components/CorporateThumbnailCarouselBlock.js": __glob_4_12, "./data-components/CorporateVerticalListingBlock.js": __glob_4_13, "./data-components/MultiCardBlock.js": __glob_4_14, "./data-components/SiteHeader.js": __glob_4_15, "./data-components/SiteHeaderMobile.js": __glob_4_16 }; 1715const enhancementRegistry = {}; 1716for (const [path, mod] of Object.entries(enhancementModules)) { 1717 const name = path.split("/").pop().replace(/\.\w+$/, ""); 1718 const resolvedEnhance = mod?.default || mod; 1719 enhancementRegistry[name] = resolvedEnhance; 1720 dev.log(`\u{1F4E6} Registered enhancement "${name}" from: ${path}`, showLogs); 1721} 1722window.addEventListener("load", () => { 1723 wrapRteTables(); 1724 const enhancedNodes = document.querySelectorAll("[data-component]"); 1725 dev.log("\u{1F50D} Enhanced nodes:", enhancedNodes, showLogs); 1726 enhancedNodes.forEach((el) => { 1727 const name = el.dataset.component; 1728 const enhance = enhancementRegistry[name]; 1729 if (typeof enhance === "function") { 1730 dev.log(`\u{1F9E9} Running enhancement "${name}" on:`, el, showLogs); 1731 dev.log("\u{1F50D} Enhancement function for", name, ":", enhance, showLogs); 1732 try { 1733 enhance(el); 1734 } catch (e) { 1735 dev.warn(`\u274C Enhancement "${name}" threw an error; continuing.`, showLogs); 1736 } 1737 } else { 1738 dev.warn(`\u{1F50E} Enhancement "${name}" not found.`, showLogs); 1739 dev.warn(enhance, showLogs); 1740 } 1741 }); 1742}); 1743__vitePreload(() => import("./IconInjector.68cff805.js"), true ? ["assets/IconInjector.68cff805.js","assets/react-vendor.bb2da738.js"] : void 0).then(({ 1744 injectIcons 1745}) => { 1746 const runIconInjection = () => injectIcons(); 1747 if (document.readyState === "complete") { 1748 runIconInjection(); 1749 } else { 1750 window.addEventListener("load", runIconInjection, { 1751 once: true 1752 }); 1753 } 1754}); 1755__vitePreload(() => import("./VideoOverlayEnhancer.99b29704.js"), true ? [] : void 0).then(({ 1756 default: enhanceVideoOverlays 1757}) => { 1758 window.addEventListener("load", () => enhanceVideoOverlays()); 1759}); 1760__vitePreload(() => import("./BreadcrumbInjector.2763d64b.js"), true ? [] : void 0).then(({ 1761 injectBreadcrumbs 1762}) => { 1763 window.addEventListener("load", injectBreadcrumbs); 1764}); 1765__vitePreload(() => import("./ScrollAnimator.e98d6490.js"), true ? ["assets/ScrollAnimator.e98d6490.js","assets/vendor.7c830806.js","assets/vendor.e25f51f2.css"] : void 0).then((mod) => { 1766 window.addEventListener("load", () => mod.runScrollAnimations()); 1767}); 1768__vitePreload(() => Promise.resolve().then(function() { 1769 return CountAnimator; 1770}), true ? void 0 : void 0).then((mod) => { 1771 window.addEventListener("load", () => mod.initCountAnimations()); 1772});
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.