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AAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,SAAAA,WAGEA,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,SAAAA,WAKAQ,GAAAA,GAAiCA,GAArC,GACED,GAAYC,EAAD,GAAD,EAD2D,IAGrER,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,SAAAA,UAGAA,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,SAAAA,YAGSQ,GAAJ,GACLD,EAAAA,IACAP,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,YAAAA,aAIAA,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,YAAAA,UAGAA,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,YAAAA,WAGAA,EAAE,WAAac,EAAfd,MAAAA,OAAAA,MAAAA,YAAAA,YAKFA,EAAAA,uBAAAA,KAAAA,QAAAA,KAA2CA,EAAAA,4CAAAA,KAAAA,MAA3CA,QAEA,IACEO,EAAAA,KAEFP,EAAAA,OAAAA,KAAcI,EAAAA,IAAdJ,GACAA,EAAE,+BAAiCa,EAAnCb,UAAAA,IAAAA,SAA+DO,EAlDV,e,EAxEjEV,GA2IN,IAAIA,G,iBC5IJkB,EAAOC,QAAUX,OAAe,S","sources":["webpack://sage/./resources/scripts/modules/edi-navigation.js","webpack://sage/external window \"jQuery\""],"sourcesContent":["import 'bootstrap/js/dist/dropdown';\nclass EdiNavigation {\n constructor() {\n this.scrollProgressBar();\n //this.resizeWindow();\n }\n // resizeWindow(){\n // $(window).on('resize', () => {\n // $(\"div.scroll-progress-content\").each(function (index) {\n // $('.progressBar li').removeClass('active');\n // $('.progressBar li').removeClass('current');\n // $('.progressBar li').removeClass('passive');\n // });\n // this.scrollProgressBar();\n // });\n // }\n scrollProgressBar(){\n var firstnode = $(\"#firstnode\").val();\n //console.log(firstnode);\n\n if($(\".edi-report-new .card-text-image button\").hasClass('d-none'))\n $(\".edi-report-new .card-text-image button\").removeClass('d-none');\n\n $(\".progressBar ul.dropdown-menu li\").click(function () {\n $(\".progressBar button\").find('span').html($(this).find('em').html());\n });\n \n $(\".progressBar a\").click(function () {\n var IdName = $(this).attr(\"href\");\n $(\".progressBar li\").removeClass('current');\n $(\"[href='\" + IdName + \"']\")\n .parent(\"li\")\n .addClass(\"active current\");\n if ($(window).width() < 768){\n $(\"html, body\").animate(\n {\n scrollTop: $(IdName).offset().top - 160,\n },\n 800\n );\n }else{\n $(\"html, body\").animate(\n {\n scrollTop: $(IdName).offset().top - 180,\n },\n 800\n );\n }\n });\n $(\".progressBar button\").click(function () {\n if ($(this).attr(\"aria-expanded\") == \"false\") {\n $(\"html, body\").animate(\n {\n scrollTop: $(firstnode).offset().top,\n },\n 200\n );\n }\n $(\".progressBar button\").find('span').html($(\".progressBar ul.dropdown-menu li:first\").find('em').html());\n });\n \n \n\n $(window).scroll(function () {\n var a = window.innerHeight + window.scrollY;\n var b = document.body.offsetHeight;\n var c = a >= b;\n var percent=0;\n\n $('.progressBar li:first').addClass('active');\n \n var CurrentPosition = $(this).scrollTop();\n //console.log('here');\n $(\"div.scroll-progress-content\").each(function (index) {\n \n var SectionTop = $(this).offset().top - 320;\n var SectionLength = $(this).height();\n var SectionBottom = SectionTop + SectionLength;\n var i = index;//$(this).index();\n var IdSection = $(this).attr(\"id\");\n $('.progressBar li:first').addClass('active');\n //console.log(i);\n if(CurrentPosition > (SectionTop)){\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .addClass(\"passive\");\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .addClass(\"active\");\n }\n \n if (CurrentPosition >= SectionTop && CurrentPosition <= SectionBottom) {\n percent = ((CurrentPosition - SectionTop) / SectionLength) * 100;\n //console.log(\"i: \"+i+\" top: \"+SectionTop+\" Current: \"+CurrentPosition+ \" sectionlength: \"+SectionLength+ \" Percent: \"+percent);\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .addClass(\"active\");\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .addClass(\"current\");\n } else if (CurrentPosition >= SectionBottom) {\n percent = 100;\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .removeClass(\"current\");\n } else {\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .removeClass(\"active\");\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .removeClass(\"passive\");\n $(\"[href='#\" + IdSection + \"']\")\n .parent(\"li\")\n .removeClass(\"current\");\n }\n \n $(\".progressBar button\").find('span').html($(\".progressBar ul.dropdown-menu li.current\").find('em').html());\n\n if (c) {\n percent = 100;\n }\n $(\".rs\").text(c + \"|\" + percent);\n $(\".dropdown-menu li.active:eq(\" + i + \") span\").css(\"height\", percent + \"%\");\n // if ($(window).width() < 768) {\n // } else {\n // //console.log(percent);\n // $(\".dropdown-menu li.active:eq(\" + i + \") span\").css({\"width\" : percent + \"%\"});\n // }\n });\n });\n\n\n\n\n\n }\n}\n\nexport default EdiNavigation;\nnew EdiNavigation;\n","module.exports = window[\"jQuery\"];"],"names":["EdiNavigation","this","firstnode","$","IdName","scrollTop","top","c","window","document","percent","CurrentPosition","index","SectionTop","SectionLength","SectionBottom","i","IdSection","module","exports"],"sourceRoot":""}