PageSourceSearch

https://www.keyence.com.cn/js/core/analytics-views.js?var=20260930121816

js keyence.com.cn collected 2026-10-08 03:28:36 UTC 56,243 bytes, 1,620 lines download raw bytes

1(function (win, doc, $, utils) {
2    'use strict';
3
4    win.AnalyticsViews = {};
5
6    win.AnalyticsViews.getSubLangType = function () {
7        var subLangType = location.pathname.match(win.suz_LanguagePath);
8
9        if (subLangType === null) {
10            subLangType = '';
11        } else {
12            subLangType = subLangType[0].replace('/', '');
13        }
14
15        return subLangType;
16    };
17
18    win.AnalyticsViews.Utility = {};
19
20    win.AnalyticsViews.Utility.Location = (function () {
21        var Location = {};
22
23        Location.matchPathname = function (patternList) {
24            var len = patternList.length;
25            var i;
26            var pathname = win.location.pathname;
27            var pattern;
28            var result = false;
29
30            pathname = pathname.replace(win.suz_LanguagePath, '');
31
32            for (i = 0; i < len; i++) {
33                pattern = new RegExp(patternList[i]);
34
35                if (pattern.test(pathname)) {
36                    result = true;
37
38                    break;
39                }
40            }
41
42            return result;
43        };
44
45        Location.getDomain = function () {
46            return win.location.protocol + '//' + win.location.hostname;
47        };
48
49        return Location;
50    }());
51
52    win.AnalyticsViews.Utility.Form = (function () {
53        var Form = {};
54
55        Form.getLabelPrefix = function () {
56            var FormFilter = win.KeyenceForm.FormFilter;
57            var WechatLoginFlow = win.KeyenceForm.WechatLoginFlow;
58            var isRootElement = FormFilter.General.checkRootElement();
59            var prefix = '';
60            var formType = '';
61            var formSignInType = '';
62
63            if (!isRootElement) {
64                prefix = 'ready-'
65            } else {
66                formType = FormFilter.General.getFormType();
67                formSignInType = FormFilter.SignIn.getFormType();
68
69                if (formType === FormFilter.General.FORM_TYPE.MOBILE_NUMBER) {
70                    if (FormFilter.General.rootElement.classList.contains(WechatLoginFlow.classNames.isLoginActive) &&
71                        formSignInType === FormFilter.SignIn.FORM_TYPE.ASU) {
72                        prefix = 'wechat-asu-'
73                    } else if (FormFilter.General.rootElement.classList.contains(WechatLoginFlow.classNames.isLoginActive)) {
74                        prefix = 'wechat-'
75                    } else if (formSignInType === FormFilter.SignIn.FORM_TYPE.ASU) {
76                        prefix = 'asu-';
77                    } else {
78                        prefix = 'mobile-';
79                    }
80                } else if (formType === FormFilter.General.FORM_TYPE.EMAIL) {
81                    if (formSignInType === FormFilter.SignIn.FORM_TYPE.ASU) {
82                        prefix = 'asu-';
83                    } else {
84                        prefix = 'email-';
85                    }
86                } else if (formType === FormFilter.General.FORM_TYPE.WECHAT) {
87                    prefix = 'wechat-';
88                }
89            }
90
91            return prefix;
92        };
93
94        Form.setInitialScreenName = function (formCategory, noticeFunction) {
95            var initialScreenName = '';
96            var formWrapper = doc.querySelector('.js-checkCurrentFormScreen');
97
98            if (!formWrapper) {
99                return;
100            }
101
102            initialScreenName = formWrapper.dataset.currentScreenName;
103
104            if (initialScreenName) {
105                noticeFunction.noticeScreenName(
106                    initialScreenName,
107                    formCategory
108                );
109            }
110        };
111
112        Form.attachCurrentScreenObserver = function (formCategory, noticeFunction) {
113            var target = doc.querySelector('.js-checkCurrentFormScreen');
114            var observer = null;
115            var observerConfig = {
116                attributes: true
117            };
118            var screenName = '';
119
120            if (!target) {
121                return;
122            }
123
124            observer = new MutationObserver(function (record) {
125                if (record[0].target === target) {
126                    screenName = record[0].target.dataset.currentScreenName;
127
128                    if (!screenName) {
129                        return;
130                    }
131
132                    noticeFunction.noticeScreenName(
133                        screenName,
134                        formCategory
135                    );
136                }
137            });
138
139            observer.observe(target, observerConfig);
140        };
141
142        return Form;
143    }());
144
145    win.AnalyticsViews.Utility.messageNames = (function () {
146        return {
147            backLink: 'backLink',
148            nextForm: 'nextForm',
149            generalForm: 'generalForm',
150            forwardLink: 'forwardLink',
151            forwardSignInLink: 'forwardSignInLink',
152        };
153    }());
154
155    win.AnalyticsViews.MultiStepForm = (function () {
156        var Utility = win.AnalyticsViews.Utility;
157
158        var idNames = {
159            regArea: 'suz_regArea',
160            root: 'js-multiStepForm',
161            backEmail: 'js-regForm-btnBackToEmail',
162            backEmailSignIn: 'js-signinForm-btnBackToEmail',
163            backMobileSignIn: 'js-signinForm-btnBackToMobile',
164            backMobileRegister: 'js-regForm-btnBackToMobile',
165            preForm: 'js-multiStepForm-signinOrRegister',
166            signin: 'js-multiStepForm-signin',
167            registration: 'js-multiStepForm-registration',
168            loginPassword: 'loginPassword',
169            pwdAssistanceLink: 'suz-pwdAssistanceLink',
170            countryNumber: 'checkCountryNumber',
171            showNextButton: 'js-form-btnCheckRegistered',
172            showNextMobileButton: 'js-form-btnCheckMobileRegistered',
173            mobileTag: 'js-formFilterGeneral-mobileNumber',
174            emailTag: 'js-formFilterGeneral-email',
175            wechatTag: 'js-formFilterGeneral-wechat',
176            changeEmail: 'js-formDescriptionFilter-email',
177            sendVerificationEmailButton: 'js-form-btnCheckSendMail',
178            backSignIn: 'js-sendEmail-btnBackToSignin',
179            backAutoSignUp: 'js-sendEmail-btnBackToAutoSignup',
180            forwardRegister: 'js-signinForm-btnForwardToRegister',
181            sendVerificationAutoSignUpEmailButton: 'js-form-btnCheckSendAutoSignupMail',
182            forwardEmailSignIn: 'js-regForm-btnForwardToEmailSignin'
183        };
184
185        var classNames = {
186            btnPrev: 'js-regForm-btnPrevious',
187            btnNext: 'js-regForm-btnNext',
188            formGroup: 'prd-inputGroup',
189            errorText: 'suz_errorMsg',
190            regPanel: 'js-multiStep-target',
191            regFlat: 'is-register-flat',
192            isCurrent: 'is-current',
193        };
194
195        var MultiStepForm = function () {
196            this.analytics = new win.KeyenceAnalytics.Form();
197            this.$rootElement = null;
198            this.observers = {
199                errText: null,
200            };
201        };
202
203        MultiStepForm.prototype.init = function () {
204            var self = this;
205
206            self.$rootElement = $('#' + idNames.root);
207
208            if (!self.$rootElement.length) {
209                return;
210            }
211
212            self.trackInputErrorAll();
213            self.attachTrackFocus();
214            self.attachTrackClickInput();
215            self.attachTrackPrevious();
216            self.attachTrackNext();
217            self.attachTrackClickLink();
218
219            self.observers.errText = self.attachInputErrorObserver();
220
221            self.attachRegFormObserver(function () {
222                if (self.observers.errText) {
223                    self.observers.errText.disconnect();
224                }
225
226                self.attachInputErrorObserver();
227            });
228
229            Utility.Form.setInitialScreenName('signin', self.analytics);
230            Utility.Form.attachCurrentScreenObserver('signin', self.analytics);
231        };
232
233        MultiStepForm.prototype.attachTrackFocus = function () {
234            var self = this;
235            var selector = 'input, select';
236            var targetIds = [
237                idNames.countryNumber,
238            ];
239            var FormSignIn = win.KeyenceForm.FormFilter.SignIn;
240            var prefix = '';
241
242            self.$rootElement.on('focus', selector, function () {
243                var element = this;
244
245                if (element && self.isElementVisible(element)) {
246                    // When you click the back link on the auto signup screen, the country number on the login screen is focused, so give it a mobile prefix instead of auto signup prefix.
247                    if (element.id === idNames.countryNumber && FormSignIn.getFormType() === FormSignIn.FORM_TYPE.ASU) {
248                        prefix = 'mobile-';
249                    } else {
250                        prefix = Utility.Form.getLabelPrefix();
251                    }
252
253                    self.analytics.noticeEvent(
254                        self.analytics.getEventType('SIGNIN_FOCUS'),
255                        element,
256                        prefix
257                    );
258                }
259            });
260        };
261
262        MultiStepForm.prototype.attachTrackClickInput = function () {
263            var self = this;
264            var selector = 'button, input';
265            var targetIds = [
266                idNames.backEmail,
267                idNames.backEmailSignIn,
268                idNames.backMobileSignIn,
269                idNames.backMobileRegister,
270                idNames.sendVerificationEmailButton,
271                idNames.backSignIn,
272                idNames.backAutoSignUp,
273                idNames.sendVerificationAutoSignUpEmailButton,
274                idNames.forwardEmailSignIn,
275            ];
276            var backLinkIds = [
277                idNames.backEmailSignIn,
278                idNames.backMobileSignIn,
279            ];
280            var showNextIds = [
281                idNames.showNextButton,
282                idNames.showNextMobileButton,
283            ];
284            var generalIds = [
285                idNames.mobileTag,
286                idNames.emailTag,
287                idNames.wechatTag,
288                idNames.changeEmail,
289            ];
290            var forwardIds = [
291                idNames.forwardRegister,
292            ];
293            var forwardSignInIds = [
294                idNames.forwardEmailSignIn,
295            ];
296
297            targetIds.forEach(function (id) {
298                selector += ', #' + id;
299            });
300
301            self.$rootElement.on('click', selector, function () {
302                var element = this;
303
304                if ((element && self.isRegisterPanelVisible(element)) || targetIds.includes(element.i
304d)) {
305                    self.analytics.noticeEvent(
306                        self.analytics.getEventType('SIGNIN_CLICK'),
307                        element,
308                        Utility.Form.getLabelPrefix()
309                    );
310
311                    if (backLinkIds.includes(element.id)) {
312                        win.postMessage(Utility.messageNames.backLink, Utility.Location.getDomain());
313                    } else if (showNextIds.includes(element.id)) {
314                        win.postMessage(Utility.messageNames.nextForm, Utility.Location.getDomain());
315                    } else if (generalIds.includes(element.id)) {
316                        win.postMessage(Utility.messageNames.generalForm, Utility.Location.getDomain());
317                    } else if (forwardIds.includes(element.id)) {
318                        win.postMessage(Utility.messageNames.forwardLink, Utility.Location.getDomain());
319                    } else if (forwardSignInIds.includes(element.id)) {
320                        win.postMessage(Utility.messageNames.forwardSignInLink, Utility.Location.getDomain());
321                    }
322                }
323            });
324        };
325
326        MultiStepForm.prototype.attachTrackClickLink = function () {
327            var self = this;
328            var selector = 'a:not(#' + idNames.pwdAssistanceLink + ')';
329
330            self.$rootElement.on('click', selector, function () {
331                var element = this;
332
333                if (element && !self.isRegisterationPagination(this)) {
334                    self.analytics.noticeEvent(
335                        self.analytics.getEventType('SIGNIN_CLICK'),
336                        element,
337                        Utility.Form.getLabelPrefix()
338                    );
339                }
340            });
341        };
342
343        MultiStepForm.prototype.attachTrackPrevious = function () {
344            var self = this;
345            var selector = '.' + classNames.btnPrev;
346
347            self.$rootElement.on('mousedown keydown touchend', selector, function () {
348                var element = this;
349
350                if (element) {
351                    self.analytics.noticeEvent(
352                        self.analytics.getEventType('SIGNIN_CLICK'),
353                        element,
354                        Utility.Form.getLabelPrefix()
355                    );
356                }
357            });
358        };
359
360        MultiStepForm.prototype.attachTrackNext = function () {
361            var self = this;
362            var selector = '.' + classNames.btnNext;
363
364            self.$rootElement.on('mousedown keydown touchend', selector, function () {
365                var element = this;
366
367                if (element) {
368                    self.analytics.noticeEvent(
369                        self.analytics.getEventType('SIGNIN_CLICK'),
370                        element,
371                        Utility.Form.getLabelPrefix()
372                    );
373                }
374            });
375        };
376
377        MultiStepForm.prototype.attachRegFormObserver = function (handler) {
378            var obs;
379
380            if (typeof handler !== 'function') {
381                return null;
382            }
383
384            obs = new MutationObserver(handler);
385
386            obs.observe(doc.getElementById(idNames.regArea), {
387                childList: true,
388            });
389
390            return obs;
391        };
392
393        MultiStepForm.prototype.attachInputErrorObserver = function () {
394            var self = this;
395            var obs;
396            var callback;
397            var selector = '.' + classNames.formGroup + ' .' + classNames.errorText;
398
399            callback = function (records) {
400                var $target = $(self.getObservationTarget(records));
401                var $parentElement;
402
403                if ($target && $target.length) {
404                    $parentElement = $target.parents('.' + classNames.formGroup);
405                }
406
407                if ($parentElement && $parentElement.length) {
408                    self.trackInputError($parentElement.get(0));
409                }
410            };
411
412            obs = new MutationObserver(callback);
413
414            self.$rootElement.find(selector).each(function () {
415                obs.observe(this, {
416                    childList: true,
417                });
418            });
419
420            return obs;
421        };
422
423        MultiStepForm.prototype.isRegisterationPagination = function (element) {
424            var result = false;
425
426            if (!element) {
427                return result;
428            }
429
430            if (
431                element.classList.contains(classNames.btnNext) ||
432                element.classList.contains(classNames.btnPrev)
433            ) {
434                result = true;
435            }
436
437            return result;
438        };
439
440        MultiStepForm.prototype.getObservationTarget = function (records) {
441            var target = null;
442            var $recordItem = null;
443            var editedRecordsArray = [];
444            var i = 0;
445
446            if (records.length >= 2) {
447                for (i; i < records.length; i++) {
448                    $recordItem = $(records[i].target);
449
450                    if ($recordItem.is(':visible')) {
451                        editedRecordsArray.push(records[i]);
452                    }
453                }
454
455                records = editedRecordsArray;
456            }
457
458            if (Array.isArray(records) && (records[0] && records[0].target)) {
459                target = records[0].target;
460            }
461
462            return target;
463        };
464
465        MultiStepForm.prototype.trackInputErrorAll = function () {
466            var self = this;
467            var $formGroups = this.$rootElement.find('.' + classNames.formGroup);
468
469            if ($formGroups.length) {
470                $formGroups.each(function () {
471                    self.trackInputError(this);
472                });
473            }
474        };
475
476        MultiStepForm.prototype.trackInputError = function (formGroupElement) {
477            var self = this;
478            var $formGroup;
479            var $errorText;
480            var $targetElement;
481            var element;
482            var inputSelector = 'input, select';
483            var eventType = '';
484            var tagName = '';
485            var isInputField = false;
486            var inputField = null;
487
488            if (!formGroupElement) {
489                return;
490            }
491
492            $formGroup = $(formGroupElement);
493            $errorText = $formGroup.find('.' + classNames.errorText);
494
495            if ($errorText.length
496                && $errorText.text().length
497                && self.isElementVisible(formGroupElement)) {
498                $targetElement = $formGroup.find('#' + idNames.loginPassword);
499
500                if (!$targetElement.length) {
501                    $targetElement = $formGroup.find(inputSelector);
502                }
503            }
504
505            if (!$targetElement || !$targetElement.length) {
506                return;
507            }
508
509            element = $targetElement.get(0);
510
511            if (!element) {
512                return;
513            }
514
515            if ($formGroup.hasClass('is-unavailable')) {
516                eventType = 'SIGNIN_VALIDATE_ERROR';
517            } else if ($targetElement.length >= 2) {
518                $targetElement.each(function () {
519                    if (this.tagName === 'INPUT') {
520                        isInputField = true;
521                        inputField = this;
522
523                        return false;
524                    }
525                });
526
527                if (isInputField && inputField.value === '') {
528                    eventType = 'SIGNIN_BLANK_ERROR';
529                } else {
530                    eventType = 'SIGNIN_ERROR';
531                }
532            } else if ($targetElement.length === 1) {
533                tagName = $targetElement.get(0).tagName;
534
535                if ((tagName === 'INPUT' && $targetElement.get(0).value === '')
536                    || tagName === 'SELECT') {
537                    eventType = 'SIGNIN_BLANK_ERROR';
538                } else {
539                    eventType = 'SIGNIN_ERROR';
540                }
541            }
542
543            self.analytics.noticeEvent(
544                self.analytics.getEventType(eventType),
545                element,
546                Utility.Form.getLabelPrefix()
547            );
548        };
549
550        MultiStepForm.prototype.isRegisterElement = function (element) {
551            var $element = $(element);
552
553            if ($element.length && $element.parents('.' + classNames.regPanel).length) {
554                return true;
555            }
556
557            return false;
558        };
559
560        MultiStepForm.prototype.isRegisterPanelVisible = function (element) {
561            var $element = $(element);
562            var $regPanel;
563            var result;
564
565            if (!$element || !$element.length) {
566                return false;
567            }
568
569            if (this.isRegisterElement($element)) {
570                $regPanel = $element.parents('.' + classNames.regPanel);
571
572                if ($('#' + idNames.registration).hasClass(classNames.regFlat)) {
573                    result = true;
574                } else {
575                    if ($regPanel.hasClass(classNames.isCurrent)) {
576                        result = true;
577                    } else {
578                        result = false;
579                    }
580                }
581
582                return result;
583            }
584
585            return $element.is(':visible');
586        };
587
588        MultiStepForm.prototype.isElementVisible = function (element) {
589            var $element = $(element);
590
591            if (!$element || !$element.length) {
592                return false;
593            }
594
595            if (!$element.is(':visible')
596                || $element.css('visibility') !== 'visible'
597                || $element.css('opacity') === '0') {
598                return false;
599            }
600
601            return true;
602        };
603
604        MultiStepForm.prototype.trackModalControl = function (idName, actionName, formCategory) {
605            var self = new win.KeyenceAnalytics.Form();
606
607            if (idName && actionName && formCategory) {
608                self.noticeModalControl(
609                    idName,
610                    actionName,
611                    formCategory,
612                    Utility.Form.getLabelPrefix()
613                );
614            }
615        };
616
617        return MultiStepForm;
618    }());
619
620    win.AnalyticsViews.PasswordAssistance = (function () {
621        var Utility = win.AnalyticsViews.Utility;
622
623        var idNames = {
624            emailAddress: 'js-reset-EmailAddress',
625            sendEmail: 'js-reset-sendMail',
626            histBackPwd: 'js-reset-histBackPwd',
627            pwd: 'js-reset-Pwd',
628            editPwd: 'js-reset-editPwd',
629            mobileNumber: 'remindMobileNumber',
630            verificationCode: 'remindVerificationCode',
631            showPassword: 'resetPassword-showPassword',
632            mobileTag: 'js-formFilterGeneral-mobileNumber',
633            emailTag: 'js-formFilterGeneral-email',
634            wechatTag: 'js-formFilterGeneral-wechat',
635            getVerificationCode: 'remindVerificationCode-getCode',
636        };
637
638        var classNames = {
639            isError: 'is-error',
640            formGroup: 'prd-inputGroup',
641            errorText: 'suz_errorMsg',
642        };
643
644        var names = {
645            passwordAssistanceActionForm: 'user_passwordAssistanceActionForm',
646            passwordAssistanceResetActionForm: 'user_passwordAssistance_resetPasswordActionForm',
647        };
648
649        var PasswordAssistance = function () {
650            this.analytics = new win.KeyenceAnalytics.Form();
651            this.urlPatternList = [
652                /^\/user\/passwordAssistance\//,
653                /^\/user\/passwordAssistance\/resetPassword\//,
654            ];
655            this.$form = null;
656        };
657
658        PasswordAssistance.prototype.init = function () {
659            var self = this;
660
661            self.$form = $('form[name="' + names.passwordAssistanceActionForm + '"]');
662            self.$resetForm = $('form[name="' + names.passwordAssistanceResetActionForm + '"]');
663
664            if (!this.canStartTracking()) {
665                return;
666            }
667
668            self.trackInputErrorAll();
669            self.attachTrackFocusEvent();
670            self.attachTrackClickEvent();
671            self.attachInputErrorObserver();
672
673            Utility.Form.setInitialScreenName('reset', self.analytics);
674            Utility.Form.attachCurrentScreenObserver('reset', self.analytics);
675        };
676
677        PasswordAssistance.prototype.canStartTracking = function () {
678            var len = this.urlPatternList.length;
679            var i;
680            var pathname = win.location.pathname;
681            var pattern;
682            var result = false;
683
684            for (i = 0; i < len; i++) {
685                pattern = new RegExp(this.urlPatternList[i]);
686
687                if (pattern.test(pathname)) {
688                    result = true;
689
690                    break;
691                }
692            }
693
694            return result;
695        };
696
697        PasswordAssistance.prototype.attachTrackFocusEvent = function () {
698            var self = this;
699            var selector = [
700                '#' + idNames.emailAddress,
701                '#' + idNames.pwd,
702                '#' + idNames.mobileNumber,
703                '#' + idNames.verificationCode,
704            ].join(', ');
705            var elements = document.querySelectorAll(selector);
706
707            Array.prototype.forEach.call(elements, function (elm) {
708                elm.addEventListener('focus', function () {
709                    if (!self.isElementVisible(elm)) {
710                        return;
711                    }
712
713                    self.analytics.noticeEvent(
714                        self.analytics.getEventType('RESET_FOCUS'),
715                        elm,
716                        Utility.Form.getLabelPrefix()
717                    );
718                });
719            });
720        };
721
722        PasswordAssistance.prototype.attachTrackClickEvent = function () {
723            var self = this;
724            var selector = [
725                '#' + idNames.sendEmail,
726                '#' + idNames.histBackPwd,
727                '#' + idNames.editPwd,
728                '#' + idNames.showPassword,
729                '#' + idNames.mobileTag,
730                '#' + idNames.emailTag,
731                '#' + idNames.wechatTag,
732                '#' + idNames.getVerificationCode,
733            ].join(', ');
734            var elements = document.querySelectorAll(selector);
735            var generalIds = [
736                idNames.mobileTag,
737                idNames.emailTag,
738                idNames.wechatTag,
739            ];
740
741            Array.prototype.forEach.call(elements, function (elm) {
742                elm.addEventListener('click', function () {
743                    self.analytics.noticeEvent(
744                        self.analytics.getEventType('RESET_CLICK'),
745                        elm,
746                        Utility.Form.getLabelPrefix()
747                    );
748
749                    if (generalIds.includes(elm.id)) {
750                        win.postMessage(Utility.messageNames.generalForm, Utility.Location.getDomain());
751                    }
752                });
753            });
754        };
755
756        PasswordAssistance.prototype.attachRegFormObserver = function (handler) {
757            var obs;
758
759            if (typeof handler !== 'function') {
760                return null;
761            }
762
763            obs = new MutationObserver(handler);
764
765            obs.observe(this.$form.get(0), {
766                childList: true,
767            });
768
769            return obs;
770        };
771
772        PasswordAssistance.prototype.attachInputErrorObserver = function () {
773            var self = this;
774            var obs;
775            var callback;
776            var selector = '.' + classNames.formGroup + ' .' + classNames.errorText;
777
778            callback = function (records) {
779                var $target = $(self.getObservationTarget(records));
780                var $parentElement;
781
782                if ($target && $target.length) {
783                    $parentElement = $target.parents('.' + classNames.formGroup);
784                }
785
786                if ($parentElement && $parentElement.length) {
787                    self.trackInputError($parentElement.get(0));
788                }
789            };
790
791            obs = new MutationObserver(callback);
792
793            if (self.$form.length) {
794                self.$form.find(selector).each(function () {
795                    obs.observe(this, {
796                        childList: true,
797                    });
798                });
799            } else if (self.$resetForm.length) {
800                self.$resetForm.find(selector).each(function () {
801                    obs.observe(this, {
802                        childList: true,
803                    });
804                });
805            }
806
807            return obs;
808        };
809
810        PasswordAssistance.prototype.getObservationTarget = function (records) {
811            var target = null;
812
813            if (Array.isArray(records) && (records[0] && records[0].target)) {
814                target = records[0].target;
815            }
816
817            return target;
818        };
819
820        PasswordAssistance.prototype.trackInputErrorAll = function () {
821            var self = this;
822            var $formGroups = this.$form.find('.' + classNames.formGroup);
823
824            if ($formGroups.length) {
825                $formGroups.each(function () {
826                    self.trackInputError(this);
827                });
828            }
829        };
830
831        PasswordAssistance.prototype.trackInputErrorAll = function () {
832            var self = this;
833            var $formGroups = this.$form.find('.' + classNames.formGroup);
834            var $resetFormGroups = this.$resetForm.find('.' + classNames.formGroup);
835
836            if ($formGroups.length) {
837                $formGroups.each(function () {
838                    self.trackInputError(this);
839                });
840            } else if ($resetFormGroups.length) {
841                $resetFormGroups.each(function () {
842                    self.trackInputError(this);
843                });
844            }
845        };
846
847        PasswordAssistance.prototype.trackInputError = function (formGroupElement) {
848            var self = this;
849            var $formGroup;
850            var $errorText;
851            var $targetElement;
852            var element;
853            var inputSelector = 'input, select';
854            var eventType = '';
855            var tagName = '';
856
857            if (!formGroupElement) {
858                return;
859            }
860
861            $formGroup = $(formGroupElement);
862            $errorText = $formGroup.find('.' + classNames.errorText);
863
864            if ($errorText.is(':visible')
865                && $errorText.text().length
866                && self.isElementVisible(formGroupElement)) {
867                $targetElement = $formGroup.find(inputSelector);
868            }
869
870            if ($targetElement && $targetElement.length) {
871                element = $targetElement.get(0);
872
873                if ($formGroup.hasClass('is-unavailable')) {
874                    eventType = 'RESET_VALIDATE_ERROR';
875                } else if ($targetElement.length === 1) {
876                    tagName = element.tagName;
877
878                    if ((tagName === 'INPUT' && element.value === '')
879                        || tagName === 'SELECT') {
880                        eventType = 'RESET_BLANK_ERROR';
881                    } else {
882                        eventType = 'RESET_ERROR';
883                    }
884                }
885
886                if (element) {
887                    self.analytics.noticeEvent(
888                        self.analytics.getEventType(eventType),
889                        element,
890                        Utility.Form.getLabelPrefix()
891                    );
892                }
893            }
894        };
895
896        PasswordAssistance.prototype.isElementVisible = function (element) {
897            var $element = $(element);
898
899            if (!$element || !$element.length) {
900                return false;
901            }
902
903            if (!$element.is(':visible')
904                || $element.css('visibility') !== 'visible'
905                || $element.css('opacity') === '0') {
906                return false;
907            }
908
909            return true;
910        };
911
912        return PasswordAssistance;
913    }());
914
915    win.AnalyticsViews.RegisteredMemberForm = (function () {
916        var idNames = {
917            loggedInButton: 'js-form-btnLoginedContinue',
918            autoLoginButton: 'js-form-autoLoginSwitch',
919            autoSignUpButton: 'js-form-autoSignupSwitch',
920            multiStepFormRoot: 'js-multiStepForm',
921        };
922
923        var RegisteredMemberForm = function () {
924            this.analytics = new win.KeyenceAnalytics.Form();
925        };
926
927        RegisteredMemberForm.prototype.init = function () {
928            var self = this;
929
930            self.$multiStepFormRootElement = $('#' + idNames.multiStepFormRoot);
931
932            if (self.$multiStepFormRootElement.length) {
933                return;
934            }
935
936            self.attachTrackClickEvent();
937        };
938
939        RegisteredMemberForm.prototype.attachTrackClickEvent = function () {
940            var self = this;
941            var selector = [
942                '#' + idNames.loggedInButton,
943                '#' + idNames.autoLoginButton,
944                '#' + idNames.autoSignUpButton,
945            ].join(', ');
946            var elements = document.querySelectorAll(selector);
947
948            Array.prototype.forEach.call(elements, function (elm) {
949                elm.addEventListener('click', function () {
950                    self.analytics.noticeEvent(
951                        self.analytics.getEventType('SIGNIN_CLICK'),
952                        elm,
953                        ''
954                    );
955                });
956            });
957        };
958
959        return RegisteredMemberForm;
960    }());
961
962    win.AnalyticsViews.GroupTypeNavi = (function () {
963        var classNames = {
964            listGroup: 'prd-categoryNavigation-parentList',
965            linkGroup: 'prd-categoryNavigation-parentLink',
966            listType: 'prd-categoryNavigation-childList',
967            linkType: 'prd-inlineLink',
968        };
969
970        var GroupTypeNavi = function () {
971            this.analytics = new win.KeyenceAnalytics.Analytics();
972            this.urlPatternList = [
973                /^\/products\/[a-zA-Z0-9-_]+\/$/,
974                /^\/products\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+\/$/,
975            ];
976        };
977
978        GroupTypeNavi.prototype.init = function () {
979            if (!this.canStartTracking()) {
980                return;
981            }
982
983            this.initLinkClassNames();
984            this.attachTrackClickNav();
985            this.attachTrackClickChildNav();
986        };
987
988        GroupTypeNavi.prototype.initLinkClassNames = function () {
989            var subLangType = win.AnalyticsViews.getSubLangType();
990
991            if (subLangType.length) {
992                classNames.linkGroup = classNames.linkGroup + '[href^="/' + subLangType + '/product"]';
993                classNames.linkType = classNames.linkType + '[href^="/' + subLangType + '/product"]';
994            } else {
995                classNames.linkGroup += '[href^="/product"]';
996                classNames.linkType += '[href^="/product"]';
997            }
998        };
999
1000        GroupTypeNavi.prototype.canStartTracking = function () {
1001            var len = this.urlPatternList.length;
1002            var i;
1003            var pathname = win.location.pathname;
1004            var pattern;
1005            var result = false;
1006
1007            pathname = pathname.replace(win.suz_LanguagePath, '');
1008
1009            for (i = 0; i < len; i++) {
1010                pattern = new RegExp(this.urlPatternList[i]);
1011
1012                if (pattern.test(pathname)) {
1013                    result = true;
1014
1015                    break;
1016                }
1017            }
1018
1019            return result;
1020        };
1021
1022        GroupTypeNavi.prototype.attachTrackClickNav = function () {
1023            var self = this;
1024            var selector = [
1025                '.' + classNames.listGroup + ' .' + classNames.linkGroup,
1026            ].join(', ');
1027            var groupNavLinkList = document.querySelectorAll(selector);
1028
1029            Array.prototype.forEach.call(groupNavLinkList, function (navLink) {
1030                navLink.addEventListener('click', function () {
1031                    self.analytics.noticeEvent(
1032                        win.KeyenceAnalytics.GroupTypeLeftNavi.name,
1033                        win.KeyenceAnalytics.GeneralMeasure.EVENT_TYPES.CLICK,
1034                        navLink
1035                    );
1036                });
1037            });
1038        };
1039
1040        GroupTypeNavi.prototype.attachTrackClickChildNav = function () {
1041            var self = this;
1042            var selector = [
1043                '.' + classNames.listType + '> li .' + classNames.linkType,
1044            ].join(', ');
1045            var typeNavLinkList = document.querySelectorAll(selector);
1046
1047            Array.prototype.forEach.call(typeNavLinkList, function (typeLink) {
1048                typeLink.addEventListener('click', function () {
1049                    self.analytics.noticeEvent(
1050                        win.KeyenceAnalytics.GroupTypeLeftNavi.name,
1051                        win.KeyenceAnalytics.GeneralMeasure.EVENT_TYPES.CLICK,
1052                        typeLink
1053                    );
1054                });
1055            });
1056        };
1057
1058        return GroupTypeNavi;
1059    }());
1060
1061    win.AnalyticsViews.DownloadFilter = (function () {
1062        var Utility = win.AnalyticsViews.Utility;
1063
1064        var idNames = {
1065            modelsList: 'js-setModelsList',
1066            fileTypesList: 'js-filterFileTypes',
1067        };
1068
1069        var classList = {
1070            modelsListChild: 'js-setModelsList-child',
1071            modelsCheckbox: 'js-setModelsList-checkbox',
1072            modelsListLabel: 'js-setModelsList-label',
1073        };
1074
1075        var DownloadFilter = function () {
1076            this.analytics = new win.KeyenceAnalytics.Analytics();
1077            this.urlPatternList = [
1078                /^\/products\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+\/downloads\/$/,
1079                /^\/downloads\/$/,
1080            ];
1081        };
1082
1083        DownloadFilter.prototype.init = function () {
1084            if (!Utility.Location.matchPathname(this.urlPatternList)) {
1085                return;
1086            }
1087
1088            this.attachTrackAddModels();
1089            this.attachTrackAddFileTypes();
1090        };
1091
1092        DownloadFilter.prototype.attachTrackAddModels = function () {
1093            var self = this;
1094
1095            doc.addEventListener('click', function (event) {
1096                var targetElement = event.target;
1097
1098                if (targetElement && targetElement.classList.contains(classList.modelsCheckbox)) {
1099                    self.analytics.noticeEvent(
1100                        win.KeyenceAnalytics.DownloadFilter.name,
1101                        win.KeyenceAnalytics.DownloadFilter.EVENT_TYPES.CLICK_MODELS,
1102                        targetElement
1103                    );
1104                }
1105            });
1106        };
1107
1108        DownloadFilter.prototype.attachTrackAddFileTypes = function () {
1109            var self = this;
1110            var selector = [
1111                '#' + idNames.fileTypesList + ' label input[type="checkbox"]',
1112            ].join(', ');
1113            var elements = document.querySelectorAll(selector);
1114
1115            Array.prototype.forEach.call(elements, function (checkbox) {
1116                checkbox.addEventListener('click', function () {
1117                    self.analytics.noticeEvent(
1118                        win.KeyenceAnalytics.DownloadFilter.name,
1119                        win.KeyenceAnalytics.DownloadFilter.EVENT_TYPES.CLICK_FILE_TYPES,
1120                        checkbox
1121                    );
1122                });
1123            });
1124        };
1125
1126        return DownloadFilter;
1127    }());
1128
1129    win.AnalyticsViews.CTABanner = (function () {
1130        var CTABanner = function () {
1131            this.analytics = new win.KeyenceAnalytics.Analytics();
1132        };
1133
1134        CTABanner.prototype.init = function () {
1135            var self = this;
1136
1137            win.addEventListener('message', function (event) {
1138                self.attachTrackShow(event);
1139                self.attachTrackClickLink(event);
1140                self.attachTrackClickClose(event);
1141            });
1142        };
1143
1144        CTABanner.prototype.attachTrackShow = function (event) {
1145            var self = this;
1146            var eventType = '';
1147
1148            if (event.data.schema === 'image') {
1149                eventType = win.KeyenceAnalytics.CTABanner.EVENT_TYPES.SHOW_IMAGE_SCHEMA;
1150            }
1151
1152            if (event.data.schema === 'video') {
1153                eventType = win.KeyenceAnalytics.CTABanner.EVENT_TYPES.SHOW_MOVIE_SCHEMA;
1154            }
1155
1156            self.analytics.noticeEvent(
1157                win.KeyenceAnalytics.CTABanner.name,
1158                eventType,
1159                doc.body
1160            );
1161        };
1162
1163        CTABanner.prototype.attachTrackClickLink = function (event) {
1164            var self = this;
1165            var selector = [
1166                '[data-cta-measure]',
1167            ].join(', ');
1168            var links = doc.querySelectorAll(selector);
1169            var eventType = '';
1170
1171            Array.prototype.forEach.call(links, function (link) {
1172                link.addEventListener('click', function () {
1173                    if (event.data.schema === 'image') {
1174                        eventType = win.KeyenceAnalytics.CTABanner.EVENT_TYPES.CLICK_IMAGE_SCHEMA_LINK;
1175                    }
1176
1177                    if (event.data.schema === 'video') {
1178                        eventType = win.KeyenceAnalytics.CTABanner.EVENT_TYPES.CLICK_MOVIE_SCHEMA_LINK;
1179                    }
1180
1181                    self.analytics.noticeEvent(
1182                        win.KeyenceAnalytics.CTABanner.name,
1183                        eventType,
1184                        link
1185                    );
1186                });
1187            });
1188        };
1189
1190        CTABanner.prototype.attachTrackClickClose = function (event) {
1191            var self = this;
1192            var selector = [
1193                '#js-ctaBanner-closeButton',
1194            ].join(', ');
1195            var closeTriggers = doc.querySelectorAll(selector);
1196            var eventType = '';
1197
1198            Array.prototype.forEach.call(closeTriggers, function (trigger) {
1199                trigger.addEventListener('click', function () {
1200                    if (event.data.schema === 'image') {
1201                        eventType = win.KeyenceAnalytics.CTABanner.EVENT_TYPES.CLICK_IMAGE_SCHEMA_CLOSE;
1202                    }
1203
1204                    if (event.data.schema === 'video') {
1205                        eventType = win.KeyenceAnalytics.CTABanner.EVENT_TYPES.CLICK_MOVIE_SCHEMA_CLOSE;
1206                    }
1207
1208                    self.analytics.noticeEvent(
1209                        win.KeyenceAnalytics.CTABanner.name,
1210                        eventType,
1211                        doc.body
1212                    );
1213                });
1214            });
1215        };
1216
1217        return CTABanner;
1218    }());
1219
1220    win.AnalyticsViews.SideCTA = (function () {
1221        var classNames = {
1222            link: 'js-menuConversion-link',
1223            snsLink: 'js-menuConversion-snsLink',
1224            appButton: 'js-menuConversion-appButton',
1225            removeButton: 'js-menuConversion-removeButton'
1226        };
1227
1228        var selectors = [
1229            '.' + classNames.link,
1230            '.' + classNames.appButton,
1231            '.' + classNames.snsLink
1232        ].join(', ');
1233
1234        var SideCTA = function () {
1235            this.analytics = new win.KeyenceAnalytics.Analytics();
1236        };
1237
1238        SideCTA.prototype.init = function () {
1239            this.attachTrackClickSideCTALink();
1240            this.attachTrackClickSideCTARemoveButton();
1241        };
1242
1243        SideCTA.prototype.attachTrackClickSideCTALink = function () {
1244            var self = this;
1245            var $doc = $(doc);
1246
1247            $doc.on('click', selectors, function () {
1248                var element = this;
1249
1250                if (element) {
1251                    self.analytics.noticeEvent(
1252                        win.KeyenceAnalytics.SideCTA.name,
1253                        win.KeyenceAnalytics.SideCTA.EVENT_TYPES.CLICK_LINK,
1254                        element
1255                    );
1256                }
1257            });
1258        };
1259
1260        SideCTA.prototype.attachTrackClickSideCTARemoveButton = function () {
1261            var self = this;
1262            var $doc = $(doc);
1263
1264            $doc.on('click', '.' + classNames.removeButton, function () {
1265                var element = this;
1266
1267                if (element) {
1268                    self.analytics.noticeEvent(
1269                        win.KeyenceAnalytics.SideCTA.name,
1270                        win.KeyenceAnalytics.SideCTA.EVENT_TYPES.CLICK_REMOVE_BUTTON,
1271                        element
1272                    );
1273                }
1274            });
1275        };
1276
1277        return SideCTA;
1278    }());
1279
1280    win.AnalyticsViews.MykDeqwasModal = (function () {
1281        var MykDeqwasModal = function () {
1282            this.analytics = new win.KeyenceAnalytics.Analytics();
1283        };
1284
1285        MykDeqwasModal.prototype.init = function () {
1286            var self = this;
1287
1288            win.addEventListener('message', function (event) {
1289                self.attachTrackShow(event);
1290                self.attachTrackClose(event);
1291            });
1292        };
1293
1294        MykDeqwasModal.prototype.attachTrackShow = function (event) {
1295            var self = this;
1296            var eventType = '';
1297
1298            if (event.data.myKDeqwasModalState === win.KeyenceAnalytics.MykDeqwasModal.EVENT_TYPES.SHOW) {
1299                eventType = win.KeyenceAnalytics.MykDeqwasModal.EVENT_TYPES.SHOW;
1300                self.attachTrackClickAssetLink();
1301            }
1302
1303            if (eventType) {
1304                self.analytics.noticeEvent(
1305                    win.KeyenceAnalytics.MykDeqwasModal.name,
1306                    eventType,
1307                    doc.body
1308                );
1309            }
1310        };
1311
1312        MykDeqwasModal.prototype.attachTrackClose = function (event) {
1313            var self = this;
1314            var eventType = '';
1315
1316            if (event.data.myKDeqwasModalState === win.KeyenceAnalytics.MykDeqwasModal.EVENT_TYPES.CLOSE) {
1317                eventType = win.KeyenceAnalytics.MykDeqwasModal.EVENT_TYPES.CLOSE;
1318            }
1319
1320            if (eventType) {
1321                self.analytics.noticeEvent(
1322                    win.KeyenceAnalytics.MykDeqwasModal.name,
1323                    eventType,
1324                    doc.body
1325                );
1326            }
1327        };
1328
1329        MykDeqwasModal.prototype.attachTrackClickAssetLink = function () {
1330            var self = this;
1331            var assetLinks = doc.querySelectorAll('.js-myKeyenceModalRecommend-assetLink');
1332
1333            if (assetLinks.length) {
1334                assetLinks.forEach((assetLink) => {
1335                    assetLink.addEventListener('click', function () {
1336                        var element = this;
1337
1338                        self.analytics.noticeEvent(
1339                            win.KeyenceAnalytics.MykDeqwasModal.name,
1340                            win.KeyenceAnalytics.MykDeqwasModal.EVENT_TYPES.CLICK_ASSET_LINK,
1341                            element
1342                        );
1343                    });
1344                });
1345            };
1346        };
1347
1348        return MykDeqwasModal;
1349    }());
1350
1351    win.AnalyticsViews.MykOneMorePRBanner = (function () {
1352        var MykOneMorePRBanner = function () {
1353            this.analytics = new win.KeyenceAnalytics.Analytics();
1354        };
1355
1356        MykOneMorePRBanner.prototype.init = function () {
1357            var self = this;
1358
1359            win.addEventListener('message', function (event) {
1360                self.attachTrackShow(event);
1361            });
1362        };
1363
1364        MykOneMorePRBanner.prototype.attachTrackShow = function (event) {
1365            var self = this;
1366            var eventType = '';
1367            var video = null;
1368
1369            if (event.data.mykOneMorePRBannerState === win.KeyenceAnalytics.MykOneMorePRBanner.EVENT_TYPES.SHOW) {
1370                eventType = win.KeyenceAnalytics.MykOneMorePRBanner.EVENT_TYPES.SHOW;
1371                self.attachTrackClickLink();
1372            }
1373
1374            if (eventType) {
1375                video = doc.querySelector('.js-myKeyenceOneMorePR-video');
1376
1377                if (video) {
1378                    self.analytics.noticeEvent(
1379                        win.KeyenceAnalytics.MykOneMorePRBanner.name,
1380                        eventType,
1381                        video
1382                    );
1383                }
1384            }
1385        };
1386
1387        MykOneMorePRBanner.prototype.attachTrackClickLink = function () {
1388            var self = this;
1389            var link = doc.querySelector('.js-myKeyenceOneMorePR-link');
1390
1391            if (link) {
1392                link.addEventListener('click', function () {
1393                    var element = this;
1394
1395                    self.analytics.noticeEvent(
1396                        win.KeyenceAnalytics.MykOneMorePRBanner.name,
1397                        win.KeyenceAnalytics.MykOneMorePRBanner.EVENT_TYPES.CLICK,
1398                        element
1399                    );
1400                });
1401            }
1402        };
1403
1404        return MykOneMorePRBanner;
1405    }());
1406
1407    win.AnalyticsViews.ModalWindow = (function () {
1408        var classNames = {
1409            root: 'js-modalWindow',
1410            show: 'js-modalWindow-showButton',
1411        };
1412
1413        var ModalWindow = function () {
1414            this.analytics = new win.KeyenceAnalytics.Analytics();
1415        };
1416
1417        ModalWindow.prototype.init = function () {
1418            this.attachTrackShow();
1419            this.attachTrackClose();
1420        };
1421
1422        ModalWindow.prototype.attachTrackShow = function () {
1423            var self = this;
1424            var showButtons = doc.querySelectorAll(`.${classNames.show}`);
1425
1426            if (showButtons.length) {
1427                showButtons.forEach(button => {
1428                    button.addEventListener('click', function (event) {
1429                        self.analytics.noticeEvent(
1430                            win.KeyenceAnalytics.ModalWindow.name,
1431                            win.KeyenceAnalytics.ModalWindow.EVENT_TYPES.SHOW,
1432                            event.currentTarget
1433                        );
1434                    })
1435                })
1436            }
1437        };
1438
1439        ModalWindow.prototype.attachTrackClose = function () {
1440            var self = this;
1441            var roots = doc.querySelectorAll(`.${classNames.root}`)
1442
1443            if (roots.length) {
1444                roots.forEach(root => {
1445                    root.addEventListener('close', function (event) {
1446                        self.analytics.noticeEvent(
1447                            win.KeyenceAnalytics.ModalWindow.name,
1448                            win.KeyenceAnalytics.ModalWindow.EVENT_TYPES.CLOSE,
1449                            event.currentTarget
1450                        );
1451                    })
1452                })
1453            }
1454        };
1455
1456        return ModalWindow;
1457    }());
1458
1459    win.AnalyticsViews.PopupMypage = (function () {
1460        var classNames = {
1461            banner: 'js-pwaInstallBanner',
1462            addButton: 'js-pwaInstallBanner__addButton',
1463            closeButton: 'js-pwaInstallBanner__closeButton',
1464        };
1465
1466        var PopupMypage = function () {
1467            this.analytics = new win.KeyenceAnalytics.Analytics();
1468            this.hasTrackedShow = false;
1469        };
1470
1471        PopupMypage.prototype.init = function () {
1472            this.attachTrackMessage();
1473            this.attachTrackShowIfVisible();
1474            this.attachTrackClick();
1475            this.attachTrackClose();
1476        };
1477
1478        PopupMypage.prototype.getBanner = function () {
1479            return doc.querySelector('.' + classNames.banner);
1480        };
1481
1482        PopupMypage.prototype.notice = function (eventType, element) {
1483            if (!element) {
1484                return false;
1485            }
1486
1487            this.analytics.noticeEvent(
1488                win.KeyenceAnalytics.PopupMypage.name,
1489                eventType,
1490                element
1491            );
1492
1493            return true;
1494        };
1495
1496        PopupMypage.prototype.noticeShow = function (element) {
1497            if (this.hasTrackedShow) {
1498                return;
1499            }
1500
1501            if (this.notice(win.KeyenceAnalytics.PopupMypage.EVENT_TYPES.SHOW, element)) {
1502                this.hasTrackedShow = true;
1503            }
1504        };
1505
1506        // Fallback only: banner HTML starts as hidden.
1507        // Official show signal is postMessage({ popupMypageState: 'show' }).
1508        PopupMypage.prototype.attachTrackShowIfVisible = function () {
1509            var banner = this.getBanner();
1510
1511            if (banner && !banner.hidden) {
1512                this.noticeShow(banner);
1513            }
1514        };
1515
1516        PopupMypage.prototype.attachTrackMessage = function () {
1517            var self = this;
1518
1519            win.addEventListener('message', function (event) {
1520                var eventType = '';
1521                var banner = self.getBanner();
1522
1523                if (event.origin !== win.location.origin) {
1524                    return;
1525                }
1526
1527                if (!event.data || typeof event.data !== 'object') {
1528                    return;
1529                }
1530
1531                eventType = event.data.popupMypageState;
1532
1533                if (eventType === win.KeyenceAnalytics.PopupMypage.EVENT_TYPES.SHOW) {
1534                    if (!banner) {
1535                        return;
1536                    }
1537
1538                    self.noticeShow(banner);
1539                }
1540            });
1541        };
1542
1543        PopupMypage.prototype.attachTrackClick = function () {
1544            var self = this;
1545            var addButton = doc.querySelector('.' + classNames.addButton);
1546
1547            if (!addButton) {
1548                return;
1549            }
1550
1551            addButton.addEventListener('click', function () {
1552                self.notice(
1553                    win.KeyenceAnalytics.PopupMypage.EVENT_TYPES.CLICK,
1554                    addButton
1555                );
1556            });
1557        };
1558
1559        PopupMypage.prototype.attachTrackClose = function () {
1560            var self = this;
1561            var closeButton = doc.querySelector('.' + classNames.closeButton);
1562
1563            if (!closeButton) {
1564                return;
1565            }
1566
1567            closeButton.addEventListener('click', function () {
1568                self.notice(
1569                    win.KeyenceAnalytics.PopupMypage.EVENT_TYPES.CLOSE,
1570                    closeButton
1571                );
1572            });
1573        };
1574
1575        return PopupMypage;
1576    }());
1577
1578    win.AnalyticsViews.init = function () {
1579        if (win.KeyenceAnalytics) {
1580            new win.AnalyticsViews.MultiStepForm().init();
1581            new win.AnalyticsViews.PasswordAssistance().init();
1582            new win.AnalyticsViews.RegisteredMemberForm().init();
1583            new win.AnalyticsViews.GroupTypeNavi().init();
1584            new win.AnalyticsViews.DownloadFilter().init();
1585            new win.AnalyticsViews.CTABanner().init();
1586            new win.AnalyticsViews.SideCTA().init();
1587            new win.AnalyticsViews.MykDeqwasModal().init();
1588            new win.AnalyticsViews.MykOneMorePRBanner().init();
1589            new win.AnalyticsViews.ModalWindow().init();
1590            new win.AnalyticsViews.PopupMypage().init();
1591        }
1592    };
1593
1594    doc.addEventListener('DOMContentLoaded', () => {
1595        if (win.analyticsViewsComplete === true) {
1596            return;
1597        }
1598
1599        win.AnalyticsViews.init();
1600        win.analyticsViewsComplete = true;
1601    });
1602}(window, document, this.jQuery, {
1603    closest: function (nodeArg, selector) {
1604        'use strict';
1605
1606        var node = nodeArg;
1607
1608        return (node.closest || function (_selector) {
1609            do {
1610                if ((node.matches || node.msMatchesSelector).call(node, _selector)) {
1611                    return node;
1612                }
1613
1614                node = node.parentElement || node.parentNode;
1615            } while (node !== null && node.nodeType === 1);
1616
1617            return null;
1618        }).call(node, selector);
1619    },
1620}));

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.