1document.addEventListener('DOMContentLoaded', () => { 2 3 // ======== SPãããã¼ ãã ======== 4 class SPheaderNav { 5 constructor(classBurger, clasSheaderBurgerTarget) { 6 let resizeTransitionTime; 7 8 this.html = document.documentElement; 9 this.burger = document.querySelector(classBurger); 10 this.burgerTarget = document.querySelector(clasSheaderBurgerTarget); 11 this.noTransition = document.querySelectorAll('.js-noTransition'); 12 13 window.addEventListener('resize', () => { 14 this.html.classList.remove('overflow-hidden'); 15 this.burgerTarget.classList.remove('is-active'); 16 17 // PCâTBæã®ã¢ãã¡ã¼ã·ã§ã³çºç«ãç¡å¹å 18 this.noTransition.forEach(obj=> { 19 obj.classList.add('no-transition'); 20 resizeTransitionTime = setTimeout(() => { 21 obj.classList.remove('no-transition'); 22 }, 300); 23 }) 24 }); 25 26 this.init(); 27 } 28 29 init() { 30 if (this.burger && this.burgerTarget) { 31 this.burger.addEventListener('click', () => { 32 this.burger.classList.toggle('is-active'); 33 this.burgerTarget.classList.toggle('is-active'); 34 35 if (this.burgerTarget.classList.contains('is-active')) { 36 this.html.classList.add('overflow-hidden'); 37 } else { 38 this.html.classList.remove('overflow-hidden'); 39 } 40 }); 41 } 42 } 43 } 44 45 // ======== ã¡ã¤ã³ãã¸ã¥ã¢ã«ã¹ã©ã¤ãã¼ ======== 46 class MainvisualSlider { 47 constructor(splideSelector, trackSelector, listSelector, slideSelector, paginationSelector) { 48 this.splide = document.querySelector(splideSelector); 49 this.track = document.querySelector(trackSelector); 50 this.list = document.querySelector(listSelector); 51 this.slides = document.querySelectorAll(slideSelector); 52 this.pagination = document.querySelector(paginationSelector); 53 this.instance = null; 54 this.init(); 55 this.addResizeHandler(); 56 } 57 58 init() { 59 this.splide = new Splide(this.splide, { 60 type: 'loop', 61 perPage: 1, 62 perMove: 1, 63 width: 'auto', 64 gap: '20px', 65 padding: '25%', 66 pagination: true, 67 arrows: false, 68 rewind: false, 69 drag: true, 70 autoplay: true, 71 interval: 5000, 72 lazyLoad: 'nearby', 73 breakpoints: { 74 1400: { 75 padding: '20%', 76 gap: '20px', 77 }, 78 1024: { 79 padding: '20%', 80 gap: '20px', 81 }, 82 768: { 83 padding: '20%', 84 gap: '10px', 85 }, 86 500: { 87 padding: '10%', 88 gap: '10px', 89 }, 90 }, 91 }); 92 93 this.splide.mount(); 94 } 95 96 addResizeHandler() { 97 let resizeTimer; 98 99 const updatePadding = () => { 100 const width = window.innerWidth; 101 102 if (width > 1400) { 103 const minWidth = 1400; 104 const maxWidth = 2400; 105 const minPadding = 20; 106 const maxPadding = 35; 107 108 const clampedWidth = Math.min(width, maxWidth); 109 const ratio = (clampedWidth - minWidth) / (maxWidth - minWidth); 110 const paddingValue = minPadding + (maxPadding - minPadding) * ratio; 111 112 this.splide.options = { 113 ...this.splide.options, 114 padding: `${paddingValue}%`, 115 }; 116 } 117 }; 118 119 updatePadding(); 120 121 window.addEventListener('resize', () => { 122 clearTimeout(resizeTimer); 123 resizeTimer = setTimeout(() => { 124 updatePadding(); 125 }, 100); 126 }); 127 } 128 } 129 130 // ======== ããã¯ã¢ããã¹ã©ã¤ãã¼ ======== 131 class PickupSlider { 132 constructor(splideSelector) { 133 this.splideElement = document.querySelector(splideSelector); 134 this.instance = null; 135 this.init(); 136 this.addResizeHandler(); 137 } 138 139 init() { 140 if (window.innerWidth <= 768) { 141 this.mountSplide(); 142 } 143 } 144 145 mountSplide() { 146 if (this.instance) return; 147 148 this.instance = new Splide(this.splideElement, { 149 type: 'slide', 150 perPage: 1, 151 focus: 'center', 152 gap: '16px', 153 padding: '17%', 154 speed: 400, 155 start: 1, 156 pagination: false, 157 arrows: false, 158 drag: 'free', 159 trimSpace: true, 160 }); 161 this.instance.mount(); 162 } 163 164 destroySplide() { 165 if (this.instance) { 166 this.instance.destroy(); 167 this.instance = null; 168 } 169 } 170 171 addResizeHandler() { 172 let resizeTimer; 173 174 window.addEventListener('resize', () => { 175 clearTimeout(resizeTimer); 176 resizeTimer = setTimeout(() => { 177 if (window.innerWidth <= 768) { 178 this.mountSplide(); 179 } else { 180 this.destroySplide(); 181 } 182 }, 100); 183 }); 184 } 185 } 186 187 // ======== ãããã¢ãã¡ã¼ã·ã§ã³é¢é£ ======== 188 class DotAnimation { 189 constructor(canvasSelector) { 190 this.canvas = document.querySelector(canvasSelector); 191 this.ctx = this.canvas.getContext('2d'); 192 this.dots = []; 193 this.angles = [ 194 -45.0, -40.59, -38.98, -32.53, -21.36, -13.24, -10.38, -6.38, 195 11.89, 12.29, 15.14, 25.29, 33.75, 39.94, 44.83, 46.92, 196 59.90, 68.47, 74.49, 85.34, 86.09, 95.99, 106.93, 110.25, 197 110.64, 118.65, 131.88, 132.14, 147.31, 151.15, 160.0 198 ].map(deg => (deg * Math.PI) / 180); 199 200 this.angleIndex = 0; 201 this.setupCanvas(); 202 this.initializeDots(); 203 this.animate(); 204 205 window.addEventListener('resize', debounce(() => this.resetCanvasAndDots(), 100)); 206 } 207 208 setupCanvas() { 209 this.canvas.width = window.innerWidth; 210 this.canvas.height = window.innerHeight; 211 this.RADIUS_LIMIT = Math.min(this.canvas.width, this.canvas.height) * 0.5; 212 } 213 214 getDotColor(angle) { 215 const angleDeg = (angle * 180) / Math.PI; 216 const t = (angleDeg - (-45)) / (160 + 45); 217 let r, g, b; 218 if (t < 0.2) { 219 const t1 = t / 0.2;
220 r = Math.round(0xcb + (0x00 - 0xcb) * t1); 221 g = Math.round(0xe7 + (0x5b - 0xe7) * t1); 222 b = Math.round(0xff + (0xac - 0xff) * t1); 223 } else if (t < 0.8) { 224 r = 0x00; 225 g = 0x5b; 226 b = 0xac; 227 } else { 228 const t2 = (t - 0.8) / 0.2; 229 r = Math.round(0x00 + (0xcb - 0x00) * t2); 230 g = Math.round(0x5b + (0xe7 - 0x5b) * t2); 231 b = Math.round(0xac + (0xff - 0xac) * t2); 232 } 233 234 return `rgb(${r}, ${g}, ${b})`; 235 } 236 237 createDot(isInitial = false) { 238 if (Math.random() < 0.5) return; 239 240 const baseAngle = this.angles[this.angleIndex]; 241 const offset = (Math.random() * 2 - 1) * 0.5 * (Math.PI / 180); 242 const angle = baseAngle + offset; 243 this.angleIndex = (this.angleIndex + 1) % this.angles.length; 244 245 const distance = isInitial 246 ? Math.random() * (this.RADIUS_LIMIT * 5) 247 : Math.sqrt(this.canvas.width ** 2 + this.canvas.height ** 2) / 2 + 100; 248 const x = this.canvas.width / 2 + distance * Math.cos(angle); 249 const y = this.canvas.height / 2 + distance * Math.sin(angle); 250 const scale = 2 + Math.random() * (8 - 2); 251 const speed = 0.1 + Math.random() * (0.5 - 0.3); 252 253 this.dots.push({ 254 x, y, scale, initialScale: scale, 255 velocityX: -Math.cos(angle) * speed, 256 velocityY: -Math.sin(angle) * speed, 257 baseSpeed: speed, 258 color: this.getDotColor(baseAngle), 259 hasEnteredScreen: false, 260 enterTime: null, 261 opacity: 0.1, 262 distanceFromCenter: distance, 263 }); 264 } 265 266 initializeDots() { 267 for (let i = 0; i < 500; i++) this.createDot(true); 268 } 269 270 updateDots() { 271 this.dots.forEach((dot, index) => { 272 dot.x += dot.velocityX; 273 dot.y += dot.velocityY; 274 275 const distanceFromCenter = Math.hypot( 276 dot.x - this.canvas.width / 2, 277 dot.y - this.canvas.height / 2 278 ); 279 280 const speedFactor = (distanceFromCenter / this.RADIUS_LIMIT) ** 2.5; 281 dot.x += dot.velocityX * dot.baseSpeed * speedFactor; 282 dot.y += dot.velocityY * dot.baseSpeed * speedFactor; 283 dot.scale = dot.initialScale * (distanceFromCenter / this.RADIUS_LIMIT); 284 dot.opacity = distanceFromCenter <= 300 && distanceFromCenter >= 40 285 ? (distanceFromCenter - 40) / (300 - 40) 286 : distanceFromCenter < 40 ? 0 : dot.opacity; 287 288 if (!dot.hasEnteredScreen && dot.x >= 0 && dot.x <= this.canvas.width && dot.y >= 0 && dot.y <= this.canvas.height) { 289 dot.hasEnteredScreen = true; 290 dot.fadeInterval = setInterval(() => { 291 dot.opacity += 0.05; 292 if (dot.opacity >= 1) { 293 dot.opacity = 1; 294 clearInterval(dot.fadeInterval); 295 } 296 }, 100); 297 } 298 299 if (dot.opacity === 0) this.dots.splice(index, 1); 300 }); 301 } 302 303 drawDots() { 304 this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); 305 306 this.dots.forEach(dot => { 307 this.ctx.globalAlpha = dot.opacity; 308 this.ctx.beginPath(); 309 this.ctx.arc(dot.x, dot.y, dot.scale, 0, Math.PI * 2); 310 this.ctx.fillStyle = dot.color; 311 this.ctx.fill(); 312 }); 313 314 this.ctx.globalAlpha = 1.0; 315 } 316 317 resetCanvasAndDots() { 318 this.setupCanvas(); 319 this.dots.length = 0; 320 this.initializeDots(); 321 } 322 323 animate() { 324 if (!this.lastDotCreationTime || performance.now() - this.lastDotCreationTime > 200) { 325 this.createDot(); 326 this.lastDotCreationTime = performance.now(); 327 } 328 this.updateDots(); 329 this.drawDots(); 330 requestAnimationFrame(() => this.animate()); 331 } 332 } 333 334 // ======== ãµã¼ã¯ã«ã©ã¤ã³ã¢ãã¡ã¼ã·ã§ã³é¢é£ ======== 335 class CircleLineAnimation { 336 constructor(circleLineSelector, serviceItemSelector) { 337 this.circleLines = document.querySelectorAll(circleLineSelector); 338 this.serviceItems = document.querySelectorAll(serviceItemSelector); 339 this.init(); 340 341 window.addEventListener('resize', debounce(() => this.init(), 100)); 342 } 343 344 init() { 345 this.circleLines.forEach((item, itemIndex) => { 346 const radius = item.offsetWidth / 2; 347 const dotsContainer = item.querySelector('.js-circleDots'); 348 const fixedSpeed = 0.0015; 349 const dotsSizeFixed = window.innerWidth <= 1024 ? 2 : 5; 350 351 dotsContainer.innerHTML = ''; 352 const dots = Array.from({ length: 5 }, (_, i) => { 353 const dot = document.createElement('div'); 354 dot.className = 'js-circleDot topServiceLinkCircle_dot'; 355 dot.style.width = dot.style.height = `${Math.floor(Math.random() * 7) + dotsSizeFixed}px`; 356 dot.dataset.speed = i % 2 === 0 ? fixedSpeed.toFixed(5) : (Math.random() * 0.003 + 0.0005).toFixed(5); 357 dotsContainer.appendChild(dot); 358 359 return dot; 360 }); 361 362 item.addEventListener('mouseenter', () => { 363 this.adjustSpeed(dots, 5); 364 this.toggleTransparency(item, itemIndex, true); 365 }); 366 367 item.addEventListener('mouseleave', () => { 368 this.adjustSpeed(dots, 1 / 5); 369 this.toggleTransparency(item, itemIndex, false); 370 }); 371 372 this.animateCircleLineDots(dots, radius); 373 }); 374 } 375 376 adjustSpeed(dots, factor) {
377 dots.forEach(dot => dot.dataset.speed = (parseFloat(dot.dataset.speed) * factor).toFixed(3)); 378 } 379 380 toggleTransparency(currentItem, currentIndex, makeTransparent) { 381 this.circleLines.forEach((otherItem, otherIndex) => { 382 if (otherItem !== currentItem) { 383 otherItem.classList.toggle('is-transparent', makeTransparent); 384 385 this.serviceItems.forEach((service, serviceIndex) => { 386 if (serviceIndex === otherIndex) { 387 service.classList.toggle('is-transparent', makeTransparent); 388 } 389 }); 390 } 391 }); 392 } 393 394 animateCircleLineDots(dots, radius) { 395 let angleOffsets = new Array(dots.length).fill(0); 396 397 const animate = () => { 398 dots.forEach((dot, index) => { 399 const speed = parseFloat(dot.dataset.speed); 400 angleOffsets[index] += speed; 401 const angle = (index / dots.length) * 2 * Math.PI + angleOffsets[index]; 402 const x = radius * Math.cos(angle); 403 const y = radius * Math.sin(angle); 404 const size = parseInt(dot.style.width, 10); 405 dot.style.transform = `translate(${radius + x - size / 2}px, ${radius + y - size / 2}px)`; 406 }); 407 408 requestAnimationFrame(animate); 409 }; 410 411 animate(); 412 } 413 } 414 415 // ======== ãã¥ã¼ã¹ãã¿ã³é¢é£ ======== 416 class NewsButtonHandler { 417 constructor() { 418 this.newsMenu = { 419 trigger: document.querySelectorAll('.js-newsMenuTrigger'), 420 target: document.querySelectorAll('.js-newsMenuTarget'), 421 }; 422 this.newsNavi = { 423 trigger: document.querySelectorAll('.js-newsNaviTrigger'), 424 target: document.querySelectorAll('.js-newsNaviTarget'), 425 }; 426 this.newsTab = { 427 trigger: document.querySelectorAll('.js-newsTabTrigger'), 428 target: document.querySelectorAll('.js-newsTabTarget'), 429 }; 430 this.init(); 431 } 432 433 init() { 434 if (this.newsMenu.trigger) { 435 this.newsMenu.trigger.forEach((button, idx) => { 436 button.addEventListener('click', () => { 437 this.newsMenu.target[idx].classList.toggle('is-open'); 438 }); 439 }); 440 441 document.addEventListener('click', e => { 442 if (!e.target.closest('.js-newsMenuTrigger') && !e.target.closest('.js-newsMenuTarget')) { 443 this.newsMenu.target.forEach(target => target.classList.remove('is-open')); 444 } 445 }); 446 } 447 448 if (this.newsNavi.trigger) { 449 this.newsNavi.trigger.forEach((button, idx) => { 450 button.addEventListener('click', () => { 451 this.newsNavi.target[idx].classList.toggle('is-open'); 452 }); 453 }); 454 } 455 456 if (this.newsTab.trigger) { 457 const newsTab_length = this.newsTab.target.length; 458 this.newsTab.trigger.forEach((button, idx) => { 459 button.addEventListener('click', () => { 460 const _text = button.textContent; 461 const _target = button.closest('.js-newsMenuTarget'); 462 _target.classList.remove('is-open'); 463 _target.querySelector('.js-newsMenuTrigger').textContent = _text; 464 for(let i=0; i<newsTab_length; i++){ 465 if(i===idx){ 466 this.newsTab.trigger[i].classList.add('is-current'); 467 this.newsTab.target[i].classList.add('is-active'); 468 }else{ 469 this.newsTab.trigger[i].classList.remove('is-current'); 470 this.newsTab.target[i].classList.remove('is-active'); 471 } 472 } 473 }); 474 }); 475 } 476 } 477 } 478 479 // ======== ã¢ã³ã¼ãã£ãªã³ ======== 480 class AccordionHandler { 481 constructor(buttonSelector, targetSelector) { 482 this.accordionButtons = document.querySelectorAll(buttonSelector); 483 this.accordionTargets = document.querySelectorAll(targetSelector); 484 this.init(); 485 } 486 487 init() { 488 this.accordionButtons.forEach(button => { 489 button.addEventListener('click', () => { 490 if (button.classList.contains('is-active')) { 491 button.classList.remove('is-active'); 492 this.accordionTargets.forEach(target => target.classList.remove('is-active')); 493 494 return; 495 } 496 497 const dataName = button.getAttribute('data-name'); 498 let matchedTarget = null; 499 500 this.accordionButtons.forEach(button => button.classList.remove('is-active')); 501 this.accordionTargets.forEach(target => { 502 if (target.getAttribute('data-name') === dataName) { 503 matchedTarget = target; 504 } 505 target.classList.remove('is-active'); 506 }); 507 508 if (matchedTarget && !matchedTarget.classList.contains('is-active')) { 509 matchedTarget.classList.add('is-active'); 510 button.classList.add('is-active'); 511 } 512 }); 513 }); 514 } 515 } 516 517 // ======== ãã«ãã¦ã³ ======== 518 class PulldownHandler { 519 constructor(buttonSelector, targetSelector) { 520 this.pulldownButtons = document.querySelectorAll(buttonSelector);
521 this.pulldownTargets = document.querySelectorAll(targetSelector); 522 this.pulldownSelect = document.querySelectorAll('.js-pulldownSelect'); 523 this.init(); 524 } 525 526 init() { 527 this.pulldownButtons.forEach(button => { 528 button.addEventListener('click', () => { 529 const dataName = button.getAttribute('data-name'); 530 let matchedTarget = null; 531 532 button.classList.toggle('is-active'); 533 this.pulldownTargets.forEach(target => { 534 if (target.getAttribute('data-name') === dataName) { 535 matchedTarget = target; 536 } 537 }); 538 539 if (matchedTarget) { 540 matchedTarget.classList. toggle('is-open'); 541 } 542 }); 543 }); 544 545 this.pulldownSelect.forEach(select => { 546 select.addEventListener('click', () => { 547 this.pulldownTargets.forEach(target => { 548 if (target.classList.contains('is-open')) { 549 target.classList.remove('is-open'); 550 } 551 }); 552 }); 553 }); 554 555 document.addEventListener('click', e => { 556 if (!e.target.closest('.js-pulldownButton') && !e.target.closest('.js-pulldownTarget')) { 557 this.pulldownButtons.forEach(button => button.classList.remove('is-active')); 558 this.pulldownTargets.forEach(target => target.classList.remove('is-open')); 559 } 560 }); 561 } 562 } 563 564 // ======== Tab ======== 565 class TabHandler { 566 constructor(triggerSelector, targetSelector) { 567 this.tabTriggers = document.querySelector(triggerSelector).querySelectorAll('button'); 568 this.tabTargets = document.querySelector(targetSelector).children; 569 this.length = this.tabTriggers.length; 570 this.tabTrigger_current = document.querySelector('.js-tabCurrentTrigger'); 571 this.tabTarget_current = this.tabTrigger_current ? this.tabTrigger_current.closest('.js-tabCurrentTarget') : null; 572 573 this.init(); 574 } 575 576 init() { 577 const _self = this; 578 _self.tabTriggers.forEach((trigger, index)=>{ 579 trigger.addEventListener('click', function(){ 580 const _text = trigger.innerHTML; 581 582 for(let i=0; i<_self.length; i++){ 583 if(i===index){ 584 _self.tabTriggers[index].classList.add('is-active'); 585 _self.tabTargets[index].classList.add('is-active'); 586 }else{ 587 _self.tabTriggers[i].classList.remove('is-active'); 588 _self.tabTargets[i].classList.remove('is-active'); 589 } 590 } 591 592 if(_self.tabTrigger_current) { 593 _self.tabTrigger_current.innerHTML = _text; 594 } 595 if(_self.tabTarget_current) { 596 _self.tabTarget_current.classList.remove('is-open'); 597 } 598 }); 599 }); 600 601 if (_self.tabTrigger_current && _self.tabTarget_current) { 602 _self.tabTrigger_current.addEventListener('click', function(){ 603 _self.tabTarget_current.classList.toggle('is-open'); 604 }); 605 606 document.addEventListener('click', e => { 607 if (!e.target.closest('.js-tabTrigger') && !e.target.closest('.js-tabCurrentTrigger')) { 608 _self.tabTarget_current.classList.remove('is-open'); 609 } 610 }); 611 } 612 } 613 } 614 615 // ======== Splide ======== 616 class SplideInit { 617 constructor(splideSelector, trackSelector, listSelector, slideSelector) { 618 this.splide = document.querySelector(splideSelector); 619 this.track = document.querySelector(trackSelector); 620 this.list = document.querySelector(listSelector); 621 this.slides = document.querySelectorAll(slideSelector); 622 this.init(); 623 } 624 625 init() { 626 this.splide = new Splide(this.splide, { 627 type: 'loop', 628 perPage: 1, 629 perMove: 1, 630 width: '100%', 631 gap: '20px', 632 padding: '20%', 633 pagination: false, 634 arrows: false, 635 rewind: false, 636 drag: true, 637 autoplay: true, 638 interval: 5000, 639 lazyLoad: 'nearby', 640 destroy: true, 641 breakpoints: { 642 1025: { 643 destroy: false, 644 }, 645 }, 646 }); 647 648 this.splide.mount(); 649 } 650 } 651 652 // ======== ãªã³ã¯ã³ãã¼ ======== 653 class CopyTrigger { 654 constructor(triggerSelector) { 655 this.copyTriggers = document.querySelectorAll(triggerSelector); 656 this.init(); 657 } 658 659 init() { 660 this.copyTriggers.forEach(copyTrigger => { 661 copyTrigger.addEventListener('click', () => { 662 let copyText = copyTrigger.value; 663 navigator.clipboard.writeText(copyText); 664 665 setTimeout(() => { 666 alert(copyText.includes('/en/') ? 'Link copied.' : 'ãªã³ã¯ãã³ãã¼ãã¾ããã'); 667 }, 100); 668 }); 669 }); 670 } 671 } 672 673 // ======== ãªã³ã¯é·ç§» ========== 674 class LinkTrigger { 675 constructor(triggerSelector) { 676 this.linkTriggers = document.querySelectorAll(triggerSelector); 677 this.init(); 678 } 679 680 init() {
681 this.linkTriggers.forEach(linkTrigger => { 682 linkTrigger.addEventListener('click', () => { 683 const link = linkTrigger.getAttribute('data-link'); 684 window.open(link, '_blank', 'noreferrer noopener'); 685 }); 686 }); 687 } 688 } 689 690 class ScrollToTop { 691 constructor() { 692 this.button = document.getElementById('js-m-footer-floating-button'); 693 this.trigger = document.getElementById('js-m-footer-floating-trigger'); 694 this.topTarget = document.getElementById('js-footer-scroll-target'); 695 696 if (this.button && this.trigger) { 697 this.event(); 698 } 699 } 700 event(){ 701 this.observer(); 702 this.button.addEventListener('click', () => this.onScrollTop()); 703 } 704 onScrollTop(){ 705 if (this.topTarget) { 706 this.topTarget.scrollIntoView({ behavior: 'smooth', block: 'start' }); 707 } else { 708 window.scrollTo({ top: 0, behavior: 'smooth' }); 709 } 710 } 711 observer(){ 712 const observer = new IntersectionObserver((entries) => { 713 entries.forEach(entry => { 714 const rect = entry.boundingClientRect; 715 const rootRect = entry.rootBounds; 716 717 if (entry.isIntersecting) { 718 this.button.classList.remove('is-active'); 719 } else { 720 if (rect.bottom < rootRect.top) { 721 this.button.classList.add('is-active'); 722 } else { 723 this.button.classList.remove('is-active'); 724 } 725 } 726 }); 727 }); 728 729 observer.observe(this.trigger); 730 } 731 } 732 733 // ======== é å»¶å®è¡å¦ç ======== 734 function debounce(func, wait) { 735 let timeout; 736 return function (...args) { 737 clearTimeout(timeout); 738 timeout = setTimeout(() => func.apply(this, args), wait); 739 }; 740 } 741 742 // ======== ã¤ã³ã¹ã¿ã³ã¹çæ ======== 743 function initializeIfClassExists(ClassName, ...selectors) { 744 if (selectors.every(selector => document.querySelector(selector))) { 745 new ClassName(...selectors); 746 } 747 } 748 749 initializeIfClassExists(SPheaderNav, '.js-headerBurger', '.js-headerBurgerTarget'); 750 initializeIfClassExists(MainvisualSlider, '.js-mainvisualSplide', '.js-mainvisualTrack', '.js-mainvisualList', '.js-mainvisualSlide', '.js-mainvisualPagination'); 751 initializeIfClassExists(PickupSlider, '.js-pickupSplide'); 752 initializeIfClassExists(DotAnimation, '.js-mainvisualParticle'); 753 initializeIfClassExists(CircleLineAnimation, '.js-circleLine', '.js-serviceItem'); 754 initializeIfClassExists(NewsButtonHandler); 755 initializeIfClassExists(AccordionHandler, '.js-accordionButton', '.js-accordionTarget'); 756 initializeIfClassExists(PulldownHandler, '.js-pulldownButton', '.js-pulldownTarget'); 757 initializeIfClassExists(TabHandler, '.js-tabTrigger', '.js-tabTarget'); 758 // initializeIfClassExists(SplideInit, '.splide', '.splide__track', '.splide__list', '.splide__slide'); 759 initializeIfClassExists(CopyTrigger, '.js-copyTrigger'); 760 initializeIfClassExists(LinkTrigger, '.js-linkTrigger'); 761 initializeIfClassExists(ScrollToTop); 762});
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.