{"version":3,"file":"js/app.js","mappings":";;;;;;;;;;;;;;;AAAa;AACwD;AACd;AACZ;AACA;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mDAAM;AACZ;AACA;AACA;AACA;AACA;AACA,EAAE,wDAAqB;AACvB;AACA;AACA;AACA;;AAEA,mBAAmB,wCAAwC;AAC3D;AACA;AACA,QAAQ;AACR,GAAG;AACH;AACA;AACA,EAAE,+CAAY;AACd;AACA,MAAM,6EAAmB;AACzB;AACA,MAAM,+DAAY;AAClB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;ACvDY;;AAEN;AACP;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0DAA0D,GAAG;AAC7D;AACA;AACA;AACA,2DAA2D,IAAI;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5Ba;AAC8B;AAC3C,YAAY,eAAe;;AAEpB;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,mDAAU;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;;;;;;;;;;;;;;;;;;;;;;ACxHa;;AAEe;AACuB;;AAEnD;;AAEgB;AACS;;AAElB;AACP,EAAE,sCAAI,gBAAgB,6DAAa;AACnC;;AAEA;AACO;AACP;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACO;AACP;AACA;AACA,IAAI,6DAAa;AACjB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,IAAI,6DAAa;AACjB;AACA;AACA;AACA,qBAAqB,uCAAuC;AAC5D,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;AClDa;;AAEN;AACP;AACA;AACA;AACA;AACA,kCAAkC,cAAc;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACfa;AAC4B;;AAElC;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qDAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACjEO;AACP;AACA;;;;;;;UCFA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA;WACA;WACA,kBAAkB,qBAAqB;WACvC,oHAAoH,iDAAiD;WACrK;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,8CAA8C;;WAE9C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,iCAAiC,mCAAmC;WACpE;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UElDA;UACA;UACA;UACA,wFAAwF,gDAAgD;UACxI","sources":["webpack://frontend-starter/./src/js/app.js","webpack://frontend-starter/./src/js/utility/_cssCustomProperties.js","webpack://frontend-starter/./src/js/utility/_drawer.js","webpack://frontend-starter/./src/js/utility/_gsap.js","webpack://frontend-starter/./src/js/utility/_scrollLock.js","webpack://frontend-starter/./src/js/utility/_smoothScroll.js","webpack://frontend-starter/./src/js/utility/_stripUnit.js","webpack://frontend-starter/webpack/bootstrap","webpack://frontend-starter/webpack/runtime/chunk loaded","webpack://frontend-starter/webpack/runtime/define property getters","webpack://frontend-starter/webpack/runtime/hasOwnProperty shorthand","webpack://frontend-starter/webpack/runtime/make namespace object","webpack://frontend-starter/webpack/runtime/jsonp chunk loading","webpack://frontend-starter/webpack/before-startup","webpack://frontend-starter/webpack/startup","webpack://frontend-starter/webpack/after-startup"],"sourcesContent":["\"use strict\";\nimport { CssCustomProperties } from \"./utility/_cssCustomProperties\";\nimport { SmoothScroll } from \"./utility/_smoothScroll\";\nimport { Drawer } from \"./utility/_drawer\";\nimport * as modGsap from \"./utility/_gsap\";\nconst mediaQuery = window.matchMedia(\"screen and (min-width: 960px)\");\n// ----------------------\n// Drawer\n// ----------------------\nconst setupDrawer = () => {\n const drawer = document.querySelector(\".js-drawer\");\n const button = document.querySelector(\".js-drawer-button\");\n const header = document.querySelector(\".header\");\n const anchorLinks = header.querySelectorAll(\".js-anchor\");\n const backdrop = document.querySelector(\".js-backdrop\");\n const elements = {\n button,\n drawer,\n header,\n anchorLinks,\n backdrop,\n };\n new Drawer(elements);\n};\nconst inViewEntry = () => {\n const kvEntry = document.querySelector(\".index-kv-front-entry\");\n const footer = document.querySelector(\".footer\");\n const leadSection = document.querySelector(\".section-lead\");\n modGsap.ScrollTrigger.create({\n trigger: leadSection,\n start: \"bottom bottom\",\n endTrigger: footer,\n end: \"top bottom\",\n\n toggleClass: { targets: kvEntry, className: \"is-view\" },\n // onEnter: () => {\n // kvEntry.classList.toggle(\"is-view\");\n // },\n });\n};\nwindow.addEventListener(\"DOMContentLoaded\", () => {\n modGsap.init();\n inViewEntry();\n new CssCustomProperties();\n const links = document.querySelectorAll(`a[href*=\"#\"]`);\n new SmoothScroll(links);\n changeMediaQuery(mediaQuery);\n function changeMediaQuery(event) {\n if (event.matches) {\n // md\n } else {\n // smp\n setupDrawer();\n }\n }\n});\n","\"use strict\";\n\nexport class CssCustomProperties {\n #currentWidth = document.documentElement.clientWidth;\n\n constructor() {\n this.#setVw();\n this.#setSvh();\n\n window.addEventListener(\"resize\", this.#onResize);\n }\n\n #setVw = () => {\n const vw = document.documentElement.clientWidth * 0.01;\n document.documentElement.style.setProperty(\"--vw\", `${vw}px`);\n };\n #setSvh = () => {\n const svh = window.innerHeight * 0.01;\n document.documentElement.style.setProperty(\"--svh\", `${svh}px`);\n };\n #onResize = () => {\n if (this.#currentWidth === document.documentElement.clientWidth) {\n return;\n }\n this.#currentWidth = document.documentElement.clientWidth;\n this.#setVw();\n this.#setSvh();\n };\n}\n","\"use strict\";\nimport { ScrollLock } from \"./_scrollLock\";\n// import { SmoothScroll } from \"./_smoothScroll\";\n\nexport class Drawer {\n #header;\n #drawer;\n #button;\n // #closeButton;\n #backdrop;\n #anchorLinks;\n // #closeButton;\n #drawerOpen = false;\n #scrollLock;\n // #smoothScroll;\n // キーボード操作\n #firstTabbable;\n #lastTabbable;\n\n constructor(elements) {\n const { header, drawer, button, anchorLinks, backdrop } = elements;\n this.#header = header;\n this.#drawer = drawer;\n this.#button = button;\n // this.#closeButton = closeButton;\n this.#backdrop = backdrop;\n this.#anchorLinks = anchorLinks;\n\n this.#scrollLock = new ScrollLock();\n // this.#smoothScroll = new SmoothScroll();\n\n // キーボード操作\n const tabbableElements = this.#drawer.querySelectorAll(\n \"a[href], button:not(:disabled)\"\n );\n this.#firstTabbable = tabbableElements[0];\n this.#lastTabbable = tabbableElements[tabbableElements.length - 1];\n\n this.#button.addEventListener(\"click\", this.#onClickButton);\n // this.#closeButton.addEventListener(\"click\", this.#onClickButton);\n window.addEventListener(\"keydown\", this.#onKeydownEsc);\n window.addEventListener(\"keydown\", this.#onKeydownTabKeyFirstTabbable);\n window.addEventListener(\"keydown\", this.#onKeydownTabKeyLastTabbable);\n this.#backdrop.addEventListener(\"click\", this.#onClickBackdrop);\n // this.#anchorLinks.addEventListener(\"click\", (e) => {\n // this.#onClickAnchorLink(e);\n // });\n this.#anchorLinks.forEach((link) => {\n link.addEventListener(\"click\", (e) => {\n this.#onClickAnchorLink(e);\n });\n });\n }\n #changeAriaExpanded = (state) => {\n const value = state ? \"true\" : \"false\";\n this.#drawer.setAttribute(\"aria-expanded\", value);\n this.#button.setAttribute(\"aria-expanded\", value);\n // this.#closeButton.setAttribute(\"aria-expanded\", value);\n // this.#header.classList.toggle(IS_ACTIVE_CLASS, state);\n };\n #changeState = (state) => {\n if (state === this.#drawerOpen) return;\n this.#changeAriaExpanded(state);\n this.#drawerOpen = state;\n };\n #openDrawer = () => {\n this.#changeState(true);\n };\n #closeDrawer = () => {\n this.#changeState(false);\n };\n #onKeydownTabKeyFirstTabbable = (event) => {\n if (event.key !== \"Tab\" || !event.shiftKey) return;\n event.preventDefault();\n lastTabbable.focus();\n };\n #onKeydownTabKeyLastTabbable = (event) => {\n if (event.key !== \"Tab\" || event.shiftKey) return;\n event.preventDefault();\n firstTabbable.focus();\n };\n #onKeydownEsc = (event) => {\n if (!this.#drawerOpen || event.key !== \"Escape\") return;\n event.preventDefault();\n this.#closeDrawer();\n };\n #onClickButton = () => {\n if (this.#drawerOpen === false) {\n this.#openDrawer();\n this.#scrollLock.activate();\n // this.#firstTabbable.focus();\n return;\n }\n this.#closeDrawer();\n this.#scrollLock.deactivate();\n };\n #onClickBackdrop = () => {\n this.#onClickButton();\n };\n\n #onClickAnchorLink = (e) => {\n // e.preventDefault();\n if (this.#drawerOpen === false) {\n this.#openDrawer();\n this.#scrollLock.activate();\n // this.#firstTabbable.focus();\n return;\n }\n this.#closeDrawer();\n this.#scrollLock.deactivate();\n // const rect = document.querySelector(\".footer\");\n // console.log(rect);\n // const position = rect.getBoundingClientRect().top;\n // setTimeout(() => {\n // window.scrollTo({\n // top: position,\n // behavior: \"smooth\",\n // });\n // }, 300);\n };\n}\n","\"use strict\";\n\nimport { gsap } from \"gsap\";\nimport { ScrollTrigger } from \"gsap/ScrollTrigger\";\n\nconst activeClass = \"is-active\";\n\nexport { gsap };\nexport { ScrollTrigger };\n\nexport function init() {\n gsap.registerPlugin(ScrollTrigger);\n}\n\n// ランダムなdelayを付けたいときに\nexport function getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive\n}\n\n//- scrollTriggerでクラスを付与 (1度だけ実行)\nexport function onceAnimation(className = \".anim-once\", viewportAnker = \"75%\") {\n const animOnce = document.querySelectorAll(className);\n animOnce.forEach((item) => {\n ScrollTrigger.create({\n trigger: item,\n start: \"top \" + viewportAnker,\n once: true,\n onEnter: () => {\n item.classList.add(activeClass);\n },\n });\n });\n}\n\n//- scrollTriggerでクラスを付与 (複数回実行)\nexport function repeatAnimation(\n className = \".anim-repeat\",\n viewportAnker = \"75%\"\n) {\n const animRepeat = document.querySelectorAll(className);\n animRepeat.forEach((item) => {\n ScrollTrigger.create({\n trigger: item,\n start: \"top \" + viewportAnker,\n toggleActions: \"play reverse play reverse\",\n toggleClass: { targets: item, className: activeClass },\n });\n });\n}\n","\"use strict\";\n\nexport class ScrollLock {\n #body = document.body;\n // #scrollY = 0;\n activate = () => {\n // this.#scrollY = window.scrollY;\n // this.#body.style.top = `-${this.#scrollY}px`;\n this.#body.classList.add(\"scroll-locked\");\n };\n deactivate = () => {\n // this.#body.style.top = \"auto\";\n this.#body.classList.remove(\"scroll-locked\");\n // window.scrollTo(0, this.#scrollY);\n };\n}\n","\"use strict\";\nimport { stripUnit } from \"./_stripUnit\";\n\nexport class SmoothScroll {\n #links;\n\n constructor(links) {\n this.#links = links;\n this.#links.forEach((link) => {\n link.addEventListener(\"click\", (e) => {\n this.#moveAnchorLink(e);\n });\n });\n }\n #moveAnchorLink = (e) => {\n const target = e.currentTarget;\n e.preventDefault();\n const targetId = target.hash;\n var href = target.href;\n var currentURL = location.href;\n if (currentURL.indexOf(\"#\") > -1) currentURL = currentURL.split(\"#\")[0];\n if (href.split(\"#\")[0] != currentURL) {\n window.location.href = href;\n } else {\n var param = href.substring(href.indexOf(\"?\"));\n\n if (\n target.hasAttribute(\"target\") &&\n target.getAttribute(\"target\") == \"_blank\"\n ) {\n open(target.href, \"_blank\");\n } else {\n if (href.indexOf(\"?\") > -1) {\n location.href = href.replace(param, \"\");\n } else {\n if (\n href.indexOf(currentURL) == -1 ||\n location.pathname == \"/\" ||\n href.split(\"#\")[0] != currentURL\n ) {\n location.href = href;\n } else if (href.indexOf(currentURL) > -1) {\n const targetElement = document.querySelector(targetId);\n // 画面上部から要素までの距離\n const rectTop = targetElement.getBoundingClientRect().top;\n // 現在のスクロール距離\n const offsetTop = window.scrollY;\n // scroll-margin-topプロパティでheaderの高さを確保\n const scrollMarginTop =\n stripUnit(\n window\n .getComputedStyle(targetElement)\n .getPropertyValue(\"scroll-margin-top\")\n ) || 0;\n const top = rectTop + offsetTop - scrollMarginTop;\n\n window.scrollTo({\n top,\n behavior: \"smooth\",\n });\n }\n }\n }\n }\n };\n}\n","export const stripUnit = (value) => {\n return Number((value || \"\").toString().replace(/[^\\d\\.-]/gi, \"\")) || null;\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"js/app\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkfrontend_starter\"] = self[\"webpackChunkfrontend_starter\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"/js/vendor\"], function() { return __webpack_require__(\"./src/js/app.js\"); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":[],"sourceRoot":""}