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vF,IAAII,EAAsB1C,EAAoBQ,OAAEL,EAAW,CAAC,MAAM,WAAa,OAAOH,EAAoB,SAC1G0C,EAAsB1C,EAAoBQ,EAAEkC,G","sources":["webpack:///webpack/runtime/chunk loaded","webpack:///../html/member/lp/Kowai202403/assets/es6/top/_main.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top/_scroll.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top/booklist/_auto-scroll.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top/booklist/_insert-html.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top/booklist/_modal.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top/booklist/_slider.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top/booklist/_booklist.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/top.es6","webpack:///../html/member/lp/Kowai202403/assets/es6/common/_config.es6","webpack:///webpack/bootstrap","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/startup"],"sourcesContent":["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};","export default class Main {\r\n constructor() {\r\n this._$main = document.querySelector('.l-main');\r\n\r\n this._init();\r\n }\r\n\r\n _init() {\r\n this._setLoaded();\r\n }\r\n\r\n _setLoaded() {\r\n this._$main.classList.add('-loaded');\r\n }\r\n\r\n get $main() {\r\n return this._$main;\r\n }\r\n\r\n get isNarrow() {\r\n return window.matchMedia('(max-width: 769px)').matches;\r\n }\r\n}\r\n","export default class Scroll {\r\n constructor() {\r\n this.isNarrow = TOP.main.isNarrow;\r\n\r\n this._init();\r\n }\r\n\r\n _init() {\r\n this._setSmoothScroll();\r\n this._setScrollEvent();\r\n }\r\n\r\n _setSmoothScroll() {\r\n const $smoothArr = [...document.querySelectorAll('.js-smooth')];\r\n\r\n $smoothArr.forEach($smooth => this._addClick($smooth));\r\n }\r\n\r\n _addClick($smooth) {\r\n $smooth.addEventListener('click', e => {\r\n e.preventDefault();\r\n\r\n const selector = e.currentTarget.hash || 'html',\r\n $target = document.querySelector(selector),\r\n y = $target.getBoundingClientRect().top,\r\n gap = this.isNarrow ? 44 : 0;\r\n\r\n window.scrollTo({\r\n behavior: 'smooth',\r\n top: window.pageYOffset + y - gap,\r\n });\r\n });\r\n }\r\n\r\n _setScrollEvent() {\r\n const $showArr = [...document.querySelectorAll('[data-show]')],\r\n $animationArr = [...document.querySelectorAll('.js-animation')];\r\n\r\n $showArr.forEach($show => this._setObserve($show, '-active', { rootMargin: '0px 0px -20%' }));\r\n $animationArr.forEach($animation => this._setObserve($animation, '-running'));\r\n }\r\n\r\n _setObserve($el, activeClass, option = {}) {\r\n const setEntries = entries => entries.forEach(entry => this._changeActive(entry, activeClass)),\r\n intersection = new IntersectionObserver(setEntries, option);\r\n\r\n intersection.observe($el);\r\n }\r\n\r\n _changeActive(entry, activeClass) {\r\n if (!entry.isIntersecting && activeClass == '-active') return;\r\n\r\n const method = entry.isIntersecting ? 'add' : 'remove';\r\n\r\n entry.target.classList[method](activeClass);\r\n }\r\n}\r\n","export default class AutoScroll {\r\n constructor() {\r\n this._$kansoArr = [...document.querySelectorAll('.js-kanso')];\r\n }\r\n\r\n setAutoScroll() {\r\n this._$kansoArr.forEach($kanso => {\r\n const $kansoTxtArr = [...$kanso.querySelectorAll('.js-kanso__txt span')],\r\n $kansoTtlArr = [...$kanso.querySelectorAll('.js-kanso__ttl span')];\r\n\r\n this._changeActive($kansoTxtArr[0], $kansoTtlArr[0], 'add');\r\n this._addTransitionend($kanso, $kansoTxtArr, $kansoTtlArr);\r\n });\r\n }\r\n\r\n _changeActive($txtEl, $ttlEl, method) {\r\n $txtEl.classList[method]('-active');\r\n $ttlEl.classList[method]('-active');\r\n }\r\n\r\n _addTransitionend($kanso, $kansoTxtArr, $kansoTtlArr) {\r\n let order = 0;\r\n\r\n $kansoTxtArr.forEach($kansoTxt => {\r\n $kansoTxt.addEventListener('animationend', e => {\r\n if (e.animationName == 'sec__kanso__txt__show') return;\r\n\r\n const $activeTxt = $kanso.querySelector('.js-kanso__txt .-active'),\r\n $activeTtl = $kanso.querySelector('.js-kanso__ttl .-active');\r\n\r\n order++;\r\n order >= $kansoTxtArr.length && (order = 0);\r\n\r\n this._changeActive($activeTxt, $activeTtl, 'remove');\r\n setTimeout(() => this._changeActive($kansoTxtArr[order], $kansoTtlArr[order], 'add'));\r\n });\r\n });\r\n }\r\n}\r\n","import AutoScroll from './_auto-scroll';\r\n\r\nexport default class InsertHtml {\r\n constructor() {\r\n this._autoScroll = new AutoScroll();\r\n }\r\n\r\n setInsertHtml(booklist) {\r\n this.json = booklist.json;\r\n\r\n this.json.forEach((obj, i) => {\r\n const $sec = document.querySelector(`[data-lv='${obj['こわさレベル']}']`);\r\n\r\n this._insertKansoHtml($sec, obj, i);\r\n this._insertBookHtml($sec, obj);\r\n });\r\n\r\n const _kansoAnimation = (retry = 0) => {\r\n document.querySelectorAll('.js-kanso__txt').forEach(($kansoTxt) => {\r\n Array.from($kansoTxt.children).forEach(($kanso) => {\r\n const itemHeight = $kanso.clientHeight,\r\n lineHeight = parseFloat(getComputedStyle($kanso).lineHeight),\r\n second = Math.round(itemHeight / lineHeight) * 3;\r\n\r\n if (retry > 49) {\r\n second = 6;\r\n }\r\n\r\n $kanso.style.animationDuration = `0.5s, ${second}s`;\r\n\r\n if (itemHeight === 0 || (second === 0 && retry <= 50)) {\r\n setTimeout(() => _kansoAnimation(retry + 1), 100);\r\n return;\r\n }\r\n });\r\n });\r\n\r\n if (retry === 0) {\r\n this._autoScroll.setAutoScroll();\r\n }\r\n };\r\n\r\n _kansoAnimation();\r\n }\r\n\r\n _insertKansoHtml($sec, obj, i) {\r\n if (!obj['感想1']) return;\r\n\r\n const $kansoTxt = $sec.querySelector('.js-kanso__txt'),\r\n $kansoTtl = $sec.querySelector('.js-kanso__ttl');\r\n\r\n $kansoTxt.insertAdjacentHTML('beforeend', `${obj['感想1']}`);\r\n $kansoTtl.insertAdjacentHTML('beforeend', `${obj['タイトル']}`);\r\n }\r\n\r\n _insertBookHtml($sec, obj) {\r\n const $row = $sec.querySelector('.js-row'),\r\n ttlRuby = this._getTtlRubyHtml(obj['タイトル(ルビ)']),\r\n html = `
\r\n \r\n
${ttlRuby}
\r\n\r\n この本を読む\r\n
\r\n