PageSourceSearch

https://grafaci.or.jp/wp-content/themes/graphic/assets/js/script.js?ver=1750064528

js grafaci.or.jp collected 2026-10-05 22:51:33 UTC 22,386 bytes, 595 lines download raw bytes

vendor: 111 bytes, lines 1-5
1/******/ (() => { // webpackBootstrap
2/******/ 	"use strict";
3/******/ 	var __webpack_modules__ = ({
4
5/***/ "./
5js/_anchorScroll.js":
6/*!*****************************!*\
7  !*** ./js/_anchorScroll.js ***!
8  \*****************************/
9/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10
11__webpack_require__.r(__webpack_exports__);
12/* harmony export */ __webpack_require__.d(__webpack_exports__, {
13/* harmony export */   anchorScroll: () => (/* binding */ anchorScroll)
14/* harmony export */ });
15function anchorScroll() {
16  var anchorLinks = document.querySelectorAll('a[href^="#"]');
17  anchorLinks.forEach(function (anchor) {
18    anchor.addEventListener('click', function (e) {
19      e.preventDefault();
20      var targetId = anchor.getAttribute('href');
21      var targetElement = document.querySelector(targetId);
22      if (targetElement) {
23        targetElement.scrollIntoView({
24          behavior: 'smooth',
25          block: 'start'
26        });
27      }
28    });
29  });
30}
31
32/***/ }),
33
34/***/ "./js/_animation.js":
35/*!**************************!*\
36  !*** ./js/_animation.js ***!
37  \**************************/
38/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
39
40__webpack_require__.r(__webpack_exports__);
41/* harmony export */ __webpack_require__.d(__webpack_exports__, {
42/* harmony export */   animation: () => (/* binding */ animation)
43/* harmony export */ });
44function animation() {
45  // 関数定義
46  var inviewAction = function inviewAction(content, classname) {
47    var contentTopFade = Math.floor(content.getBoundingClientRect().top + window.scrollY);
48    var visibilHeight = window.innerHeight + window.scrollY;
49    if (contentTopFade <= visibilHeight) {
50      content.classList.add(classname);
51    }
52  };
53
54  // 対象のコンテンツの表示(時間差)
55  var inviewActionLate = function inviewActionLate(content, classname, time) {
56    var contentTopFade = Math.floor(content.getBoundingClientRect().top + window.scrollY);
57    var visibilHeight = window.innerHeight + window.scrollY;
58    if (contentTopFade <= visibilHeight) {
59      setTimeout(function () {
60        content.classList.add(classname);
61      }, time);
62    }
63  };
64
65  // 全てのクラスに対してアニメーションを適用する関数
66  var applyAnimations = function applyAnimations() {
67    document.querySelectorAll('.inview').forEach(function (element) {
68      inviewAction(element, 'inview_action');
69    });
70    document.querySelectorAll('.inview_up').forEach(function (element) {
71      inviewAction(element, 'inview_up_action');
72    });
73    document.querySelectorAll('.inview_left').forEach(function (element) {
74      inviewAction(element, 'inview_left_action');
75    });
76    document.querySelectorAll('.p-scholarship__detail__bu').forEach(function (element) {
77      inviewAction(element, 'active');
78    });
79    document.querySelectorAll('.p-scholarship__detail__bu__wrap').forEach(function (element) {
80      inviewAction(element, 'active');
81    });
82    document.querySelectorAll('.inview2').forEach(function (element) {
83      inviewActionLate(element, 'inview_action', 300);
84    });
85    document.querySelectorAll('.inview300').forEach(function (element) {
86      inviewActionLate(element, 'inview_action', 500);
87    });
88    document.querySelectorAll('.inview500').forEach(function (element) {
89      inviewActionLate(element, 'inview_action', 700);
90    });
91    document.querySelectorAll('.inview_up200').forEach(function (element) {
92      inviewActionLate(element, 'inview_up_action', 200);
93    });
94    document.querySelectorAll('.inview_up300').forEach(function (element) {
95      inviewActionLate(element, 'inview_up_action', 300);
96    });
97    document.querySelectorAll('.inview_up400').forEach(function (element) {
98      inviewActionLate(element, 'inview_up_action', 400);
99    });
100    document.querySelectorAll('.inview_up500').forEach(function (element) {
101      inviewActionLate(element, 'inview_up_action', 500);
102    });
103    document.querySelectorAll('.inview_up600').forEach(function (element) {
104      inviewActionLate(element, 'inview_up_action', 600);
105    });
106    document.querySelectorAll('.inview_up700').forEach(function (element) {
107      inviewActionLate(element, 'inview_up_action', 700);
108    });
109    document.querySelectorAll('.inview_up900').forEach(function (element) {
110      inviewActionLate(element, 'inview_up_action', 900);
111    });
112    document.querySelectorAll('.inview_up1200').forEach(function (element) {
113      inviewActionLate(element, 'inview_up_action', 1200);
114    });
115    document.querySelectorAll('.inview_left200').forEach(function (element) {
116      inviewActionLate(element, 'inview_left_action', 200);
117    });
118    document.querySelectorAll('.inview_left300').forEach(function (element) {
119      inviewActionLate(element, 'inview_left_action', 300);
120    });
121    document.querySelectorAll('.inview_left400').forEach(function (element) {
122      inviewActionLate(element, 'inview_left_action', 400);
123    });
124    document.querySelectorAll('.inview_left500').forEach(function (element) {
125      inviewActionLate(element, 'inview_left_action', 500);
126    });
127  };
128
129  // ページロード時とスクロール時にアニメーションを適用
130  window.addEventListener('DOMContentLoaded', applyAnimations);
131  window.addEventListener('scroll', applyAnimations);
132}
133
134/***/ }),
135
136/***/ "./js/_disableHover.js":
137/*!*****************************!*\
138  !*** ./js/_disableHover.js ***!
139  \*****************************/
140/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
141
142__webpack_require__.r(__webpack_exports__);
143/* harmony export */ __webpack_require__.d(__webpack_exports__, {
144/* harmony export */   disableHover: () => (/* binding */ disableHover)
145/* harmony export */ });
146function disableHover() {
147  // スマホやタブレットでのタッチデバイス判定
148  var touch = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
149  if (touch) {
150    // スタイルシートのルールをすべてチェック
151    try {
152      Array.from(document.styleSheets).forEach(function (styleSheet) {
153        try {
154          var rules = styleSheet.cssRules || styleSheet.rules; // cssRulesにアクセスできない場合もあるので、両方試す
155
156          if (!rules) return;
157          for (var i = rules.length - 1; i >= 0; i--) {
158            var rule = rules[i];
159            if (rule.selectorText && rule.selectorText.includes(':hover')) {
160              styleSheet.deleteRule(i); // hoverルールを削除
161            }
162          }
163        } catch (e) {
164          // cssRulesにアクセスできないスタイルシートを無視(例えば、クロスドメインのスタイルシート)
165          console.warn('スタイルシートにアクセスできませんでした:', e);
166        }
167      });
168    } catch (e) {
169      console.error('スタイルシートの処理中にエラーが発生しました:', e);
170    }
171  }
172}
173
174/***/ }),
175
176/***/ "./js/_drawer.js":
177/*!***********************!*\
178  !*** ./js/_drawer.js ***!
179  \***********************/
180/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
181
182__webpack_require__.r(__webpack_exports__);
183/* harmony export */ __webpack_require__.d(__webpack_exports__, {
184/* harmony export */   drawer: () => (/* binding */ drawer)
185/* harmony export */ });
186function drawer() {
187  var hamburgerButton = document.querySelector('.l-header__menu-button');
188  var nav = document.querySelector(".l-header__sp-nav");
189  var overlay = document.querySelector(".l-header__overlay");
190  var menuText = document.querySelector('.l-header__menu-text');
191  var listWrap = document.querySelector('.l-header__nav-list-wrap');
192
193  // メニューの開閉処理
194  hamburgerButton.addEventListener('click', function (e) {
195    var isExpanded = e.currentTarget.getAttribute("aria-expanded") === "true";
196    e.currentTarget.setAttribute("aria-expanded", !isExpanded);
197    document.documentElement.classList.toggle("is-drawerActive");
198    nav.classList.toggle('is-active');
199    overlay.classList.toggle('is-active');
200    hamburgerButton.classList.toggle('is-active');
201    listWrap.classList.toggle('is-active');
202
203    // aria-expanded の値を切り替えた後でテキストを変更
204    if (!isExpanded) {
205      menuText.textContent = 'close';
206    } else {
207      menuText.textContent = 'menu';
208    }
209    var body = document.body;
210    var bodyStyle = window.getComputedStyle(body);
211    if (bodyStyle.overflow === "hidden") {
212      body.style.height = "";
213      body.style.overflow = "";
214    } else {
215      body.style.height = "auto";
216      body.style.overflow = "hidden";
217    }
218  });
219
220  // overlay または nav の外側をクリックした際にメニューを閉じる処理
221  overlay.addEventListener('click', function () {
222    closeMenu();
223  });
224
225  // メニューを閉じる処理
226  function closeMenu() {
227    document.documentElement.classList.remove("is-drawerActive");
228    nav.classList.remove('is-active');
229    overlay.classList.remove('is-active');
230    hamburgerButton.classList.remove('is-active');
231    hamburgerButton.setAttribute("aria-expanded", "false");
232    menuText.textContent = 'menu';
233    var body = document.body;
234    body.style.height = "";
235    body.style.overflow = "";
236  }
237}
238;
239
240/***/ }),
241
242/***/ "./js/_faq.js":
243/*!********************!*\
244  !*** ./js/_faq.js ***!
245  \********************/
246/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
247
248__webpack_require__.r(__webpack_exports__);
249/* harmony export */ __webpack_require__.d(__webpack_exports__, {
250/* harmony export */   faq: () => (/* binding */ faq)
251/* harmony export */ });
252function faq() {
253  // 全てのFAQの質問要素を取得
254  var faqQuestions = document.querySelectorAll('.p-contact-faq__question');
255  faqQuestions.forEach(function (question) {
256    question.addEventListener('click', function () {
257      // クリックされた質問の親要素(p-contact-faq__item)を取得
258      var faqItem = question.closest('.p-contact-faq__item');
259      var answer = faqItem.querySelector('.p-contact-faq__answer');
260      var arrow = question.querySelector('.p-contact-faq__arrow');
261
262      // 回答部分の開閉
263      if (answer.classList.contains('open')) {
264        answer.classList.remove('open');
265        arrow.classList.remove('active');
266      } else {
267        answer.classList.add('open');
268        arrow.classList.add('active');
269      }
270
271      // 他のFAQの回答を閉じる処理
272      faqQuestions.forEach(function (otherQuestion) {
273        var otherFaqItem = otherQuestion.closest('.p-contact-faq__item');
274        var otherAnswer = otherFaqItem.querySelector('.p-contact-faq__answer');
275        var otherArrow = otherQuestion.querySelector('.p-contact-faq__arrow');
276        if (otherFaqItem !== faqItem) {
277          otherAnswer.classList.remove('open');
278          otherArrow.classList.remove('active');
279        }
280      });
281    });
282  });
283}
284
285/***/ }),
286
287/***/ "./js/_modal.js":
288/*!**********************!*\
289  !*** ./js/_modal.js ***!
290  \**********************/
291/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
292
293__webpack_require__.r(__webpack_exports__);
294/* harmony export */ __webpack_require__.d(__webpack_exports__, {
295/* harmony export */   modal: () => (/* binding */ modal)
296/* harmony export */ });
297function modal() {
298  var cards = document.querySelectorAll('.testimonial-card');
299  var modals = document.querySelectorAll('.p-top-hero__modal');
300  var modalOverlay = document.querySelector('.p-top-hero__modal-overlay'); // クラスを修正して1つのオーバーレイを選択
301  var closeButtons = document.querySelectorAll('.close-button');
302  cards.forEach(function (card) {
303    card.addEventListener('click', function () {
304      var targetModalId = card.getAttribute('data-modal-target');
305      var targetModal = document.getElementById(targetModalId);
306      if (targetModal) {
307        targetModal.classList.add('is-visible');
308        modalOverlay.classList.add('is-visible'); // オーバーレイにクラスを追加
309      }
310    });
311  });
312  closeButtons.forEach(function (button) {
313    button.addEventListener('click', function () {
314      var modal = button.closest('.p-top-hero__modal');
315      if (modal) {
316        modal.classList.remove('is-visible');
317        modalOverlay.classList.remove('is-visible'); // オーバーレイからクラスを削除
318      }
319    });
320  });
321  modals.forEach(function (modal) {
322    modal.addEventListener('click', function (event) {
323      if (event.target === modal) {
324        modal.classList.remove('is-visible');
325        modalOverlay.classList.remove('is-visible'); // オーバーレイからクラスを削除
326      }
327    });
328    var modalContent = modal.querySelector('.modal-content');
329    if (modalContent) {
330      modalContent.addEventListener('click', function (event) {
331        event.stopPropagation();
332      });
333    }
334  });
335
336  // オーバーレイをクリックしたときにモーダルを閉じる処理
337  modalOverlay.addEventListener('click', function () {
338    modals.forEach(function (modal) {
339      return modal.classList.remove('is-visible');
340    });
341    modalOverlay.classList.remove('is-visible');
342  });
343}
344
345/***/ }),
346
347/***/ "./js/_swiper.js":
348/*!***********************!*\
349  !*** ./js/_swiper.js ***!
350  \***********************/
351/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
352
353__webpack_require__.r(__webpack_exports__);
354/* harmony export */ __webpack_require__.d(__webpack_exports__, {
355/* harmony export */   swiper: () => (/* binding */ swiper)
356/* harmony export */ });
357function swiper() {
358  var mySwiper = new Swiper('.swiper-container', {
359    loop: true,
360    speed: 1500,
361    navigation: {
362      nextEl: '.swiper-container .swiper-button-next',
363      prevEl: '.swiper-container .swiper-button-prev'
364    },
365    pagination: {
366      el: ".swiper-pagination",
367      type: "fraction",
368      clickable: true
369    },
370    autoplay: {
371      delay: 4000,
372      disableOnInteraction: false
373    }
374  });
375  var swiper2 = new Swiper('.swiper-container-2', {
376    loop: true,
377    speed: 1500,
378    navigation: {
379      nextEl: '.swiper-container-2 .swiper-button-next',
380      prevEl: '.swiper-container-2 .swiper-button-prev'
381    },
382    pagination: {
383      el: ".swiper-container-2 .swiper-pagination",
384      type: "fraction",
385      clickable: true
386    },
387    autoplay: {
388      delay: 4000,
389      disableOnInteraction: false
390    }
391  });
392  var swiper3 = new Swiper('.swiper-container-3', {
393    loop: true,
394    speed: 2000,
395    slidesPerView: 5.8,
396    spaceBetween: 20,
397    centeredSlides: true,
398    autoplay: {
399      delay: 3000,
400      disableOnInteraction: false
401    },
402    breakpoints: {
403      0: {
404        slidesPerView: 1.24,
405        spaceBetween: 15
406      },
407      500: {
408        slidesPerView: 2.5,
409        spaceBetween: 15
410      },
411      768: {
412        slidesPerView: 3.5,
413        spaceBetween: 15
414      },
415      1024: {
416        slidesPerView: 4.5,
417        spaceBetween: 20
418      },
419      1367: {
420        slidesPerView: 5.8,
421        spaceBetween: 20
422      }
423    }
424  });
425}
426
427/***/ }),
428
vendor: 893 bytes, lines 429-450
429/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
430/*!***********************************************************!*\
431  !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
432  \***********************************************************/
433/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
434
435__webpack_require__.r(__webpack_exports__);
436/* harmony export */ __webpack_require__.d(__webpack_exports__, {
437/* harmony export */   "default": () => (/* binding */ _typeof)
438/* harmony export */ });
439function _typeof(o) {
440  "@babel/helpers - typeof";
441
442  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
443    return typeof o;
444  } : function (o) {
445    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
446  }, _typeof(o);
447}
448
449
450/***/ })
vendor: 2,324 bytes, lines 450-509
450
451
452/******/ 	});
453/************************************************************************/
454/******/ 	// The module cache
455/******/ 	var __webpack_module_cache__ = {};
456/******/ 	
457/******/ 	// The require function
458/******/ 	function __webpack_require__(moduleId) {
459/******/ 		// Check if module is in cache
460/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
461/******/ 		if (cachedModule !== undefined) {
462/******/ 			return cachedModule.exports;
463/******/ 		}
464/******/ 		// Create a new module (and put it into the cache)
465/******/ 		var module = __webpack_module_cache__[moduleId] = {
466/******/ 			// no module.id needed
467/******/ 			// no module.loaded needed
468/******/ 			exports: {}
469/******/ 		};
470/******/ 	
471/******/ 		// Execute the module function
472/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
473/******/ 	
474/******/ 		// Return the exports of the module
475/******/ 		return module.exports;
476/******/ 	}
477/******/ 	
478/************************************************************************/
479/******/ 	/* webpack/runtime/define property getters */
480/******/ 	(() => {
481/******/ 		// define getter functions for harmony exports
482/******/ 		__webpack_require__.d = (exports, definition) => {
483/******/ 			for(var key in definition) {
484/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
485/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
486/******/ 				}
487/******/ 			}
488/******/ 		};
489/******/ 	})();
490/******/ 	
491/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
492/******/ 	(() => {
493/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
494/******/ 	})();
495/******/ 	
496/******/ 	/* webpack/runtime/make namespace object */
497/******/ 	(() => {
498/******/ 		// define __esModule on exports
499/******/ 		__webpack_require__.r = (exports) => {
500/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
501/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
502/******/ 			}
503/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
504/******/ 		};
505/******/ 	})();
506/******/ 	
507/************************************************************************/
508var __webpack_exports__ = {};
509/*!**********************!*\
510  !*** ./js/script.js ***!
511  \**********************/
512__webpack_require__.r(__webpack_exports__);
513/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
514/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_drawer */ "./js/_drawer.js");
515/* harmony import */ var _anchorScroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_anchorScroll */ "./js/_anchorScroll.js");
516/* harmony import */ var _swiper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_swiper */ "./js/_swiper.js");
517/* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_modal */ "./js/_modal.js");
518/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./_animation */ "./js/_animation.js");
519/* harmony import */ var _faq__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./_faq */ "./js/_faq.js");
520/* harmony import */ var _disableHover__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./_disableHover */ "./js/_disableHover.js");
521
522
523
524
525
526
527
528
529
530// ページの内容が完全に読み込まれた後のイベント
531document.addEventListener('DOMContentLoaded', function () {
532  // メインタグのID取得
533  var mainElement = document.querySelector('main');
534  var pageId = mainElement ? mainElement.getAttribute('id') : null;
535
536  // ページ固有の関数実行
537  var pageFunctions = {
538    'top': [_swiper__WEBPACK_IMPORTED_MODULE_3__.swiper, _modal__WEBPACK_IMPORTED_MODULE_4__.modal],
539    'what': [_swiper__WEBPACK_IMPORTED_MODULE_3__.swiper],
540    'professional': [_swiper__WEBPACK_IMPORTED_MODULE_3__.swiper],
541    'contact': [_faq__WEBPACK_IMPORTED_MODULE_6__.faq]
542  };
543
544  // diableHoverは常に実行
545  (0,_disableHover__WEBPACK_IMPORTED_MODULE_7__.disableHover)();
546  // anchorScrollは常に実行
547  (0,_anchorScroll__WEBPACK_IMPORTED_MODULE_2__.anchorScroll)();
548  // drawerは常に実行
549  (0,_drawer__WEBPACK_IMPORTED_MODULE_1__.drawer)();
550  // animationは常に実行
551  (0,_animation__WEBPACK_IMPORTED_MODULE_5__.animation)();
552
553  // ページ固有の関数を実行
554  if (pageId && pageFunctions[pageId]) {
555    pageFunctions[pageId].forEach(function (fn) {
556      if (typeof fn === 'function') {
557        try {
558          fn();
559        } catch (error) {
560          console.error("\u30DA\u30FC\u30B8ID ".concat(pageId, " \u306E\u95A2\u6570\u5B9F\u884C\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:"), error);
561        }
562      } else {
563        console.error("\u30DA\u30FC\u30B8ID ".concat(pageId, " \u306B\u5BFE\u3057\u3066\u95A2\u6570\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001").concat((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(fn), " \u304C\u5F97\u3089\u308C\u307E\u3057\u305F"));
564      }
565    });
566  }
567});
568/******/ })()
569;
570//# sourceMappingURL=script.js.map
571
572
573document.querySelectorAll('.p-professional-member__item').forEach(item => {
574  const container = item.querySelector('.limit-text-container');
575  const button = item.querySelector('.p-professional-member__item-txt-limit-control');
576
577  button.addEventListener('click', () => {
578    const isExpanded = container.classList.toggle('is-open');
579    container.classList.toggle('is-expanded', isExpanded);
580    button.classList.toggle('is-expanded', isExpanded);
581    button.textContent = isExpanded ? '閉じる' : '続きを読む';
582
583    // 他の開いている要素を閉じる
584    document.querySelectorAll('.p-professional-member__item').forEach(other => {
585      if (other !== item) {
586        const otherContainer = other.querySelector('.limit-text-container');
587        const otherButton = other.querySelector('.p-professional-member__item-txt-limit-control');
588        otherContainer.classList.remove('is-open', 'is-expanded');
589        otherButton.classList.remove('is-expanded');
590        otherButton.textContent = '続きを読む';
591      }
592    });
593  });
594});
595

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.