PageSourceSearch

https://www.nissen.co.jp/res/p/js/common.js?202609221606

js nissen.co.jp collected 2026-10-01 12:09:44 UTC 29,739 bytes, 562 lines download raw bytes

1/* globals $ visitorId customerId */
2/*
3 * サイト固有のログインセッション系の処理を行う。
4 *  ・シリアル番号、レコメンドの永続クッキーの生成
5 * 
6 *  /res/s/js/common.js にも全く同じ sessionModule 実装があるため合わせて更新のこと。
7 */
8if (!window["sessionModule"]) {
9
10	var sessionModule = (function () {
11		var COOKIE_EXPIRY = new Date(3000, 0, 1); /* 3000年1月1日 */
12		var COOKIE_SERIALNUMBER_ALT = 'duid';
13		var COOKIE_RECOMMEND_PERSIST = 'SET_RCMDID';
14		var COOKIE_NICKNAME = 'review_nickname';
15		var COOKIE_SP_THUM_LAYOUTNUM = 'num'
16		var STORAGE_SERIALNUMBER = 'duid';
17		var STORAGE_RECOMMEND_PERSIST = 'nol_set_rcmdid';
18		var STORAGE_NICKNAME = 'nol_review_nickname';
19		var STORAGE_SP_THUM_LAYOUTNUM = 'nol_sp_thum_layoutnum'
20
21		/* 
22		 * ログアウトしていることを表すCookie名. 
23		 * 1:会員ログオフ操作が行われた
24		 * 2:一旦ログインした 
25		 * 存在しない:新規導入としてログイン状態初回とみなす
26		 */
27		var COOKIE_LOGOUT_STATUS = 'EFS_LOGOUTED';
28		var STORAGE_LOGOUT_STATUS = 'nol_logouted';
29		var enterLoggedIn = false; /* このリクエスト内でログイン状態に移行したと判断した際に true に設定される */
30
31		/*
32		 * ログイン状態
33		 * 0:ログアウト状態
34		 * 1:シャローログイン
35		 * 2:ディープログイン
36		 */
37		var STORAGE_LOGIN_STATUS = 'nol_login_status';
38
39		// ディープログイン成功後最初のアクセスか
40		var firstDeepLogin = false;
41
42		/* 
43		 * localStorageのget関数(error発生時にcatchするための関数)
44		 */
45		function getLocalStorage(storageKey) {
46			try {
47				return localStorage.getItem(storageKey);
48			} catch (e) {
49				console.warn(e, "localStorageをgetできません");
50				return null;
51			}
52		}
53
54		/* 
55		 * localStorageのset関数(error発生時にcatchするための関数)
56		 */
57		function setLocalStorage(storageKey, storageData) {
58			try {
59				localStorage.setItem(storageKey, storageData);
60			} catch (e) {
61				console.warn(e, "localStorageをsetできません");
62			}
63		}
64
65		/* 
66		 * Safari ITP2.1対応(Cookie7日間問題対応) R#74616
67		 * 一旦Cookieに入っているデータをlocalStorageに保持する(Cookieは削除しない)
68		 */
69		function copyLocalStorage(cookieKey, storageKey) {
70			var storageData = getLocalStorage(storageKey);
71			if (!storageData) {
72				var cookieData = Cookies.get(cookieKey);
73				if (cookieData) {
74					setLocalStorage(storageKey, cookieData);
75				}
76			}
77		}
78		copyLocalStorage(COOKIE_RECOMMEND_PERSIST, STORAGE_RECOMMEND_PERSIST);
79		copyLocalStorage(COOKIE_SERIALNUMBER_ALT, STORAGE_SERIALNUMBER);
80		copyLocalStorage(COOKIE_LOGOUT_STATUS, STORAGE_LOGOUT_STATUS);
81		copyLocalStorage(COOKIE_NICKNAME, STORAGE_NICKNAME); // res/p/review/zeta-voice.jsで使用 
82		copyLocalStorage(COOKIE_SP_THUM_LAYOUTNUM, STORAGE_SP_THUM_LAYOUTNUM); // res/s/search/search.jsで使用
83
84		// ログアウト時のレコメンド計測用localStorageの更新(ログアウト時はクリアして次回アクセス時に訪問者IDを設定)
85		function clearRecommendData() {
86			localStorage.removeItem(STORAGE_RECOMMEND_PERSIST);
87		}
88
89		// レコメンド計測用localStorageは未設定であればその時点の訪問者IDを入れる。
90		function ensureRecommendData() {
91			var recommendData = getLocalStorage(STORAGE_RECOMMEND_PERSIST);
92			if (!recommendData) {
93				setLocalStorage(STORAGE_RECOMMEND_PERSIST, visitorId);
94			}
95		}
96
97		// シリアル番号localStorageは未設定であればその時点の訪問者IDを入れる。
98		// (duidは別jsでも使用されているためCookieにも保持する)
99		// ・元々あるduidが不正値の場合は空にする。
100		// ・訪問者IDが空の場合は作成しない。
101
102		function ensureSerialNumData() {
103			var serialNumData = getLocalStorage(STORAGE_SERIALNUMBER);
104			if ( serialNumData && serialNumData.startsWith('.') && !(serialNumData.length == 46 || serialNumData.length == 50) ) {
105				//不正な値の時duid削除
106				Cookies.remove(COOKIE_SERIALNUMBER_ALT);
107				localStorage.removeItem(STORAGE_SERIALNUMBER);
108				serialNumData = null;
109			}
110			if ( !serialNumData && visitorId ) {
111				serialNumData = Cookies.get(COOKIE_SERIALNUMBER_ALT) || visitorId + '.' + new Date().getTime();	
112				setLocalStorage(STORAGE_SERIALNUMBER, serialNumData);
113			}
114			if ( serialNumData ) {
115				Cookies.set(COOKIE_SERIALNUMBER_ALT, serialNumData, {
116					path: '/',
117					expires: COOKIE_EXPIRY
118				});
119			}
120
121			return serialNumData;
122		}
123
124		// ログイン状態をlocalStorage(Cookie)に保存しておく。1:会員ログオフ操作が行われた、2:一旦ログインした
125		function setLogoutStatus(logoutStatus) {
126			setLocalStorage(STORAGE_LOGOUT_STATUS, logoutStatus);
127		}
128
129		/**
130		 * 現在ログイン状態なら ture を返す。
131		 * 【前提】
132		 * HTML内に会員の情報を表すJS変数が適切に設置されていること。
133		 * 
134		 * @returns ログイン状態なら true
135		 */
136		function isLoggedIn() {
137			if (typeof customerId !== 'undefined') {
138				return customerId !== null && customerId.length > 0;
139			}
140			return false;
141		}
142
143		/**
144		 * このブラウザ内でログイン状態になって初回のリクエスト中であればtrueを返す。
145		 * この仕組が一度も実行されていない(cookieが存在しない)場合もログイン状態であれば初回は実行されるため、
146		 * 必ずしもログインした瞬間のタイミングではないことに注意。
147		 * 
148		 * @returns このブラウザ内でログイン状態になって初回のリクエスト中であればtrueを返す
149		 */
150		function isEnteredLoggedIn() {
151			return enterLoggedIn;
152		}
153
154		/**
155		 * ログイン状態をJSから利用するための状態維持を行う。
156		 * localStorage状態の維持と初回ログインの状態の設定。
157		 */
158		function ensureLoginStatus() {
159			if (isLoggedIn()) { // ログイン状態の場合
160				var logoutStatus = getLocalStorage(STORAGE_LOGOUT_STATUS);
161				if (!logoutStatus || logoutStatus === "1") { // 存在しない or 0(無効値)or ログアウトした状態
162					// 画面からのログアウト処理が行われていた、あるいは、ログイン状態管理導入後の初回のときは
163					// enterLoggedInをtrueにして、このリクエスト中はログイン後の初回であることを保持(シャロー状態を含む)。
164					enterLoggedIn = true;
165				}
166				// ログイン状態になっていたらlocalStorageに状態を反映しておく
167				setLogoutStatus("2");
168			}
169		}
170
171		function onLogout() {
172			clearRecommendData();
173
174			// ログアウトしたことをlocalStorageに保存しておく。2:画面からログアウトした。
175			setLogoutStatus("1");
176		}
177
178		function onAccess() {
179			ensureLoginStatus();
180			ensureRecommendData();
181			ensureSerialNumData();
182		}
183
184		/**
185		 * 下記の場合「firstDeepLogin」変数を「true」にセットする
186		 * - ログアウト状態「0」→ディープログイン「2」
187		 * - シャローログイン「1」→ディープログイン「2」
188		 * ローカルストレージにログイン状態「nol_login_status」を保存する
189		 *
190		 * @param {string} status ログイン状態( 0:ログアウト状態 1:シャローログイン 2:ディープログイン)
191		 */
192		function changeLoginStatus(status) {
193			// ローカルストレージに保存したログイン状態
194			let curStatus = getLocalStorage(STORAGE_LOGIN_STATUS);
195			if ((curStatus === "0" || curStatus === "1") && status === "2") {
196				firstDeepLogin = true;
197			}
198
199			// 現在のログイン状態をローカルストレージに保存する
200			setLocalStorage(STORAGE_LOGIN_STATUS, status);
201		}
202
203		/**
204		 * このブラウザ内でディープログイン状態になって初回のリクエスト中であればtrueを返す。
205		 * 下記のケースのみ「true」を返す
206		 * 1- 「ログアウト」状態から「ディープログイン」状態になって
207		 * 2- 「シャローログイン」状態から「ディープログイン」状態になって
208		 *
209		 * @returns このブラウザ内でディープログイン状態になって初回のリクエスト中であればtrueを返す
210		 */
211		function isFirstDeepLogin() {
212			return firstDeepLogin;
213		}
214
215		return {
216			onAccess: onAccess,
217			onLogout: onLogout,
218			isLoggedIn: isLoggedIn,
219			isEnteredLoggedIn: isEnteredLoggedIn,
220			getDuid: ensureSerialNumData,
221			changeLoginStatus: changeLoginStatus,
222			isFirstDeepLogin: isFirstDeepLogin
223		}
224	})();
225
226	// 毎回アクセス
227	sessionModule.onAccess();
228}
229
230// modal_overlay
231$(function () {
232	if ($('#modal_overlay').length === 0) {
233		var wrapper = '<div id="modal_overlay" style="display:none;"></div>';
234		$('body').append(wrapper);
235	}
236});
237
238
239
240// ヘッダー設定
241$(function () {
242	// カート商品数
243	$('#cart_quantity').text(totalCartCount);
244});
245
246
247// リンク選択時の検索処理
248function searchFunction(keyword) {
249	$("#keyword").val(keyword);
250
251	if ($('#searchArea form').eq(0).length > 0) {
252		$('#searchArea form').eq(0).submit(); //for sp submit
253		return false;
254	}
255	$('form[name=searchbox]').submit()
256}
257
258/**
259 * 似ている商品はこちらを選択時の処理
260 */
261function open_similar_items_modal(deviceType, itemCodeString) {
262	var templateHtmlString = '';
263	templateHtmlString += '<div class="similar-items-modal m-modal">';
264	templateHtmlString += ' <div id="loading-recommend" class="m-modal_inr loading_inr">';
265	templateHtmlString += '   <div class="loader">';
266	templateHtmlString += '     loading...';
267	templateHtmlString += '   </div>';
268	templateHtmlString += ' </div>';
269	templateHtmlString += ' <div id="endloading" class="m-modal_inr" style="display:none">';
270	templateHtmlString += '   <p class="m-modal_close" onclick="modalModule.flush();">';
271	if (deviceType == "SP" || deviceType == "reserveSP") {
272		templateHtmlString += '閉じる';
273	}
274	templateHtmlString += '   </p>';
275	if (deviceType == "reservePC" || deviceType == "reserveSP") {
276		templateHtmlString += '   <section class="check-recent nissen-recommend recommend_NR-18-013" data-slot="detail_rm_sim_yoyaku">';
277	}
278	else {
279		templateHtmlString += '   <section class="check-recent nissen-recommend recommend_NR-18-013" data-slot="detail_rm_sim_keppin">';
280	}
281	templateHtmlString += '     <div class="title-wrap">';
282	if (deviceType == "reservePC" || deviceType == "reserveSP") {
283		templateHtmlString += '       <h2 class="sec-tit">すぐ届く似ている商品</h2>';
284	}
285	else {
286		templateHtmlString += '       <h2 class="sec-tit">似ている商品はこちら</h2>';
287	}
288	templateHtmlString += '     </div>';
289	templateHtmlString += '     <div id="itemFound">';
290	templateHtmlString += '       <div class="row js-recommend" style="overflow-y: scroll;height: 400px;"></div>';
291	templateHtmlString += '       <p class="notice">※ご案内している商品についても、一部の色・サイズで、売切れの場合がございます。ご了承ください。</p>';
292	templateHtmlString += '     </div>';
293	templateHtmlString += '     <div class="container" id="itemNotFound">';
294	templateHtmlString += '       <p class="no-item">';
295	templateHtmlString += '         <img class="img" src="/res/p/img/recommend/gomennasai.gif" alt="申し訳ございません。似ている商品が見つかりませんでした。">';
296	templateHtmlString += '       </p>';
297	templateHtmlString += '       <p class="close_no-item" onclick="modalModule.flush();">閉じる</p>';
298	templateHtmlString += '     </div>';
299	templateHtmlString += '   </section>';
300	templateHtmlString += ' </div>';
301	templateHtmlString += '</div>';
302	templateHtmlString += '<style>';
303	templateHtmlString += '.recommend_NR-18-013 .js-item-review .m-item_list_reviewstars {';
304	templateHtmlString += '	width: 55.5px;';
305	templateHtmlString += '}';
306	templateHtmlString += '.recommend_NR-18-013 .m-item_list_discount,';
307	templateHtmlString += '.recommend_NR-18-013 .m-item_list_quickview,';
308	templateHtmlString += '.recommend_NR-18-013 .m-item_list_fav,';
309	templateHtmlString += '.recommend_NR-18-013 .m-item_list_stock {';
310	templateHtmlString += '	display: none!important;';
311	templateHtmlString += '}';
312	templateHtmlString += '.recommend_NR-18-013 .col-item-parts {';
313	templateHtmlString += '	margin-bottom: 20px;';
314	templateHtmlString += '}';
315	templateHtmlString += '</style>';
316	modalModule.push($(templateHtmlString));
317
318	var option = {
319		basicItemCd: itemCodeString,
320		reserveFlag: deviceType == "reservePC" || deviceType == "reserveSP"
321	}
322	nissen_recommend_build_area_modal("NR-18-013", option).then(function (data) {
323		$('#endloading').show();
324		$('#loading-recommend').hide();
325		if (typeof (data) !== "object" || data.length === 0) {
326			$('#itemNotFound').show();
327			$('#itemFound').hide();
328			$('.recommend_NR-18-013').show();
329		}
330		else {
331			$('#itemFound').show();
332			$('#itemNotFound').hide();
333		}
334
335		// モーダルのサイズを調整
336		if (deviceType == "PC" || deviceType == "reservePC") {
337			$('recommend_NR-18-013 .js-recommend').height(Math.max(298, $(window).height() - 450));
338
339			$(window).on('resize', function () {
340				// モーダルのサイズを調整
341				$('.recommend_NR-18-013 .js-recommend').height(Math.max(298, $(window).height() - 450));
342			});
343		}
344	});
345}
346
347/**
348 * Get the URL parameter value
349 *
350 * @param  name {string} パラメータのキー文字列
351 * @return  url {url} 対象のURL文字列(任意)
352 */
353function nolGetURLParam(name, url) {
354	if (!url) url = window.location.href;
355	name = name.replace(/[\[\]]/g, "\\$&");
356	var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
357		results = regex.exec(url);
358	if (!results) return undefined;
359	if (!results[2]) return "";
360	return decodeURIComponent(results[2].replace(/\+/g, " "));
361}
362
363var nissenHoverTimerID;
364function hoverNavigation(navi) {
365	clearTimeout(nissenHoverTimerID);
366	// グローバルナビ
367	var $modal = $('#modal_overlay');
368	var $this = $(navi);
369
370	$this.siblings().removeClass('active');
371
372	nissenHoverTimerID = setTimeout(function () {
373		$this.addClass('active');
374		$('.hdr').addClass('layerup');
375		$modal.show().stop(true, true);
376	}, 100);
377}
378
379function leaveNavigation() {
380	clearTimeout(nissenHoverTimerID);
381	// グローバルナビ
382	var $modal = $('#modal_overlay');
383	var $gNav = $('.hdr_gnav_cat');
384	nissenHoverTimerID = setTimeout(function () {
385		$gNav.removeClass('active');
386		$modal.hide();
387	}, 100);
388}
389
390
391// google推奨 画像遅延読み込み
392//ブラウザ判定。誤判定防止のため、下記順にて判定を行う。
393//IEとsafariのみpolyfill使用
394var intersectionObserver = false;
395
396if (!('IntersectionObserver' in window) ||
397    !('IntersectionObserverEntry' in window) ||
398    !('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
399		(function(undefined) {!function(){function e(e,t){for(var n=-1,o=e.length;++n<o;)if(n in e&&e[n]===t)return n;return-1}var t={click:1,dblclick:1,keyup:1,keypress:1,keydown:1,mousedown:1,mouseup:1,mousemove:1,mouseover:1,mouseenter:1,mouseleave:1,mouseout:1,storage:1,storagecommit:1,textinput:1};if("undefined"!=typeof document&&"undefined"!=typeof window){var n=window.Event&&window.Event.prototype||null;window.Event=Window.prototype.Event=function(e,t){if(!e)throw new Error("Not enough arguments");var n;if("createEvent"in document){n=document.createEvent("Event");var o=!(!t||t.bubbles===undefined)&&t.bubbles,i=!(!t||t.cancelable===undefined)&&t.cancelable;return n.initEvent(e,o,i),n}return n=document.createEventObject(),n.type=e,n.bubbles=!(!t||t.bubbles===undefined)&&t.bubbles,n.cancelable=!(!t||t.cancelable===undefined)&&t.cancelable,n},n&&Object.defineProperty(window.Event,"prototype",{configurable:!1,enumerable:!1,writable:!0,value:n}),"createEvent"in document||(window.addEventListener=Window.prototype.addEventListener=Document.prototype.addEventListener=Element.prototype.addEventListener=function(){var n=this,o=arguments[0],i=arguments[1];if(n===window&&o in t)throw new Error("In IE8 the event: "+o+" is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.");n._events||(n._events={}),n._events[o]||(n._events[o]=function(t){var o,i=n._events[t.type].list,r=i.slice(),c=-1,a=r.length;for(t.preventDefault=function(){!1!==t.cancelable&&(t.returnValue=!1)},t.stopPropagation=function(){t.cancelBubble=!0},t.stopImmediatePropagation=function(){t.cancelBubble=!0,t.cancelImmediate=!0},t.currentTarget=n,t.relatedTarget=t.fromElement||null,t.target=t.target||t.srcElement||n,t.timeStamp=(new Date).getTime(),t.clientX&&(t.pageX=t.clientX+document.documentElement.scrollLeft,t.pageY=t.clientY+document.documentElement.scrollTop);++c<a&&!t.cancelImmediate;)c in r&&(o=r[c],-1!==e(i,o)&&"function"==typeof o&&o.call(n,t))},n._events[o].list=[],n.attachEvent&&n.attachEvent("on"+o,n._events[o])),n._events[o].list.push(i)},window.removeEventListener=Window.prototype.removeEventListener=Document.prototype.removeEventListener=Element.prototype.removeEventListener=function(){var t,n=this,o=arguments[0],i=arguments[1];n._events&&n._events[o]&&n._events[o].list&&-1!==(t=e(n._events[o].list,i))&&(n._events[o].list.splice(t,1),n._events[o].list.length||(n.detachEvent&&n.detachEvent("on"+o,n._events[o]),delete n._events[o]))},window.dispatchEvent=Window.prototype.dispatchEvent=Document.prototype.dispatchEvent=Element.prototype.dispatchEvent=function(e){if(!arguments.length)throw new Error("Not enough arguments");if(!e||"string"!=typeof e.type)throw new Error("DOM Events Exception 0");var t=this,n=e.type;try{if(!e.bubbles){e.cancelBubble=!0;var o=function(e){e.cancelBubble=!0,(t||window).detachEvent("on"+n,o)};this.attachEvent("on"+n,o)}this.fireEvent("on"+n,e)}catch(i){e.target=t;do{e.currentTarget=t,"_events"in t&&"function"==typeof t._events[n]&&t._events[n].call(t,e),"function"==typeof t["on"+n]&&t["on"+n].call(t,e),t=9===t.nodeType?t.parentWindow:t.parentNode}while(t&&!e.cancelBubble)}return!0},document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&document.dispatchEvent(new Event("DOMContentLoaded",{bubbles:!0}))}))}}();!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||a();try{this.isIntersecting=!!t.intersectionRect}catch(r){}var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,i=o.width*o.height;this.intersectionRatio=n?i/n:this.isIntersecting?1:0}function o(t,e){var n=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=r(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function i(){return t.performance&&performance.now&&performance.now()}function r(t,e){var n=null;return function(){n||(n=setTimeout(function(){t(),n=null},e))}}function s(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function h(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function c(t,e){var n=Math.max(t.top,e.top),o=Math.min(t.bottom,e.bottom),i=Math.max(t.left,e.left),r=Math.min(t.right,e.right),s=r-i,h=o-n;return s>=0&&h>
399=0&&{top:n,bottom:o,left:i,right:r,width:s,height:h}}function u(t){var e;try{e=t.getBoundingClientRect()}catch(n){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):a()}function a(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t,e){for(var n=e;n;){if(n==t)return!0;n=p(n)}return!1}function p(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if(!("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)){var f=[];o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections()}},o.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},o.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},o.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this._checkForIntersections(),this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,h(t,"resize",this._checkForIntersections,!0),h(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():a();this._observationTargets.forEach(function(o){var r=o.element,s=u(r),h=this._rootContainsTarget(r),c=o.entry,a=t&&h&&this._computeTargetAndRootIntersection(r,e),l=o.entry=new n({time:i(),target:r,boundingClientRect:s,rootBounds:e,intersectionRect:a});c?t&&h?this._hasCrossedThreshold(c,l)&&this._queuedEntries.push(l):c&&c.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(n,o){if("none"!=t.getComputedStyle(n).display){for(var i=u(n),r=i,s=p(n),h=!1;!h;){var a=null,l=1==s.nodeType?t.getComputedStyle(s):{};if("none"==l.display)return;if(s==this.root||s==e?(h=!0,a=o):s!=e.body&&s!=e.documentElement&&"visible"!=l.overflow&&(a=u(s)),a&&!(r=c(a,r)))break;s=p(s)}return r}},o.prototype._getRootRect=function(){var t;if(this.root)t=u(this.root);else{var n=e.documentElement,o=e.body;t={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==n||r==o||r<n!=r<o)return!0}},o.prototype._rootIsInDom=function(){return!this.root||l(e,this.root)},o.prototype._rootContainsTarget=function(t){return l(this.root||e,t)},o.prototype._registerInstance=function(){f.indexOf(this)<0&&f.push(this)},o.prototype._unregisterInstance=function(){var t=f.indexOf(this);-1!=t&&f.splice(t,1)},t.IntersectionObserver=o,t.IntersectionObserverEntry=n}}(window,document);}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
400		intersectionObserver = true;
401	}
402
403var lazyImages = [];
404function LazyImageIntersectionObserver(classNameTxt){
405    lazyImages = [].slice.call(document.querySelectorAll("img."+classNameTxt));
406
407	//IntersectionObserver対応ブラウザか判定
408	//IntersectionObserver非対応だがpolyfillを使用することで対応可能となる場合は可
409	if (('IntersectionObserver' in window &&
410    'IntersectionObserverEntry' in window &&
411	'isIntersecting' in window.IntersectionObserverEntry.prototype) ||
412	('IntersectionObserver' in window && intersectionObserver === true)
413	){
414        var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
415            entries.forEach(function(entry) {
416                if (entry.isIntersecting) {
417                    var lazyImage = entry.target;
418                    lazyImage.src = lazyImage.dataset.src;
419					lazyImage.classList.add("show_img");
420                    lazyImage.classList.remove(classNameTxt);
421                    lazyImageObserver.unobserve(lazyImage);
422                }
423            });
424        });
425        lazyImages.forEach(function(lazyImage) {
426            lazyImageObserver.observe(lazyImage);
427		});
428		return;
429	}
430	
431	//IntersectionObserver非対応の場合
432	loadFunc();
433	$(window).scroll(loadFunc);
434	function loadFunc() { 
435		var target = $('img[data-src]'); 
436		$.each(target, function (i, item) {
437			var targetPos = $(item).offset().top - $(window).height() - 500; 
438			if ($(window).scrollTop() > targetPos && !$(item).is('.active')) { 
439				var imgSrc = $(item).data('src'); 
440				$(item).addClass('active').attr('src', imgSrc).hide().fadeIn(800); 
441			} 
442		}); 
443	}
444}
445
446document.addEventListener("DOMContentLoaded", function() {
447	LazyImageIntersectionObserver("lazy_img");
448});
449
450function addLazyImages(classNameTxt){
451	if(lazyImages){
452		lazyImages = [].slice.call(document.querySelectorAll("img"+classNameTxt));
453	}
454}
455
456var utilModule = (function () {
457
458	var $body;
459	var bodyCssStore = {};
460  
461	var toggle = function ($ele, $self) {
462		if(!($ele instanceof jQuery)){
463			$ele = $($ele);
464		}
465		if(!($self instanceof jQuery)){
466			$self = $($self);
467		}
468		
469		
470		if($ele.hasClass("switch-on")){
471			$ele.removeClass("switch-on");
472			$ele.addClass("switch-off");
473			$('html,body').animate({
474                          scrollTop: $ele.offset().top
475                        }, 0);
476		} else {
477			$ele.removeClass("switch-off");
478			$ele.addClass("switch-on");
479		}
480		
481		if($self.hasClass("switch-btn-on")){
482			$self.removeClass("switch-btn-on");
483			$self.addClass("switch-btn-off")
484		} else {
485			$self.removeClass("switch-btn-off");
486			$self.addClass("switch-btn-on");
487		}
488	
489	};
490
491	var modal = function ($modal) {
492	  if(!($modal instanceof jQuery)){
493		$modal = $($modal);
494	  }
495  
496	  if($modal.hasClass("modal-on")){
497                $modal.scrollTop(0);
498		$modal.removeClass("modal-on");
499		$modal.addClass("modal-off");
500		$("body").removeClass("fixed-on");
501		$("body").addClass("fixed-off");
502		$(".m-modal").css({'position': '', 'top': '', 'left': '', 'width': '', 'height': ''});
503		$(".m-modal_wrap").attr('style','');
504		modalModule.endScl();
505	  } else {
506		modalModule.modalInit();
507		$modal.removeClass("modal-off");
508		$modal.addClass("modal-on");
509		$("body").css({'position': ''});
510		$("body").removeClass("fixed-off");
511		$("body").addClass("fixed-on");
512		$(".m-modal_wrap").attr('style','z-index:30');
513	  }
514	};
515	
516	var toSingleByte = function (e) {
517		var val = e.val();
518		var str = val.replace(/[A-Za-z0-9]/g, function (s) {
519		  return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)
520		});
521	
522		if (val.match(/[A-Za-z0-9]/g)) {
523		  $(e).val(str);
524		}
525	  };
526  
527	return {
528	  toggle: toggle,
529	  modal: modal,
530	  toSingleByte: toSingleByte
531	};
532  })();
533  $(function(){
534	$(window).on('scroll', function() {
535	  if ($(this).scrollTop() > 200) {
536		$('.page-top').fadeIn(200);
537	  } else {
538		$('.page-top').fadeOut(200);
539	  }
540	});
541	$('.page-top').on('click', function(event) {
542	  event.preventDefault();
543	  $('html, body').animate({scrollTop: 0}, 600);
544	});
545  });
546
547// もっと見る用DOM
548function viewMoreDom(viewMorePoint) {
549  var classNames = viewMorePoint.classList;
550  var classListArray = Array.from(classNames);
551  var filteredClassList = classListArray.filter(function(className) {
552    return className !== 'switch-off' && className !== 'switch-on';
553  });
554  var moreClass = "'" + filteredClassList.map(function (className) {
555    return '.' + className;
556  }).join('') + "'";
557  var viewMoreHtml = document.createElement('div');
558  viewMoreHtml.classList.add('item_btn_wrap');
559  viewMoreHtml.setAttribute('onclick', 'utilModule.toggle(' + moreClass + ')');
560  viewMoreHtml.innerHTML = '<a class="switch-btn-off second-more-opn">もっと見る<span class="m-plus-btn"></span></a><a class="switch-btn-on second-more-cls">閉じる<span class="m-minus-btn"></span></a></div></div>';
561  viewMorePoint.appendChild(viewMoreHtml);
562}

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.