{"version":3,"sources":["Components/Utility/vendor/lightboxv2.min.js","Components/Utility/MetaTags.jsx","Components/Utility/ApiCalls.js","Components/Utility/WebStorageFactory.js","Components/Utility/JsonProvider.jsx","Components/Utility/ErrorProvider.jsx","Components/Utility/DataLayers.js","Components/Utility/LoadGRM.jsx","Components/Utility/Global.jsx","Components/Partials/Header.jsx","Components/Utility/PromotionState.js","Components/Partials/Footer.jsx","Components/Screens/Closed.jsx","Components/Screens/Comingsoon.jsx","Components/Screens/Splitter.jsx","Components/Screens/Login.jsx","Components/Screens/Shipping.jsx","Components/Screens/Home.jsx","Components/Screens/Register.jsx","Components/Screens/Forgotpassword.jsx","Components/Screens/Recoverpassword.jsx","Components/Screens/Batchcode.jsx","Components/Screens/Movie.jsx","Components/Screens/Wordsearch.jsx","Components/Screens/Puzzle.jsx","Components/Screens/Thankyou.jsx","Components/Screens/Limit.jsx","Components/Screens/Error.jsx","Components/Screens/FAQ.jsx","Components/Screens/Terms.jsx","Components/Utility/vendor/criticalcom.js","App.js","index.js"],"names":["a","b","c","e","d","length","fn","call","window","ctx","f","TypeError","setTimeout","push","document","readyState","addEventListener","Adimo","defaultLanguage","setLanguage","utils","location","href","replace","RegExp","exec","decodeURIComponent","domLoaded","adimo_docReady","getGATracking","source","medium","term","content","campaign","referrer","split","toLowerCase","indexOf","sessionStorage","adimoTracking","JSON","stringify","parse","encodeURIComponent","getParameterByName","search","getPageScroll","self","pageYOffset","pageXOffset","documentElement","scrollTop","scrollLeft","body","Array","findButtonsWidget","parentNode","parentElement","widget","mobileCheck","test","substr","navigator","userAgent","vendor","opera","main","o","querySelector","getAttribute","match","s","en","data","type","frameId","i","event","dataLayer","some","label","toString","parseInt","popup","style","display","k","height","offsetWidth","classList","remove","offerLabelWidth","add","this","onclick","includes","g","j","contains","isVisible","h","m","staticTouchpointIdentifier","n","q","disableABTest","ADIMO_DOMAIN","t","index","doNotTrack","dismissCookieNotification","r","ga","getAll","forEach","get","substring","u","l","createElement","className","v","w","setAttribute","textContent","iframeAnchorText","position","left","top","appendChild","x","overflow","y","onload","adimoLoadedIframe","src","frameBorder","scrolling","width","p","removeEventListener","removeChild","bind","focus","contentWindow","postMessage","querySelectorAll","hasAttribute","removeAttribute","button","widgetIndex","buttonAriaLabel","he","ar","init","children","innerHTML","cursor","border","id","preventDefault","tpid","isMobile","host","XMLHttpRequest","open","setRequestHeader","send","click","getElementById","rel","head","nodeType","childNodes","MutationObserver","addedNodes","observe","childList","subtree","loadCustomScript","load","hostname","MetaTags","title","description","keywords","Helmet","name","checkUpcCodes","dataObj","token","locale","urlPath","axios","method","headers","undefined","enctype","response","checkUser","objToSend","keys","accessToken","userName","profileId","QuestionLegal","allParamsEncrypted","russiaOrder","shippingInfoObj","shippingDetails","UserName","ua","verifyCaptchaEnterCode","redemptionToken","EncodedResponse","verifyCaptcha","orderAward","getPuzzle","postPuzzle","setLocalData","key","value","localStorage","setItem","getSessionData","getItem","setSessionData","removeSessionData","removeItem","JsonContext","createContext","LoadJson","useState","translations","setTranslations","settings","setSettings","windowOriginURL","origin","jsonEnvUrl","translationsURL","res","Translations","getData","settingsData","settingsURL","filter","itm","Locale","getSettings","Provider","ErrorProvider","useContext","history","useHistory","HandleError","error","webStorageService","status","ErrorCode","errMsgInvalid","CoreKelloggs_GeneralErrorMsg","ErrorMessage","pageScroll","dataLayers","script","lang","getElementsByTagName","Culturecode","country","toUpperCase","text","prepend","gtm","noscript","iframe","dl","GtmTitle","Node","prototype","insertAfter","newNode","nextSibling","insertBefore","signInData","userId","city","optIn","_addData","registerData","orderData","prizeNumber","imageUpload","selectSplitLocale","language_region","packCodeData","backToHP","socialData","imagePuzzleEntryComplete","entryLimit","winLimit","errorCodeEvent","url","errorCode","obj","Object","LoadGRM","formType","cb","questionLegal","handleRoute","path","pathname","login","register","reset","generateGRM","container","socialLogin","SocialSharingLocales","configObj","environment","GRMServiceURL","moduleKey","GRMModuleKey","showLogin","showSignup","showFacebook","showTwitter","facebookAppId","languageParam","join","region","gigyaApiKey","SAPGigyaApiKey","onAuth","authUser","dataToSend","AccessToken","UsernameForServiceAuth","ProfileID","AllParamsEncrypted","API","then","proceed","redirect","message","user","isNpr","Nobatchcoderequired","result","grm","winnerObj","Winner","winner","winnerCopy","isExtendedPhase","ExtendedPhase","refCode","RefCode","state","catch","onExit","clearInterval","_interval","kreg","onreadystatechange","regModule","KSTL","Registration","topic","view","element","hidden","$","attr","on","prop","val","trim","$input","max","maxLength","hasClass","windowWidth","innerWidth","heightss","firstcol","secondcol","css","Math","outerHeight","each","geterror","getfieldname","slice","getcontrolform","appendTo","form","hide","initReg","setInterval","windowHrefURL","getLocale","defaultLocale","getIsCDC","getIsShipping","showReceiptField","getNpr","localeList","item","isTOS","isCDC","isShipping","isSplitter","isShowReceiptField","browserStr","getUA","scrollTo","animate","offset","jquery","MetaTagsData","LoadGRMGlobal","Header","picturefill","srcSet","media","alt","HeaderAltText","moment","require","PromotionState","_getStates","startDate","StartDate","startDateTime","format","endDateTime","EndDate","currentDate","Date","currentDateUTC","tz","TimeZone","currentTime","outOfHrsEndDate","OutOfHrsEndDate","outOfHrsEndDateTime","extendedStartDateTime","ExtendedStartDate","getPromotionState","hours","minutes","seconds","getExtendedState","initPage","isStartPage","CampainCloseURL","_checkAppState","getStates","Footer","holdingPage","hostName","shareUrl","language","CoreKelloggs_CookiePr","idTrust","append","CoreKelloggs_FooterPrivacyPolicyLinkPrng","target","CoreKelloggs_PrivacyNoticeLinkTitle","dangerouslySetInnerHTML","__html","CoreKelloggs_FooterPrivacyPolicy","CoreKelloggs_FooterPringlesLink","CoreKelloggs_PringlesLinkTitle","CoreKelloggs_FooterPrng","nohref","class","FootListCompany","onClick","CoreKelloggs_FacebookSharingLinkTitle","aria-label","data-fbtext","FacebookSharingDescription","CoreKelloggs_FacebookImageAltText","twitterData","currentTarget","dataset","twittertext","CoreKelloggs_TwitterSharingLinkTitle","data-twittertext","TwitterSharingDescription","CoreKelloggs_TwitterImageAltText","to","CoreKelloggs_FaqsLinkTitle","CoreKelloggs_FooterFaq","CoreKelloggs_TermsNConditionsLinkTitle","CoreKelloggs_FooterTerms","FooterShortTerms","Closed","CoreKelloggs_ClosedPageTitle","CampaignName","MetaContent","EndPromoTitle","EndPromoButtonLink","EndPromoButtonLabel","Comingsoon","CoreKelloggs_ComingSoonPageTitle","ComingSoonHeading","ComingSoonDescription","ComingSoonCtaLink","CoreKelloggs_PromotionClosedCtaLinkTitle_pringles","ComingSoonCta","Splitter","SplitterPageTitle","SplitterPageHeading","SplitterPage_frenchSite_ctaTitle","SplitterPageLink1","SplitterPage_dutchSite_ctaTitle","SplitterPageLink2","SplitterPage_germanSite_ctaTitle","Login","callOnce","setCallOnce","addClass","role","LoginPageHeading","LoginPageDescription1","LoginPageDescription2","LoginPageDescription","CoreKelloggs_TncApply","LoginSectionHeading","CoreKelloggs_RegisterPageMandatoryCopy","Or","CoreKelloggs_RegisterNowButton","Shipping","shippingDefault","Require_RU_Captcha","Require_Captcha","UserDetails","FirstName","isValid","isEmpty","isWritten","LastName","Address1","Address2","City","PostalCode","Email","Phone","TermsandConditions","sended","processing","validateCaptcha","shipping","setShipping","tncCheckbox","setTncCheckbox","privacyCheckbox","setPrivacyCheckbox","radioBtnCntry","setRadioBtnCntry","isAndroid","expCallback","grecaptcha","onSuccess","redemToken","updateValidateCaptcha","err","console","log","render","sitekey","callback","oncheck","which","keyCode","attributes","for","limitInput","AddressLen","userInput","attrVal","getPattern","pattern","minlength","CoreKelloggs_RegisterPageTitle","CoreKelloggs_RegisterPageDesc","CoreKelloggs_RegisterPageKeywords","CoreKelloggs_TncsApplyLinkTitle","CoreKelloggs_KpsShippingPageHeading","CoreKelloggs_KpsMandatoryFieldText","noValidate","data-ng-click","data-ng-model","htmlFor","CoreKelloggs_KpsFirstname","required","onKeyUp","$event","onChange","CoreKelloggs_FieldRequiredError","CoreKelloggs_KpsFirstnameError","CoreKelloggs_KpsSurname","CoreKelloggs_KpsSurnameError","CoreKelloggs_KpsAddress1","CoreKelloggs_KpsAddress1Error","CoreKelloggs_KpsAddress2","CoreKelloggs_KpsCity","CoreKelloggs_KpsCityError","CoreKelloggs_KpsPostcode","minLength","CoreKelloggs_KpsPostcodeError","CoreKelloggs_KpsEmail","CoreKelloggs_KpsConfirmEmailError","CoreKelloggs_KpsMobileNumber","onKeyDown","evt","CoreKelloggs_KpsMobileNumberError","CoreKelloggs_KpsCountry","checked","tabIndex","ShippingDetailsTncCheckBox","ShippingDetailsTncLink","subscription6028_EM","CoreKelloggs_KpsSubscriptionCheckbox","disabled","shippingInfoRussiaObj","lastName","address1","address2","postCode","terms","subscription","phone","setOrder","data-ng-activity-indicator","skip-ng-show","CoreKelloggs_KpsSubmitButton","Home","_intervalG","gigya","accounts","logout","CoreKelloggs_HomePageTitle","Register","_intervalR","CoreKelloggs_RegisterPageHeading","ValidEmailDirections_register","Forgotpassword","Recoverpassword","ResetPasswordHeader","Batchcode","getBtnObj","codesArrObj","setCodesArrObj","receipt1","invalid","large","empty","statusFile","statusMsg","showName","file","fileNameObj","setFileNameObj","smallViewPort","btnObj","setbtnObj","modalShown","setModalShown","pageState","toggleModal","removeClass","positionModal","updateBtnOj","validateCaptchaHome","updateValidateCaptchaHome","upcErrorLabels","CoreKelloggs_ErrorIncompleteCode","CoreKelloggs_ErrorInvalidCode","CoreKelloggs_ErrorCodeRequired","CoreKelloggs_ErrorDuplicateCode","upcCount","CodesCount","canImage","keyup","receiptAdded","_interval1","setAdimo","strTxt","CoreKelloggs_BuyNowAdimoLinkTitle","strTxt1","after","product_id","touchPointId","strTxtDetailPage","returnTouchpointID","codes","fileName","uploadReceipt","updateErrorKey","flag","errors","anyError","onBlur","transformedInput","duplicateCount","duplicate","verifyDuplicates","checkForDuplicates","_setStatuses","receiptNum","filename","valid","statusesArr","statusCheck","imageResponse","imageResult","Status","eq","Message","validResponse","sendForm","checkEntries","FormData","codesArr","codesInput","filenameVal","shipObj","closest","onTextChange","onUploadClick","trigger","validType","onChangeReceipt","reader","FileReader","files","elementName","size","readAsDataURL","BatchcodePageTitle","BatchcodeSectionInstruction","BatchcodeSectionInstruction1","map","code","BatchcodeSectionLabel","aria-atomic","autoComplete","placeholder","CoreKelloggs_EnterCodeInputFieldTitle","CoreKelloggs_UploadImageHeader","CoreKelloggs_UploadImageTypeError","CoreKelloggs_UploadImageSizeError","CoreKelloggs_UploadImageMandatoryError","data-attr","data-clickfor","CoreKelloggs_ReceiptUploadCtaTitle","CoreKelloggs_UploadImageCta","accept","data-asd","data-code","data-file-name","data-options","data-check-entries","CoreKelloggs_ReceiptUploadIconTitle","EnterNowCtaTitle","aria-disabled","CoreKelloggs_BatchcodeSectionCta","CoreKelloggs_CodehelpSection1Title","CanImageAltText","CodehelpSection1Instruction","data-smallv","String","CoreKelloggs_Uploadimageinstructionsheading","UploadImageInstructions","UploadImageStep1","UploadImageStep2","UploadImageStep3","Movie","CoreKelloggs_ChooseMoviePageTitle","Wordsearch","letters","Crossword","words","Words","isFinishEnable","coordinatesToReturn","lockCrossword","CrossWordService","finishCb","finishErrorCb","timerecorder","startdate","set","end","enddate","haveFinalDetails","setLetters","lettersToSet","setWords","wordsToSet","wordsArr","word","isScratched","getLetters","getWords","finishCrossWord","answers","Row","Columns","setFinishCallback","fnError","start","getScrachedWord","customMerg","obj1","obj2","obj3","posStart","posEnd","scrachedWord","lettersCoordinates","abs","checkWord","starty","count","reverse","wordChecked","min","color","z","crosswordQueryStr","lastIndexOf","onselectstart","onmousedown","reason","CoreKelloggs_CrosswordPageTitle","WordSearchPageTitle","WordSearchSubHeading","cross-word","control","WordsToFind","ng-activity-indicator","ng-show","Puzzle","cardIndex","postKey","imgSrc","values","puzzle","genRanNo","floor","random","index1","randomNo","rplacedNo","handlePuzzle","jqPuzzle","texts","defaults","rows","cols","hole","shuffle","numbers","shufflePieces","confirmShuffle","toggleOriginal","toggleNumbers","counter","timer","pauseTimer","success","fadeOriginal","callbackTimeout","animation","shuffleRounds","shuffleSpeed","slidingSpeed","fadeOriginalSpeed","gridSize","overlap","backgroundOpacity","i18n","shuffleLabel","toggleOriginalLabel","toggleNumbersLabel","confirmShuffleMessage","movesLabel","secondsLabel","fr","de","pt","extend","checkOrder","numbersArray","product","round","getMatrixPosition","row","col","getBorderWidth","$element","property","Timer","interval","startTime","startPauseTime","timeout","totalPause","run","update","getTime","now","stop","clearTimeout","pause","resume","solved","$srcImg","lock","moves","shuffled","currHole","$dummyPiece","$dummyWrapper","$dummyGui","replaceWith","computedStyles","gui","padding","right","bottom","wrapper","piece","removeAttr","one","coveredWidth","coveredHeight","visibility","fullWidth","fullHeight","totalPieceWidth","totalPieceHeight","boxModelHack","boxModel","getOffset","rounds","speed","$shuffleButton","is","confirm","$gui","$background","fadeTo","prependTo","$wrapper","$buttons","$display","$counter","$timer","shuffles","choices","splice","randomIndex","animCounter","lastRound","pieceIndex","$piece","$pieces","expPos","emptyTile","ImagePuzzleTitleAccess_copy5","ImagePuzzleTitleAccess_copy1","And","ImagePuzzleTitleAccess_copy2","ImagePuzzleTitleAccess_copy3","ImagePuzzleTitleAccess_copy4","borderWidth","margin","$protoPiece","backgroundImage","bgLeft","bgTop","clone","backgroundPosition","$originalButton","$numbersButton","opacity","$controls","$protoButton","$protoField","$credits","$panel","backgroundColor","textAlign","browser","msie","mousedown","mouseout","mouseup","current","currPos","dest","ImagePuzzleTitleAccess_copy","positions","blankPos","currVal","expVal","movVal","ms","checkSolution","finishGame","show","solutionCallback","isFunction","puzzleMoves","TieBreakAnswer","RedirectUrl","complete","jQuery","version","$1","CoreKelloggs_PuzzlePageTitle","ImagePuzzlePageTitle","ImagePuzzleSteps1","ImagePuzzleSteps2","ImagePuzzleTitleCopy","ImagePuzzleTitleCopy1","ImagePuzzleTitleCopy2","Thankyou","useLocation","winCategory","WinPageDesc","WinPageDesc1","winnerCode","PrizeDrawThankyouHeading","PrizeDrawThankyouDescription","Tier3DigitalGame","Tier1Experience_description1","Tier1Experience_description2","Tier2Experience_description1","ThankyouPageHeading","ThankyouPageDescription","setThankyouContent","CoreKelloggs_ThankyouPageTitle","WinPageHeading","WinPageHeading1","Tier1Experience_description3","DigitalGameLink","DigitalGameTitle","PrizeFulfillmentTax","ReferenceNumberCopy","CoreKelloggs_ReturnToHomepageCtaTitle","CoreKelloggs_BackToHomePage","Limit","limitPageHeading","limitPageDesc","limitPageDesc1","globalLimit","Sorry","WinLimit","WinLimitDescription","CoreKelloggs_MaximumEntryLimit","CoreKelloggs_MaximumEntryLimit_teamPringles","DailyLimit","DailyLimitDescription","CoreKelloggs_LimitPageTitle","Error","titleError","CoreKelloggs_ErrorPageTitle","CoreKelloggs_ErrorPageHeading","FAQ","defaultFaq","clicked_country","currentlang","FaqCyprus","Faq","faqContent","setFaqContent","clickedCountry","setClickedCountry","show_hide","CoreKelloggs_FaqPageTitle","LabelCyprus","LabelMalta","Terms","defaultTerms","TncCyprus","Tnc","tncContent","setTncContent","CoreKelloggs_TermsPageTitle","serviceURL","JS_ServiceURL","base","siteURL","ajax","dataType","jsonpCallback","request","errorThrown","getAlert","jsonObject","json","msg","hits","detMsgURL","alertImgURL","shortMsg","App","loaded","setLoaded","loadApp","Fragment","exact","toLocaleLowerCase","ReactDOM"],"mappings":"osOAEC,SAASA,EAAEC,GAAG,SAASC,IAAI,IAAIC,EAAE,CAACA,GAAE,EAAG,IAAI,IAAIH,EAAE,EAAEA,EAAEI,EAAEC,OAAOL,IAAII,EAAEJ,GAAGM,GAAGC,KAAKC,OAAOJ,EAAEJ,GAAGS,KAAKL,EAAE,IAAIJ,EAAEA,GAAG,WAAWC,EAAEA,GAAGO,OAAO,IAAIJ,EAAE,GAAGD,GAAE,EAAGO,GAAE,EAAGT,EAAED,GAAG,SAASA,EAAEC,GAAG,GAAG,mBAAmBD,EAAE,MAAM,IAAIW,UAAU,gDAAmDR,EAAcS,YAAW,WAAWZ,EAAEC,KAAI,IAAGG,EAAES,KAAK,CAACP,GAAGN,EAAES,IAAIR,IAAI,aAAaa,SAASC,WAAWH,WAAWV,EAAE,GAAGQ,IAAII,SAASE,iBAA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AC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,mBAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,UAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,qBAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,iBAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,mBAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,UAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,gBAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,QAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAOi6B,OAAK,EAACzyB,KAAM,IAAMxH,EAAS,UAChC,kBAAC,GAAD,OAEF,kBAAC,IAAD,CAAUgT,GAAI,IAAMhT,EAAS,aAKvB,MAAVA,GAA4B,MAAVA,GAAkB,kBAAC,GAAD,SC/GhDlL,SAASuD,cAAc,QAAQqB,UAAUG,IAAImG,EAAOk6B,qBAEpDC,IAASpiB,OACP,kBAAC,IAAD,KACE,kBAAC,EAAD,KACE,kBAAC,GAAD,QAGJjjB,SAAS4J,eAAe,W","file":"static/js/main.bf7de37f.chunk.js","sourcesContent":["/* eslint-disable */\r\n\r\n!function(a,b){function c(){if(!e){e=!0;for(var a=0;a0?a.medium=\"paid search\":null!=b(\"utm_source\")||b(\"utm_medium\")||null!=b(\"utm_term\")||b(\"utm_content\")||null!=b(\"utm_campaign\")||(c.indexOf(\".google.\")>=0||c.indexOf(\".yahoo.\")>=0||c.indexOf(\".bing.\")>=0?a.medium=\"organic search\":a.medium=\"referral\"),sessionStorage.adimoTracking=JSON.stringify(a)):null!=sessionStorage.adimoTracking&&sessionStorage.adimoTracking.length>0&&(a=JSON.parse(sessionStorage.adimoTracking)));var e=\"\";return e+=null!=a.source?\"&utm_source=\"+encodeURIComponent(a.source):\"\",e+=null!=a.medium?\"&utm_medium=\"+encodeURIComponent(a.medium):\"\",e+=null!=a.term?\"&utm_term=\"+encodeURIComponent(a.term):\"\",e+=null!=a.content?\"&utm_content=\"+encodeURIComponent(a.content):\"\",e+=null!=a.campaign?\"&utm_campaign=\"+encodeURIComponent(a.campaign):\"\"},getParameterByName:function(a){a=a.replace(/[\\[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\");var b=new RegExp(\"[\\\\?&]\"+a+\"=([^&#]*)\"),c=b.exec(location.search);return null===c?\"\":decodeURIComponent(c[1].replace(/\\+/g,\" \"))},getPageScroll:function(){var a,b;return self.pageYOffset?(b=self.pageYOffset,a=self.pageXOffset):document.documentElement&&document.documentElement.scrollTop?(b=document.documentElement.scrollTop,a=document.documentElement.scrollLeft):document.body&&(b=document.body.scrollTop,a=document.body.scrollLeft),new Array(a,b)},findButtonsWidget:function(a,b){for(var c=a.parentNode||a.parentElement,d=0;d iframe\").style.height=f+\"px\"}}}function e(a){var b=a.widget,c=b.offsetWidth;b.classList.remove(\"adimoMicro\"),b.classList.remove(\"adimoTiny\"),b.classList.remove(\"adimoSmall\"),b.classList.remove(\"adimoMedium\"),c<70+a.offerLabelWidth?b.classList.add(\"adimoMicro\"):c<122+a.offerLabelWidth?b.classList.add(\"adimoTiny\"):c<172+a.offerLabelWidth?b.classList.add(\"adimoSmall\"):c<222+a.offerLabelWidth&&b.classList.add(\"adimoMedium\")}function f(a){var b=this,d=Adimo.utils.findButtonsWidget(b,o);if(d.widget.onclick){var e=d.widget,f=e.getAttribute(\"onclick\");if(f.includes(\"setLanguage\")){var g=f.match(/\\('(.*)'\\)/);if(g){var j=g[1];window.Adimo.defaultLanguage=j}}}if(!d.widget.classList.contains(\"adimoAjaxLoading\")){if(d.popup)d.isVisible?i(d):h(d);else{d.widget.classList.add(\"adimoAjaxLoading\");var m=d.staticTouchpointIdentifier;null!=Adimo.utils.getParameterByName(\"host\")&&\"&host=\"+Adimo.utils.getParameterByName(\"host\");var n=\"recipe-lightbox\"===d.type?\"recipes\":\"lightbox\",q=d.disableABTest,s=\"https://campaigns-api.adimo.co\";window.ADIMO_DOMAIN&&(s=window.ADIMO_DOMAIN);var t=s+\"/Conversions/ConvertStaticTouchpointToTouchpointUrl?touchpointIdentifier=\"+m+\"&frameId=\"+d.index+Adimo.utils.getGATracking()+\"&touchpointPath=\"+n+\"&suppressAutoEngagementTracking=false&\"+(window.Adimo.defaultLanguage?\"defaultLanguage=\"+window.Adimo.defaultLanguage+\"&\":\"\")+(d.doNotTrack?\"doNotTrack=true&\":\"\")+(d.dismissCookieNotification?\"dismissCookieNotification=true&\":\"\")+\"isLightbox=true&disableABTest=\"+(q?\"true\":\"false\")+(r?\"&autoOpen=true\":\"\");\"undefined\"!=typeof ga&&ga&&ga(function(){try{var a=ga.getAll(),b=\"\";a.length>0&&(a.forEach(function(a){var c=a.get(\"clientId\");b+=a.get(\"trackingId\")+\":\"+c+\",\"}),b.length>0&&(b=b.substring(0,b.length-1)),t+=\"&gaClient=\"+b)}catch(a){}});var u=l.createElement(\"div\");u.className=\"adimoPopup\";var v=\"LightboxFrame_\"+d.index,w=l.createElement(\"a\");w.className=\"adimo-iframe-anchor\",w.setAttribute(\"href\",\"#\"+v),w.textContent=c().iframeAnchorText,w.style.display=\"inline-block\",w.style.position=\"absolute\",w.style.left=\"50%\",w.style.top=\"50px\",w.style[\"font-size\"]=\"1px\",u.appendChild(w);var x=l.createElement(\"div\");x.className=\"iframeBox\",x.style.overflow=\"hidden\";var y=l.createElement(\"iframe\");y.setAttribute(\"id\",v),y.classList.add(\"adimo-lightbox-frame\"),function(a){y.onload=function(){h(a),a.widget.classList.remove(\"adimoAjaxLoading\"),k.adimoLoadedIframe&&k.adimoLoadedIframe()}}(d),y.src=t,y.frameBorder=\"0\",y.scrolling=\"no\",y.setAttribute(\"allow\",\"geolocation *;\"),y.style.width=p+\"px\",x.appendChild(y),u.appendChild(x),d.popup=u,l.body.appendChild(d.popup)}return!1}}function g(a){this.removeEventListener(\"click\",g,!1);var b=this.parentNode;this.classList.contains(\"adimoPopup\")&&(b=this);for(var c=null,d=0;d iframe\");b.contentWindow.focus(),b.contentWindow.postMessage({type:\"lightboxOpened\"},\"*\");for(var c=document.querySelectorAll(\"body > *:not(.adimoLightbox)\"),d=0;d0&&(i=parseInt(g.substring(h+5,g.indexOf(\".\",h)),10)),0===i||i>=11){var j=new XMLHttpRequest;j.open(\"POST\",a),j.setRequestHeader(\"Content-Type\",\"application/json; charset=utf-8\"),j.send(JSON.stringify(f))}null!=c&&\"https://4dvq37jqcg.execute-api.eu-west-1.amazonaws.com/prod/send\"==a&&t.push(c)}}var k=a,l=k.document,m=\"https://cdn.adimo.co\",n=null,o=[],p=262,q=220,r=!1;widgetIndex=0;var s={en:{buttonAriaLabel:\"Click to Add to Basket\",iframeAnchorText:\"Continue on to add products to your basket\"},he:{buttonAriaLabel:\"לחץ להוספה לסל\",iframeAnchorText:\"המשך להוסיף מוצרים לסל שלך\"},ar:{buttonAriaLabel:\"انقر للإضافة إلى سلة التسوق\",iframeAnchorText:\"استمر في إضافة منتجات إلى سلتك\"}},t=[];return{init:function(a,g){var h=function(){function a(a){var b=null;if(a.children.length>0){var d=a.innerHTML;a.innerHTML=\"\",b=document.createElement(\"div\"),d=d.replace(/href=\"#[0-9a-zA-Z]*\"/g,'href=\"javascript:void(0)\"').replace(/href=\\'#[0-9a-zA-Z]*\\'/g,\"href='javascript:void(0)'\"),b.innerHTML=d,b.style.cursor=\"pointer\"}else{b=l.createElement(\"button\"),b.classList.add(\"adimoButton\"),b.classList.add(\"sticker\"),b.classList.add(\"type-atb\"),b.style.border=\"none\",b.setAttribute(\"aria-label\",c().buttonAriaLabel);var h=l.createElement(\"div\");h.id=\"loadIndicator\",h.classList.add(\"loader\"),b.appendChild(h)}!function(a){a.addEventListener(\"click\",function(b){b.preventDefault(),f.call(a,b)})}(b);var i=a.getAttribute(\"data-static-touchpoint-identifier\"),k=\"recipe-lightbox\"===a.getAttribute(\"data-type\")?\"recipe-lightbox\":\"lightbox\",m=\"true\"===a.getAttribute(\"data-disable-ab-test\"),n={index:widgetIndex++,widget:a,button:b,staticTouchpointIdentifier:i,popup:null,isVisible:!1,disableABTest:m,type:k};a.getAttribute(\"data-do-not-track\")&&\"true\"==a.getAttribute(\"data-do-not-track\")&&(n.doNotTrack=!0),a.getAttribute(\"data-dismiss-cookie-notification\")&&\"true\"==a.getAttribute(\"data-dismiss-cookie-notification\")&&(n.dismissCookieNotification=!0),j(\"https://4dvq37jqcg.execute-api.eu-west-1.amazonaws.com/prod/send\",\"lightboxv2\",i,null,null),g&&(o=[]),a.appendChild(n.button),e(n),o.push(n),r=Adimo.utils.getParameterByName(\"a_open\");var p=Adimo.utils.getParameterByName(\"a_open\")==i;(r||p)&&(\"true\"===r.toLowerCase()||p)&&(r=!0,b.click())}var b=l.querySelectorAll(\".adimoModalOverlay\");if(b.length>0&&b[0].parentNode.removeChild(b[0]),n=l.createElement(\"div\"),n.className=\"adimoModalOverlay\",n.style.display=\"none\",l.body.appendChild(n),null==document.getElementById(\"adimoWidgetSS\")){var d=document.createElement(\"link\");d.rel=\"stylesheet\",d.type=\"text/css\",d.id=\"adimoWidgetSS\",d.href=m+\"/BasketAdsWidget/widget.css\",(document.head||document.documentElement).appendChild(d)}var h=l.querySelectorAll(\".adimoWidget\");const i=function(b){1===b.nodeType&&b.classList.contains(\"adimoWidget\")&&a(b),b.childNodes&&[].forEach.call(b.childNodes,function(a){i(a)})};new MutationObserver(function(a,b){for(var c=0;c {\r\n return (\r\n \r\n {title}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default MetaTags;","import axios from 'axios';\r\nimport { locale } from './Global';\r\n\r\nexport const checkUpcCodes = async (dataObj, token) => {\r\n if (!locale || !dataObj) { return; }\r\n let urlPath = '/api/' + locale + '/redemption/validate-codes';\r\n if (locale.toLowerCase() == 'it_it') {\r\n urlPath = '/api/' + locale + '/redemption/validate-codesIT'\r\n }\r\n if (locale.toLowerCase() == 'it_it') {\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: { \r\n 'Content-Type': undefined, \r\n enctype: 'multipart/form-data', \r\n 'redemption-token': token \r\n },\r\n data: dataObj,\r\n });\r\n return response.data;\r\n } else {\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: { 'redemption-token': token },\r\n data: { 'codes': dataObj },\r\n });\r\n return response.data;\r\n }\r\n};\r\n\r\nexport const checkUser = async objToSend => {\r\n if (!locale || !objToSend) { return; }\r\n var keys = '',\r\n urlPath = '/api/' + locale + '/redemption/user';\r\n for (keys in objToSend) {\r\n if (objToSend[keys] === '') {\r\n return;\r\n }\r\n }\r\n var dataObj = {\r\n 'accessToken': objToSend.accessToken,\r\n 'userName': objToSend.userName,\r\n 'profileId': objToSend.profileId,\r\n 'userAgent': objToSend.userAgent,\r\n 'QuestionLegal': objToSend.QuestionLegal,\r\n 'allParamsEncrypted': objToSend.allParamsEncrypted\r\n }\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n // headers: {\r\n // 'redemption-token': objToSend['redemption-token']\r\n // },\r\n data: dataObj,\r\n });\r\n return response.data;\r\n\r\n};\r\nexport const russiaOrder = async shippingInfoObj => {\r\n if (!locale || !shippingInfoObj) { return; }\r\n var urlPath = '/api/' + locale + '/redemption/userKPS';\r\n var dataObj = {\r\n 'shippingDetails': shippingInfoObj.shippingDetails,\r\n 'UserName':shippingInfoObj.UserName,\r\n 'accessToken': shippingInfoObj['redemption-token'],\r\n 'profileId': -1,\r\n 'userAgent': shippingInfoObj.ua,\r\n 'allParamsEncrypted': shippingInfoObj['redemption-token']\r\n }\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: {\r\n 'redemption-token': shippingInfoObj['redemption-token']\r\n },\r\n data: dataObj,\r\n });\r\n return response.data;\r\n\r\n};\r\nexport const verifyCaptchaEnterCode = async data => {\r\n if (!locale || !data) { return; }\r\n var urlPath = '/api/' + locale + '/redemption/authenticate-validate-codes';\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: {\r\n 'redemption-token': data.redemptionToken\r\n },\r\n data: { EncodedResponse: data.token },\r\n });\r\n return response.data;\r\n\r\n};\r\nexport const verifyCaptcha = async data => {\r\n if (!locale || !data) { return; }\r\n var urlPath = '/api/' + locale + '/redemption/authenticate';\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: {\r\n 'redemption-token': data.redemptionToken\r\n },\r\n data: { EncodedResponse: data.token },\r\n });\r\n return response.data;\r\n\r\n};\r\n\r\nexport const orderAward = async (shippingInfoObj) => {\r\n if (!locale || !shippingInfoObj) { return; }\r\n let urlPath = '/api/' + locale + '/redemption/init-order';\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: { 'redemption-token': shippingInfoObj['redemption-token'] },\r\n data: {'shippingDetails': shippingInfoObj.shippingDetails}\r\n });\r\n return response.data;\r\n};\r\nexport const getPuzzle = async (token) => {\r\n if (!locale) { return; }\r\n let urlPath = '/api/' + locale + '/redemption/get-skill';\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: { 'redemption-token': token }\r\n });\r\n return response.data;\r\n};\r\nexport const postPuzzle = async (data,token) => {\r\n if (!locale || !data) { return; }\r\n let urlPath = '/api/' + locale + '/redemption/validate-skill';\r\n const response = await axios(urlPath, {\r\n method: 'POST',\r\n headers: { 'redemption-token': token },\r\n data : data\r\n });\r\n return response.data;\r\n};\r\n\r\n\r\n","export const getLocalData = (key) => {\r\n var value = localStorage.getItem(key);\r\n if (!value) { return; }\r\n // assume it is an object that has been stringified\r\n if (value[0] === \"{\" && key != 'servToken') {\r\n value = JSON.parse(value);\r\n }\r\n return value;\r\n};\r\nexport const setLocalData = (key, value) => {\r\n if (!key || !value) { return; }\r\n if (typeof value === \"object\") {\r\n value = JSON.stringify(value);\r\n }\r\n localStorage.setItem(key, value);\r\n};\r\nexport const removeLocalData = (key) => {\r\n if (!key) { return; }\r\n localStorage.removeItem(key);\r\n};\r\nexport const getSessionData = (key) => {\r\n var value = sessionStorage.getItem(key);\r\n if (!value) { return; }\r\n // assume it is an object that has been stringified\r\n if (value[0] === \"{\" && key != 'servToken') {\r\n value = JSON.parse(value);\r\n }\r\n return value;\r\n};\r\nexport const setSessionData = (key, value) => {\r\n if (!key || !value) { return; }\r\n if (typeof value === \"object\") {\r\n value = JSON.stringify(value);\r\n }\r\n sessionStorage.setItem(key, value);\r\n};\r\nexport const removeSessionData = (key) => {\r\n if (!key) { return; }\r\n sessionStorage.removeItem(key);\r\n};\r\n","import React, { useState, createContext } from 'react';\r\nimport axios from 'axios';\r\nimport { locale } from './Global';\r\n\r\nconst JsonContext = createContext();\r\nexport const LoadJson = ({ children }) => {\r\n const [translations, setTranslations] = useState('');\r\n const [settings, setSettings] = useState('');\r\n let windowOriginURL = window.location.origin,\r\n jsonEnvUrl = (windowOriginURL.indexOf('stage.') >= 0 || windowOriginURL.indexOf('staging-') >= 0) ? 'Stage' : (windowOriginURL.indexOf('local.') >= 0 || windowOriginURL.indexOf('dev-') >= 0) ? 'Dev' : 'Prod';\r\n // Translations Call\r\n let translationsLoadFlag = (translations === '') ? true : false,\r\n translationsURL = (locale == 'be' || locale == 'ch') ? '/Content/mock/' + locale + '/translations.json' : '/Content/translations/PringlesEquity2022_' + locale + '.json';\r\n if (translationsLoadFlag) {\r\n async function getData() {\r\n const res = await axios.get(translationsURL);\r\n setTranslations(res.data.Translations);\r\n }\r\n getData();\r\n }\r\n\r\n // Settings Call\r\n let settingsLoadFlag = (settings === '') ? true : false,\r\n settingsURL = (locale == 'be' || locale == 'ch') ? '/Content/mock/settings_splitter.json' : '/Content/settingsJson/values_' + jsonEnvUrl + '.json',\r\n settingsData;\r\n if (settingsLoadFlag) {\r\n async function getSettings() {\r\n const res = await axios.get(settingsURL);\r\n settingsData = res.data.filter(function (itm) {\r\n return itm.Locale == locale;\r\n });\r\n setSettings(settingsData[0]);\r\n }\r\n getSettings();\r\n }\r\n return {children}\r\n \r\n}\r\n\r\nexport default JsonContext;","import { useHistory } from \"react-router-dom\";\r\nimport { useContext } from 'react';\r\nimport * as webStorageService from './WebStorageFactory';\r\nimport { locale, pageScroll } from './Global';\r\nimport JsonContext from './JsonProvider';\r\n\r\nconst ErrorProvider = () => {\r\n const { translations } = useContext(JsonContext);\r\n const history = useHistory();\r\n return {\r\n HandleError: (error) => {\r\n webStorageService.setSessionData('createPageState', 'Error');\r\n if (error!=undefined) {\r\n if (error.status === 500 || error.status === 503 || error.status === 400 || error.status === 403) {\r\n if (error.data.ErrorCode == undefined) {\r\n webStorageService.setSessionData('ErrorCode', error.status);\r\n history.push('/' + locale + '/Error/' + error.status);\r\n let errMsgInvalid = (translations.CoreKelloggs_GeneralErrorMsg).replace(\"100\", error.status);\r\n webStorageService.setSessionData('ErrorKey', errMsgInvalid);\r\n } else {\r\n webStorageService.setSessionData('ErrorKey', translations[error.data.ErrorMessage]);\r\n webStorageService.setSessionData('ErrorCode', error.data.ErrorCode);\r\n history.push('/' + locale + '/Error/' + error.data.ErrorCode);\r\n }\r\n pageScroll();\r\n }\r\n } else {\r\n history.push('/' + locale + '/Error/100');\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport default ErrorProvider;","import { locale } from './Global';\r\n\r\n const dataLayers=()=> {\r\n return {\r\n init: _initDataLayers,\r\n gtm: _initGTM,\r\n signInData: _SuccessfulSignIn,\r\n registerData: _SuccessfulAccountRegistration,\r\n orderData: _OderComplete,\r\n imageUpload: _ImageUpload,\r\n selectSplitLocale: _SelectSplitLocale,\r\n packCodeData: _PackCodeSubmission,\r\n backToHP:_BackToHP,\r\n socialData: _SocialShare,\r\n imagePuzzleEntryComplete:_imagePuzzleEntryComplete,\r\n entryLimit:_entryLimit,\r\n winLimit:_winLimit,\r\n errorCodeEvent:_ErrorCode,\r\n };\r\n function _initDataLayers(settings){\r\n var script = document.createElement('script'),\r\n body = document.getElementsByTagName('body'),\r\n lang = (locale == 'be' || locale == 'ch') ? settings.Culturecode.split('-')[0]:locale.split('_')[0].toLowerCase(),\r\n country = (locale == 'be' || locale == 'ch') ? locale:locale.split('_')[1].toUpperCase();\r\n script.type = 'text/javascript';\r\n script.id = 'DataLayer';\r\n script.text = 'var dataLayer = [{\\'language\\': \\''+ lang +'\\', \\'locale\\': \\''+ country +'\\', \\'brand\\': \\'Pringles\\', \\'campaign\\': \\'Mind Popping 2022\\'}];';\r\n document.body.prepend(script);\r\n }\r\n function _initGTM(translations){\r\n var script = document.createElement('script'),\r\n noscript = document.createElement('noscript'),\r\n iframe = document.createElement('iframe'),\r\n body = document.getElementsByTagName('body'),\r\n dl = document.getElementById('DataLayer');\r\n script.type = 'text/javascript';\r\n script.text = '(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\\'gtm.start\\':new Date().getTime(),event:\\'gtm.js\\'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!=\\'dataLayer\\'?\\'&l=\\'+l:\\'\\';j.async=true;j.src=\\'//www.googletagmanager.com/gtm.js?id=\\'+i+dl;f.parentNode.insertBefore(j,f);})(window,document,\\'script\\',\\'dataLayer\\',\\'GTM-PVLK\\');';\r\n iframe.src = '//www.googletagmanager.com/ns.html?id=GTM-PVLK';\r\n iframe.height = 0;\r\n iframe.width = 0;\r\n iframe.style = 'display:none;visibility:hidden';\r\n iframe.name = 'grm-iframe';\r\n iframe.title=translations.GtmTitle;\r\n Node.prototype.insertAfter = function(newNode) {\r\n if(this.nextSibling) {\r\n return this.parentNode.insertBefore(newNode, this.nextSibling);\r\n } else {\r\n return this.parentNode.appendChild(newNode);\r\n }\r\n };\r\n dl.insertAfter(noscript);\r\n noscript.appendChild(iframe);\r\n noscript.insertAfter(script);\r\n }\r\n function _addData(obj){\r\n if(!obj || Object.keys(obj).length <= 0){return;}\r\n if(window.dataLayer){\r\n window.dataLayer.push(obj); \r\n }\r\n return; \r\n }\r\n function _PackCodeSubmission(){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Pack Code Submission',\r\n 'label': 'Success'\r\n };\r\n _addData(obj);\r\n return;\r\n }\r\n function _ImageUpload(){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Image Upload(Italy)',\r\n 'label': 'Success'\r\n };\r\n _addData(obj);\r\n return;\r\n }\r\n function _SelectSplitLocale(language_region) {\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Language Page',\r\n 'label': language_region\r\n };\r\n _addData(obj);\r\n }\r\n function _imagePuzzleEntryComplete(){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Image Puzzle Entry Complete',\r\n 'label': 'Prize TBC'\r\n };\r\n\r\n _addData(obj);\r\n return;\r\n }\r\n function _SuccessfulSignIn(userId, city, country, optIn,label){\r\n var updated_label = (label=='Social')?label:'On-site';\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Account Log In',\r\n 'label': updated_label,\r\n 'userID': userId ? userId : ''\r\n /*'city': city ? city : '',\r\n 'country': country ? country : '',\r\n 'optIn': optIn ? 'Yes' : 'No'*/\r\n };\r\n _addData(obj);\r\n }\r\n function _SuccessfulAccountRegistration(userId, city, country, optIn,label){\r\n var updated_label=(label=='Social')?label:'On-site';\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Account Registration',\r\n 'label': updated_label,\r\n 'userID': userId ? userId : '',\r\n 'optIn': optIn ? 'Opt In' : 'Opt Out'\r\n };\r\n _addData(obj);\r\n }\r\n function _OderComplete(prizeNumber) {\r\n var label;\r\n switch (prizeNumber) {\r\n case 0 :\r\n label = 'Game';\r\n break;\r\n case 1 :\r\n label = 'Experience';\r\n break;\r\n case 2 :\r\n label = 'Speaker';\r\n break;\r\n case 97 :\r\n label = 'Prize TBC';\r\n break;\r\n default :\r\n label = '';\r\n break;\r\n }\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Entry Complete',\r\n 'label': label\r\n };\r\n _addData(obj);\r\n }\r\n function _SocialShare(label){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Social Share',\r\n 'label': label ? label : ''\r\n };\r\n _addData(obj);\r\n }\r\n function _entryLimit(){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Entry Limit',\r\n 'label': 'Success'\r\n };\r\n _addData(obj);\r\n }\r\n function _winLimit(){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Win Limit',\r\n 'label': 'Success'\r\n };\r\n _addData(obj);\r\n }\r\n function _BackToHP(){\r\n var obj = {\r\n 'event': 'KE1.event',\r\n 'category': 'Mind Popping 2022',\r\n 'action': 'Return To Homepage',\r\n 'label': 'Success'\r\n };\r\n _addData(obj);\r\n }\r\n function _ErrorCode(url,errorCode){\r\n var obj = {\r\n 'event': 'KE1.event', \r\n 'category': 'Mind Popping 2022', \r\n 'action': 'Error Code', \r\n 'label': url?url:'', \r\n 'errorCode': errorCode?errorCode:''\r\n };\r\n _addData(obj);\r\n }\r\n }\r\n \r\nexport default dataLayers;","import { useHistory } from \"react-router-dom\";\r\nimport { useContext } from 'react';\r\nimport { locale, $, pageScroll, isNpr } from './Global';\r\nimport * as API from './ApiCalls';\r\nimport * as webStorageService from './WebStorageFactory';\r\nimport JsonContext from './JsonProvider';\r\nimport ErrorProvider from \"./ErrorProvider\";\r\nimport dataLayers from \"./DataLayers\";\r\n\r\nconst LoadGRM = (formType, cb) => {\r\n const { settings } = useContext(JsonContext);\r\n const history = useHistory();\r\n const { HandleError } = ErrorProvider();\r\n const handleRoute = (path) => {\r\n history.push({ pathname: path });\r\n pageScroll();\r\n };\r\n const handleRouteNpn = (path, obj) => {\r\n if(path.toLowerCase().indexOf('thankyou')>-1){\r\n webStorageService.setSessionData('createPageState', 'Thankyou');\r\n }else if(path.toLowerCase().indexOf('puzzle')>-1){\r\n webStorageService.setSessionData('createPageState', 'Puzzle');\r\n }\r\n history.push({ pathname: path, state: obj });\r\n pageScroll();\r\n };\r\n var login = false,\r\n register = false,\r\n subscription = false,\r\n reset = false,\r\n questionLegal;\r\n\r\n switch (formType) {\r\n case 'login':\r\n login = true;\r\n register = false;\r\n break;\r\n case 'register':\r\n login = false;\r\n register = true;\r\n break;\r\n case 'forgot':\r\n login = true;\r\n register = false;\r\n break;\r\n case 'reset':\r\n // login = true;\r\n // register = false;\r\n reset = true;\r\n break;\r\n default:\r\n login = true;\r\n register = true;\r\n }\r\n var generateGRM = function () {\r\n if (document.querySelectorAll('#reg-container').length) {\r\n var container = document.getElementById('reg-container'),\r\n url = window.location.host,\r\n socialLogin = (settings.SocialSharingLocales.toLowerCase()).indexOf(locale.toLowerCase()) > -1 ? true : false,\r\n configObj = {\r\n environment: settings.GRMServiceURL.match('stage') ? 'stage' : 'prod', // or 'stage' for testing\r\n moduleKey: settings.GRMModuleKey, //modulekeyvalue, //\r\n showLogin: login,\r\n showSignup: register,\r\n showFacebook: socialLogin,\r\n showTwitter: socialLogin,\r\n facebookAppId: window.location.hostname.indexOf('pringles.com') < 0 ? '1963787220523772' : '1125206200989558',\r\n // myAccountUrl: '/path/to/myaccount.html', // required, if you are implementing my account v6\r\n languageParam : locale.split(\"_\").join(\"-\"),\r\n region:\"KEU\",\r\n gigyaApiKey : settings.SAPGigyaApiKey,\r\n onAuth: function (authUser) {\r\n // cookie authUser properties, or post them back to your server via AJAX\r\n // then fire callback to notify the reg v6 module that your auth routine has finished\r\n // for example:\r\n if (authUser) {\r\n if (login || register) {\r\n var dataToSend = {\r\n // 'redemption-token': webStorageService.getSessionData('servToken'),\r\n 'QuestionLegal': questionLegal,\r\n 'accessToken': authUser.AccessToken,\r\n 'userName': authUser.UsernameForServiceAuth,\r\n 'profileId': authUser.ProfileID,\r\n 'userAgent': navigator.userAgent,\r\n 'allParamsEncrypted': authUser.AllParamsEncrypted\r\n };\r\n // $rootScope.profileId = authUser.ProfileID;\r\n // $rootScope.disableRegister = true;\r\n\r\n\r\n API.checkUser(dataToSend).then((response) => {\r\n // var locale = webStorageService.getSessionData('requestedlocale'),\r\n var page = '',\r\n proceed = true;\r\n if (response.redirect) {\r\n\r\n proceed = false;\r\n \r\n if (response.redirect.indexOf('limit') > -1) {\r\n webStorageService.setSessionData('createPageState', 'Limit');\r\n webStorageService.setSessionData('limitType', response.message);\r\n }\r\n if (response.redirect.indexOf('puzzle') > -1) {\r\n webStorageService.setSessionData('createPageState', 'puzzle');\r\n }\r\n handleRoute(response.redirect);\r\n\r\n }\r\n if (response.user) {\r\n response.user.profileId = authUser.ProfileID;\r\n // resourceService.setGRMUser(response.user);\r\n webStorageService.setSessionData('grmUser', response.user);\r\n }\r\n if (response.token) {\r\n webStorageService.setSessionData('servToken', response.token);\r\n var token = response.token;\r\n }\r\n if (formType === 'login') {\r\n // dataLayers().signInData(authUser.ProfileID, authUser.City, authUser.Country, subscription, authUser.Flow);\r\n }\r\n if (formType === 'register') {\r\n // dataLayers().registerData(authUser.ProfileID, authUser.City, authUser.Country, subscription, authUser.Flow);\r\n }\r\n if ((formType === 'login' || formType === 'register') && proceed) {\r\n /*$location.path('/' + lang + '/ShippingDetails');\r\n accessService.setPermission('shippingdetails', true);*/\r\n if (isNpr && response.Nobatchcoderequired) {\r\n var data = [];\r\n API.checkUpcCodes(data, webStorageService.getSessionData('servToken')).then(function (response) {\r\n \r\n if (!!response.result && response.result.length > 0) {\r\n webStorageService.setSessionData('servToken', response.token);\r\n var grm = webStorageService.getSessionData('grmUser');\r\n var shippingInfoObj = {\r\n 'redemption-token': webStorageService.getSessionData('servToken'),\r\n 'shippingDetails': grm\r\n };\r\n API.orderAward(shippingInfoObj).then(function (response) {\r\n \r\n \r\n if (response.token) {\r\n \r\n webStorageService.setSessionData('servToken', response.token);\r\n webStorageService.setLocalData('servToken', response.token);\r\n } else {\r\n webStorageService.removeSessionData('servToken');\r\n }\r\n // var grmUser = {};\r\n // if (Object.keys(resourceService.getGRMUser()).length !== 0) {\r\n // grmUser = resourceService.getGRMUser();\r\n // } else {\r\n // grmUser = webStorageService.getSessionData('grmUser');\r\n // }\r\n if (response.redirect) {\r\n var winnerObj = {};\r\n if (response.redirect.indexOf('puzzle') > -1) {\r\n webStorageService.setSessionData('createPageState', 'Puzzle');\r\n }\r\n if (response.redirect.toLowerCase().indexOf('thankyou') > -1) {\r\n if (response.Winner !== undefined && response.Winner !== null) {\r\n winnerObj = {\r\n winner: response.Winner,\r\n winnerCopy: response.winnerCopy,\r\n isExtendedPhase: response.ExtendedPhase,\r\n refCode: response.RefCode\r\n }\r\n // dataLayers().orderData(response.Winner);\r\n }\r\n }\r\n \r\n if (response.redirect.indexOf('limit') > -1) {\r\n webStorageService.setSessionData('createPageState', 'Limit');\r\n }\r\n handleRouteNpn(response.redirect, winnerObj);\r\n \r\n } else {\r\n HandleError();\r\n }\r\n }).catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n }\r\n }).catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n } else {\r\n webStorageService.setSessionData('createPageState', 'Batchcodeentry');\r\n handleRoute(\"/\" + locale + \"/BatchCodeEntry\");\r\n }\r\n }\r\n }).catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n } else if (reset) {\r\n setTimeout(function () {\r\n window.location.pathname = '/' + locale;\r\n }, 4000);\r\n }\r\n }\r\n },\r\n onExit: function (authUser) {\r\n // your redirect logic goes here \r\n // NOTE: if you already used onAuth to authenticate the user\r\n // then you don't need to do anything with authUser here\r\n // console.log(authUser, 'exit');\r\n // AccessService.clearPermissions();\r\n // SpoonService.clearSpoon();\r\n // ShippingService.clearData();\r\n // $location.path(startAgainUrl);\r\n }\r\n };\r\n function initReg() {\r\n // initialize the reg v6 module\r\n var regModule = window.KSTL.Registration.init(container, configObj);\r\n // subscribe to module event notifications\r\n var eventViewRender = regModule.bind('view:render', function (topic, view) {\r\n cb();\r\n if (view.name === '/Sweepstakes/Error') {\r\n view.element.hidden = true;\r\n }\r\n // personal checkbox\r\n $('#reg-container input[type=\"checkbox\"] + label').prepend('');\r\n\r\n // placeholder\r\n /*$('#reg-container input[name=\"FirstName\"]').attr(\"placeholder\", resourceService.translations.GrmFirstNamePlaceholder);\r\n $('#reg-container input[name=\"LastName\"]').attr(\"placeholder\", resourceService.translations.GrmLastNamePlaceholder);\r\n $('#reg-container input[name=\"Password\"]').attr(\"placeholder\", resourceService.translations.GrmPasswordPlaceholder);\r\n $('#reg-container input[name=\"PasswordConfirm\"]').attr(\"placeholder\", resourceService.translations.GrmConfirmPasswordPlaceholder);\r\n $('#reg-container input[name=\"AddressLine1\"]').attr(\"placeholder\", resourceService.translations.GrmAddressLine1Placeholder);\r\n $('#reg-container input[name=\"AddressLine2\"]').attr(\"placeholder\", resourceService.translations.GrmAddressLine2Placeholder);\r\n $('#reg-container input[name=\"City\"]').attr(\"placeholder\", resourceService.translations.GrmTownCityPlaceholder);\r\n $('#reg-container input[name=\"PostalCode\"]').attr(\"placeholder\", resourceService.translations.GrmPostcodePlaceholder);\r\n $('#reg-container input[name=\"UserName\"]').attr(\"placeholder\", resourceService.translations.GrmEmailPlaceholder);\r\n $('#reg-container input[name=\"UserNameConfirm\"]').attr(\"placeholder\", resourceService.translations.GrmConfirmEmailPlaceholder);\r\n $('#reg-container input[name=\"PhoneNumber1\"]').attr(\"placeholder\", resourceService.translations.GrmPhoneNumberPlaceholder);\r\n */\r\n\r\n $('#KSTL-Registration-wrapper-TermsConditions label a').attr(\"target\", \"_self\");\r\n\r\n $('#KSTL-Registration-wrapper-HeaderSubscription input').on('change', function () {\r\n subscription = $(this).prop(\"checked\");\r\n });\r\n\r\n $('#KSTL-Registration-QuestionLegal').on('change', function () {\r\n questionLegal = $('#KSTL-Registration-QuestionLegal').val().trim();\r\n $('#KSTL-Registration-QuestionLegal').val(questionLegal);\r\n });\r\n\r\n var $input = $('#KSTL-Registration-PostalCode');\r\n $input.on('keyup', (function (e) {\r\n var max = $input[0] ? $input[0].maxLength : 10;\r\n if (max) {\r\n if ($input.val().length > max) {\r\n $input.val($input.val().substr(0, max));\r\n }\r\n }\r\n }));\r\n // set column height\r\n var thises = $('div[ng-activity-indicator=\"Circled\"]');\r\n if (thises.hasClass(\"ng-hide\")) {\r\n var windowWidth = window.innerWidth;\r\n var heightss = \"\";\r\n var firstcol = $('.js-setheight .twocols > div:first-child .content');\r\n var secondcol = $('.js-setheight .twocols > div:last-child .content');\r\n if (windowWidth > 768) {\r\n firstcol.css({ \"height\": \"\" });\r\n secondcol.css({ 'height': \"\" });\r\n heightss = Math.max(firstcol.outerHeight(true), secondcol.outerHeight(true));\r\n firstcol.css({ 'height': heightss });\r\n secondcol.css({ 'height': heightss });\r\n }\r\n }\r\n\r\n // change position of validate-error\r\n $(\".ns-popover-list-theme\").each(function () {\r\n var geterror = $(this);\r\n var getfieldname = $(this).attr(\"id\").slice(26);\r\n var controlformid = \"#KSTL-Registration-wrapper-\" + getfieldname;\r\n var getcontrolform = $(controlformid);\r\n geterror.appendTo(getcontrolform);\r\n });\r\n // if ($('.pod').length > 0){ \r\n // var $pod = $('.pod'),\r\n // grmScope = KSTL.Registration.frmElement($pod.get()).isolateScope();\r\n // }\r\n // if (!grmScope) {\r\n // \treturn;\r\n // }\r\n });\r\n\r\n var eventFormSubmit = regModule.bind('form:submit', function (topic, form) {\r\n /*console.log('regv6 form:submit', form.name);\r\n if you wish to unsubscribe\r\n regModule.unbind(eventViewRender);\r\n console.log(eventFormSubmit);*/\r\n });\r\n\r\n var eventForgotPwdRender = regModule.bind('forgotpassword:render', function (topic, view) {\r\n $(\".login-container .login-heading\").hide();\r\n });\r\n\r\n var eventTnCLinkRender = regModule.bind('registration:render', function (topic, view) {\r\n if ($('#KSTL-Registration-AddressLine1').length) {\r\n var addressVal = $('#KSTL-Registration-AddressLine1').val();\r\n // if(addressVal==''|| addressVal==null || addressVal==undefined)\r\n // window.KSTL.Registration.frmElement.AddressLine1 = '.';\r\n }\r\n });\r\n }\r\n clearInterval(_interval);\r\n // async script loader... do not modify\r\n return (function () {\r\n var src, kreg, s;\r\n if(settings.SAPGigyaApiKey!=undefined && settings.SAPGigyaApiKey!=null){\r\n src = settings.GRMServiceURL + '/scripts/registrationv2.js';;\r\n }\r\n else if(locale == \"en_IS\"){\r\n src = settings.GRMServiceURL + '/scripts/registration_survey.js';\r\n }\r\n else {\r\n src = settings.GRMServiceURL + '/scripts/registration.min.js';\r\n }\r\n kreg = document.createElement('script');\r\n kreg.type = 'text/javascript';\r\n kreg.onload = kreg.onreadystatechange = function () {\r\n if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {\r\n kreg.onload = kreg.onreadystatechange = null;\r\n if (container) {\r\n initReg();\r\n }\r\n }\r\n };\r\n kreg.src = src;\r\n s = document.getElementsByTagName('script')[0];\r\n s.parentNode.insertBefore(kreg, s);\r\n })();\r\n }\r\n }\r\n var _interval = setInterval(function () {\r\n generateGRM();\r\n }, 300);\r\n};\r\n\r\nexport default LoadGRM;\r\n","import { localeList, defaultLocale } from './ConfigData.json';\r\nimport MetaTagsData from './MetaTags';\r\nimport LoadGRMGlobal from './LoadGRM';\r\nimport jquery from 'jquery';\r\n\r\nlet windowOriginURL = window.location.origin,\r\n windowHrefURL = window.location.href,\r\n getLocale = defaultLocale,\r\n getIsTOS = false,\r\n getIsCDC = false,\r\n getIsShipping = false,\r\n getIsSplitter = false,\r\n showReceiptField = false,\r\n getNpr = false;\r\n\r\nconst checkLocale = () => {\r\n localeList.forEach(function (item, index) {\r\n let url = (windowHrefURL.split(windowOriginURL + '/')[1]).split('/')[0].toLowerCase();\r\n if (url.toLowerCase() == item.locale.toLowerCase()) {\r\n getLocale = item.locale;\r\n getIsTOS = item.isTOS;\r\n getIsCDC = item.isCDC;\r\n getIsShipping = item.isShipping;\r\n getIsSplitter = item.isSplitter;\r\n showReceiptField = item.isShowReceiptField;\r\n getNpr = item.isNpr;\r\n }\r\n });\r\n}\r\ncheckLocale();\r\n\r\nconst getUA = () => {\r\n var ua = navigator.userAgent,\r\n browserStr = /Safari/i.test(ua) && !(/Chrome/i.test(ua)) ? 'safari ' : '',\r\n browserStr = /Android/i.test(ua) ? browserStr + 'android ' : browserStr + '',\r\n browserStr = /iPhone/i.test(ua) ? browserStr + 'iphone ' : browserStr + '',\r\n browserStr = /iPad/i.test(ua) ? browserStr + 'ipad ' : browserStr + '',\r\n browserStr = /Mac/i.test(ua) ? browserStr + 'mac' : browserStr + '';\r\n document.querySelector('html').className = browserStr;\r\n}\r\ngetUA();\r\n\r\nexport const pageScroll = () => {\r\n window.scrollTo(0, 0);\r\n setTimeout(function () {\r\n $('html, body').animate({\r\n scrollTop: $('.container').offset().top - 100\r\n }, 1000);\r\n }, 1000);\r\n}\r\n\r\nexport const relativeURL = process.env.PUBLIC_URL;\r\nexport const $ = jquery;\r\nexport const locale = getLocale;\r\nexport const isTOS = getIsTOS;\r\nexport const isCDC = getIsCDC;\r\nexport const isShipping = getIsShipping;\r\nexport const isSplitter = getIsSplitter;\r\nexport const isShowReceiptField = showReceiptField;\r\nexport const isNpr = getNpr;\r\nexport const MetaTags = MetaTagsData;\r\nexport const LoadGRM = LoadGRMGlobal;","import React, { useContext } from 'react';\r\nimport { localeList } from '../Utility/ConfigData.json';\r\nimport { locale } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Header() {\r\n const { translations } = useContext(JsonContext);\r\n \r\n const switchCountry = (e) => {\r\n e.preventDefault();\r\n window.location = \"/\" + e.target.value + \"/Home\";\r\n }\r\n return (\r\n <>\r\n
\r\n {/*
\r\n \r\n \r\n
*/}\r\n \r\n \r\n \r\n {translations.HeaderAltText}\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Header;","import * as webStorageService from './WebStorageFactory';\r\nimport { locale } from './Global';\r\nimport dataLayers from './DataLayers';\r\nconst moment = require('moment-timezone'); // UTC time according to the timezones npm i moment-timezone\r\nconst PromotionState=(settings,translations)=> {\r\n\r\n function _initPage () {\r\n var path = window.location.pathname.toLowerCase(),\r\n isStartPage = (path.match('home') || path.match('\\/' + locale + '\\/$') || path.match('\\/' + locale + '$') || path === '/') && !path.match('thankyou') ? true : false;\r\n // dataLayers().init(settings);\r\n // dataLayers().gtm(translations); \r\n if (isStartPage) {\r\n webStorageService.removeSessionData('servToken');\r\n webStorageService.removeLocalData('servToken');\r\n webStorageService.removeSessionData('grmUser');\r\n webStorageService.removeSessionData('lastUrlArr');\r\n }\r\n //Setting initial data in session storage\r\n // initConfig.setDefaultUrl(locale);//set default/start url for requested localization\r\n webStorageService.setSessionData('requestedLang', locale); //store requested localization in session storage\r\n // var initPermission = initConfig.getPagePermission(); //get start permissions for each page from init configuration service\r\n //Data Layers\r\n if (isStartPage) {\r\n // webStorageService.setSessionData('permission', initPermission); //store start permission in session storage \r\n // dataLayers.init();\r\n // dataLayers.gtm();\r\n }\r\n if (path.match('recoverpassword') || path.match('forgotpassword')) {\r\n // webStorageService.setSessionData('permission', initPermission); //store start permission in session storage \r\n }\r\n\r\n var fState = new _getStates();\r\n //check Promotion State status and redirect to valid page\r\n _checkAppState(fState.getPromotionState());\r\n // _checkAppState('holdingpage');\r\n };\r\n function _getStates() {\r\n if (locale != 'ch' && locale != 'be') {\r\n\r\n var startDate = moment(settings.StartDate),\r\n startDateTime = startDate.format(),\r\n\r\n endDate = moment(settings.EndDate),\r\n endDateTime = endDate.format(),\r\n\r\n currentDate = new Date(),\r\n currentDateUTC = moment(currentDate).tz(settings.TimeZone),\r\n currentTime = currentDateUTC.format(),\r\n\r\n outOfHrsEndDate = settings.OutOfHrsEndDate == null ? currentDateUTC : moment(settings.OutOfHrsEndDate),\r\n outOfHrsEndDateTime = outOfHrsEndDate.format(),\r\n\r\n extendedStartDate = settings.ExtendedStartDate == null ? currentDateUTC : moment(settings.ExtendedStartDate),\r\n extendedStartDateTime = extendedStartDate.format(); \r\n }\r\n function _getPromotionState() {\r\n if (locale != 'ch' && locale != 'be') {\r\n if (currentTime >= startDateTime) {\r\n if (currentTime > endDateTime)\r\n return 'closed';\r\n else if (currentTime < outOfHrsEndDateTime) {\r\n if (currentDateUTC.hours() >= startDate.hours() && currentDateUTC.hours() <= outOfHrsEndDate.hours()) {\r\n if (currentDateUTC.hours() == startDate.hours() && currentDateUTC.hours() == outOfHrsEndDate.hours()) {\r\n if (currentDateUTC.minutes() >= outOfHrsEndDate.minutes()) {\r\n if (currentDateUTC.minutes() == outOfHrsEndDate.minutes()) {\r\n if (currentDateUTC.seconds() > outOfHrsEndDate.seconds()) {\r\n return 'outofhours';\r\n } else {\r\n return 'live';\r\n }\r\n } else {\r\n return 'outofhours';\r\n }\r\n\r\n }\r\n }\r\n else if (currentDateUTC.hours() == startDate.hours()) {\r\n if (currentDateUTC.minutes() <= startDate.minutes()) {\r\n if (currentDateUTC.minutes() == startDate.minutes()) {\r\n if (currentDateUTC.seconds() < startDate.seconds()) {\r\n return 'outofhours';\r\n } else {\r\n return 'live';\r\n }\r\n } else {\r\n return 'outofhours';\r\n }\r\n }\r\n } else if (currentDateUTC.hours() == outOfHrsEndDate.hours()) {\r\n if (currentDateUTC.minutes() >= outOfHrsEndDate.minutes()) {\r\n if (currentDateUTC.minutes() == outOfHrsEndDate.minutes()) {\r\n if (currentDateUTC.seconds() > outOfHrsEndDate.seconds()) {\r\n return 'outofhours';\r\n } else {\r\n return 'live';\r\n }\r\n } else {\r\n return 'outofhours';\r\n }\r\n\r\n }\r\n }\r\n return 'live';\r\n }\r\n else {\r\n return 'outofhours'\r\n }\r\n }\r\n\r\n return 'live';\r\n }\r\n return 'holdingpage';\r\n } else {\r\n return 'splitter';\r\n }\r\n }\r\n function _getExtendedState() {\r\n if (currentTime >= extendedStartDateTime && currentTime < endDateTime) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n return {\r\n getPromotionState: _getPromotionState,\r\n getExtendedState: _getExtendedState\r\n };\r\n };\r\n function _checkAppState(state) {\r\n if (!state) { return; }\r\n var url = '';\r\n switch (state.toLowerCase()) {\r\n case 'holdingpage':\r\n url = '/' + locale + '/ComingSoon';\r\n webStorageService.setSessionData('createPageState', 'Comingsoon');\r\n if ((window.location.href.toLowerCase()).indexOf('comingsoon') <= -1) {\r\n window.location.href=url;\r\n }\r\n break;\r\n case 'closed':\r\n url = settings.CampainCloseURL;\r\n window.location.href = url;\r\n break;\r\n case 'outofstock':\r\n url = '/' + locale + '/Outofstock';\r\n // routingConfig.setPath('redirectUrl', 'Outofstock');\r\n webStorageService.setSessionData('createPageState', 'Outofstock');\r\n // accessService.setPermission('oos', true);\r\n // history.push(url)\r\n // $location.path(url);\r\n break;\r\n case 'outofhours':\r\n // routingConfig.setPath('redirectUrl', 'Home');\r\n webStorageService.setSessionData('createPageState', 'Outofhours');\r\n break;\r\n case 'live':\r\n // routingConfig.setPath('redirectUrl', 'Home');\r\n // webStorageService.setSessionData('createPageState', 'Home');\r\n break;\r\n case 'splitter':\r\n url = '/' + locale;\r\n // routingConfig.setPath('redirectUrl', url);\r\n // window.location.href = url;\r\n break;\r\n default:\r\n url = '/' + locale + '/Error';\r\n // routingConfig.setPath('redirectUrl', 'Error');\r\n webStorageService.setSessionData('createPageState', 'Error');\r\n window.location.href = url;\r\n break;\r\n }\r\n }\r\n return {\r\n initPage: _initPage,\r\n getStates: _getStates\r\n }\r\n\r\n}\r\nexport default PromotionState;","import React, { useContext } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport { relativeURL, locale, $ } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\nimport PromotionState from '../Utility/PromotionState';\r\n\r\nfunction Footer() {\r\n const { translations, settings } = useContext(JsonContext);\r\n const { getStates } = PromotionState(settings, translations);\r\n var holdingPage = (getStates().getPromotionState().toLowerCase() == 'holdingpage') ? true : false;\r\n let hostName = window.location.hostname,\r\n shareUrl = (hostName == 'mindpopping.pringles.com') ? hostName + '/Content/s/' + locale + '/' : hostName + '/Content/s_dev/' + locale + '/';\r\n\r\n const shareFacebook = (e) => {\r\n e.preventDefault();\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + shareUrl, 'targetWindow', 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes,width=550, height=450');\r\n // dataLayers().socialData('Facebook');\r\n return false;\r\n }\r\n\r\n const shareTwitter = (e) => {\r\n e.preventDefault();\r\n let twitterData = e.currentTarget.dataset.twittertext;\r\n window.open('https://twitter.com/intent/tweet?url=' + shareUrl + '&text=' + twitterData, 'targetWindow', 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes,width=550, height=450');\r\n // dataLayers().socialData('Twitter');\r\n return false;\r\n }\r\n\r\n const cookiePolicy = () => {\r\n setTimeout(function () {\r\n if (document.getElementById('PlaceidTrust')) {\r\n if ($('#cookieContainer').length > 0 && !$('.truste-script').length) {\r\n let country = locale.split('_')[1].toLowerCase(),\r\n language = locale.split('_')[0],\r\n src = translations.CoreKelloggs_CookiePr + '&language=' + language,\r\n idTrust = src.split('&')[1].split('=')[1];\r\n document.getElementById('PlaceidTrust').setAttribute('id', idTrust);\r\n $('.trusty').append('');\r\n }\r\n }\r\n }, 1000);\r\n }\r\n cookiePolicy();\r\n\r\n return (\r\n <>\r\n
\r\n {!holdingPage ?
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
    \r\n {/* */}\r\n
  • \r\n {translations.CoreKelloggs_FooterFaq}\r\n
  • \r\n
  • \r\n {translations.CoreKelloggs_FooterTerms}\r\n
  • \r\n {/* {\r\n isFR &&\r\n
  • \r\n {translations.CoreKelloggs_FooterMentionsSanitaires}\r\n
  • \r\n } */}\r\n
  • \r\n \r\n
  • \r\n
  • \r\n {translations.CoreKelloggs_FooterPrng}\r\n
  • \r\n
  • \r\n Cookie Preferences\r\n
  • \r\n
\r\n
\r\n {translations.FooterShortTerms &&
}\r\n
:
\r\n \r\n
\r\n
}\r\n
\r\n {/* {!holdingPage &&\r\n
\r\n }\r\n {!holdingPage &&\r\n
\r\n } */}\r\n\r\n \r\n )\r\n}\r\n\r\nexport default Footer;","import React, { useContext } from 'react';\r\nimport { MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Closed() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n sessionStorage.removeItem('createPageState');\r\n document.querySelector('body').setAttribute('pagename', 'Closed');\r\n\r\n return (\r\n <>\r\n \r\n
\r\n

{translations.EndPromoTitle}

\r\n \r\n {translations.EndPromoButtonLabel}\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Closed;","import React, { useContext } from 'react';\r\nimport { MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Comingsoon() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n sessionStorage.removeItem('createPageState');\r\n document.querySelector('body').setAttribute('pagename', 'Comingsoon');\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n

{translations.ComingSoonHeading}

\r\n

\r\n \r\n {translations.ComingSoonCta}\r\n \r\n
\r\n {/* */}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Comingsoon;","import React, { useContext } from 'react';\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport { locale, MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\n\r\nfunction Splitter() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n webStorageService.removeSessionData('codes');\r\n webStorageService.removeSessionData('createPageState');\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Splitter');\r\n return (\r\n <>\r\n \r\n
\r\n

\r\n \r\n {\r\n locale == 'be' &&\r\n \r\n }\r\n {\r\n locale == 'ch' &&\r\n \r\n }\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Splitter;","import React, { useContext, useState } from 'react';\r\nimport { locale, LoadGRM, $, isCDC } from '../Utility/Global'\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Login() {\r\n const { translations } = useContext(JsonContext);\r\n const [callOnce, setCallOnce] = useState(false);\r\n if (!callOnce) {\r\n LoadGRM('login', function () {\r\n disableRegister = false;\r\n if ($('.hiding').length > 0) {\r\n $('.hiding').addClass('hide');\r\n }\r\n });\r\n setCallOnce(true);\r\n }\r\n\r\n var disableRegister,\r\n ua = navigator.userAgent.toLowerCase();\r\n document.querySelector('body').setAttribute('pagename', 'Login');\r\n\r\n return (\r\n <>\r\n {!isCDC &&
\r\n
\r\n
{translations.LoginPageHeading}
\r\n

{translations.LoginPageHeading}

\r\n

{translations.LoginPageDescription1}

\r\n {locale == 'en_GR' &&

}\r\n

{translations.LoginPageDescription}

\r\n {/*

{translations.LoginPageDescription1}

*/}\r\n

\r\n **\r\n \r\n {translations.CoreKelloggs_TncApply}\r\n \r\n

\r\n

{translations.LoginSectionHeading}

\r\n

\r\n
\r\n
\r\n
{translations.Or}
\r\n {translations.CoreKelloggs_RegisterNowButton}\r\n
}\r\n {isCDC &&
\r\n \r\n
\r\n \r\n
}\r\n \r\n )\r\n}\r\n\r\nexport default Login;","import React, { useState, useContext } from 'react';\r\nimport { Redirect, useHistory } from 'react-router-dom';\r\nimport { locale, MetaTags, $, pageScroll } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport * as API from '../Utility/ApiCalls';\r\nimport ErrorProvider from '../Utility/ErrorProvider';\r\n\r\nfunction Shipping() {\r\n const { translations, settings } = useContext(JsonContext);\r\n var shippingDefault, Require_RU_Captcha = settings.Require_Captcha;\r\n if (webStorageService.getSessionData('shippingBtnObj') == undefined) {\r\n shippingDefault = [{\r\n UserDetails: {\r\n FirstName: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n LastName: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n Address1: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n Address2: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n City: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n PostalCode: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n Email: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n Phone: {\r\n isValid: false,\r\n isEmpty: true,\r\n error: false,\r\n value: '',\r\n isWritten: false,\r\n },\r\n TermsandConditions: {\r\n isEmpty: true,\r\n error: false\r\n },\r\n sended: false,\r\n processing: false,\r\n validateCaptcha: (locale == 'ru_RU' && Require_RU_Captcha == \"true\") ? false : true\r\n },\r\n }]\r\n } else {\r\n shippingDefault = JSON.parse(webStorageService.getSessionData(\"shippingBtnObj\"));\r\n }\r\n\r\n const [firstName, setFirstName] = useState('')\r\n const [lastName, setLastName] = useState('')\r\n const [shipping, setShipping] = useState(shippingDefault);\r\n const [tncCheckbox, setTncCheckbox] = useState(false);\r\n const [privacyCheckbox, setPrivacyCheckbox] = useState(false);\r\n const [radioBtnCntry, setRadioBtnCntry] = useState(false);\r\n const history = useHistory();\r\n const {HandleError} = ErrorProvider();\r\n const handleRoute = (path) => {\r\n history.push({pathname:path});\r\n pageScroll();\r\n }\r\n document.querySelector('body').setAttribute('pagename', 'Shipping');\r\n\r\n var ua = navigator.userAgent.toLowerCase(),\r\n isAndroid = ua.indexOf(\"android\") > -1,\r\n // processing = false,\r\n // Require_RU_Captcha = translations.Require_Captcha,\r\n // validateCaptcha = (locale == 'ru_RU' && Require_RU_Captcha == \"true\") ? false : true,\r\n RIChecked = false,\r\n tcChecked = false,\r\n countrySel = false,\r\n countryValue = '',\r\n UserDetails = '',\r\n _interval,\r\n sended = false,\r\n isIRL = (locale === 'ie' ? true : false);\r\n\r\n if ($('.hiding').length > 0) {\r\n $('.hiding').addClass('hide');\r\n }\r\n // $('html, body').animate({\r\n // scrollTop: $('header').offset().top - 100\r\n // }, 2000); \r\n var setCaptcha = function () {\r\n if ($('#sdForm').length && $('.g-recaptcha-response').length < 1 && typeof window.grecaptcha.render !== 'undefined') {\r\n if (locale == 'ru_RU' && Require_RU_Captcha == \"true\") {\r\n window.grecaptcha.render(\r\n 'g-recaptcha', {\r\n sitekey: '6LeRF1scAAAAAB-yBjJMrzLYSBqNAGjkf2PokFq1',\r\n callback: onSuccess,\r\n 'expired-callback': expCallback,\r\n 'hl': 'ru'\r\n }\r\n );\r\n }\r\n clearInterval(_interval);\r\n }\r\n };\r\n _interval = setInterval(function () {\r\n setCaptcha();\r\n }, 300);\r\n // countrySelected = function(event) {\r\n // countrySel = true;\r\n // console.log(event);\r\n // }\r\n function expCallback() {\r\n window.grecaptcha.reset();\r\n shippingDefault = JSON.parse(webStorageService.getSessionData('shippingBtnObj'))\r\n shippingDefault[0].UserDetails.validateCaptcha = false;\r\n webStorageService.setSessionData('shippingBtnObj', shippingDefault);\r\n setShipping(shippingDefault);\r\n }\r\n function onSuccess(token) {\r\n shippingDefault = webStorageService.getSessionData('shippingBtnObj') == undefined ? shippingDefault : JSON.parse(webStorageService.getSessionData('shippingBtnObj'));\r\n var redemToken = webStorageService.getSessionData('servToken') ? webStorageService.getSessionData('servToken') : '';\r\n if (token) {\r\n API.verifyCaptcha({ token: token, redemptionToken: redemToken }).then(function (res) {\r\n let updateValidateCaptcha = (res.status == 'FAILED') ? false : true;\r\n shippingDefault[0].UserDetails.validateCaptcha = updateValidateCaptcha;\r\n webStorageService.setSessionData('shippingBtnObj', shippingDefault);\r\n setShipping(shippingDefault);\r\n webStorageService.setSessionData('servToken', res.token);\r\n }).catch(function (err) {\r\n console.log(err)\r\n })\r\n }\r\n }\r\n var oncheck = function (event) {\r\n var keyCode = event.which || event.keyCode;\r\n if (keyCode == 13) {\r\n if (event.target.attributes.for.value == 'KSTL-Registration-TermsandConditions') {\r\n setTncCheckbox(!tncCheckbox);\r\n } else {\r\n setPrivacyCheckbox(!privacyCheckbox);\r\n }\r\n }\r\n }\r\n var limitInput = function (event) {\r\n if (isAndroid) {\r\n var AddressLen = event.target.maxLength;\r\n if (event.target.value.length > AddressLen) {\r\n event.target.value = event.target.value.substring(0, event.target.value - 1);\r\n }\r\n }\r\n }\r\n var userInput = function (event) {\r\n let attrVal = event.target.attributes.name.value,\r\n getPattern = attrVal == 'Address1' || attrVal == 'Address2' ? '' : event.target.attributes.pattern.value,\r\n pattern = RegExp(getPattern);\r\n shippingDefault[0].UserDetails[attrVal].isWritten = true;\r\n if (!event.target.value.length) {\r\n shippingDefault[0].UserDetails[attrVal].isEmpty = true;\r\n shippingDefault[0].UserDetails[attrVal].error = true;\r\n }else {\r\n shippingDefault[0].UserDetails[attrVal].isEmpty = false;\r\n if (!pattern.test(event.target.value)) {\r\n shippingDefault[0].UserDetails[attrVal].isValid = false\r\n shippingDefault[0].UserDetails[attrVal].error = true;\r\n } else {\r\n if(( attrVal == 'PostalCode'|| attrVal == 'Phone') && event.target.value.length < parseInt(event.target.attributes.minlength.value) ){\r\n shippingDefault[0].UserDetails[attrVal].isValid = false\r\n shippingDefault[0].UserDetails[attrVal].error = true;\r\n }else{\r\n shippingDefault[0].UserDetails[attrVal].error = false;\r\n shippingDefault[0].UserDetails[attrVal].isValid = true;\r\n shippingDefault[0].UserDetails[attrVal].value = event.target.value;\r\n }\r\n }\r\n }\r\n\r\n webStorageService.setSessionData('shippingBtnObj', shippingDefault);\r\n setShipping(shippingDefault);\r\n\r\n }\r\n var CountryValue = 'Russia',\r\n //sets default checked attribute for Terms\r\n TermsValues = true,\r\n onlyNumbers = function (evt) {\r\n if ((evt.which < 48 && evt.which > 41) || evt.which > 57) {\r\n evt.preventDefault();\r\n }\r\n }\r\n //public metodhs\r\n // setOrder = setOrder;\r\n function setOrder(event) {\r\n event.preventDefault();\r\n if (!shipping[0].UserDetails.FirstName.isEmpty && !shipping[0].UserDetails.LastName.isEmpty && !shipping[0].UserDetails.Address1.isEmpty && !shipping[0].UserDetails.Address2.isEmpty && !shipping[0].UserDetails.City.isEmpty && !shipping[0].UserDetails.PostalCode.isEmpty && !shipping[0].UserDetails.processing && shipping[0].UserDetails.validateCaptcha) {\r\n shippingDefault[0].UserDetails.sended = true;\r\n shippingDefault[0].UserDetails.processing = true;\r\n webStorageService.setSessionData('')\r\n setShipping(shippingDefault);\r\n var shippingInfoRussiaObj = {\r\n 'redemption-token': webStorageService.getSessionData('servToken'),\r\n 'UserName': shipping[0].UserDetails.Email.value,\r\n 'ua': ua,\r\n 'shippingDetails': {\r\n name: shipping[0].UserDetails.FirstName.value,\r\n lastName: shipping[0].UserDetails.LastName.value,//formObj.LastName,\r\n address1: shipping[0].UserDetails.Address1.value,//formObj.Address1,\r\n address2: shipping[0].UserDetails.Address2.value,//formObj.Address2,\r\n city: shipping[0].UserDetails.City.value,//formObj.City,\r\n postCode: shipping[0].UserDetails.PostalCode.value,//formObj.PostalCode,\r\n state: '',\r\n Email: shipping[0].UserDetails.Email.value,\r\n terms: tncCheckbox,\r\n subscription: privacyCheckbox,\r\n phone: shipping[0].UserDetails.Phone.value,\r\n country: radioBtnCntry// resourceService.getCountryCode().toLowerCase() // add russia\r\n }\r\n };\r\n API.russiaOrder(shippingInfoRussiaObj).then(function(response){\r\n if(response.token){\r\n webStorageService.setSessionData('servToken', response.token);\r\n webStorageService.setLocalData('servToken', response.token);\r\n // token = response.token;\r\n var shippingInfoObj = {\r\n 'redemption-token': response.token,\r\n 'shippingDetails': {\r\n name: shipping[0].UserDetails.FirstName.value,\r\n lastName: shipping[0].UserDetails.LastName.value,//formObj.LastName,\r\n address1: shipping[0].UserDetails.Address1.value,//formObj.Address1,\r\n address2: shipping[0].UserDetails.Address2.value ,//formObj.Address2,\r\n city: shipping[0].UserDetails.City.value,//formObj.City,\r\n postCode: shipping[0].UserDetails.PostalCode.value,//formObj.PostalCode,\r\n state: '',\r\n Email:shipping[0].UserDetails.Email.value,\r\n terms:tncCheckbox, \r\n subscription:privacyCheckbox,\r\n phone: shipping[0].UserDetails.Phone.value,\r\n country: 'ru'// resourceService.getCountryCode().toLowerCase() // add russia\r\n }\r\n };\r\n webStorageService.setSessionData('shippingInfoObj',shippingInfoObj);\r\n webStorageService.setSessionData('createPageState', 'Batchcodeentry');\r\n handleRoute(\"/\" + locale + \"/BatchCodeEntry\"); \r\n }\r\n else if(response.redirect){\r\n if (response.redirect.indexOf('limit') > -1) {\r\n webStorageService.setSessionData('limitType', response.message);\r\n webStorageService.setSessionData('createPageState', 'Limit');\r\n handleRoute(response.redirect); \r\n } \r\n }\r\n else{\r\n // $location.path(lang + '/Error');\r\n }\r\n }).catch(function(error){\r\n HandleError(error.response);\r\n });\r\n }\r\n }\r\n return (\r\n <>\r\n \r\n
\r\n

{translations.LoginPageHeading}

\r\n
{translations.LoginPageHeading}
\r\n

{translations.LoginPageDescription}

\r\n

**\r\n {translations.CoreKelloggs_TncApply}\r\n

\r\n

{translations.CoreKelloggs_KpsShippingPageHeading}

\r\n

\r\n
\r\n {/* */}\r\n
\r\n \r\n {/* */}\r\n
\r\n {/* */}\r\n
\r\n \r\n limitInput($event)}\r\n onChange={($event) => userInput($event)}\r\n pattern=\"^[^±!@£$%^&*_+§¡€#¢§¶•ªº«\\\\/<>?:;|=.,]{1,50}$\"\r\n className={shipping[0].UserDetails.FirstName.isValid ? 'form-valid-field' : ''} />\r\n
\r\n {\r\n (shipping[0].UserDetails.FirstName.isEmpty && shipping[0].UserDetails.FirstName.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n {\r\n !shipping[0].UserDetails.FirstName.isValid && !shipping[0].UserDetails.FirstName.isEmpty &&
\r\n

\r\n {translations.CoreKelloggs_KpsFirstnameError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n \r\n limitInput($event)}\r\n onChange={($event) => userInput($event)}\r\n required={true}\r\n pattern=\"^[^±!@£$%^&*_+§¡€#¢§¶•ªº«\\\\/<>?:;|=.,]{1,50}$\"\r\n className={shipping[0].UserDetails.LastName.isValid ? 'form-valid-field' : ''} />\r\n
\r\n {\r\n (shipping[0].UserDetails.LastName.isEmpty && shipping[0].UserDetails.LastName.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n {\r\n !shipping[0].UserDetails.LastName.isValid && !shipping[0].UserDetails.LastName.isEmpty &&
\r\n

\r\n {translations.CoreKelloggs_KpsSurnameError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* */}\r\n\r\n {/* */}\r\n
\r\n \r\n limitInput($event)}\r\n onChange={($event) => userInput($event)}\r\n required={true}\r\n className={shipping[0].UserDetails.Address1.isValid ? 'form-valid-field' : ''}\r\n />\r\n
\r\n {\r\n (shipping[0].UserDetails.Address1.isEmpty && shipping[0].UserDetails.Address1.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_KpsAddress1Error}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n \r\n limitInput($event)}\r\n onChange={($event) => userInput($event)}\r\n required={true}\r\n className={shipping[0].UserDetails.Address2.isValid ? 'form-valid-field' : ''}\r\n />\r\n
\r\n {\r\n (shipping[0].UserDetails.Address2.isEmpty && shipping[0].UserDetails.Address2.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n \r\n\r\n limitInput($event)}\r\n pattern=\"^[^±!@£$%^&*_+§¡€#¢§¶•ªº«\\\\/<>?:;|=.,]{1,50}$\"\r\n onChange={($event) => userInput($event)}\r\n required={true}\r\n className={shipping[0].UserDetails.City.isValid ? 'form-valid-field' : ''} />\r\n
\r\n {\r\n (shipping[0].UserDetails.City.isEmpty && shipping[0].UserDetails.City.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n {\r\n !shipping[0].UserDetails.City.isValid && !shipping[0].UserDetails.City.isEmpty &&
\r\n

\r\n {translations.CoreKelloggs_KpsCityError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n \r\n limitInput($event)}\r\n pattern=\"^[0-9]*$\"\r\n required={true}\r\n onChange={($event) => userInput($event)}\r\n required={true}\r\n className={shipping[0].UserDetails.PostalCode.isValid ? 'form-valid-field' : ''} />\r\n
\r\n {\r\n (shipping[0].UserDetails.PostalCode.isEmpty && shipping[0].UserDetails.PostalCode.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n {\r\n !shipping[0].UserDetails.PostalCode.isValid && !shipping[0].UserDetails.PostalCode.isEmpty &&
\r\n

\r\n {translations.CoreKelloggs_KpsPostcodeError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n \r\n\r\n userInput($event)}\r\n required={true}\r\n className={shipping[0].UserDetails.Email.isValid ? 'form-valid-field' : ''} />\r\n
\r\n {\r\n (shipping[0].UserDetails.Email.isEmpty && shipping[0].UserDetails.Email.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n {\r\n !shipping[0].UserDetails.Email.isValid && !shipping[0].UserDetails.Email.isEmpty &&
\r\n

\r\n {translations.CoreKelloggs_KpsConfirmEmailError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n\r\n {/* */}\r\n
\r\n \r\n\r\n onlyNumbers($event)}\r\n onChange={($event) => userInput($event)}\r\n className={shipping[0].UserDetails.Phone.isValid ? 'form-valid-field' : ''} />\r\n
\r\n {\r\n (shipping[0].UserDetails.Phone.isEmpty && shipping[0].UserDetails.Phone.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n {\r\n !shipping[0].UserDetails.Phone.isValid && !shipping[0].UserDetails.Phone.isEmpty &&
\r\n

\r\n {translations.CoreKelloggs_KpsMobileNumberError}\r\n

\r\n
\r\n }\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n \r\n\r\n setRadioBtnCntry(!radioBtnCntry)} />\r\n \r\n {/*
*/}\r\n
\r\n {/* \r\n \r\n */}\r\n
\r\n setTncCheckbox(!tncCheckbox)}\r\n />\r\n
\r\n {\r\n (shipping[0].UserDetails.TermsandConditions.isEmpty && shipping[0].UserDetails.TermsandConditions.error) &&\r\n
\r\n

\r\n {translations.CoreKelloggs_FieldRequiredError}\r\n

\r\n
\r\n }\r\n
\r\n \r\n \r\n
\r\n
\r\n setPrivacyCheckbox(!privacyCheckbox)} />\r\n \r\n \r\n
\r\n {/* */}\r\n\r\n {/* */}\r\n
\r\n
\r\n
\r\n {/* */}\r\n\r\n {/* */}\r\n
\r\n {/* */}\r\n \r\n {/* */}\r\n
\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Shipping;","import React, { useContext } from 'react';\r\nimport { locale, isShipping, MetaTags } from '../Utility/Global';\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport Login from './Login';\r\nimport Shipping from './Shipping';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Home() {\r\n const { translations } = useContext(JsonContext);\r\n webStorageService.removeSessionData('codes');\r\n webStorageService.removeSessionData('createPageState');\r\n webStorageService.removeSessionData('btnObj');\r\n webStorageService.removeSessionData('shippingBtnObj');\r\n webStorageService.removeSessionData('receiptObj');\r\n const _intervalG = setInterval(function () {\r\n logout();\r\n }, 300);\r\n function logout() {\r\n if (window.gigya != undefined) {\r\n window.gigya.accounts.logout();\r\n clearInterval(_intervalG);\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {\r\n isShipping ? : \r\n }\r\n \r\n )\r\n}\r\n\r\nexport default Home;","import React, { useContext, useState } from 'react';\r\nimport { MetaTags, LoadGRM, $, isCDC } from '../Utility/Global';\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Register() {\r\n const { translations } = useContext(JsonContext);\r\n const [callOnce, setCallOnce] = useState(false);\r\n\r\n webStorageService.removeSessionData('codes');\r\n webStorageService.removeSessionData('createPageState');\r\n document.querySelector('body').setAttribute('pagename', 'Register');\r\n if (!callOnce) {\r\n LoadGRM('register', function () {\r\n if ($('.hiding').length > 0) {\r\n $('.hiding').addClass('hide');\r\n }\r\n });\r\n setCallOnce(true);\r\n const _intervalR = setInterval(function () {\r\n setFocus();\r\n }, 300);\r\n\r\n function setFocus() {\r\n if (document.getElementById('KSTL-Registration-FirstName') != null) {\r\n document.getElementById('KSTL-Registration-FirstName').focus();\r\n clearInterval(_intervalR);\r\n }\r\n }\r\n\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {!isCDC &&
\r\n
\r\n

{translations.CoreKelloggs_RegisterPageHeading}

\r\n

{translations.ValidEmailDirections_register}

\r\n

\r\n
{translations.CoreKelloggs_RegisterPageHeading}
\r\n {/*

{translations.LoginPageTitle}

*/}\r\n
\r\n
\r\n
}\r\n {\r\n isCDC &&
\r\n
\r\n
\r\n }\r\n \r\n )\r\n}\r\n\r\nexport default Register;","import React, { useContext } from 'react';\r\nimport { MetaTags, LoadGRM } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Forgotpassword() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Forgotpassword');\r\n\r\n if ((window.location.href).indexOf('resetpassword') > 0 || (window.location.href).indexOf('unlockaccount') > 0) {\r\n LoadGRM('reset', function () { });\r\n }\r\n else {\r\n LoadGRM('forgot', function () { });\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Forgotpassword;","import React, { useContext } from 'react';\r\nimport { MetaTags, LoadGRM } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Recoverpassword() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Recoverpassword');\r\n\r\n LoadGRM('reset', function () { });\r\n\r\n return (\r\n <>\r\n \r\n
\r\n

{translations.ResetPasswordHeader}

\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Recoverpassword;","import React, { useState, useContext } from 'react';\r\nimport { Redirect, useHistory } from 'react-router-dom';\r\nimport { locale, isShowReceiptField, MetaTags, $, pageScroll } from '../Utility/Global';\r\nimport '../Utility/vendor/lightboxv2.min';\r\nimport * as API from '../Utility/ApiCalls';\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport ErrorProvider from '../Utility/ErrorProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\n\r\nfunction Batchcode() {\r\n const history = useHistory();\r\n const { HandleError } = ErrorProvider();\r\n const _intervalG = setInterval(function () {\r\n logout();\r\n }, 300);\r\n function logout() {\r\n if (window.gigya != undefined) {\r\n window.gigya.accounts.logout();\r\n clearInterval(_intervalG);\r\n }\r\n }\r\n\r\n const handleRoute = (path, obj) => {\r\n if (path.toLowerCase().indexOf('thankyou') > -1) {\r\n webStorageService.setSessionData('createPageState', 'Thankyou');\r\n } else if (path.toLowerCase().indexOf('puzzle') > -1) {\r\n webStorageService.setSessionData('createPageState', 'Puzzle');\r\n }\r\n else if (path.toLowerCase().indexOf('limit') > -1) {\r\n webStorageService.setSessionData('createPageState', 'Limit');\r\n }\r\n history.push({ pathname: path, state: obj });\r\n pageScroll();\r\n }\r\n const [codesArrObj, setCodesArrObj] = useState([{\r\n 'objId': '',\r\n 'id': '',\r\n 'errors': '',\r\n 'labels': '',\r\n 'value': '',\r\n 'uploadId': '',\r\n 'receiptNum': '',\r\n 'isWritten': false,\r\n 'duplicateKey': -1\r\n }]);\r\n const [fileNameObj, setFileNameObj] = useState([{\r\n receipt1: {\r\n name: '',\r\n invalid: false,\r\n large: false,\r\n empty: '',\r\n statusFile: '',\r\n statusMsg: '',\r\n showName: false,\r\n file: null\r\n }\r\n }])\r\n const { translations, settings } = useContext(JsonContext);\r\n var Require_Captcha = settings.Require_Captcha,\r\n _interval,\r\n getBtnObj;\r\n\r\n if (webStorageService.getSessionData('btnObj') == undefined) {\r\n getBtnObj = [{\r\n 'sended': false,\r\n 'validateCaptchaHome': (Require_Captcha == \"true\") ? false : true,\r\n 'anyError': false,\r\n 'isEmpty': true,\r\n 'validResponse': false\r\n }];\r\n } else {\r\n getBtnObj = JSON.parse(webStorageService.getSessionData(\"btnObj\"));\r\n }\r\n const [btnObj, setbtnObj] = useState(getBtnObj)\r\n const [modalShown, setModalShown] = useState(false);\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n\r\n // pageState = 'Batchcodeentry';\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Batchcodeentry') {\r\n return \r\n }\r\n let smallViewPort;\r\n\r\n var toggleModal = function (event) {\r\n event.preventDefault();\r\n setModalShown(!modalShown)\r\n if (!modalShown) {\r\n $('html,body').removeClass('activeOverlay');\r\n }\r\n setTimeout(function () {\r\n positionModal();\r\n }, 5);\r\n };\r\n var positionModal = function () {\r\n if (modalShown) {\r\n if ($('.ng-modal-dialog').height() > ($(window).height() - 50)) {\r\n smallViewPort = false;\r\n }\r\n else {\r\n smallViewPort = true;\r\n }\r\n }\r\n }\r\n if (pageState == 'Batchcodeentry') {\r\n var upcErrorLabels = {\r\n 'length': translations.CoreKelloggs_ErrorIncompleteCode,\r\n 'pattern': translations.CoreKelloggs_ErrorInvalidCode,\r\n 'redeemed': translations.CoreKelloggs_ErrorInvalidCode,\r\n 'empty': translations.CoreKelloggs_ErrorCodeRequired,\r\n 'duplicate': translations.CoreKelloggs_ErrorDuplicateCode,\r\n 'invalid': translations.CoreKelloggs_ErrorInvalidCode\r\n },\r\n hidePromoCodeField,\r\n upcCount = settings.CodesCount,\r\n canImage = (locale == 'ru_RU') ? locale : 'en_GB';\r\n\r\n if (locale == 'lv_LV' || locale == 'bg_bg') {\r\n hidePromoCodeField = true;\r\n }\r\n \r\n $('.topMenuAdimo').keyup(function (e) {\r\n if (e.keyCode == 13) {\r\n $('.topMenuAdimo').click();\r\n e.preventDefault();\r\n }\r\n });\r\n \r\n const _interval1 = setInterval(function () {\r\n setAdimo();\r\n }, 300);\r\n var setAdimo = function () {\r\n if ($('.bg-home-img-cont').length) {\r\n if ((locale == 'en_GB') && document.querySelectorAll('.buy-now').length == 0) {\r\n var buyNowBtn = true;\r\n // setTimeout(function () {\r\n // $(function () {\r\n // Adimo call\r\n window.Adimo.main.init('https://basketads.adimo.co', false);\r\n var strTxt = \"\";\r\n var strTxt1 = \"'Buy Now'\";\r\n $(\".bg-home-img-cont\").after(strTxt);\r\n $('.buy-now-txt').append(strTxt1);\r\n //To add product detail page\t\r\n if ($(\".pack-image span > span\").data('src')) {\r\n var product_image_path = \"\";\r\n product_image_path = $(\".pack-image span > span\").data('src');\r\n var product_id = product_image_path.split('/')[6];\r\n var insertPosition = $(\".kstl-product-description\");\r\n function returnTouchpointID(product_id) {\r\n switch (product_id) {\r\n case 'product_6786220':\r\n //Product - Pringles BBQ 200g\r\n var touchPointId = '344696b0-fd4d-4a19-a7c2-0a2652d75ced';\r\n break;\r\n case 'product_6604916':\r\n //Product - Pringles BBQ 40g\r\n var touchPointId = '1027c729-b269-42e9-93b4-af2b9bf823d7';\r\n break;\r\n case 'product_6574745':\r\n //Product - Pringles Cheese & Onion 200g\r\n var touchPointId = '4be34b8b-2d7e-41b3-9c10-73fbdb218130';\r\n break;\r\n case 'product_6598149':\r\n //Product - Pringles Original 200g\r\n var touchPointId = 'd094270e-ae39-48ba-869f-a58c029a47ed';\r\n break;\r\n case 'product_6589741':\r\n //Product - Pringles Original 40g\r\n var touchPointId = '5e73ef3c-ff83-4288-bb9d-fb5774fec452';\r\n break;\r\n case 'product_6598149':\r\n //Product - Pringles Original 70g\r\n var touchPointId = '114919bf-91e9-4784-9c83-185cf8fdc97f';\r\n break;\r\n case 'product_6581769':\r\n //Product - Pringles Paprika 200g\r\n var touchPointId = '48baf4f8-775f-484d-b25e-c0a811de438d';\r\n break;\r\n case 'product_6589742':\r\n //Product - Pringles Paprika 40g\r\n var touchPointId = '1bbf72dc-c1af-4319-9025-991b733ea5a0';\r\n break;\r\n case 'product_3310719':\r\n //Product - Pringles Prawn Cocktail 200g\r\n var touchPointId = '0af913d6-1b55-4f85-9513-88adfcb31d38';\r\n break;\r\n case 'product_7387674':\r\n //Product - Pringles Rice Katsu Curry 160\r\n var touchPointId = '2b4296b2-1eea-461b-ba8c-75187abc15bd';\r\n break;\r\n case 'product_3311028':\r\n //Product - Pringles Salt & Vinegar 200g\r\n var touchPointId = 'e3e6db4f-220c-4e43-bd11-d69522ff0476';\r\n break;\r\n case 'product_6574775':\r\n //Product - Pringles Salt & Vinegar 40g\r\n var touchPointId = '661a3c38-c47d-42df-8993-c6b2cf90a400';\r\n break;\r\n case 'product_11093244':\r\n //Product - Pringles Sizzl'N Cheese & Chilli 180g\r\n var touchPointId = '72bc4e39-6753-4381-8df6-3d522664d2b7';\r\n break;\r\n case 'product_11092207':\r\n //Product - Pringles Sizzl'N Kickin’ Sour Cream 180g\r\n var touchPointId = '4ec16765-399a-4b8b-86b2-cbc734a4ee0d';\r\n break;\r\n case 'product_11093193':\r\n //Product - Pringles Sizzl'N Spicy BBQ 180g\r\n var touchPointId = '6ec2bfc5-7344-4732-b5ff-830b7c31bfa1';\r\n break;\r\n case 'product_6609590':\r\n //Product - Pringles Smokey Bacon 200g\r\n var touchPointId = '99be6444-9379-459e-93d7-feab9b20187f';\r\n break;\r\n case 'product_6598150':\r\n //Product - Pringles Sour Cream & Onion 200g\r\n var touchPointId = '3a6d9290-66e9-418a-9a09-3fa43c34d46d';\r\n break;\r\n case 'product_3311040':\r\n //Product - Pringles Sour Cream & Onion 40g\r\n var touchPointId = 'f6d13daf-00dc-43b0-a22f-6de85a1ae8a3';\r\n break;\r\n case 'product_6598150':\r\n //Product - Pringles Sour Cream & Onion 70g\r\n var touchPointId = '07c092e9-23bc-4ddf-a0be-547448c300d2';\r\n break;\r\n case 'product_6605707':\r\n //Product - Pringles Steak 200g\r\n var touchPointId = 'e304aea1-d16c-44ba-8bf2-6bf2b3fdc8b2';\r\n break;\r\n case 'product_6926477':\r\n //Product - Rice BBQ Teriyaki 160g\r\n var touchPointId = 'f04c808b-2b1b-446c-b2f4-aef422805421';\r\n break;\r\n case 'product_6926473':\r\n //Product - Rice Malaysian Red Curry 160g\r\n var touchPointId = '6d8d139d-9793-4f15-bb70-9c9fdf2de076';\r\n break;\r\n case 'product_6926471':\r\n //Product - Rice Peking Duck with Hoisin Sauce 160g\r\n var touchPointId = 'ba7eb203-3739-41fd-93a1-c704e4315834';\r\n break;\r\n case 'product_6926475':\r\n //Product - Rice Tandoori Chicken Masala 160g\r\n var touchPointId = '0a299d1e-867f-4bdb-8668-0f7fe1f0ef26';\r\n break;\r\n case 'Product_3978711':\r\n //Product - Tortilla Cheesy Nacho Cheese 160g\r\n var touchPointId = 'e2b0b9de-b750-4084-b19a-d1c4c27a2363';\r\n break;\r\n case 'product_6231074':\r\n //Product - Tortilla Sour Cream 160g\r\n var touchPointId = 'eda72921-1398-41ff-8e55-de8f492955ce';\r\n break;\r\n }\r\n if (touchPointId) {\r\n var strTxtDetailPage = \"
\";\r\n } else {\r\n var strTxtDetailPage = \"\";\r\n }\r\n return strTxtDetailPage;\r\n }\r\n insertPosition.after(returnTouchpointID(product_id));\r\n }\r\n // });\r\n // }, 1000);\r\n\r\n }\r\n clearInterval(_interval1);\r\n }\r\n }\r\n var imageValid = false,\r\n numValid = false,\r\n PromotionIdNotFound = false,\r\n codes = [],\r\n updateBtnOj = getBtnObj,\r\n receiptAdded,\r\n // $anchorScroll,\r\n // modalShown = false,\r\n coordinatesToReturn = {},\r\n lockCrossword = false,\r\n showlanguageSelector = true,\r\n fileName = [];\r\n var setCaptcha = function () {\r\n if ($('#upcCodeForm').length && $('.g-recaptcha-response').length < 1 && typeof window.grecaptcha.render !== 'undefined') {\r\n if (settings.Require_Captcha == \"true\") {\r\n window.grecaptcha.render(\r\n 'g-recaptcha', {\r\n sitekey: '6LeRF1scAAAAAB-yBjJMrzLYSBqNAGjkf2PokFq1',\r\n callback: onSuccess,\r\n 'expired-callback': expCallback,\r\n 'hl': locale.split('_')[0]\r\n }\r\n );\r\n }\r\n clearInterval(_interval);\r\n }\r\n };\r\n _interval = setInterval(function () {\r\n setCaptcha();\r\n }, 300);\r\n\r\n function expCallback() {\r\n window.grecaptcha.reset();\r\n updateBtnOj = JSON.parse(webStorageService.getSessionData('btnObj'))\r\n updateBtnOj[0].validateCaptchaHome = false;\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n\r\n setbtnObj(updateBtnOj);\r\n }\r\n function onSuccess(token) {\r\n updateBtnOj = JSON.parse(webStorageService.getSessionData('btnObj'))\r\n if (token) {\r\n API.verifyCaptchaEnterCode({ token: token, redemptionToken: webStorageService.getSessionData('servToken') }).then(function (res) {\r\n let updateValidateCaptchaHome = (res.status == 'FAILED') ? false : true;\r\n updateBtnOj[0].validateCaptchaHome = updateValidateCaptchaHome;\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n webStorageService.setSessionData('servToken', res.token);\r\n }).catch(function (err) {\r\n HandleError(err.response)\r\n })\r\n }\r\n }\r\n\r\n if (webStorageService.getSessionData('codes') == undefined) {\r\n for (var i = 1; i <= upcCount; i++) {\r\n codes.push({\r\n 'objId': i,\r\n 'id': 'Code' + i,\r\n 'errors': '',\r\n 'labels': 'BatchcodeSection1Label' + i,\r\n 'value': '',\r\n 'uploadId': 'uploadImg' + i,\r\n 'receiptNum': 'receipt' + i,\r\n 'isWritten': false,\r\n 'duplicateKey': -1\r\n });\r\n }\r\n } else {\r\n codes = JSON.parse(webStorageService.getSessionData(\"codes\"));\r\n }\r\n\r\n var uploadReceipt = false;\r\n if (locale.toLowerCase() == 'it_it') {\r\n document.querySelector('body').className = 'activeOverlay Batchcodeentry';\r\n uploadReceipt = true;\r\n if (webStorageService.getSessionData('receiptObj') == undefined) {\r\n fileName = [{\r\n receipt1: {\r\n name: '',\r\n invalid: false,\r\n large: false,\r\n empty: '',\r\n statusFile: '',\r\n statusMsg: '',\r\n showName: false,\r\n file: null\r\n }\r\n }];\r\n } else {\r\n fileName = JSON.parse(webStorageService.getSessionData(\"receiptObj\"));\r\n }\r\n } else {\r\n uploadReceipt = false;\r\n }\r\n\r\n var checkForDuplicates = function (e, index) {\r\n var value = e.target.value.toLowerCase();\r\n for (var i = 0; i < codes.length; i++) {\r\n if (value == codes[i].value.toLowerCase() && i != index && (!codes[i].errors || codes[i].errors == upcErrorLabels.duplicate)) {\r\n codes[i].errors = upcErrorLabels.duplicate;\r\n codes[index].errors = upcErrorLabels.duplicate;\r\n //codes[i].duplicateKey = index;\r\n }\r\n }\r\n // setCodesArr(codes);\r\n }\r\n var verifyDuplicates = function (index) {\r\n var duplicateCount;\r\n for (var i = 0; i < codes.length; i++) {\r\n duplicateCount = 0;\r\n if (i != index && codes[i].errors == upcErrorLabels.duplicate) {\r\n for (var j = 0; j < codes.length; j++) {\r\n if (codes[i].value.toLowerCase() == codes[j].value.toLowerCase() && i != j) {\r\n duplicateCount++;\r\n }\r\n }\r\n if (!duplicateCount && codes[i].errors == upcErrorLabels.duplicate) {\r\n codes[i].errors = '';\r\n }\r\n }\r\n }\r\n\r\n }\r\n var updateErrorKey = function () {\r\n var flag = false;\r\n for (var i = 0; i < codes.length; i++) {\r\n if (codes[i].errors) {\r\n flag = true;\r\n }\r\n }\r\n updateBtnOj[0].anyError = (flag ? true : false);\r\n }\r\n var onBlur = function (index, e) {\r\n // if(!item.$viewValue){\r\n // _setInvalidFieldState(item.$name, 'required');\r\n // }\r\n if (e.target.value.length < e.target.maxLength && e.target.value.length) {\r\n codes[index].errors = upcErrorLabels.length;\r\n } else if (!e.target.value.length) {\r\n codes[index].errors = upcErrorLabels.empty;\r\n updateBtnOj[0].isEmpty = true;\r\n } else {\r\n updateBtnOj[0].isEmpty = false;\r\n }\r\n updateErrorKey();\r\n codes[index].isWritten = true;\r\n webStorageService.setSessionData(\"codes\", codes);\r\n setCodesArrObj(codes);\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n // alignVertically();\r\n };\r\n var userInput = function (e, index) {\r\n codes[index].value = e.target.value;\r\n if (e.target.value == 0 && (codes[index].isWritten || codes[index].errors)) {\r\n codes[index].errors = upcErrorLabels.empty;\r\n }\r\n else if (codes[index].isWritten || codes[index].errors) {\r\n let transformedInput = e.target.value.replace(/[^a-zA-Z0-9]/g, ''); \r\n e.target.value = transformedInput\r\n if (e.target.value.length < e.target.maxLength) {\r\n codes[index].errors = upcErrorLabels.length;\r\n updateErrorKey();\r\n }\r\n verifyDuplicates(index);\r\n updateBtnOj[0].isEmpty = false;\r\n }\r\n if (e.target.value.length == e.target.maxLength) {\r\n e.preventDefault();\r\n } else if (e.target.value.length > e.target.maxLength) {\r\n // Maximum exceeded\r\n e.target.value = e.target.value.substring(0, e.target.maxLength);\r\n }\r\n if (e.target.value.length == e.target.maxLength) {\r\n codes[index].errors = '';\r\n checkForDuplicates(e, index);\r\n updateErrorKey();\r\n }\r\n webStorageService.setSessionData(\"codes\", codes);\r\n setCodesArrObj(codes);\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n // alignVertically();\r\n }\r\n var _setStatuses = function (response) {\r\n var valid = true,\r\n statusesArr = response.result,\r\n statusCheck = true,\r\n imageResponse = uploadReceipt ? response.imageResult : '',\r\n receiptNum, scrollElement, filename;\r\n codes = webStorageService.getSessionData(\"codes\") ? JSON.parse(webStorageService.getSessionData(\"codes\")) : '';\r\n filename = webStorageService.getSessionData(\"receiptObj\") ? JSON.parse(webStorageService.getSessionData(\"receiptObj\")) : '';\r\n if (uploadReceipt && !!imageResponse) {\r\n for (i = 0; i < imageResponse.length; i++) {\r\n if (imageResponse[i].Status.toLowerCase() == 'failed') {\r\n valid = false;\r\n if (Require_Captcha === \"true\") {\r\n window.grecaptcha.reset();\r\n updateBtnOj[0].validateCaptchaHome = false;\r\n // setbtnObj({...btnObj,validateCaptchaHome:false});\r\n }\r\n $('.upload-img').eq(i).val(null);\r\n receiptNum = 'receipt' + (i + 1);\r\n filename[0][receiptNum].statusFile = true;\r\n filename[0][receiptNum].showName = false;\r\n receiptAdded = false;\r\n filename[0][receiptNum].statusMsg = imageResponse[i].Message;\r\n filename[0][receiptNum].file = null;\r\n filename[0][receiptNum].name = '';\r\n webStorageService.setSessionData('receiptObj', filename);\r\n setFileNameObj(filename);\r\n //someCtrlFn(receiptNum, null, false);\r\n if (statusCheck) {\r\n scrollElement = 'uploadReceipt' + (i + 1);\r\n statusCheck = false;\r\n }\r\n }\r\n }\r\n }\r\n for (i = 0; i < statusesArr.length; i++) {\r\n if (statusesArr[i].status.toLowerCase() != 'valid') {\r\n updateBtnOj[0].anyError = true;\r\n updateBtnOj[0].validResponse = false;\r\n\r\n if (Require_Captcha === \"true\") {\r\n window.grecaptcha.reset();\r\n updateBtnOj[0].validateCaptchaHome = false;\r\n // validateCaptchaHome = false;\r\n // setbtnObj(updateBtnOj);\r\n\r\n }\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n codes[i].errors = upcErrorLabels[statusesArr[i].status.toLowerCase()];\r\n valid = false;\r\n if (statusCheck) {\r\n scrollElement = 'Code' + (i + 1);\r\n statusCheck = false;\r\n // $anchorScroll.yOffset = 100;\r\n }\r\n }\r\n }\r\n if (!statusCheck) {\r\n // $anchorScroll(scrollElement);\r\n // $('#' + scrollElement).focus();\r\n }\r\n webStorageService.setSessionData(\"codes\", codes);\r\n setCodesArrObj(codes);\r\n\r\n //$location.hash(scrollElement);\r\n // call $anchorScroll()\r\n // alignVertically();\r\n return valid;\r\n }\r\n var sendForm = function (e) {\r\n e.preventDefault();\r\n receiptAdded = (uploadReceipt) ? checkEntries() : true;\r\n if (!receiptAdded) {\r\n setTimeout(function () {\r\n if ($('.blank-msg').eq(0).length > 0) {\r\n var elem = $('.blank-msg').eq(0).closest('.upload-receipt').attr('id');\r\n // $anchorScroll(elem);\r\n }\r\n }, 300);\r\n } else {\r\n updateBtnOj[0].sended = true;\r\n updateBtnOj[0].validResponse = true;\r\n updateBtnOj[0].validateCaptchaHome = false;\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n\r\n var form = new FormData(),\r\n data, codesArr = [],\r\n codesInput = webStorageService.getSessionData(\"codes\") ? JSON.parse(webStorageService.getSessionData(\"codes\")) : '',\r\n filenameVal = webStorageService.getSessionData(\"receiptObj\") ? JSON.parse(webStorageService.getSessionData(\"receiptObj\")) : '';\r\n\r\n for (var i = 0; i < codesInput.length; i++) {\r\n codesArr[i] = $.trim(codesInput[i].value).toUpperCase();\r\n }\r\n if (locale.toLowerCase() == 'it_it') {\r\n for (var i = 0; i < 1; i++) {\r\n\r\n // form.append('receipt[]', filenameVal[0]['receipt' + (i + 1)].file);\r\n form.append('PartNumber', filenameVal[0]['receipt' + (i + 1)].file);\r\n\r\n }\r\n for (var i = 0; i < codesArr.length; i++) {\r\n\r\n form.append('Codes[]', codesArr[i]);\r\n }\r\n data = form;\r\n } else {\r\n data = codesArr;\r\n }\r\n API.checkUpcCodes(data, webStorageService.getSessionData('servToken')).then(function (response) {\r\n updateBtnOj[0].sended = false;\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n if (!!response.result && response.result.length > 0) {\r\n if (_setStatuses(response) && response.token) {\r\n webStorageService.setSessionData('servToken', response.token);\r\n // if (locale.toLowerCase() != 'lv_lv' && locale.toLowerCase() != 'bg_bg') {\r\n // dataLayers().packCodeData();\r\n // }\r\n if (locale.toLowerCase() === 'ru_ru') {\r\n var shipObj = webStorageService.getSessionData('shippingInfoObj');\r\n var shippingInfoObj = {\r\n 'redemption-token': response.token,\r\n 'shippingDetails': {\r\n name: shipObj.shippingDetails.name,\r\n lastName: shipObj.shippingDetails.lastName,//formObj.LastName,\r\n address1: shipObj.shippingDetails.address1,//formObj.Address1,\r\n address2: shipObj.shippingDetails.address2,//formObj.Address2,\r\n city: shipObj.shippingDetails.city,//formObj.City,\r\n postCode: shipObj.shippingDetails.postCode,//formObj.PostalCode,\r\n state: shipObj.shippingDetails.state,\r\n Email: shipObj.shippingDetails.Email,\r\n terms: shipObj.shippingDetails.terms,\r\n subscription: shipObj.shippingDetails.subscription,\r\n phone: shipObj.shippingDetails.phone,\r\n country: shipObj.shippingDetails.country// resourceService.getCountryCode().toLowerCase() // add russia\r\n }\r\n };\r\n }\r\n else {\r\n var grm = webStorageService.getSessionData('grmUser');\r\n var shippingInfoObj = {\r\n 'redemption-token': webStorageService.getSessionData('servToken'),\r\n 'shippingDetails': grm\r\n };\r\n }\r\n\r\n /*sended = true;*/\r\n\r\n API.orderAward(shippingInfoObj).then(function (response) {\r\n // sended = false;\r\n /*disableRegister = false;*/\r\n if (response.token) {\r\n // var token = response.token;\r\n webStorageService.setSessionData('servToken', response.token);\r\n webStorageService.setLocalData('servToken', response.token);\r\n } else {\r\n webStorageService.removeSessionData('servToken');\r\n }\r\n if (response.redirect) {\r\n updateBtnOj[0].validResponse = false;\r\n webStorageService.setSessionData('btnObj', updateBtnOj);\r\n setbtnObj(updateBtnOj);\r\n var winnerObj = {};\r\n if (response.redirect.toLowerCase().indexOf('thankyou') > -1) {\r\n if (response.Winner !== undefined && response.Winner !== null) {\r\n winnerObj = {\r\n winner: response.Winner,\r\n winnerCopy: response.winnerCopy,\r\n isExtendedPhase: response.ExtendedPhase,\r\n refCode: response.RefCode\r\n }\r\n //dataLayers().orderData(response.Winner);\r\n }\r\n }\r\n if (response.redirect.indexOf('limit') > -1) {\r\n webStorageService.setSessionData('limitType', response.message);\r\n }\r\n handleRoute(response.redirect, winnerObj);\r\n } else {\r\n // $location.path(locale + '/Error');\r\n }\r\n }).catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n }\r\n\r\n }\r\n }).catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n }\r\n };\r\n // var onClick = function (clicks) {\r\n // clicks = clicks;\r\n // this.options.registerClicks(clicks);\r\n // }\r\n var checkEntries = function () {\r\n receiptAdded = true;\r\n let filenameVal = webStorageService.getSessionData(\"receiptObj\") ? JSON.parse(webStorageService.getSessionData(\"receiptObj\")) : [{\r\n receipt1: {\r\n name: '',\r\n invalid: false,\r\n large: false,\r\n empty: '',\r\n statusFile: '',\r\n statusMsg: '',\r\n showName: false,\r\n file: null\r\n }\r\n }];\r\n for (var key in filenameVal[0]) {\r\n if (filenameVal[0][key].name.length < 1) {\r\n filenameVal[0][key].empty = true;\r\n filenameVal[0][key].invalid = false;\r\n filenameVal[0][key].large = false;\r\n filenameVal[0][key].statusFile = false;\r\n } else {\r\n filenameVal[0][key].empty = false;\r\n }\r\n if (filenameVal[0][key].file == null) {\r\n receiptAdded = false;\r\n }\r\n }\r\n webStorageService.setSessionData('receiptObj', filenameVal);\r\n setFileNameObj(filenameVal);\r\n return receiptAdded;\r\n }\r\n // var someCtrlFn = function (arg1, arg2, field) {\r\n // var validEntry = true;\r\n // filename[arg1].file = arg2;\r\n // imageValid = false;\r\n // if (field) {\r\n // filename[arg1].statusFile = false;\r\n // }\r\n // receiptAdded = true;\r\n // };\r\n\r\n var onTextChange = function (e, index) {\r\n var $el = $(e.target);\r\n var maxLength = $el.attr('maxLength');\r\n maxLength = maxLength ? maxLength : 19;\r\n };\r\n var onUploadClick = function ($event) {\r\n $event.preventDefault();\r\n var triggerEl = $('#' + $($event.target).data('clickfor'));\r\n triggerEl.trigger('click');\r\n };\r\n var validType = ['image/jpeg', 'image/jpg', 'image/gif', 'image/png']\r\n , validSize = 5;\r\n var onChangeReceipt = function (event) {\r\n const reader = new FileReader();\r\n let file = event.target.files[0],\r\n elementName = event.target.name;\r\n fileName[0][elementName].name = '';\r\n fileName[0][elementName].invalid = false;\r\n fileName[0][elementName].size = false;\r\n fileName[0][elementName].showName = false;\r\n fileName[0][elementName].statusFile = false;\r\n fileName[0][elementName].large = false;\r\n fileName[0][elementName].empty = false;\r\n\r\n if (file == undefined) {\r\n file = null;\r\n }\r\n else if (validType.indexOf(file.type) < 0) {\r\n event.target.value = null;\r\n file = null;\r\n fileName[0][elementName].invalid = true;\r\n fileName[0][elementName].large = false;\r\n }\r\n else if ((file.size) / (1024 * 1024) > validSize) {\r\n event.target.value = null;\r\n file = null;\r\n fileName[0][elementName].invalid = false;\r\n fileName[0][elementName].large = true;\r\n }\r\n else {\r\n fileName[0][elementName].name = file.name;\r\n fileName[0][elementName].showName = true;\r\n // dataLayers().imageUpload()\r\n }\r\n reader.addEventListener(\"load\", function () {\r\n // convert image file to base64 string\r\n fileName[0][elementName].file = reader.result;\r\n webStorageService.setSessionData('receiptObj', fileName);\r\n setFileNameObj(fileName);\r\n }, false);\r\n\r\n if(file){\r\n reader.readAsDataURL(file);\r\n }else{\r\n setFileNameObj(fileName);\r\n }\r\n\r\n }\r\n var isOutOfHours = webStorageService.getSessionData('pageState') ?\r\n webStorageService.getSessionData('pageState') === 'Outofhours' : false;\r\n //isOutOfHours=true;\r\n // if (isOutOfHours) dataLayers().OutOfHours();\r\n var goToPringlesSite = function () {\r\n // dataLayers().goToPringles('Out of Hours Page');\r\n };\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Batchcodeentry');\r\n\r\n }\r\n\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{translations.LoginPageHeading}

\r\n

{translations.LoginPageDescription}

\r\n\r\n {/*

\r\n **{translations.CoreKelloggs_TncApply}\r\n

*/}\r\n\r\n
\r\n
\r\n
\r\n

{translations.BatchcodeSectionInstruction}

\r\n

{translations.BatchcodeSectionInstruction1}

\r\n {\r\n codes.map(function (code, index) {\r\n return (\r\n
\r\n \r\n\r\n
\r\n

\r\n {codesArrObj[index].errors}\r\n

\r\n
\r\n
\r\n userInput(e, index)}\r\n onBlur={(e) => onBlur(index, e)}\r\n className={codesArrObj[index].errors && 'ng-error'}\r\n onKeyUp={(e) => onTextChange(e, index)}\r\n title={translations.CoreKelloggs_EnterCodeInputFieldTitle} />\r\n\r\n
\r\n {\r\n isShowReceiptField &&
\r\n

\r\n {translations.CoreKelloggs_UploadImageHeader}\r\n

\r\n {fileNameObj[0][code.receiptNum].invalid && {translations.CoreKelloggs_UploadImageTypeError}}\r\n {fileNameObj[0][code.receiptNum].large && {translations.CoreKelloggs_UploadImageSizeError}}\r\n {fileNameObj[0][code.receiptNum].empty && {translations.CoreKelloggs_UploadImageMandatoryError}}\r\n {fileNameObj[0][code.receiptNum].statusFile && {fileNameObj[0][code.receiptNum].statusMsg}}\r\n {fileNameObj[0][code.receiptNum].showName && {fileNameObj[0][code.receiptNum].name}\r\n }\r\n \r\n
\r\n }\r\n
\r\n )\r\n })\r\n }\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n (locale == 'en_GB' ) &&

Need another Pringles can?
You are just a click away.

\r\n }\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{translations.CoreKelloggs_CodehelpSection1Title}

\r\n \r\n {/* */}\r\n \r\n \r\n {/* */}\r\n {translations.CanImageAltText}\r\n \r\n

{translations.CodehelpSection1Instruction}

\r\n
\r\n
\r\n
\r\n {modalShown &&
\r\n {modalShown &&
\r\n
toggleModal(event)}>
\r\n
\r\n
toggleModal(event)}>
\r\n
\r\n
\r\n {translations.CoreKelloggs_Uploadimageinstructionsheading &&

{translations.UploadImageInstructions}

}\r\n
\r\n
\r\n

{translations.UploadImageStep1}

\r\n

{translations.UploadImageStep2}

\r\n

{translations.UploadImageStep3}

\r\n
\r\n
\r\n
\r\n
}\r\n
}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Batchcode;\r\n\r\n\r\n","import React, { useContext } from 'react';\r\nimport { Redirect } from \"react-router-dom\";\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport { locale, MetaTags, pageScroll } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Movie() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Movie') {\r\n return \r\n }\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Movie');\r\n\r\n return (\r\n <>\r\n \r\n
\r\n

{translations.CoreKelloggs_ChooseMoviePageTitle}

\r\n Movie Page\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Movie;","import React, { useState, useContext } from 'react';\r\nimport { Redirect } from \"react-router-dom\";\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport { locale, MetaTags, $, pageScroll } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Wordsearch() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Wordsearch') {\r\n return \r\n }\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Wordsearch');\r\n\r\n // Initial state of letters\r\n var letters = [],\r\n Crossword = [],\r\n // Initial state of words\r\n words = [],\r\n Words = [],\r\n wordMustBeChecked = true,\r\n isFinishEnable = function () { },\r\n coordinatesToReturn = {},\r\n lockCrossword = false,\r\n wordCompleted,\r\n CrossWordService = {\r\n finishCb: null,\r\n finishErrorCb: null,\r\n token: null,\r\n timerecorder: (function () {\r\n var startdate = new Date();\r\n var set = false;\r\n var end = false;\r\n var enddate = new Date();\r\n return function (state) {\r\n var ResultSolutionTimeSeconds = enddate - startdate;\r\n if (!set) {\r\n startdate = new Date();\r\n set = true;\r\n return startdate;\r\n }\r\n if (state == 'stop' && !end) {\r\n enddate = new Date();\r\n end = true;\r\n return enddate;\r\n }\r\n // startdate = '', set = false, end = false, enddate = ''; \r\n return ResultSolutionTimeSeconds;\r\n };\r\n })(),\r\n haveFinalDetails: function () {\r\n return Crossword.length > 0 && Words.length > 0;\r\n },\r\n setLetters: function (lettersToSet) {\r\n try {\r\n Crossword = JSON.parse(lettersToSet);\r\n } catch (e) {\r\n // Console.log(\"Bad letters format from backend\");\r\n }\r\n },\r\n setWords: function (wordsToSet) {\r\n try {\r\n var wordsArr = JSON.parse(wordsToSet);\r\n Words = [];\r\n for (var i = 0; i < wordsArr.length; i++) {\r\n if (locale.toLowerCase() == \"ka_ge\") {\r\n Words.push({\r\n word: wordsArr[i].toLowerCase(),\r\n isScratched: false\r\n });\r\n }\r\n else {\r\n Words.push({\r\n word: wordsArr[i].toUpperCase(),\r\n isScratched: false\r\n });\r\n }\r\n }\r\n } catch (e) {\r\n // Console.log(\"Bad words format from backend\");\r\n }\r\n },\r\n getLetters: function () {\r\n return letters;\r\n },\r\n getWords: function () {\r\n return words;\r\n },\r\n isFinishEnable: function (cb) {\r\n isFinishEnable = cb;\r\n // Return isFinishEnable;\r\n },\r\n finishCrossWord: function () {\r\n // var token = this.token;\r\n // var result = $q.defer();\r\n var answers = [];\r\n $('.ng-isolate-scope').removeClass(\"ng-hide\");\r\n for (var k in coordinatesToReturn) {\r\n answers.push({\r\n // Column: k,\r\n // Rows: coordinatesToReturn[k]\r\n Row: k,\r\n Columns: coordinatesToReturn[k]\r\n });\r\n }\r\n // dataService\r\n // .postCrossword(\r\n // { answers: answers, SolutionTimeSeconds: CrossWordService.timerecorder() },\r\n // accessService.getToken()\r\n // )\r\n // .then(function(data) {\r\n // // Result.resolve(data);\r\n // // DataRedirectPage = data.RedirectPage;\r\n // /* if(data.RedirectPage == \"win-1\" || data.RedirectPage == \"win-2\" || data.RedirectPage == \"win-3\" || data.RedirectPage == \"win-4\" || data.RedirectPage == \"win-5\") {\r\n // dataLayers().entryComplete('Winner');\r\n // accessService.setPermission('win', true)\r\n // $location.path(\"/\"+locale+\"/win\")\r\n // // console.log('redirect to win');\r\n // } else if (data.RedirectPage == \"lose\") {\r\n // dataLayers().entryComplete('Not a Winner');\r\n // accessService.setPermission('lose', true)\r\n // $location.path(\"/\"+locale+\"/lose\")\r\n // //console.log('redirect to lose');\r\n // } */\r\n // // dataLayers().wordSearchComplete();\r\n // // Crossword = [];\r\n // // Words = [];\r\n // // accessService.setPermission('thankyou', true);\r\n // dataLayers().wordSearchComplete();\r\n // accessService.setPermission('limit', true);\r\n // if(data.response.RedirectUrl.toLowerCase().indexOf('lose')>-1){\r\n // accessService.setPermission('lose', true);\r\n // }\r\n // if(data.response.RedirectUrl.toLowerCase().indexOf('win')>-1){\r\n // accessService.setPermission('win', true);\r\n // }\r\n // if(data.response.RedirectUrl.toLowerCase().indexOf('thankyou')>-1){\r\n // // (locale.toLowerCase() == 'mk_mk') ? dataLayers().orderData(16) : dataLayers().orderData(97);\r\n // winner = 97;\r\n // dataLayers().orderData(winner);\r\n // accessService.setPermission('thankyou', true);\r\n // }\r\n // $location.path(data.response.RedirectUrl);\r\n // // Console.log('data', data);\r\n // /* },function(reason){\r\n // if(reason.RedirectPage === \"error\" && reason.ErrorMessage.indexOf(\"102\")>-1) {\r\n // dataLayers().entryComplete('Not a Winner');\r\n // accessService.setPermission('lose', true)\r\n // $location.path(\"/\"+locale+\"/lose\")\r\n // } else {\r\n // result.reject(false);\r\n // } */\r\n // })\r\n // .catch(function(error) {\r\n // errorService.handleError(error);\r\n // });\r\n // Result.promise.then(this.finishCb, this.finishErrorCb);\r\n // return result.promise;\r\n },\r\n setFinishCallback: function (fn, fnError, token) {\r\n this.finishCb = fn;\r\n this.finishErrorCb = fnError;\r\n this.token = token;\r\n },\r\n start: null,\r\n getScrachedWord: null\r\n },\r\n customMerg = function (obj1, obj2, obj3) {\r\n if (typeof obj2 !== 'object') {\r\n if (!obj1[obj2]) {\r\n obj1[obj2] = [];\r\n }\r\n obj1[obj2].push(obj3);\r\n return false;\r\n }\r\n for (var i in obj2) {\r\n if (!obj1[i]) {\r\n obj1[i] = [];\r\n }\r\n for (var j = 0; j < obj2[i].length; j++) {\r\n if (obj1[i].indexOf(obj2[i][j]) == -1) {\r\n obj1[i].push(obj2[i][j]);\r\n }\r\n }\r\n }\r\n };\r\n // Detect if scrached word is correct\r\n CrossWordService.getScrachedWord = function (posStart, posEnd) {\r\n var scrachedWord = '';\r\n var lettersCoordinates = {};\r\n if (posStart.x == posEnd.x) {\r\n var start = posStart.y > posEnd.y ? posEnd.y : posStart.y;\r\n var end = posStart.y > posEnd.y ? posStart.y : posEnd.y;\r\n for (var i = start; i <= end; i++) {\r\n scrachedWord += letters[i][posStart.x];\r\n customMerg(lettersCoordinates, i, posStart.x);\r\n }\r\n } else if (posStart.y == posEnd.y) {\r\n var start = posStart.x > posEnd.x ? posEnd.x : posStart.x;\r\n var end = posStart.x > posEnd.x ? posStart.x : posEnd.x;\r\n for (var i = start; i <= end; i++) {\r\n scrachedWord += letters[posStart.y][i];\r\n customMerg(lettersCoordinates, posStart.y, i);\r\n }\r\n } else if (Math.abs(posStart.x - posEnd.x) == Math.abs(posStart.y - posEnd.y)) {\r\n var start = posStart.x > posEnd.x ? posEnd : posStart;\r\n var end = posStart.x > posEnd.x ? posStart : posEnd;\r\n for (var i = 0; i <= end.x - start.x; i++) {\r\n if (start.y < end.y) {\r\n scrachedWord += letters[start.y + i][start.x + i];\r\n customMerg(lettersCoordinates, start.y + i, start.x + i);\r\n } else {\r\n scrachedWord += letters[start.y - i][start.x + i];\r\n customMerg(lettersCoordinates, start.y - i, start.x + i);\r\n }\r\n }\r\n }\r\n if (wordMustBeChecked) {\r\n if (\r\n checkWord(scrachedWord, posStart, posEnd, function () {\r\n customMerg(coordinatesToReturn, lettersCoordinates);\r\n })\r\n ) {\r\n // Nothing\r\n }\r\n } else if (scrachedWord != '') {\r\n words.push({\r\n word: scrachedWord,\r\n isScratched: true,\r\n start: {\r\n x: posStart.x,\r\n y: posStart.y\r\n },\r\n end: {\r\n x: posEnd.x,\r\n y: posEnd.y\r\n }\r\n });\r\n customMerg(coordinatesToReturn, lettersCoordinates);\r\n isFinishEnable();\r\n }\r\n };\r\n // Detect if scrached word is on the words list\r\n\r\n var checkWord = function (word, posStart, posEnd, cb) {\r\n var count = 0,\r\n result = false,\r\n start,\r\n end,\r\n starty;\r\n for (var i = 0; i < words.length; i++) {\r\n if (\r\n !words[i].isScratched &&\r\n (words[i].word.trim() == word ||\r\n words[i].word.trim() ==\r\n word\r\n .split('')\r\n .reverse()\r\n .join(''))\r\n ) {\r\n words[i].isScratched = true;\r\n var wordChecked = words[i].word.trim().toLowerCase();\r\n $('.' + wordChecked)\r\n .addClass('wodrIsChecked')\r\n .append('');\r\n words[i].start = {\r\n x: posStart.x,\r\n y: posStart.y\r\n };\r\n words[i].end = {\r\n x: posEnd.x,\r\n y: posEnd.y\r\n };\r\n count++;\r\n if (posStart.x == posEnd.x) {\r\n start = Math.min(posStart.y, posEnd.y);\r\n end = Math.max(posStart.y, posEnd.y);\r\n for (var j = start; j <= end; j++) {\r\n $(\r\n 'tr:nth-child(' + (j + 1) + ') td:nth-child(' + (posStart.x + 1) + ')'\r\n ).css({ color: '#fff' });\r\n }\r\n } else if (posStart.y == posEnd.y) {\r\n start = Math.min(posStart.x, posEnd.x);\r\n end = Math.max(posStart.x, posEnd.x);\r\n for (var j = start; j <= end; j++) {\r\n $(\r\n 'tr:nth-child(' + (posStart.y + 1) + ') td:nth-child(' + (j + 1) + ')'\r\n ).css({ color: '#fff' });\r\n }\r\n } else {\r\n var z = 1;\r\n start = Math.min(posStart.x, posEnd.x);\r\n end = Math.max(posStart.x, posEnd.x);\r\n starty = Math.min(posStart.y, posEnd.y);\r\n if (\r\n (posStart.x > posEnd.x && posStart.y > posEnd.y) ||\r\n (posStart.x < posEnd.x && posStart.y < posEnd.y)\r\n ) {\r\n for (var j = start; j <= end; j++) {\r\n $(\r\n 'tr:nth-child(' + (starty + z) + ') td:nth-child(' + (j + 1) + ')'\r\n ).css({ color: '#fff' });\r\n z++;\r\n }\r\n } else {\r\n for (var j = end; j >= start; j--) {\r\n $(\r\n 'tr:nth-child(' + (starty + z) + ') td:nth-child(' + (j + 1) + ')'\r\n ).css({ color: '#fff' });\r\n z++;\r\n }\r\n }\r\n }\r\n result = true;\r\n } else if (words[i].isScratched) {\r\n count++;\r\n }\r\n }\r\n if (word.isScratched) {\r\n }\r\n if (result) {\r\n cb();\r\n }\r\n // If(count==words.length){\r\n\r\n if (count == 10) {\r\n isFinishEnable();\r\n CrossWordService.timerecorder('stop');\r\n //$('.text .button').removeClass('inactive');\r\n wordCompleted = true;\r\n if (lockCrossword === false) {\r\n CrossWordService.finishCrossWord();\r\n lockCrossword = true;\r\n }\r\n // CrossWordService.finishCrossWord();\r\n // dataLayers().crosswordSend();\r\n // finishCrossWord();\r\n }\r\n return result;\r\n };\r\n // $('.crossword .button').on(\"click\", function () {\r\n // ret.finishCrossWord();\r\n // // dataLayers().crosswordSend();\r\n // });\r\n CrossWordService.start = function () {\r\n letters = Crossword;\r\n words = Words;\r\n };\r\n\r\n wordCompleted = false;\r\n var crosswordQueryStr = (window.location.href).substr((window.location.href).lastIndexOf('/') + 1),\r\n crosswordUuidStr = crosswordQueryStr.indexOf(\"?\") > 0 ? crosswordQueryStr.split(\"?\")[0] : crosswordQueryStr,\r\n crosswordUuid = crosswordQueryStr ? crosswordUuidStr : null;\r\n $('html, body').animate(\r\n {\r\n scrollTop: $('.wordsearchpage').offset().top\r\n },\r\n 2000\r\n );\r\n // Private variables\r\n var kraveHorrorWinUrl = '/win';\r\n var kraveHorrorLoseUrl = locale + '/lose';\r\n var kraveHorrorUrl = locale + '/Error',\r\n // Public variables\r\n isStarted = false,\r\n isFinishEnable = false,\r\n isTipVisible = true;\r\n // Private methods\r\n document.getElementById('crossword').onselectstart = function () {\r\n return false;\r\n };\r\n document.getElementById('crossword').onmousedown = function () {\r\n return false;\r\n };\r\n // Public methods\r\n var startCrossWord = function () {\r\n CrossWordService.start();\r\n isStarted = true;\r\n if (typeof crosswordControl.turnOn === 'function')\r\n crosswordControl.turnOn();\r\n if (typeof crosswordControl.redraw === 'function')\r\n crosswordControl.redraw();\r\n };\r\n // accessService.setPermission('limit', false);\r\n // accessService.setPermission('closed', false);\r\n CrossWordService.timerecorder();\r\n CrossWordService.setFinishCallback(\r\n function (data) {\r\n // If(data.result==true){\r\n // accessService.setPermission(kraveHorrorWinUrl);\r\n // $location.path(kraveHorrorWinUrl);\r\n // console.log(data.result);\r\n // }else{\r\n // accessService.setPermission(kraveHorrorLoseUrl);\r\n // $location.path(kraveHorrorLoseUrl);\r\n // console.log(data.result);\r\n // }\r\n },\r\n function (reason) {\r\n window.location.href = ('/' + locale + '/error');\r\n },\r\n // accessService.getToken()\r\n );\r\n /* finishCrossWord = function(){\r\n if(!isFinishEnable){\r\n return false;\r\n }\r\n CrossWordService.finishCrossWord(accessService.getToken()).then(function(data){\r\n if(data.result==true){\r\n accessService.grantPermission(kraveHorrorWinUrl);\r\n $location.path(kraveHorrorWinUrl);\r\n console.log(data.result);\r\n }else{\r\n accessService.grantPermission(kraveHorrorLoseUrl);\r\n $location.path(kraveHorrorLoseUrl);\r\n console.log(data.result);\r\n }\r\n }, function(reason){\r\n $location.path(\"/\"+locale+\"/error\");\r\n });\r\n };\r\n */\r\n var closeTip = function () {\r\n isTipVisible = false;\r\n };\r\n // This variable will be pass to directive\r\n var crosswordControl = {};\r\n // Init\r\n // if(!LocalizationService.isGoldenSpoonModule()){\r\n // $location.path('/Error');\r\n // return false;\r\n // }\r\n // console.log('token', accessService.getToken());\r\n // if(!CrossWordService.haveFinalDetails()){\r\n /* RequestService.Post({}, \"api/\" + locale + \"/crossword\", \"get\", accessService.getToken()) */\r\n // dataService\r\n // .getCrossword(accessService.getToken())\r\n // .then(function (data) {\r\n // if (data.crossword) {\r\n // CrossWordService.setLetters(data.crossword);\r\n // CrossWordService.setWords(data.words);\r\n // var wordsFromArr = JSON.parse(data.words),\r\n // wordsFrom = '';\r\n // for (var i = 0; i < wordsFromArr.length; i++) {\r\n // if (locale.toLowerCase() == \"ka_ge\") {\r\n // wordsFrom +=\r\n // '

' +\r\n // wordsFromArr[i].toLowerCase() +\r\n // '

';\r\n // }\r\n // else {\r\n // wordsFrom +=\r\n // '

' +\r\n // wordsFromArr[i].toUpperCase() +\r\n // '

';\r\n // }\r\n // }\r\n // wordsFrom = wordsFrom;\r\n // // Console.log(data.Words)\r\n // CrossWordService.start();\r\n // isStarted = true;\r\n // if (typeof crosswordControl.turnOn === 'function')\r\n // crosswordControl.turnOn();\r\n // if (typeof crosswordControl.redraw === 'function')\r\n // crosswordControl.redraw();\r\n // } else {\r\n // kraveHorrorUrl = locale + '/Error';\r\n // }\r\n // /* }, function(reson) {\r\n // $location.path(locale + \"/Error\"); */\r\n // })\r\n // .catch(function (error) {\r\n // errorService.handleError(error);\r\n // });\r\n // }\r\n // pass callback function to the service\r\n CrossWordService.isFinishEnable(function () {\r\n // $apply(function () {\r\n // isFinishEnable = true;\r\n // });\r\n });\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n

{translations.WordSearchPageTitle}

\r\n

{translations.WordSearchSubHeading}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{translations.WordsToFind}

\r\n {/*

{wordsFrom}

*/}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Wordsearch;","import React, { useContext } from 'react';\r\nimport { Redirect, useHistory } from \"react-router-dom\";\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport * as API from '../Utility/ApiCalls'\r\nimport { locale, MetaTags, $, pageScroll } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport ErrorProvider from '../Utility/ErrorProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\n\r\nfunction Puzzle() {\r\n const { translations } = useContext(JsonContext);\r\n const { HandleError } = ErrorProvider();\r\n const history = useHistory();\r\n\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Puzzle') {\r\n return \r\n }\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Puzzle');\r\n\r\n // setTimeout(function () {\r\n // $('html, body').animate({\r\n // scrollTop: $('.puzzle-container').offset().top - 100\r\n // }, 2000);\r\n // }, 2000);\r\n // accessService.setPermission('batchcode', false);\r\n // accessService.setPermission('register', false);\r\n // accessService.setPermission('login', false);\r\n\r\n var vm = this,\r\n postKey = [],\r\n imgSrc = (window.innerWidth <= 1024) ? '/Content/img/puzzle/mindpopping2022-puzzle-kv-250x250.jpg' : '/Content/img/puzzle/mindpopping2022-puzzle-kv-350x350.jpg',cardIndex,skillToken,answers;\r\n // cardIndex = Object.values([2, 4, 1, 3]);\r\n API.getPuzzle(webStorageService.getSessionData(\"servToken\")).then(function (data) {\r\n cardIndex = Object.values(data.puzzle);\r\n skillToken = data.token;\r\n webStorageService.setSessionData(\"servToken\",data.token);\r\n var genRanNo = function () {\r\n return Math.floor(100000 + Math.random() * 900000);\r\n }\r\n /*\r\n * Make encrypted array for puzzle tile poistions--@shivam\r\n */\r\n for (var index1 = 0; index1 < 6; index1++) {\r\n var randomNo = genRanNo().toString();\r\n var rplacedNo = randomNo.substring(0, cardIndex[index1]) + cardIndex[index1] + randomNo.substring(cardIndex[index1] + 1);\r\n postKey[index1] = rplacedNo;\r\n }\r\n answers = [postKey[0], postKey[1], postKey[2], postKey[3], postKey[4], postKey[5], genRanNo().toString()];\r\n var generatePuzzle = function generatePuzzle() {\r\n if (cardIndex != undefined) {\r\n $('.main-wrapper .container.puzzle #puzzleContainer').css('display', 'block');\r\n if ($('.hiding').length > 0) {\r\n $('.hiding').addClass('hide');\r\n }\r\n handlePuzzle(cardIndex,translations);\r\n clearInterval(_interval);\r\n }\r\n }\r\n var _interval = setInterval(function () {\r\n generatePuzzle();\r\n }, 300);\r\n\r\n }).catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n $('.main-wrapper .container.puzzle #puzzleContainer').css('display', 'block');\r\n const handlePuzzle = (cardIndex,translations)=> {\r\n (function ($) {\r\n /*\r\n * jqPuzzle - Sliding Puzzles with jQuery\r\n * Version 1.02\r\n * \r\n * Copyright (c) 2008 Ralf Stoltze, http://www.2meter3.de/jqPuzzle/\r\n * Dual-licensed under the MIT and GPL licenses.\r\n */\r\n $.fn.jqPuzzle = function (settings, texts) {\r\n \r\n // default settings\r\n var defaults = {\r\n \r\n rows: 2, // number of rows [3 ... 9]\r\n cols: 2, // number of columns [3 ... 9]\r\n hole: 4, // initial hole position [1 ... rows*columns]\r\n shuffle: false, // initially show shuffled pieces [true|false]\r\n numbers: true, // initially show numbers on pieces [true|false]\r\n language: 'en', // language for gui elements [language code]\r\n \r\n // display additional gui controls\r\n control: {\r\n shufflePieces: true, // display 'Shuffle' button [true|false]\r\n confirmShuffle: true, // ask before shuffling [true|false]\r\n toggleOriginal: true, // display 'Original' button [true|false]\r\n toggleNumbers: true, // display 'Numbers' button [true|false]\r\n counter: true, // display moves counter [true|false]\r\n timer: true, // display timer (seconds) [true|false]\r\n pauseTimer: false // pause timer if 'Original' button is activated \r\n // [true|false]\r\n },\r\n \r\n // perform actions when the puzzle is solved sucessfully\r\n success: {\r\n fadeOriginal: true, // cross-fade original image [true|false]\r\n callback: undefined, // callback a user-defined function [function]\r\n // the function is passed an object as its argument\r\n // which includes the fields 'moves' and 'seconds'\r\n callbackTimeout: 300 // time in ms after which the callback is called\r\n },\r\n \r\n // animation speeds and settings\r\n animation: {\r\n shuffleRounds: 3, // number of shuffle rounds [1 ... ]\r\n shuffleSpeed: 800, // time in ms to perform a shuffle round\r\n slidingSpeed: 200, // time in ms for a single move\r\n fadeOriginalSpeed: 600 // time in ms to cross-fade original image\r\n },\r\n \r\n // additional style information not specified via css\r\n style: {\r\n gridSize: 2, // space between two pieces in px\r\n overlap: true, // if true, adjacent piece borders will overlap\r\n // applies only if gridSize is set to 0\r\n backgroundOpacity: 0.1 // opacity of the original image behind the pieces\r\n // [0 ... 1] (0 means no display)\r\n }\r\n };\r\n \r\n // language localizations\r\n var i18n = {\r\n en: {\r\n shuffleLabel: 'Shuffle',\r\n toggleOriginalLabel: 'Original',\r\n toggleNumbersLabel: 'Numbers',\r\n confirmShuffleMessage: 'Do you really want to shuffle?',\r\n movesLabel: 'moves',\r\n secondsLabel: 'seconds'\r\n },\r\n fr: {\r\n shuffleLabel: 'Mélanger',\r\n toggleOriginalLabel: 'Original',\r\n toggleNumbersLabel: 'Nombres',\r\n confirmShuffleMessage: 'Veux-tu vraiment mélanger?',\r\n movesLabel: 'mouvements',\r\n secondsLabel: 'secondes'\r\n },\r\n de: {\r\n shuffleLabel: 'Mischen',\r\n toggleOriginalLabel: 'Original',\r\n toggleNumbersLabel: 'Nummern',\r\n confirmShuffleMessage: 'Willst du wirklich mischen?',\r\n movesLabel: 'Züge',\r\n secondsLabel: 'Sekunden'\r\n },\r\n pt: {\r\n shuffleLabel: 'Embaralhar',\r\n toggleOriginalLabel: 'Original',\r\n toggleNumbersLabel: 'Numeros',\r\n confirmShuffleMessage: 'Tem certeza que deseja reembralhar?',\r\n movesLabel: 'movimentos',\r\n secondsLabel: 'segundos'\r\n }\r\n };\r\n \r\n // if rows or cols, but no hole was user-defined,\r\n // explicitly set hole position to last piece (bottom right)\r\n if (settings && !settings.hole && (settings.rows || settings.cols)) {\r\n settings.hole = (settings.rows || defaults.rows) * (settings.cols || defaults.cols);\r\n }\r\n \r\n // extend the user-defined settings object with default settings\r\n settings = $.extend(true, {}, defaults, settings);\r\n \r\n // extend the user-defined texts object with current language texts\r\n texts = $.extend((i18n[settings.language] || i18n[defaults.language]), texts);\r\n \r\n // create some handy shortcut variables\r\n var rows = settings.rows,\r\n cols = settings.cols,\r\n hole = settings.hole;\r\n var control = settings.control,\r\n success = settings.success,\r\n animation = settings.animation,\r\n style = settings.style;\r\n \r\n // check settings for valid values\r\n \r\n // keep rows and columns within limits\r\n if (rows < 3 || rows > 9) rows = defaults.rows;\r\n if (cols < 3 || cols > 9) cols = defaults.rows;\r\n \r\n // keep hole position within limits\r\n if ((hole > (rows * cols)) || (hole < 1)) hole = rows * cols;\r\n hole--; // zero-based index\r\n \r\n // animation speed = 0 doesn't work\r\n if (animation.slidingSpeed < 1) animation.slidingSpeed = 1;\r\n if (animation.shuffleSpeed < 1) animation.shuffleSpeed = 1;\r\n if (animation.fadeOriginalSpeed < 1) animation.fadeOriginalSpeed = 1;\r\n \r\n // keep shuffle rounds within limits\r\n if (animation.shuffleRounds < 1) animation.shuffleRounds = 1;\r\n \r\n \r\n // helper functions --------------------------------------------------------\r\n \r\n // checks if the puzzle is solved\r\n var checkSolution = function ($pieces) {\r\n \r\n // iterate over pieces and check each piece\r\n for (var i = 0; i < $pieces.length; i++) {\r\n // since the hole is not saved in the pieces array, \r\n // adjust the index if it is bejond the hole position\r\n // var pieceIndex = (i < hole) ? i : i + 1;\r\n \r\n // check if current position match target (index) position\r\n // if($pieces.eq(i).attr('current') != pieceIndex) return false;\r\n if ($(\"[current='\" + i + \"']\").attr('index') != cardIndex[i]) return false;\r\n }\r\n \r\n return true;\r\n };\r\n \r\n // checks if the puzzle can be solved (pure math ...)\r\n var checkOrder = function (numbersArray) {\r\n var product = 1;\r\n for (var i = 1; i <= (rows * cols - 1); i++) {\r\n for (var j = (i + 1); j <= (rows * cols); j++) {\r\n product *= ((numbersArray[i - 1] - numbersArray[j - 1]) / (i - j));\r\n }\r\n }\r\n return Math.round(product) == 1;\r\n };\r\n \r\n // get the linear index from a row/col pair (zero-based)\r\n var getLinearPosition = function (row, col) {\r\n return parseInt(row) * cols + parseInt(col);\r\n };\r\n \r\n // get the row/col pair from a linear index (zero-based)\r\n var getMatrixPosition = function (index) {\r\n return {\r\n row: (Math.floor(index / cols)),\r\n col: (index % cols)\r\n };\r\n };\r\n \r\n // get the pixel width of a border (internet explorer returns keywords)\r\n // the left side values will be used\r\n var getBorderWidth = function ($element) {\r\n // the reported css value\r\n var property = $element.css('border-left-width');\r\n // a border style must be set to get a valid border width\r\n if ($element.css('border-left-style') != 'none') {\r\n switch (property) {\r\n case 'thin':\r\n return 2;\r\n case 'medium':\r\n return 4;\r\n case 'thick':\r\n return 6;\r\n default:\r\n return parseInt(property) || 0; // parse pixel value\r\n }\r\n }\r\n return 0;\r\n };\r\n \r\n // a reusable timer component\r\n // pass in a timeout interval in ms, after which callback is called\r\n // callback gets passed one argument, the elapsed time is ms\r\n var Timer = function (interval, callback) {\r\n var startTime;\r\n var startPauseTime;\r\n var totalPause = 0;\r\n var timeout;\r\n \r\n var run = function () {\r\n update(new Date().getTime());\r\n timeout = setTimeout(run, interval);\r\n };\r\n \r\n var update = function (now) {\r\n callback(now - totalPause - startTime);\r\n };\r\n \r\n // start the timer\r\n this.start = function () {\r\n if (startTime) return false;\r\n startTime = new Date().getTime();\r\n run();\r\n };\r\n \r\n // stop the timer\r\n this.stop = function () {\r\n if (!startTime) return false;\r\n clearTimeout(timeout);\r\n var now = new Date().getTime();\r\n if (startPauseTime) totalPause += now - startPauseTime;\r\n update(now);\r\n startTime = startPauseTime = undefined;\r\n totalPause = 0;\r\n };\r\n \r\n // pause the timer\r\n this.pause = function () {\r\n if (!startTime || startPauseTime) return false;\r\n clearTimeout(timeout);\r\n startPauseTime = new Date().getTime();\r\n };\r\n \r\n // resume the timer\r\n this.resume = function () {\r\n if (!startPauseTime) return false;\r\n totalPause += new Date().getTime() - startPauseTime;\r\n startPauseTime = undefined;\r\n run();\r\n };\r\n };\r\n \r\n \r\n // apply jqPuzzle to each image element within selection -------------------\r\n \r\n return this.filter('img').each(function () {\r\n var $srcImg = $(this); // source image as jQuery object\r\n var lock = false; // flag if animations are running\r\n var moves = 0; // counter for single moves\r\n var seconds = 0; // counter for seconds after first move\r\n var solved; // flag if the puzzle is solved by the user\r\n var shuffled = settings.shuffle; // flag if the puzzle was shuffled\r\n var timer; // a timer component\r\n \r\n // save the current hole position for further manipulation\r\n var currHole = hole;\r\n \r\n \r\n // create dummy elements to get computed css properties\r\n var $dummyPiece = $('
').addClass('jqp-piece');\r\n var $dummyWrapper = $('
').addClass('jqp-wrapper').append($dummyPiece);\r\n var $dummyGui = $('
')\r\n .attr('class', $srcImg.attr('class') || '') // transfer classes\r\n .addClass('jqPuzzle')\r\n .append($dummyWrapper);\r\n \r\n // replace original image with dummy\r\n $srcImg.replaceWith($dummyGui);\r\n \r\n // assign old image id to dummy\r\n $dummyGui.attr('id', $srcImg.attr('id') || '');\r\n \r\n // get computed css properties of dummy elements\r\n var computedStyles = {\r\n gui: {\r\n border: getBorderWidth($dummyGui),\r\n padding: {\r\n left: parseInt($dummyGui.css('padding-left')) || 0,\r\n right: parseInt($dummyGui.css('padding-right')) || 0,\r\n top: parseInt($dummyGui.css('padding-top')) || 0,\r\n bottom: parseInt($dummyGui.css('padding-bottom')) || 0\r\n }\r\n },\r\n wrapper: {\r\n border: getBorderWidth($dummyWrapper),\r\n padding: parseInt($dummyWrapper.css('padding-left')) || 0\r\n },\r\n piece: {\r\n border: getBorderWidth($dummyPiece)\r\n }\r\n };\r\n \r\n // re-replace dummy elements with original image\r\n $dummyGui.removeAttr('id');\r\n $dummyGui.replaceWith($srcImg);\r\n \r\n \r\n // wait for the image to be loaded, to be able to get its real width/height\r\n $srcImg.one('load', function () {\r\n \r\n // overlap piece borders if there is no margin between pieces\r\n // this way, piece borders will not be doubled\r\n var overlap = (style.gridSize === 0 && style.overlap);\r\n \r\n // total space of piece borders and grid lines, which will cover parts of the image\r\n var coveredWidth = cols * (2 * computedStyles.piece.border) + (cols - 1) * style.gridSize;\r\n var coveredHeight = rows * (2 * computedStyles.piece.border) + (rows - 1) * style.gridSize;\r\n \r\n // recalc if overlap\r\n if (overlap) {\r\n coveredWidth -= (cols - 1) * computedStyles.piece.border;\r\n coveredHeight -= (rows - 1) * computedStyles.piece.border;\r\n }\r\n \r\n // make sure to get the original image size, not scaled values\r\n // in mozilla, width() and height() do not work with hidden elements\r\n $srcImg.css({\r\n width: 'auto',\r\n height: 'auto',\r\n visibility: 'visible'\r\n });\r\n \r\n // pieces width and height, based on original image size\r\n var width = Math.floor(($srcImg.width() - coveredWidth) / cols);\r\n var height = Math.floor(($srcImg.height() - coveredHeight) / rows);\r\n \r\n // reject too small images\r\n if (width < 30 || height < 30) return false;\r\n \r\n // recalc full image width and height to avoid rounding errors\r\n var fullWidth = cols * width + coveredWidth;\r\n var fullHeight = rows * height + coveredHeight;\r\n \r\n // image source path\r\n var imgSrc = $srcImg.attr('src');\r\n \r\n // total width/height of a piece (including piece border and 1 grid size)\r\n var totalPieceWidth = width + 2 * computedStyles.piece.border + style.gridSize;\r\n var totalPieceHeight = height + 2 * computedStyles.piece.border + style.gridSize;\r\n \r\n // handle internet explorer quirks mode box model\r\n var boxModelHack = {\r\n piece: $.boxModel ? 0 : 2 * computedStyles.piece.border,\r\n wrapper: $.boxModel ? 0 : 2 * (computedStyles.wrapper.border + computedStyles.wrapper.padding),\r\n gui: {\r\n width: $.boxModel ? 0 : 2 * computedStyles.gui.border +\r\n computedStyles.gui.padding.left + computedStyles.gui.padding.right,\r\n height: $.boxModel ? 0 : 2 * computedStyles.gui.border +\r\n computedStyles.gui.padding.top + computedStyles.gui.padding.bottom\r\n }\r\n };\r\n \r\n \r\n // helper functions ------------------------------------------------\r\n \r\n // pixel offset of an element, based on matrix position\r\n var getOffset = function (row, col) {\r\n var offset = {\r\n left: computedStyles.wrapper.padding + col * totalPieceWidth,\r\n top: computedStyles.wrapper.padding + row * totalPieceHeight\r\n };\r\n \r\n if (overlap) {\r\n offset.left -= col * computedStyles.piece.border;\r\n offset.top -= row * computedStyles.piece.border;\r\n }\r\n \r\n return offset;\r\n };\r\n \r\n // shuffle pieces\r\n var shuffle = function (rounds, speed) {\r\n \r\n // when speed is defined, the function was triggered by a user event (button click)\r\n if (speed) {\r\n // do nothing, if disabled\r\n if ($shuffleButton.is('.jqp-disabled')) return false;\r\n \r\n // do nothing, if locked\r\n if (lock) return false;\r\n \r\n // ask for confirmation\r\n if (control.confirmShuffle && (moves > 0) &&\r\n !window.confirm(texts.confirmShuffleMessage)) return false;\r\n \r\n lock = true; // set lock\r\n \r\n // if the puzzle is solved\r\n if (solved) {\r\n // reset gui\r\n $gui.removeClass('jqp-solved');\r\n \r\n // fade out original\r\n $background.fadeTo(animation.fadeOriginalSpeed, style.backgroundOpacity, function () {\r\n // opera gets kicked without remove()\r\n $background.remove().prependTo($wrapper);\r\n \r\n // re-enable all buttons\r\n $buttons.removeClass('jqp-disabled');\r\n });\r\n }\r\n }\r\n \r\n // stop the timer\r\n if (timer) timer.stop();\r\n \r\n // reset flag and counters\r\n solved = false;\r\n shuffled = true;\r\n moves = 0;\r\n seconds = 0;\r\n \r\n // reset display\r\n if ($display) $display.removeClass('jqp-disabled');\r\n if ($counter) $counter.val(moves);\r\n if ($timer) $timer.val(seconds);\r\n \r\n var shuffles = [];\r\n var i = 0;\r\n // generate orders for several shuffle rounds\r\n while (i < rounds) {\r\n // create an array for choosing random positions\r\n // based on its lenght, we can select free positions\r\n var choices = [];\r\n for (var j = 0; j < rows * cols; j++) {\r\n choices[j] = j;\r\n }\r\n // remove element on initial hole position\r\n choices.splice(hole, 1);\r\n \r\n shuffles[i] = [];\r\n // generate random numbers\r\n for (var j = 0; j < rows * cols; j++) {\r\n \r\n // but keep hole at initial position\r\n if (j == hole) {\r\n shuffles[i][j] = hole;\r\n continue;\r\n }\r\n \r\n // select a random position based on the length of the choices\r\n var randomIndex = Math.floor(Math.random() * choices.length);\r\n \r\n // save the value at this index as the next number in the current order\r\n shuffles[i][j] = choices[randomIndex];\r\n \r\n // remove this value from the choices array (reducing its length)\r\n choices.splice(randomIndex, 1);\r\n }\r\n \r\n // don't increase i if we are in last round \r\n // and the generated order is not solvable\r\n if (((i + 1) < rounds) || checkOrder(shuffles[i])) i++;\r\n }\r\n \r\n var animCounter = 0; // animation counter for save unlock\r\n \r\n // shuffle pieces in several rounds\r\n for (var i = 0; i < rounds; i++) {\r\n \r\n // set flag for the last round\r\n var lastRound = ((i + 1) == rounds);\r\n \r\n // iterate over the generated orders\r\n // with j being the linear index for the destination order\r\n for (var j = 0; j < shuffles[i].length; j++) {\r\n \r\n // we cannot move the hole\r\n if (j == hole) {\r\n // update hole position\r\n if (lastRound) currHole = hole;\r\n continue;\r\n }\r\n \r\n // the value is the index of the current piece\r\n // in the original, ordered $pieces array\r\n var pieceIndex = shuffles[i][j];\r\n \r\n // since the hole is not saved in the $pieces array, \r\n // adjust the index if it is bejond the hole position\r\n if (pieceIndex > hole) pieceIndex -= 1;\r\n \r\n // get the actual piece to be moved\r\n var $piece = $pieces.eq(pieceIndex);\r\n \r\n // get target position\r\n var target = getMatrixPosition(j);\r\n \r\n // get pixel offset new position\r\n var offset = getOffset(target.row, target.col);\r\n \r\n // update current row/cal in last round\t(ie needs a string)\r\n if (lastRound) {\r\n $piece.attr('current', j.toString());\r\n var expPos = $piece[0].getAttribute('expectedposition'),\r\n emptyTile = (expPos == 1 || expPos == 5) ? translations.ImagePuzzleTitleAccess_copy5 + ' 6.' : '';\r\n (j >= 3) ? $piece.attr('aria-label', emptyTile + translations.ImagePuzzleTitleAccess_copy1 + ' ' + String(j + 1) + ' ' + translations.And + ' ' + translations.ImagePuzzleTitleAccess_copy2 + ' ' + expPos + '. ' + translations.ImagePuzzleTitleAccess_copy3) : $piece.attr('aria-label', emptyTile + translations.ImagePuzzleTitleAccess_copy1 + ' ' + String(j + 1) + ' ' + translations.And + ' ' + translations.ImagePuzzleTitleAccess_copy2 + ' ' + expPos + '. ' + translations.ImagePuzzleTitleAccess_copy4);\r\n }\r\n \r\n // either just set or animate styles\r\n if (speed === undefined) {\r\n $piece.css({\r\n left: offset.left,\r\n top: offset.top\r\n });\r\n } else {\r\n // animate!\r\n $piece.animate({\r\n left: offset.left,\r\n top: offset.top\r\n }, speed, null, function () {\r\n // unlock after last animation in last round\r\n animCounter++;\r\n if (animCounter == animation.shuffleRounds * (rows * cols - 1)) {\r\n lock = false;\r\n animCounter = 0;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n };\r\n \r\n \r\n // create elements -------------------------------------------------\r\n \r\n // create a wrapper for the pieces\r\n var $wrapper = $('
')\r\n .addClass('jqp-wrapper')\r\n .css({\r\n width: fullWidth + boxModelHack.wrapper + 2,\r\n height: fullHeight + boxModelHack.wrapper + 2,\r\n borderWidth: computedStyles.wrapper.border,\r\n padding: computedStyles.wrapper.padding,\r\n margin: 0,\r\n position: 'relative',\r\n overflow: 'hidden',\r\n display: 'block',\r\n visibility: 'inherit'\r\n });\r\n \r\n // create a single piece prototype to be cloned for the actual pieces\r\n var $protoPiece = $('')\r\n .addClass('jqp-piece')\r\n .css({\r\n width: width + boxModelHack.piece + 2,\r\n height: height + boxModelHack.piece + 2,\r\n backgroundImage: 'url(' + imgSrc + ')',\r\n borderWidth: computedStyles.piece.border,\r\n margin: 0,\r\n padding: 0,\r\n position: 'absolute',\r\n overflow: 'hidden',\r\n display: 'block',\r\n visibility: 'inherit',\r\n cursor: 'default'\r\n })\r\n .attr('href', '#')\r\n .append($('')); // will hold the numbers\r\n // create pieces inside wrapper\r\n \r\n var $pieces = $([]),\r\n key = 0; // create an empty jQuery object\r\n for (var i = 0; i < rows; i++) {\r\n for (var j = 0; j < cols; j++) {\r\n var index = getLinearPosition(i, j); // linear index\r\n \r\n // do not create piece at initial hole position\r\n if (index == hole) continue;\r\n \r\n // get piece position offset\r\n var offset = getOffset(i, j);\r\n \r\n // calculate background offset\r\n var bgLeft = -1 * (j * totalPieceWidth + computedStyles.piece.border);\r\n var bgTop = -1 * (i * totalPieceHeight + computedStyles.piece.border);\r\n \r\n // recalc if overlap\r\n if (overlap) {\r\n bgLeft += j * computedStyles.piece.border;\r\n bgTop += i * computedStyles.piece.border;\r\n }\r\n \r\n // create single pieces from prototype\r\n $pieces = $pieces.add($protoPiece.clone()\r\n .css({\r\n left: offset.left,\r\n top: offset.top,\r\n backgroundPosition: (bgLeft + 'px ' + bgTop + 'px')\r\n })\r\n // add expando property to save the current position\r\n .attr('current', String(index)) // ie hack: String()\r\n .attr('index', cardIndex[key])\r\n .attr('href', '#')\r\n .attr('expectedposition', String(index + 1))\r\n .appendTo($wrapper)\r\n // add number to inner span\r\n .children().text(index + 1).end()\r\n );\r\n key = key + 1;\r\n }\r\n }\r\n \r\n // initially shuffle pieces\r\n if (settings.shuffle) shuffle(1);\r\n \r\n // create background (original image) inside wrapper\r\n var $background = $('
')\r\n .css({\r\n width: fullWidth,\r\n height: fullHeight,\r\n left: computedStyles.wrapper.padding,\r\n top: computedStyles.wrapper.padding,\r\n backgroundImage: 'url(' + imgSrc + ')',\r\n borderWidth: 0,\r\n margin: 0,\r\n padding: 0,\r\n position: 'absolute',\r\n opacity: style.backgroundOpacity\r\n })\r\n .prependTo($wrapper);\r\n \r\n // create controls which will hold the buttons and the display\r\n var $controls = $('
')\r\n .addClass('jqp-controls')\r\n .css({\r\n visibility: 'inherit',\r\n display: 'block',\r\n position: 'static'\r\n });\r\n \r\n var $shuffleButton, $originalButton, $numbersButton;\r\n \r\n // create a button prototype to be cloned for the actual buttons\r\n var $protoButton = $('').css('cursor', 'default');\r\n \r\n // create shuffle button\r\n if (control.shufflePieces) {\r\n $shuffleButton = $protoButton.clone()\r\n .text(texts.shuffleLabel)\r\n .appendTo($controls);\r\n }\r\n \r\n // create toggle original button\r\n if (control.toggleOriginal) {\r\n $originalButton = $protoButton.clone()\r\n .text(texts.toggleOriginalLabel)\r\n .appendTo($controls);\r\n }\r\n \r\n // create toggle numbers button\r\n if (control.toggleNumbers) {\r\n $numbersButton = $protoButton.clone()\r\n .text(texts.toggleNumbersLabel)\r\n .appendTo($controls);\r\n // immediately toggle button, if numbers are initially shown\r\n if (settings.numbers) $numbersButton.addClass('jqp-toggle');\r\n }\r\n \r\n // keep a reference to all buttons for convenience\r\n var $buttons = $controls.children();\r\n \r\n var $display, $counter, $timer;\r\n if (control.counter || control.timer) {\r\n \r\n // create wrapper for counter/timer\r\n $display = $('')\r\n .css('cursor', 'default')\r\n .appendTo($controls);\r\n \r\n // create a text field prototype to be cloned for actual text fields\r\n var $protoField = $('')\r\n .val(0)\r\n .css({\r\n width: '5ex',\r\n cursor: 'default'\r\n })\r\n .attr('readonly', 'readonly');\r\n \r\n // create counter component\r\n if (control.counter) $counter = $protoField.clone()\r\n .appendTo($display)\r\n .after(texts.movesLabel + ' ');\r\n \r\n // create timer component\r\n if (control.timer) $timer = $protoField.clone()\r\n .appendTo($display)\r\n .after(texts.secondsLabel);\r\n \r\n // disable display if the puzzle is not shuffled yet\r\n if (!settings.shuffle) $display.addClass('jqp-disabled');\r\n }\r\n \r\n // add link to jqPuzzle homepage\r\n var $credits = $('')\r\n // .text('jqPuzzle')\r\n // .attr('href', 'http://www.2meter3.de/jqPuzzle/')\r\n // .css({\r\n // \t'float': 'right',\r\n // \tfontFamily: 'Verdana, Arial, Helvetica, sans-serif',\r\n // \tfontSize: '9px',\r\n // \tlineHeight: '12px',\r\n // \ttextDecoration: 'none',\r\n // \tcolor: '#FFFFFF',\r\n // \tbackgroundColor: '#777777',\r\n // \tbackgroundImage: 'none',\r\n // \tborderBottom: '1px dotted #FFFFFF',\r\n // \tpadding: '1px 3px 2px',\r\n // \tmarginRight: computedStyles.wrapper.border,\r\n // \tposition: 'static',\r\n // \tdisplay: 'inline',\r\n // \tvisibility: 'inherit'\r\n // });\r\n \r\n // panel which holds controls and credits, used for height() calculations\r\n var $panel = $('
')\r\n .css({\r\n width: fullWidth + 2 * (computedStyles.wrapper.padding + computedStyles.wrapper.border),\r\n position: 'absolute',\r\n display: 'block',\r\n visibility: 'inherit', //'visible',\r\n margin: '0px',\r\n padding: '0px',\r\n backgroundColor: 'transparent'\r\n })\r\n .append($credits).append($controls);\r\n $('.correct-img, .correct-img img').css({\r\n height: fullHeight + 2 * (computedStyles.wrapper.padding + computedStyles.wrapper.border) + boxModelHack.gui.height - 10,\r\n })\r\n // full gui (including wrapper and panel)\r\n var $gui = $('
')\r\n .attr('class', $srcImg.attr('class') || '') // transfer classes\r\n .addClass('jqPuzzle') // always assign class jqPuzzle\r\n .css({\r\n width: fullWidth + 2 * (computedStyles.wrapper.padding + computedStyles.wrapper.border) + boxModelHack.gui.width,\r\n height: fullHeight + 2 * (computedStyles.wrapper.padding + computedStyles.wrapper.border) + boxModelHack.gui.height,\r\n textAlign: 'left',\r\n overflow: 'hidden',\r\n display: 'block'\r\n })\r\n .append($wrapper).append($panel);\r\n \r\n // replace source image with jqPuzzle\r\n $srcImg.replaceWith($gui);\r\n \r\n // assign source image id to jqPuzzle\r\n var id = $srcImg.attr('id');\r\n if (id) $gui.attr('id', id);\r\n \r\n // opera has strange effect when calling hide() and val() before \r\n // the elements are attached to the dom\r\n // hide numbers\r\n if (!settings.numbers) $pieces.children().hide();\r\n // fill inputs\r\n if ($display) $display.children('input').val(0);\r\n \r\n // now, after everything is rendered, recalc gui height\r\n var guiHeight = $gui.height();\r\n var panelHeight = $panel.height();\r\n \r\n $gui.height($gui.height() + $panel.height());\r\n \r\n \r\n // attach events ---------------------------------------------------\r\n \r\n // prevent text selection\r\n if ($.browser.msie) $gui[0].onselectstart = function () {\r\n return false;\r\n };\r\n else $gui.mousedown(function () {\r\n return false;\r\n });\r\n \r\n // button press on mousedown\r\n $buttons.mousedown(function () {\r\n if (!$(this).is('.jqp-disabled')) $(this).addClass('jqp-down');\r\n });\r\n $buttons.mouseout(function () {\r\n $(this).removeClass('jqp-down');\r\n });\r\n $buttons.mouseup(function () {\r\n $(this).removeClass('jqp-down');\r\n });\r\n \r\n // swap pieces on click\r\n $pieces.on('click touchend', function (event) {\r\n //$pieces.click(function (event) {\r\n event.preventDefault();\r\n // do nothing, if locked\r\n if (lock) return false;\r\n \r\n // do nothing, if solved after being shuffled\r\n if (solved) return false;\r\n \r\n lock = true; // set lock\r\n var $piece = $(this);\r\n $piece.focus();\r\n // get current position from expando\r\n var current = $piece.attr('current');\r\n var expPos = $piece[0].getAttribute('expectedposition');\r\n var currPos = $piece[0].getAttribute('current');\r\n // get current matrix positions for piece and hole\r\n var source = getMatrixPosition(current);\r\n var dest = getMatrixPosition(currHole);\r\n \r\n // only swap pieces adjacent to the hole\r\n if (Math.abs(source.row - dest.row) + Math.abs(source.col - dest.col) != 1) {\r\n lock = false;\r\n $piece.attr('aria-label', translations.ImagePuzzleTitleAccess_copy1 + ' ' + String(parseInt(currPos) + 1) + ' ' + translations.And + ' ' + translations.ImagePuzzleTitleAccess_copy2 + ' ' + expPos + '.' + translations.ImagePuzzleTitleAccess_copy4);\r\n \r\n return false;\r\n }\r\n else {\r\n $piece.attr('aria-label', translations.ImagePuzzleTitleAccess_copy);\r\n }\r\n // get offset for the new position\r\n var offset = getOffset(dest.row, dest.col);\r\n \r\n // update piece expando and current hole position\r\n $piece.attr('current', String(currHole)); // ie hack: String()\r\n \r\n var positions = [],\r\n blankPos = [];\r\n for (var i = 0; i < 6; i++) {\r\n $pieces.each(function (j) {\r\n if (i == $pieces[j].getAttribute('current')) {\r\n positions.push(i);\r\n return;\r\n //currPos[j] = $pieces[j].getAttribute('current');\r\n // expPos[j] = $pieces[j].getAttribute('expectedposition');\r\n //need later// $pieces[j].setAttribute('aria-label', 'The current position of tile is ' + String(parseInt($pieces[j].getAttribute('current'))+1) + ' and it should be at position ' + $pieces[j].getAttribute('expectedposition') + '.');\r\n }\r\n });\r\n if (positions.indexOf(i) < 0) { //identifying blank position\r\n blankPos.push(i);\r\n }\r\n \r\n }\r\n setTimeout(() => {\r\n for (var k = 0; k < 5; k++) {\r\n var currVal = (parseInt($pieces[k].getAttribute('current')) + 1),\r\n expVal = $pieces[k].getAttribute('expectedposition'),\r\n emptyTile = (expVal == 1 || expVal == 5) ? translations.ImagePuzzleTitleAccess_copy5 + ' ' + parseInt(blankPos[0] + 1) + '. ' : '',\r\n movVal = ((blankPos[0] == 0 && ($pieces[k].getAttribute('current') == '1' || $pieces[k].getAttribute('current') == '2')) || (blankPos[0] == 1 && ($pieces[k].getAttribute('current') == '0' || $pieces[k].getAttribute('current') == '3')) || (blankPos[0] == 2 && ($pieces[k].getAttribute('current') == '0' || $pieces[k].getAttribute('current') == '3' || $pieces[k].getAttribute('current') == '4')) || (blankPos[0] == 3 && ($pieces[k].getAttribute('current') == '1' || $pieces[k].getAttribute('current') == '2' || $pieces[k].getAttribute('current') == '5')) || (blankPos[0] == 4 && ($pieces[k].getAttribute('current') == '2' || $pieces[k].getAttribute('current') == '5')) || (blankPos[0] == 5 && ($pieces[k].getAttribute('current') == '3' || $pieces[k].getAttribute('current') == '4'))) ? translations.ImagePuzzleTitleAccess_copy3 : translations.ImagePuzzleTitleAccess_copy4;\r\n \r\n $pieces[k].setAttribute('aria-label', emptyTile + translations.ImagePuzzleTitleAccess_copy1 + ' ' + currVal + ' ' + translations.And + ' ' + translations.ImagePuzzleTitleAccess_copy2 + ' ' + expVal + '. ' + movVal);\r\n }\r\n }, 1500);\r\n \r\n currHole = current;\r\n // increase moves counter only if the puzzle was shuffled\r\n if (shuffled) moves++;\r\n \r\n // update counter field\r\n if ($counter) $counter.val(moves);\r\n \r\n // start timer, if needed\r\n if (moves == 1) {\r\n // initiate timer with update function\r\n if (!timer) timer = new Timer(333, function (ms) {\r\n seconds = Math.floor(ms / 1000);\r\n if ($timer) $timer.val(seconds);\r\n });\r\n timer.start();\r\n }\r\n \r\n // animate!\r\n $piece.animate({\r\n left: offset.left,\r\n top: offset.top\r\n }, animation.slidingSpeed, null, function () {\r\n // only check if the puzzle was shuffled\r\n if (shuffled) {\r\n // check if the puzzle is solved\r\n solved = checkSolution($pieces);\r\n if (solved) {\r\n if (timer) timer.stop();\r\n shuffled = false;\r\n $gui.addClass('jqp-solved');\r\n window.setTimeout(finishGame, 100);\r\n } else {\r\n lock = false\r\n \r\n }\r\n } else lock = false;\r\n });\r\n });\r\n \r\n // shuffle pieces on click\r\n if (control.shufflePieces) $shuffleButton.click(function () {\r\n shuffle(animation.shuffleRounds, animation.shuffleSpeed);\r\n });\r\n \r\n // toggle original on click\r\n if (control.toggleOriginal) $originalButton.click(function () {\r\n // do nothing, if disabled\r\n if ($originalButton.is('.jqp-disabled')) return false;\r\n \r\n // do nothing, if locked\r\n if (lock) return false;\r\n \r\n lock = true; // set lock\r\n \r\n if ($originalButton.is('.jqp-toggle')) {\r\n // re-enable other buttons\r\n if (control.shufflePieces) $shuffleButton.removeClass('jqp-disabled');\r\n if (control.toggleNumbers) $numbersButton.removeClass('jqp-disabled');\r\n \r\n $originalButton.removeClass('jqp-toggle');\r\n \r\n // fade out original\r\n $background.fadeTo(animation.fadeOriginalSpeed, style.backgroundOpacity, function () {\r\n $(this).prependTo($wrapper);\r\n \r\n // resume timer\r\n if (control.pauseTimer && timer) timer.resume();\r\n \r\n lock = false;\r\n });\r\n } else {\r\n // disable other buttons\r\n if (control.shufflePieces) $shuffleButton.addClass('jqp-disabled');\r\n if (control.toggleNumbers) $numbersButton.addClass('jqp-disabled');\r\n \r\n $originalButton.addClass('jqp-toggle');\r\n \r\n // pause timer\r\n if (control.pauseTimer && timer) timer.pause();\r\n \r\n // fade in original\r\n $background.appendTo($wrapper).fadeTo(animation.fadeOriginalSpeed, 1, function () {\r\n \r\n lock = false;\r\n });\r\n }\r\n return false; // prevent default action\r\n });\r\n \r\n // toggle numbers on click\r\n if (control.toggleNumbers) $numbersButton.click(function () {\r\n // do nothing, if disabled\r\n if ($numbersButton.is('.jqp-disabled')) return false;\r\n \r\n if ($numbersButton.is('.jqp-toggle')) {\r\n $numbersButton.removeClass('jqp-toggle');\r\n $pieces.children().hide();\r\n } else {\r\n $numbersButton.addClass('jqp-toggle');\r\n $pieces.children().show();\r\n }\r\n });\r\n \r\n \r\n // work to do when the puzzle is solved\r\n var finishGame = function () {\r\n if (success.fadeOriginal) {\r\n // disable buttons\r\n if (control.toggleOriginal) $originalButton.addClass('jqp-disabled');\r\n if (control.toggleNumbers) $numbersButton.addClass('jqp-disabled');\r\n \r\n // fade in original\r\n $background.appendTo($wrapper).fadeTo(animation.fadeOriginalSpeed, 1.0, function () {\r\n lock = false; // reset lock\r\n solutionCallback(); // call user callback\r\n });\r\n } else {\r\n lock = false; // reset lock\r\n solutionCallback(); // call user callback\t\r\n }\r\n };\r\n \r\n // call a user-defined callback after a timeout, when the puzzle is solved\r\n var solutionCallback = function () {\r\n if ($.isFunction(success.callback)) {\r\n setTimeout(function () {\r\n success.callback({\r\n moves: moves,\r\n seconds: seconds\r\n });\r\n \r\n }, success.callbackTimeout);\r\n }\r\n // console.log(seconds);\r\n var puzzleMoves = moves;\r\n $('.ng-isolate-scope').removeClass(\"hide-loader\");\r\n API.postPuzzle({\r\n answers: answers,\r\n TieBreakAnswer: puzzleMoves\r\n },\r\n webStorageService.getSessionData(\"servToken\")\r\n )\r\n .then(function (data) {\r\n // accessService.setPermission('limit', true);\r\n if (data.response.RedirectUrl.toLowerCase().indexOf('thankyou') > -1) {\r\n \r\n var winnerObj = {\r\n winner: 97,\r\n }\r\n \r\n // dataLayers().imagePuzzleEntryComplete();\r\n // dataLayers().orderData(97);\r\n webStorageService.setSessionData('createPageState', 'Thankyou');\r\n }\r\n \r\n history.push({ pathname: data.response.RedirectUrl, state: winnerObj });\r\n pageScroll();\r\n })\r\n .catch(function (error) {\r\n HandleError(error.response);\r\n });\r\n };\r\n \r\n }); // img load\r\n \r\n // unfortunately, image load does not fire consistently across browsers\r\n // (especially with cached images)\r\n // therefore, check image.load periodically (bah, brute force...)\r\n var interval = setInterval(function () {\r\n if ($srcImg[0].complete) {\r\n clearInterval(interval);\r\n $srcImg.trigger('load');\r\n }\r\n }, 333);\r\n \r\n /*\r\n var interval;\r\n (function waitForImage($image) {\r\n if(!$image[0].complete) {\r\n interval = setInterval(function() {\r\n waitForImage($image);\r\n }, 100);\r\n } else {\r\n clearInterval(interval);\r\n $image.trigger('load');\r\n }\r\n })($srcImg);*/\r\n \r\n // ie shows some inconsistencies with img load and cached images\r\n // fortunately, in this cases img.complete is true from the beginning\r\n //if($.browser.msie && $srcImg[0] && $srcImg[0].complete) $srcImg.trigger('load');\r\n \r\n \r\n }).end(); // return full collection to allow chaining\r\n };\r\n \r\n // automagically apply jqPuzzle to all images with class 'jqPuzzle'\r\n $(function () {\r\n \r\n $('img.jqPuzzle').each(function () {\r\n \r\n // define an additional micro format (to be used as a class name)\r\n \r\n /* Syntax: .jqp[-LANGUAGE]-rROWS-cCOLS[-hHOLE][-sSHUFFLE_ROUNDS][-FLAGS]\r\n * \r\n * Flags: S - initially shuffle pieces\r\n * N - initially hide numbers\r\n * A - hide 'Shuffle' button\r\n * B - hide 'Original' button\r\n * C - hide 'Numbers' button\r\n * D - hide 'moves' display\r\n * E - hide 'seconds' display\r\n */\r\n var microFormat = /\\bjqp(-[a-z]{2})?-r(\\d)-c(\\d)(-h(\\d+))?(-s(\\d+))?(-[A-Z]+)?\\b/;\r\n \r\n // execute regex and save matches\r\n var match = microFormat.exec(this.className);\r\n \r\n // build settings object from micro format\r\n var settings;\r\n if (match) {\r\n settings = {\r\n rows: parseInt(match[2]),\r\n cols: parseInt(match[3]),\r\n hole: parseInt(match[5]) || null,\r\n shuffle: match[8] && match[8].indexOf('S') != -1,\r\n numbers: match[8] ? match[8].indexOf('N') == -1 : true,\r\n language: match[1] && match[1].substring(1)\r\n };\r\n \r\n if (match[7]) {\r\n settings.animation = {};\r\n settings.animation.shuffleRounds = parseInt(match[7]);\r\n }\r\n \r\n if (match[8] && match[8].search(/[ABCDE]/) != -1) {\r\n settings.control = {};\r\n settings.control.shufflePieces = match[8].indexOf('A') == -1;\r\n settings.control.toggleOriginal = match[8].indexOf('B') == -1;\r\n settings.control.toggleNumbers = match[8].indexOf('C') == -1;\r\n settings.control.counter = match[8].indexOf('D') == -1;\r\n settings.control.timer = match[8].indexOf('E') == -1;\r\n }\r\n }\r\n // call the plugin\r\n $(this).jqPuzzle(settings);\r\n });\r\n });\r\n \r\n })($);\r\n var jQuery = $;\r\n jQuery.browser = {};\r\n (function () {\r\n jQuery.browser.msie = false;\r\n jQuery.browser.version = 0;\r\n if (navigator.userAgent.match(/MSIE ([0-9]+)\\./)) {\r\n jQuery.browser.msie = true;\r\n jQuery.browser.version = RegExp.$1;\r\n }\r\n })();\r\n $(function () {\r\n var mySettings = {\r\n rows: 3, // number of rows [3 ... 9] \r\n cols: 2, // number of columns [3 ... 9] \r\n hole: 6, // initial hole position [1 ... rows*columns] \r\n shuffle: true, // initially show shuffled pieces [true|false] \r\n numbers: false, // initially show numbers on pieces [true|false] \r\n // display additional gui controls \r\n control: {\r\n shufflePieces: false, // display 'Shuffle' button [true|false] \r\n confirmShuffle: false, // ask before shuffling [true|false] \r\n toggleOriginal: false, // display 'Original' button [true|false] \r\n toggleNumbers: false, // display 'Numbers' button [true|false] \r\n counter: false, // display moves counter [true|false] \r\n timer: false, // display timer (seconds) [true|false] \r\n pauseTimer: false // pause timer if 'Original' button is activated \r\n // [true|false] \r\n },\r\n }\r\n $('#puzzle-box').jqPuzzle(mySettings);\r\n });\r\n }\r\n \r\n return (\r\n <>\r\n \r\n
\r\n

{translations.ImagePuzzlePageTitle}

\r\n
{translations.CoreKelloggs_PuzzlePageTitle}
\r\n
\r\n {/*

{translations.ImagePuzzleStepsHeading}

*/}\r\n

{translations.ImagePuzzleSteps1}

\r\n

{translations.ImagePuzzleSteps2}

\r\n {/*

{translations.ImagePuzzleSteps3}

*/}\r\n
\r\n
\r\n

{translations.ImagePuzzleTitleCopy}

\r\n

{translations.ImagePuzzleTitleCopy1}

\r\n

{translations.ImagePuzzleTitleCopy2}

\r\n
\r\n
\r\n
\r\n {translations.CoreKelloggs_PuzzlePageTitle}\r\n
\r\n {translations.CoreKelloggs_PuzzlePageTitle}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Puzzle;","import React, { useContext } from 'react';\r\nimport { Redirect, useLocation } from \"react-router-dom\";\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport { locale, MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\n\r\nfunction Thankyou() {\r\n const { translations } = useContext(JsonContext);\r\n const location = useLocation();\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n // let pageState = 'Thankyou';\r\n\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Thankyou') {\r\n return \r\n }\r\n\r\n webStorageService.removeSessionData('createPageState');\r\n document.querySelector('body').setAttribute('pagename', 'Thankyou');\r\n\r\n var winnerCode = location.state.winner,\r\n // var winnerCode = -16,\r\n isExtendedPhase = location.state.isExtendedPhase;\r\n // isExtendedPhase = false;\r\n var winCategory, WinPageDesc, WinPageHeading, WinPageSubHeading, WinPageDesc1, refCode;\r\n if (isExtendedPhase) {\r\n winCategory = 'extended'\r\n WinPageDesc = translations.PrizeDrawThankyouHeading;\r\n WinPageDesc1 = translations.PrizeDrawThankyouDescription;\r\n // dataLayers().orderData(97);\r\n }\r\n\r\n\r\n var setThankyouContent = function () {\r\n switch (winnerCode) {\r\n case 0:\r\n case -16:\r\n winCategory = 'Lose';\r\n WinPageDesc = translations.Tier3DigitalGame;\r\n break;\r\n case 1:\r\n winCategory = 'MPExperience';\r\n WinPageDesc = translations.Tier1Experience_description1;\r\n WinPageDesc1 = translations.Tier1Experience_description2;\r\n refCode = location.state.refCode;\r\n // refCode = 'XXXXX';\r\n break;\r\n case 2:\r\n winCategory = 'MPLevitating';\r\n WinPageDesc = translations.Tier2Experience_description1;\r\n WinPageDesc1 = translations.Tier1Experience_description2;\r\n refCode = location.state.refCode;\r\n break;\r\n case 97:\r\n winCategory = 'Crossword';\r\n WinPageDesc = translations.ThankyouPageHeading;\r\n WinPageDesc1 = translations.ThankyouPageDescription;\r\n break;\r\n default:\r\n // $location.path(lang + '/Home');\r\n break;\r\n }\r\n }\r\n if (!isExtendedPhase) {\r\n setThankyouContent();\r\n }\r\n return (\r\n <>\r\n \r\n
\r\n {(winCategory != 'Crossword' && winCategory != 'extended')&&

{translations.WinPageHeading}
{translations.WinPageHeading1}

}\r\n\r\n {(winCategory == 'Crossword' || winCategory == 'extended') &&

{WinPageDesc}

}\r\n\r\n
{winCategory != 'Crossword' ? translations.WinPageHeading1 : WinPageDesc}
\r\n\r\n {(winCategory != 'Crossword' && winCategory != 'extended') &&

{WinPageDesc}

}\r\n\r\n {(winCategory != 'Lose') &&

{WinPageDesc1}

}\r\n\r\n {(winCategory != 'Crossword' && winCategory != 'extended') &&

{translations.Tier1Experience_description3}

}\r\n\r\n {(winCategory != 'Crossword' && winCategory != 'extended') &&

poptheblocks.com

}\r\n {((locale == 'ru_RU' || locale == 'uk_UA') && winCategory == 'MPLevitating') &&

}\r\n {(winCategory == 'MPExperience' || winCategory == 'MPLevitating') &&

}\r\n\r\n {(winCategory == 'MPExperience' || winCategory == 'MPLevitating') &&

}\r\n\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Thankyou;","import React, { useContext } from 'react';\r\nimport { Redirect } from \"react-router-dom\";\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport { locale, MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\n\r\nfunction Limit() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Limit') {\r\n return \r\n }\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Limit');\r\n\r\n let vm = this,\r\n // webStorageService.removeSessionData('permission');\r\n // webStorageService.removeSessionData('servToken');\r\n globalLimit = webStorageService.getSessionData('limitType'),\r\n // globalLimit = 'MaxUserAttemptLimit',\r\n limitPageHeading,\r\n limitPageDesc,\r\n limitPageDesc1;\r\n const _intervalG = setInterval(function () {\r\n logout();\r\n }, 300);\r\n function logout() {\r\n if (window.gigya != undefined) {\r\n window.gigya.accounts.logout();\r\n clearInterval(_intervalG);\r\n }\r\n }\r\n\r\n if (globalLimit == 'GlobalRedemptionLimit') {\r\n // dataLayers().winLimit();\r\n limitPageHeading = translations.Sorry;\r\n limitPageDesc = translations.WinLimit;\r\n limitPageDesc1 = translations.WinLimitDescription;\r\n } else if (globalLimit == 'MaxUserAttemptLimit') {\r\n limitPageDesc = translations.CoreKelloggs_MaximumEntryLimit;\r\n limitPageDesc1 = translations.CoreKelloggs_MaximumEntryLimit_teamPringles;\r\n } else {\r\n // dataLayers().entryLimit();\r\n limitPageHeading = translations.Sorry;\r\n limitPageDesc = translations.DailyLimit;\r\n limitPageDesc1 = translations.DailyLimitDescription;\r\n }\r\n return (\r\n <>\r\n \r\n
\r\n {limitPageHeading &&

{limitPageHeading}

}\r\n {limitPageDesc &&

}\r\n {limitPageDesc1 &&

}\r\n {globalLimit == 'GlobalRedemptionLimit' &&

poptheblocks.com

}\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Limit;","import React, { useContext } from 'react';\r\nimport { Redirect, useHistory, useLocation } from \"react-router-dom\";\r\nimport * as webStorageService from '../Utility/WebStorageFactory';\r\nimport { locale, MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\nimport dataLayers from '../Utility/DataLayers';\r\nfunction Error() {\r\n const { translations } = useContext(JsonContext);\r\n const history = useHistory();\r\n const location = useLocation();\r\n\r\n let pageState = webStorageService.getSessionData('createPageState');\r\n pageState = 'Error';\r\n if (pageState == '' || pageState == undefined || pageState == null) {\r\n window.location = '/' + locale + '/Home';\r\n } else if (pageState != 'Error') {\r\n return \r\n }\r\n\r\n\r\n document.querySelector('body').setAttribute('pagename', 'Error');\r\n let ErrorKey = webStorageService.getSessionData('ErrorKey') ? webStorageService.getSessionData('ErrorKey') : translations.CoreKelloggs_GeneralErrorMsg,\r\n ErrorCode = webStorageService.getSessionData('ErrorCode') ? webStorageService.getSessionData('ErrorCode') : '',\r\n titleError = ErrorKey,\r\n hideErrHead = (ErrorCode == 140) ? true : false;\r\n // dataLayers().errorCodeEvent(\"pringles.com\",ErrorCode)\r\n return (\r\n <>\r\n \r\n
\r\n

{translations.CoreKelloggs_ErrorPageHeading}

\r\n

\r\n {/*

{translations.ErrorPageThankyou}

*/}\r\n dataLayers().backToHP()} className=\"button\" title={translations.CoreKelloggs_ReturnToHomepageCtaTitle}>\r\n {translations.CoreKelloggs_BackToHomePage}\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Error;","import React, { useContext, useState } from 'react';\r\nimport { locale, MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction FAQ() {\r\n const { translations } = useContext(JsonContext);\r\n document.querySelector('body').setAttribute('pagename', 'FAQ');\r\n\r\n let currentlang = locale.toLowerCase(),\r\n defaultFaq,\r\n clicked_country;\r\n // defaultFaq=translations.Faq;\r\n switch (currentlang) {\r\n case 'en_gr':\r\n defaultFaq = translations.FaqCyprus;\r\n clicked_country = 'Cyprus';\r\n break;\r\n // case 'fr_be':\r\n // defaultFaq=translations.FaqBelgium;\r\n // clicked_country='Belgium';\r\n // break;\r\n default:\r\n defaultFaq = translations.Faq;\r\n }\r\n \r\n const [ faqContent, setFaqContent ] = useState(defaultFaq);\r\n const [ clickedCountry, setClickedCountry ] = useState(clicked_country?clicked_country:'');\r\n \r\n const show_hide = function (key) {\r\n clicked_country = key.trim();\r\n setClickedCountry(clicked_country);\r\n // faqContent = translations['Faq' + key];\r\n setFaqContent(translations['Faq' + key]);\r\n\r\n /* if(clicked_country === 'Luxembourgh'){\r\n faqContent=translations['FaqLuxembourg'];\r\n } else if(clicked_country === 'Belgium') {\r\n faqContent=translations['FaqBelgium'];\r\n } else if(clicked_country === 'Malta') {\r\n faqContent=translations['FaqMalta'];\r\n } else if(clicked_country === 'Iceland') {\r\n faqContent=translations['FaqIceland'];\r\n } else{\r\n faqContent=translations['Faq'+key];\r\n }*/\r\n };\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n {\r\n (currentlang != 'el_gr' && currentlang != 'az_az') &&

{translations.CoreKelloggs_FooterFaq}

\r\n }\r\n {\r\n currentlang == 'el_gr' &&

ΣΥΧΝΕΣ ΕΡΩΤΗΣΕΙΣ (FAQ)

\r\n }\r\n {\r\n currentlang == 'en_gr' &&
    \r\n {\r\n currentlang == 'en_gr' &&
  1. show_hide('Cyprus')}\r\n className={clickedCountry !== 'Cyprus' ? 'active inactive': 'active'}\r\n >{translations.LabelCyprus}
  2. \r\n }\r\n {\r\n currentlang == 'en_gr' &&
  3. show_hide('Malta')}\r\n className={clickedCountry === 'Malta' ? 'active':''}\r\n >{translations.LabelMalta}
  4. \r\n }\r\n {/* {\r\n currentlang == 'en_gr' &&
  5. {translations.LabelIceland}
  6. \r\n }\r\n {\r\n currentlang == 'fr_be' &&
  7. {translations.LabelBelgium}
  8. \r\n }\r\n {\r\n currentlang == 'en_gr' &&
  9. {translations.LabelLuxembourg}
  10. \r\n } */}\r\n\r\n
\r\n }\r\n {/* */}\r\n

\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default FAQ;","import React, { useContext, useState } from 'react';\r\nimport { locale, MetaTags } from '../Utility/Global';\r\nimport JsonContext from '../Utility/JsonProvider';\r\n\r\nfunction Terms() {\r\n const { translations } = useContext(JsonContext);\r\n\r\n document.querySelector('body').setAttribute('pagename', 'TERMS');\r\n\r\n let currentlang = locale.toLowerCase(),\r\n defaultTerms,\r\n clicked_country;\r\n // defaultTerms=translations.Faq;\r\n switch (currentlang) {\r\n case 'en_gr':\r\n defaultTerms = translations.TncCyprus;\r\n clicked_country = 'Cyprus';\r\n break;\r\n // case 'fr_be':\r\n // defaultTerms=translations.TncBelgium;\r\n // clicked_country='Belgium';\r\n // break;\r\n default:\r\n defaultTerms = translations.Tnc;\r\n }\r\n const [ tncContent, setTncContent ] = useState(defaultTerms);\r\n const [ clickedCountry, setClickedCountry ] = useState(clicked_country?clicked_country:'');\r\n const show_hide = function (key) {\r\n clicked_country = key.trim();\r\n setClickedCountry(clicked_country);\r\n // tncContent = translations['Tnc' + key];\r\n setTncContent(translations['Tnc' + key]);\r\n /* if(clickedCountry === 'Luxembourgh'){\r\n tncContent=translations['TncLuxembourgh'];\r\n } else if(clickedCountry === 'Belgium') {\r\n tncContent=translations['TncBelgium'];\r\n } else if(clickedCountry === 'Malta') {\r\n tncContent=translations['TncMalta'];\r\n } else if(clickedCountry === 'Iceland') {\r\n tncContent=translations['TncIceland'];\r\n } else{\r\n tncContent=translations['Tnc'+key];\r\n }*/\r\n };\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n {\r\n (currentlang != 'el_gr' && currentlang != 'az_az') &&

{translations.CoreKelloggs_FooterTerms}

\r\n }\r\n {\r\n currentlang == 'el_gr' &&

ΟΡΟΙ ΚΑΙ ΠΡΟΫΠΟΘΕΣΕΙΣ

\r\n }\r\n {\r\n currentlang == 'en_gr' &&
    \r\n {\r\n currentlang == 'en_gr' &&
  1. show_hide('Cyprus')}\r\n className={clickedCountry !== 'Cyprus' ? 'active inactive': 'active'}\r\n >{translations.LabelCyprus}
  2. \r\n }\r\n {\r\n currentlang == 'en_gr' &&
  3. show_hide('Malta')}\r\n className={clickedCountry === 'Malta' ? 'active': ' '}\r\n >{translations.LabelMalta}
  4. \r\n }\r\n {/* {\r\n currentlang == 'en_gr' &&
  5. {translations.LabelIceland}
  6. \r\n }\r\n {\r\n currentlang == 'fr_be' &&
  7. {translations.LabelBelgium}
  8. \r\n }\r\n {\r\n currentlang == 'en_gr' &&
  9. {translations.LabelLuxembourg}
  10. \r\n } */}\r\n
\r\n }\r\n

\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Terms;","import {$} from '../../Utility/Global'\r\n\r\n$(window).on('load',function(){\r\n var serviceURL = (typeof window.JS_ServiceURL !== 'undefined')?window.JS_ServiceURL:'https://services.kelloggs.com',\r\n base = window.location.pathname.split('/')[1],\r\n siteURL = window.location.origin + (base.length > 0 ? \"/\" + base : \"\");\r\n\t\tif (siteURL.indexOf('stage.') >= 0) {\r\n /*commented stage as per mindtree ref#1076472*/\r\n serviceURL = \"//gammastage.services.kelloggs.com\";\r\n }\r\n $.ajax({\r\n url: serviceURL+'/bin/ccquerybuilder.jsonp?propertyName=sitepath&propertyValue='+siteURL,\r\n dataType: 'jsonp',\r\n //jsonp: false,\r\n jsonpCallback: 'getAlert',\r\n success: function(data){\r\n //console.log(data); \r\n },\r\n complete: function() {\r\n //alert('complete');\r\n },\r\n error: function (request, error, errorThrown) {\r\n //console.log(error, errorThrown);\r\n }\r\n });\r\n});\r\nwindow.getAlert = function(jsonObject) {\r\n var json = JSON.parse(jsonObject), i, msg = \"\";\r\n for (i=0;i  '+shortMsg+'
';\r\n }\r\n if(document.getElementById('error_wp').innerHTML!=null)\r\n document.getElementById('error_wp').innerHTML=msg;\r\n}","import React, { useContext,useState } from 'react';\r\nimport { Route, Switch, Redirect } from \"react-router-dom\";\r\n\r\nimport { locale } from './Components/Utility/Global';\r\n\r\nimport Header from './Components/Partials/Header';\r\nimport Footer from './Components/Partials/Footer';\r\n\r\nimport Closed from './Components/Screens/Closed';\r\nimport Comingsoon from './Components/Screens/Comingsoon';\r\nimport Splitter from './Components/Screens/Splitter';\r\nimport Home from './Components/Screens/Home';\r\nimport Register from './Components/Screens/Register';\r\nimport Forgotpassword from './Components/Screens/Forgotpassword';\r\nimport Recoverpassword from './Components/Screens/Recoverpassword';\r\nimport Batchcode from './Components/Screens/Batchcode';\r\nimport Movie from './Components/Screens/Movie';\r\nimport Wordsearch from './Components/Screens/Wordsearch';\r\nimport Puzzle from './Components/Screens/Puzzle';\r\nimport Thankyou from './Components/Screens/Thankyou';\r\nimport Limit from './Components/Screens/Limit';\r\nimport Error from './Components/Screens/Error';\r\nimport FAQ from './Components/Screens/FAQ';\r\nimport Terms from './Components/Screens/Terms';\r\nimport JsonContext from './Components/Utility/JsonProvider';\r\nimport './Components/Utility/vendor/criticalcom';\r\nimport PromotionState from './Components/Utility/PromotionState';\r\n\r\nimport './Styles/mindpopping2022.scss';\r\nvar $ = require('jquery');\r\nvar jQuery = require('jquery');\r\n\r\nwindow.$ = $;\r\nwindow.jQuery = $;\r\n\r\nfunction App() {\r\n const { translations, settings } = useContext(JsonContext);\r\n const [loaded, setLoaded] = useState(false);\r\n const loadApp = (translations !== \"\" && translations !== undefined && settings !== \"\" && settings !== undefined) ? true : false;\r\n\r\n if(loadApp && !loaded){\r\n setLoaded(true);\r\n const {initPage} = PromotionState(settings,translations);\r\n initPage();\r\n sessionStorage.removeItem('btnObj');\r\n sessionStorage.removeItem('shippingBtnObj');\r\n sessionStorage.removeItem('receiptObj');\r\n }\r\n\r\n return (\r\n <>\r\n {loadApp && loaded &&\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {\r\n locale != 'be' && locale != 'ch' &&