promoMarkupnotifMarkup

“,panelEmptyTemplate=”

  • emptyPanelMsg

  • “,panelErrorTemplate=”

    errorMsg

    “,panelParentTemplate=””,notifOnboardPromoTemplate=”

  • “,EXPANDED_PANEL=”expanded_panel”,ERROR_PANEL=”error_panel”,NotificationView=function(){function e(n,t)classCallCheck(this,e);var i=this;i._config=n,i._panelNode=null,i._store=treturn createClass(e,[key:”_generatePanelMarkup”,value:function(e,n)var t=this._config,i=void 0,o=void 0;”undefined”!=typeof window&&(i=window.Notification&&”default”===window.Notification.permission,o=t.promos.bypassEligibleClassCheck,{key:”render”,value:function(e,n)var t=this;if(t._panelNode)var i=void 0,o=t._panelNode,r=void 0,s=void 0;switch(e)case EXPANDED_PANEL:i=panelTemplate,s=t._store.getNotifications(),r=t._generatePanelMarkup(i,s),o.innerHTML=r;break;case ERROR_PANEL:r=(i=panelErrorTemplate).replace(“errorMsg”,t._config.panel.errorMsg),o.innerHTML=rn&&n()else n&&n(new Error(“No panel parent”))},key:”createPanelParentNode”,value:function(e)e&&(e.innerHTML=panelParentTemplate,this._panelNode=document.getElementById(constants.panelNodeId)),key:”updateBadgeNode”,value:function(e)if(e)var n=this._store.getNotifications().newCount,t=this._config.badge.maxCount;if(n)var i=n>t?t+”+”:n;e.innerHTML=ielse e.innerHTML=””,key:”addStyles”,value:function(e)if(e&&”undefined”!=typeof window)]),e}(),EXPANDED_PANEL$1=”expanded_panel”,ERROR_PANEL$1=”error_panel”,PanelController=function()function e(n,t,i)classCallCheck(this,e);var o=this;o._store=t,o._view=i,o._config=n;var r=o._config.panel;o._panelParentNode=document.querySelector(r.parentSelector),o._badgeNode=o._config.badge.selector&&document.querySelector(o._config.badge.selector),o._indicatorNode=r.indicatorSelector&&document.querySelector(r.indicatorSelector)return createClass(e,[key:”createPanelParentNode”,value:function()this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(constants.panelNodeId),key:”refreshPanelNode”,value:function(e,n)var t=this;addClass(t._notifPanelNode,constants.panelLoading),t._store.fetchNotifications(e,(function(e,i))),key:”resetBadge”,value:function()var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),addClass(e._badgeNode,e._config.badge.hideClass),key:”_showIndicator”,value:function()this._indicatorNode&&(this._store.getNotifications().newCount?addClass(this._indicatorNode,this._config.panel.indicatorClass):removeClass(this._indicatorNode,this._config.panel.indicatorClass)),key:”_showBadge”,value:function()var e=this;e._store.getNotifications().newCount?removeClass(e._badgeNode,e._config.badge.hideClass):addClass(e._badgeNode,e._config.badge.hideClass)]),e(),config=promos:eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0,bypassEligibleClassCheck:!1,notifOnboardBtnLabel:”Notify Me”,notifOnboardMsg:”Get alerts for breaking news and top stories”,promoLogo:”https://s.yimg.com/cv/apiv2/ae/news/circle_bell.png”,showYahooLogo:!0,subscriptionTopic:”gondor_homerun_news”,badge:hideClass:””,maxCount:5,selector:””,panel:2,service:attemptCount:2,attemptDelay:1,url:null,resetUrl:null,isRMP:!1,responseType:”json”,timeout:1500,Main=function(){function e(n)classCallCheck(this,e);var t=this;t.config=t._parseConfig(n),t._validateRequiredConfigs()&&(t._request=new NotificationRequest(t.config),t._store=new NotificationStore(t.config,t._request),t._view=new NotificationView(t.config,t._store),t._panelController=new PanelController(t.config,t._store,t._view),t._panelController.createPanelParentNode(),t._assignHelperMethods())return createClass(e,[key:”_parseConfig”,value:function(e)var n=;for(var t in objectAssign(n,config),n)if(n.hasOwnProperty(t))var i=n[t],o=e[t];”object”===(void 0===i?”undefined”:_typeof(i))?objectAssign(i,o):n[t]=e[t]return n,key:”_validateRequiredConfigs”,value:function()!e.service.url),key:”_assignHelperMethods”,value:function()var e=this;e.helpers=refreshPanelNode:e._panelController.refreshPanelNode.bind(e._panelController),resetBadge:e._panelController.resetBadge.bind(e._panelController),resetIndicator:fun
    ction()removeClass(e._panelController._indicatorNode,e.config.panel.indicatorClass)]),e}(),notificationClient_module_min=Main,notificationClient=NotificationClient:notificationClient_module_min,CONSUMPTION_STORAGE_KEY=”lnct”,NotifClient=function(){function e()void 0===n?void 0:n.match(/ybar-variant-([a-z]*)/),this.client=new notificationClient.NotificationClient(this.getConfig())return e.prototype.refreshPanel=function()(null===(n=window.Af),e.prototype.resetBadge=function()this.client.helpers.resetBadge(),this.setTimeStamp(),e.prototype.getConfig=function()void 0===e?void 0:e.config,r=;if(o)”att”===(null===(n=this.partnerClasses)return this.mergeConfigs(t,r),e.prototype.mergeConfigs=function(e,n)var t=__assign(,e);for(var i in e)t[i]=__assign(__assign(,e[i]),n[i]);return t,e.prototype.getTimeStamp=function(),e.prototype.setTimeStamp=function()var e,n=””+Math.floor((new Date).getTime()/1e3);return null===(e=window.localStorage),e}(),notifClient=new NotifClient,getNotifClient=function()return notifClient,reInit=function()notifClient=new NotifClient,ybarRapid,ybarRapidInterval,ybarRapidErrMsg=””,beaconQueue=[],noop=function(),logRapidError=function()window.removeEventListener(“beforeunload”,logRapidError),””!==ybarRapidErrMsg&&logError(“Rapid not found on page”,new Error(ybarRapidErrMsg)),findRapidWithSpaceid=function(e)var n=void 0;if(e&&e.length>0)for(var t=0;t90&&fireImageBeacon(“performance”,e)catch(e)),1e3)}))},measureInit=measure(“ybar-init”);initYbar(),measureInit.stop(),initPerformanceMetricsBeaconListener(),initRapid(),initErrorBeaconListener();var selected=”_yb_16y71″,Css$7=”right-item”:”_yb_11yhn”,selected:selected,”ybar-mod-topnavigation”:”_yb_ck0xf”,”ybar-mod-topnavigation-teaser-imp”:”_yb_6ej5p”,DOCUMENT_NODE_TYPE=9;if(“undefined”!=typeof Element&&!Element.prototype.matches)function closest(e,n)for(;e&&e.nodeType!==DOCUMENT_NODE_TYPE;)if(“function”==typeof e.matches&&e.matches(n))return e;e=e.parentNodevar closest_1=closest;function _delegate(e,n,t,i,o)var r=listener.apply(this,arguments);return e.addEventListener(t,r,o),destroy:function()e.removeEventListener(t,r,o)function delegate(e,n,t,i,o)return”function”==typeof e.addEventListener?_delegate.apply(null,arguments):”function”==typeof t?_delegate.bind(null,document).apply(null,arguments):(“string”==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e)return _delegate(e,n,t,i,o))))function listener(e,n,t,i)return function(t)t.delegateTarget=closest_1(t.target,n),t.delegateTarget&&i.call(e,t)var delegate_1=delegate,ListNode=function(e)this.data=e,this.next=null,this.prev=null,LinkedList=function(){function e()this.head=null,this.tail=nullreturn e.prototype.push=function(e)var n=new ListNode(e);return this.head?this.tail?(n.prev=this.tail,this.tail.next=n,this.tail=n):(this.tail=n,this.tail.prev=this.head,this.head.next=this.tail):(this.head=n,n.next=this.tail),n,e.prototype.size=function()for(var e=0,n=this.head;n;)e+=1,n=n.next;return e,e.prototype.getHead=function()return this.head,e.prototype.getTail=function()return this.tail,e.prototype.get=function(e){if(e>=this.size())return null;for(var n=0,t=this.head;(null==t?void 0:t.next)&&n0&&Array.prototype.forEach.call(e,(function(e)e.onerror=function()e.onerror=null,e.style.display=”none”)),fixLogoOutline=function(e,n)e&&(hideOutlineOnMouseDown(“#ybar-logo”,”#ybar-logo”,n),n.onDestroy((function()e.classList.remove(“ybar-show-outline”),e.classList.remove(“ybar-hide-outline”)))),logoClick=function(e,n)n&&e.addElementListener(n,”click”,(function()e.triggerEvent(“logo-click”))),init$4=function(e,n)n.logoImages&&hideLogosOnError(n.logoImages),n.wrapper&&(fixLogoOutline(n.wrapper,e),logoClick(e,n.wrapper));initModule(“ybar-mod-logo”,(function(e)var n=wrapper:document.getElementById(“ybar-logo”),logoImages:document.querySelectorAll(“.”.concat(Css$6[“logo-image”]));init$4(e,n)));var overlay$1=”_yb_1fsui”,tooltip=”_yb_rw8lp”,tooltip__text=”_yb_vdz43″,tooltip__voice=”_yb_127vx”,tooltip__web=”_yb_18rmb”,Css$5=”dropdown-open”:”_yb_et2b0″,”merchant-is-selected”:”_yb_1pnmd”,overlay:overlay$1,”selected-merchant-clear-button”:”_yb_1dt1e”,”shops-buttons”:”_yb_o50n0″,”styled-select”:”_yb_mk8sv”,tooltip:tooltip,”tooltip–show”:”_yb_dqq4n”,tooltip__text:tooltip__text,tooltip__voice:tooltip__voice,tooltip__web:tooltip__web,range=function(e,n)var t=Math.max(e,n),i=Math.min(e,n),o=Math.abs(t-i);return __spreadArray([],new Array(o+1),!0).map((function(e,n)return i+n)),openSearchOverlay=function(e,n,t)var i=e.getConfig().bucketConfig,o=(void 0===i?:i).enable_search_ui,r=void 0!==o&&o;if(n.ybar)n.ybar.classList.add(“ybar-searchbox-assist-fullscreen”),document.documentElement.classList.add(“ybar-overlay”),document.body.classList.add(“ybar-overlay-noscroll”);beaconClick(“ybar”,”websrch”,””,elm:”expand”,subsec:”searchbox”,itc:”1″),setTimeout((function()n.searchInput instanceof HTMLInputElement&&(t&&(n.searchInput.value=t),n.searchInput.focus(),r&&n.searchInput.click()))),closeSearchOverlay=function(e),initMweb=function(e,n)”smartphone”===e.getConfig().device&&(e.addElementListener(n.searchBoxPlaceholder,”click”,(function()openSearchOverlay(e,n))),e.addElementListener(n.searchBoxPlaceholder,”keydown”,(function(t)var i=t,o=i.keyCode,r=i.key,s=range(65,90),a=__spreadArray(__spreadArray([],range(58,57),!0),range(96,105),!0),c=__spreadArray(__spreadArray([],s,!0),a,!0).includes(o);(32===o)),n.searchBoxBackButton&&(e.addElementListener(n.searchBoxBackButton,”click”,(function(e)e.stopPropagation(),closeSearchOverlay(n);beaconClick(“ybar”,”back-close-sr
    ch”,””,elm:”btn”,subsec:”searchbox”,itc:”1″))),e.addElementListener(n.searchInput,”keyup”,(function(e)e.stopPropagation();27===e.keyCode&&(e.stopPropagation(),closeSearchOverlay(n))))),e.onDestroy((function()closeSearchOverlay(n)))),Tooltip=function()function e(e,n,t)n&&(this.ybar=e,this.elem=n,this.options=t,this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.addEventListeners())return Object.defineProperty(e.prototype,”tooltip”,get:function()this.elem).appendChild(this.tooltipMarkup),this.ybar.onDestroy((function()t.removeChild(e.tooltipMarkup)))),this.tooltipMarkup,enumerable:!1,configurable:!0),e.prototype.show=function()this.tooltip.classList.add(this.options.showClass),e.prototype.hide=function()this.tooltip.classList.remove(this.options.showClass),e.prototype.addEventListeners=function()this.ybar.addElementListener(this.elem,”mouseenter”,this.show),this.ybar.addElementListener(this.elem,”focus”,this.show),this.ybar.addElementListener(this.elem,”mouseleave”,this.hide),this.ybar.addElementListener(this.elem,”blur”,this.hide),e.prototype.createTooltip=function()””;var n=document.createElement(“p”);return n.textContent=this.options.label,n.className=this.options.textClass,e();createCommonjsModule((function(module){(function(){var __webpack_modules__={“./src/index.js”:
    /*!**********************!*\
    !*** ./src/index.js ***!
    \**********************/function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){eval(“var I18n = __webpack_require__(/*! ./lib/I18n */ \”./src/lib/I18n.js\”);\n\n(function (win, doc) {\n \”use strict\”;\n\n var defaultConfig = \n uiLang: ‘en-US’,\n speechLang: ‘en-US’,\n voiceButton: ‘#voice-btn’,\n searchBox: \n form: ‘#sf’,\n input: ‘#yschsp’,\n params: \n fr: ”,\n fr2: ”\n \n ,\n enable_voice_trending: false,\n trending: \n market: \”en-us\”\n ,\n ui: \n speechOverlay: \n disableBlur: false\n \n ,\n browsers: \n edge: false\n \n ;\n\n function VoiceSearch(config) {\n var self = this;\n self.config = Object.assign(defaultConfig, config || );\n self.i18n = new VoiceSearch.I18n(\n lang: self.config.uiLang\n );\n self.renderPermissionGuide(self);\n self.renderSpeechPanel(self);\n self.speechResult=””;\n self.noSpeech = true;\n self.isRecognitionStart = false;\n self.recognition = null;\n self.voiceButton = doc.querySelector(self.config.voiceButton);\n self.searchBoxForm = doc.querySelector(self.config.searchBox.form);\n self.searchBoxQuery = doc.querySelector(self.config.searchBox.input);\n self.speechPanel = doc.querySelector(‘#spch’);\n self.speechButtonContainer = doc.querySelector(‘#spchbc’);\n self.speechButton = doc.querySelector(‘#spchbc-btn’);\n self.speechText = doc.querySelector(‘#spcht’);\n self.speechOverlay = doc.getElementById(‘spch-overlay’);\n self.retryLink = doc.querySelector(‘#spcht-retry’);\n self.trending = doc.getElementById(‘spch-trending’);\n self.trendingTerms = doc.getElementById(‘trending-terms’);\n self.termSpans = doc.getElementsByClassName(\”trending-term\”);\n self.closeButton = doc.querySelector(‘#spchx’);\n self.startAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-start-202105050733.wav’);\n self.resultAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-result-202105050733.wav’);\n self.errorAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-error-202105050733.wav’);\n self.closeAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-close-202105050733.wav’);\n self.permissionGuide = doc.querySelector(‘#spchp’);\n self.permissionGuideClose = doc.querySelector(‘#spchpx’);\n self.permissionGuideTimer = null;\n\n self.onEscKeyDown = function (e) \n if (e.code !== ‘Escape’) \n return;\n \n\n self.recognition.stop();\n self.sendBeacon(‘keybrd’, ‘voicesearch_cancel_esc’); // The clean up should put inside closePanel() instead of here,\n // or func won’t be cleaned up if user close panel with btn or overlay\n\n self.closePanel(self);\n ;\n\n if (self.isBrowserSupported()) {\n var SpeechRecognition = win.SpeechRecognition || win.webkitSpeechRecognition;\n var SpeechGrammarList = win.SpeechGrammarList || win.webkitSpeechGrammarList;\n var speechGrammar=”#JSGF V1.0;”;\n self.recognition = new SpeechRecognition();\n var speechRecognitionList = new SpeechGrammarList();\n\n if (speechRecognitionList.addFromString) \n speechRecognitionList.addFromString(speechGrammar, 1);\n \n\n self.recognition.grammars = speechRecognitionList;\n self.recognition.continuous = false;\n self.recognition.lang = self.config.speechLang;\n self.recognition.interimResults = false;\n self.recognition.maxAlternatives = 1;\n /* Listeners */\n\n if (self.voiceButton) \n self.voiceButton.onclick = function () \n self.recognition.start();\n\n if (self.permissionGuideTimer) \n win.clearTimeout(self.permissionGuideTimer);\n \n\n self.permissionGuideTimer = win.setTimeout(function () \n if (!self.isRecognitionStart) \n self.showPermissionGuide(self);\n \n , 300); // Also close when pressing esc\n\n doc.addEventListener(‘keydown’, self.onEscKeyDown);\n self.sendBeacon(‘clk’, ‘voicesearch’);\n ;\n \n\n if (self.speechButton) \n self.speechButton.onclick = function () \n if (!self.isRecognitionStart) \n self.recognition.start();\n self.sendBeacon(‘clk’, ‘voicesearch_panel_mic_restart’);\n else \n self.recognition.stop();\n self.sendBeacon(‘clk’, ‘voicesearch_panel_mic_close’);\n self.closePanel(self);\n \n ;\n \n\n if (self.retryLink) \n self.retryLink.onclick = function () \n if (!self.isRecognitionStart) \n self.recognition.start();\n self.sendBeacon(‘clk’, ‘voicesearch_panel_retry’);\n \n ;\n \n\n if (self.speechOverlay) \n self.speechOverlay.onclick = function () \n self.recognition.stop();\n self.sendBeacon(‘clk’, ‘voicesearch_cancel_outside’);\n self.closePanel(self);\n ;\n \n\n if (self.closeButton) \n self.closeButton.onclick = function\n /*event*/\n () \n self.recognition.stop();\n self.sendBeacon(‘clk’, ‘voicesearch_cancel’);\n self.closePanel(self);\n ;\n \n\n if (self.permissionGuideClose) \n self.permissionGuideClose.onclick = function\n /*event*/\n () \n self.recognition.stop();\n self.sendBeacon(‘clk’, ‘voicesearch_permission_close’);\n self.closeAudio.play();\n self.hidePermissionGuide(self);\n ;\n \n /* Recognition Events */\n\n\n self.recognition.onresult = function (event) \n // The SpeechRecognitionEvent results property returns a SpeechRecognitionResultList object\n // The SpeechRecognitionResultList object contains SpeechRecognitionResult objects.\n // It has a getter so it can be accessed like an array\n // The first [0] returns the SpeechRecognitionResult at the last position.\n // Each SpeechRecognitionResult object contains SpeechRecognitionAlternative objects that contain individual results.\n // These also have getters so they can be accessed like arrays.\n // The second [0] returns the SpeechRecognitionAlternative at position 0.\n // We then return the transcript property of the SpeechRecognitionAlternative object\n // console.log(‘Confidence: ‘ + event.results[0][0].confidence);\n self.speechResult = event.results[0][0].transcript;\n /* Punctuation Handling: Check last character and strip it if necessary */\n\n self.handlePunctuation(self);\n\n if (self.speechText) \n self.speechText.innerText = self.speechResult;\n \n\n if (self.searchBoxQuery) \n self.searchBoxQuery.value = self.speechResult;\n \n\n self.resultAudio.play();\n win.setTimeout(function () \n if (self.speechPanel) \n self.speechPanel.classList.remove(\”s2tb\”);\n self.speechPanel.classList.add(\”s2tb-h\”);\n \n\n self.hideRetryLink(self);\n\n if (self.searchBoxForm) \n var inputFr = self.searchBoxForm.querySelector(‘[name=fr]’);\n var inputFr2 = self.searchBoxForm.querySelector(‘[name=fr2]’);\n\n if (inputFr && self.config.searchBox && self.config.searchBox.params && self.config.searchBox.params.fr) \n inputFr.value = config.searchBox.params.fr;\n inputFr.disabled = false; // for homepage case\n \n\n if (inputFr2 && self.config.searchBox && self.config.searchBox.params && self.config.searchBox.params.fr2) \n inputFr2.value = config.searchBox.params.fr2;\n inputFr2.disabled = false; // for homepage case\n \n\n self.searchBoxForm.submit();\n \n , 1000);\n ;\n\n self.recognition.onspeechstart = function\n /*event*/\n () // Fired when speech starts\n ;\n\n self.recognition.onspeeche
    nd = function () \n // Fired when speech ends\n self.recognition.stop();\n ;\n\n self.recognition.onerror = function\n /*event*/\n () \n // console.log(‘Error occurred in recognition: ‘ + event.error);\n if (self.speechText) \n self.speechText.innerText = self.i18n.t(‘search.voice.recognition_error’);\n \n\n self.hideTrending(self);\n self.showRetryLink(self);\n self.errorAudio.play();\n ;\n\n self.recognition.onaudiostart = function\n /*event*/\n () \n // Fired when the user agent has started to capture audio.\n if (self.speechButtonContainer) \n self.speechButtonContainer.classList.add(\”listening\”);\n \n ;\n\n self.recognition.onaudioend = function\n /*event*/\n () \n // Fired when the user agent has finished capturing audio.\n if (self.speechButtonContainer) \n self.speechButtonContainer.classList.remove(\”listening\”);\n \n ;\n\n self.recognition.onsoundstart = function\n /*event*/\n () \n // Fired when any sound — recognisable speech or not — has been detected.\n self.hideTrending(self);\n self.noSpeech = false;\n\n if (self.speechButtonContainer) \n self.speechButtonContainer.classList.remove(\”listening\”);\n self.speechButtonContainer.classList.add(\”speaking\”);\n \n ;\n\n self.recognition.onsoundend = function\n /*event*/\n () \n // Fired when no sound present\n if (self.speechButtonContainer) \n self.speechButtonContainer.classList.remove(\”speaking\”);\n \n ;\n\n self.recognition.onstart = function\n /*event*/\n () \n // Fired when the speech recognition service has begun listening\n self.recognitionInit(self);\n self.startRecognition(self);\n ;\n\n self.recognition.onend = function\n /*event*/\n () \n // Fired when the speech recognition service has disconnected.\n self.isRecognitionStart = false;\n\n if (self.noSpeech == false && self.speechResult == ”) \n // No match: Fired when the speech recognition can’t recognise speech\n if (self.speechText) \n self.speechText.innerText = self.i18n.t(‘search.voice.recognition_nomatch’);\n \n\n self.hideTrending(self);\n self.showRetryLink(self);\n self.errorAudio.play();\n \n ; // trigger onReady event when initialized\n\n\n if (document && document.dispatchEvent) \n document.dispatchEvent(new Event(‘VOICE_JS_READY’));\n \n }\n } // static members\n\n\n VoiceSearch.I18n = I18n; // instance members\n\n VoiceSearch.prototype.renderPermissionGuide = function (self) \n var tmpl = \”\\n

    \\n \\n

    \\n \\n

    \\n

    \”.concat(self.i18n.t(‘search.voice.permission_title’), \”

    \\n

    \”).concat(self.i18n.t(‘search.voice.permission_text’), \”

    \\n

    \\n

    \\n

    \\n \”);\n var dom = new DOMParser().parseFromString(tmpl, ‘text/html’);\n document.body.appendChild(dom.body.children[0]);\n ;\n\n VoiceSearch.prototype.renderSpeechPanel = function (self) \n var tmpl = \”\\n

    \\n \\n \\n

    \\n

    \\n

    \\n \\n \\n \\n \\n \\n \\n

    \\n

    \\n

    \\n \\n \\n \”.concat(self.i18n.t(‘search.voice.recognition_retry’), \”\\n

    \\n

    \\n

    \\n

    \\n

    \\n

    \\n \”).concat(self.i18n.t(‘search.voice.trending_title’), \”\\n \\n

    \\n

    \\n

    \\n \”);\n var dom = new DOMParser().parseFromString(tmpl, ‘text/html’);\n\n if (self && self.config && self.config.ui && self.config.ui.speechOverlay && self.config.ui.speechOverlay.disableBlur) \n dom.body.children[0].classList.add(‘disable-blur-overlay’);\n \n\n document.body.appendChild(dom.body.children[0]);\n ;\n\n VoiceSearch.prototype.isBrowserSupported = function () \n var isSupported = false;\n var self = this;\n var isChromium = Boolean(window.chrome);\n var isIOSChrome = /CriOS/.test(window.navigator.userAgent);\n var isEdge = /Edg\\//.test(window.navigator.userAgent);\n var isLegacyEdge = /Edge\\//.test(window.navigator.userAgent);\n var isOpera = Boolean(window.opr);\n var isBrave = Boolean(window.navigator.brave);\n var browsers = [// chrome\n \n checkEnabled: function checkEnabled() \n return true;\n ,\n checkBrowser: function checkBrowser() \n return isChromium && !isIOSChrome && !isEdge && !isOpera && !isBrave;\n ,\n checkAPI: function checkAPI() \n return win && (‘SpeechRecognition’ in win \n , // edge\n \n checkEnabled: function checkEnabled() \n return self && self.config && self.config.browsers && self.config.browsers.edge;\n ,\n checkBrowser: function checkBrowser() \n return isChromium && isEdge && !isLegacyEdge;\n ,\n checkAPI: function checkAPI() \n ];\n\n for (var b = 0; b 0) \n ;\n\n VoiceSearch.prototype.sendBeacon = function (actn, slk) ;\n\n if (ULT.beacon_click) \n var trackParams = \n _S: SB.config.i13n.spaceid,\n _I: SB.config.i13n.pvid,\n actn: actn,\n sec: ‘search’,\n slk: slk\n ;\n win.YAHOO.ULT.beacon_click(trackParams);\n \n ;\n\n VoiceSearch.prototype.ajaxReq = function (url, callback) [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) [];\n\n if (Object.prototype.toString.call(newList) !== ‘[object Array]’) \n return;\n \n\n for (var i = 0; i =200&&o.status40959)&&(o19903))return!1return!0,normalizeAndEscapeUserRecord=function(e),createAccountItemElement=function(e,n,t){var i=t.ybarAccMenuItemTemplate,o=t.crumb;if(i){var r=(n+1).toString(),s=i.getAttribute(“data-signedOutState”),a=i.getAttribute(“data-done”)||””,c=getTemplateContent(i),l=c.children&&c.children[0];if(!l&&c.childNodes)for(var d=0;d0)var h=document.querySelector(“”.concat(r,” .”).concat(Css$4[“ybar-sign-out”])),v=h&&h.getAttribute(“data-soa”),g=document.querySelector(“”.concat(r,” .”).concat(Css$4[“ybar-sign-out-text”]));if(g&&v&&(g.innerText=v),c&&c.classList.add(Css$4.show),t)var y=document.querySelector(“”.concat(r,” “).concat(Css$4[“ybar-icon-arrow”])),b=Css$4[“ybar-icon-arrow-up”],_=Css$4[“ybar-icon-arrow-down”],w=Css$4[“ybar-item-hidden”],E=document.querySelectorAll(“.”.concat(Css$4[“ybar-item-hidden”]));y&&(y.classList.toggle(_),e.addElementListener(y,”click”,(function()for(var e=0;ed)var C=document.querySelector(“”.concat(r,” .”).concat(Css$4[“ybar-see-info”]));C&&C.style&&(C.style.display=”block”)addDoneUrlToAllLink(n,e)else s&&(s.style.display=”block”)))},handleResetBadge=function(e)getNotifClient().resetBadge(),e.notifBadge&&(e.notifBadge.style.visibility=”hidden”),e.profNotifBadge&&(e.profNotifBadge.style.visibility=”hidden”),getPath=function(e)if(“function”==typeof e.composedPath)return e.composedPath();if(e.path)return e.path;for(var n=e.target,t=[];null!==n.parentNode;)t.push(n),n=n.parentNode;return t.push(document,window),t,notify=function(e,n)var t=n.ybarAccountContainer,i=n.smartphoneNotifContainer,o=n.notificationMenu,r=n.notifBadge,s=n.dropdownContainer,a=n.ybarNotificationBody,c=n.profNotifBadge,l=n.backButton,d=function(e)(null==e?void 0:e.newCount)&&e.newCount>0&&r&&(r.style.visibility=”visible”,c&&(c.style.visibility=”visible”,c.innerText=r.innerText)),u=getNotifClient(),p=function()u.refreshPanel().then(d).catch((function()));if(i)p();var f=setInterval((function()p()),3e5);e.onDestroy((function()clearInterval(f))),e.addElementListener(o,”click”,(function()p(),s&&(s.style.display=”block”),t&&(t.style.width=”100%”,t.scrollTop=0,t.style.overflow=”hidden”),handleResetBadge(n),beaconClick(“ybar”,”notification”,””,slk:”notification”,elm:”btn”,elmt:”visible”===(null==r?void 0:r.style.visibility)?”new alert”:””,sec:”ybar”,subsec:”notification”,pkgt:”profile-pane”,itc:”1″))),e.addElementListener(l,”click”,(function()s&&(s.style.display=”none”),t&&(t.style.width=””,t.style.overflow=””),beaconClick(“ybar”,”back-notification”,””,slk:”back-notification”,elm:”arrow”,pkgt:”profile-pane”,sec:”ybar”,subsec:”notification”,itc:”1″))),a&&e.addElementListener(a,”click”,(function(e)getPath(e).find((function(e)var n=e;if(n.nodeName&&”a”===n.nodeName.toLowerCase()&&n.classList.contains(“yns-link”))return s&&(s.style.display=”none”),t&&(t.style.width=””,t.dispatchEvent(new CustomEvent(“toggle-overlay”))),!0)))),canBuildAccSwitcherList=!0,accSettingDropdownOpen=!1,visibilityTracking=0,params,imageElementsConfig=ybarAccountImage:selector:”ybar-account-img”,size:”64″,ybarCurrentUserProfileImage:selector:”ybar-current-user-profile-img”,size:”128″,ybarUserProfileImage:selector:”ybar-user-profile-img”,size:”128″,pictureOnErrorForSize=function(e,n)var t=”https://s.yimg.com/wm/modern/images/default_user_profile_pic_”+e+”.png”;n.onerror=null,n.srcset=””,n.src=t,init$3=function(e,n){var t=n.ybarAccountContainer,i=n.ybarAccountMenu,o=n.ybarMobile,r=n.isSmartphone,s=n.ybarMenuManagePub,a=n.arrowWrapper,c=n.downArrow,l=n.upArrow,d=n.otherAccWrapper,u=n.signInAccountMenu,p=n.signInBtn,f=n.ybarModAccount,m=n.yahooPlusImpression,h=function(i)if(t)t.style.removeProperty(“display”),”false”===t.getAttribute(“data-enabled”)&&(t.style.display=”none”),addDoneUrlToAllLink(n,e);elsevar o=new Error(“ybarAccountContainer not Found”);logError(“ERROR:”,o)t&&canBuildAccSwitcherList&&(canBuildAccSwitcherList=!1,e.onDestroy((function()canBuildAccSwitcherList=!0)),buildAccSwitcherList(e,n,i)),v=function()void 0===e,g=function()t.classList.remove(“ybarMenuOpen”),null==i,y=function()if(m&&!m.getAttribute(“src”)&&m.getAttribute(“data-src”))””;addConsentToUrl(n).then((function(e)m.setAttribute(“src”,e))),e.onDestroy((function()m.setAttribute(“src”,””)));if(p&&(addHoverEvent(e,p,”ybar”,”sign-in”,params=elm:”signin”,subsec:”settings”,itc:”2″),addDoneUrlToAllLink(n,e)),i||o||u){if(o)h(!0);else{if(h(!1),e.addEventListener(“close-all-menus”,(function()i&&!isHovered(i)?i.checked=!1:u&&u.classList.contains(Css$4.show)&&u.parentNode&&!isHovered(u.parentNode)&&g())),e.onDestroy((function()g())),i)if(i.onchange=function()e.triggerEvent(“close-all-menus”),params=itc:”2″,elm:”menu”,elmt:”user-info”,subsec:”accounts”,r)var b=document.querySelector(“#ybarAccountMenuOpener”);b&&b.setAttribute(“data-ylk”,”slk:Settings;elm:btn;sec:ybar;subsec:settings;pkgt:profile-pane;itc:0;tar:login.yahoo.com”),function()t&&addOverlay(t,”right”,e);var n=document.querySelector(“.”.concat(Css$4[“ybar-icon-image-wrapper”]));e.addElementListener(n,”click”,(function()null==t))(),e.addElementListener(a,”click”,(function()c.classList.remove(“hide”),null==l)),notify(e,n)elsevar _=document.querySelector(“#ybarAccountMenu + label”);_&&(addHoverEvent(e,_,”ybar”,”profile-expand”,params),e.addElementListener(_,”mouseenter”,y),e.addElementListener(f,”focus”,y)),i&&i.parentNode&&(e.addElementListener(i.parentNode,”mouseenter”,v),e.addElementListener(i.parentNode,”focusin”,v))hideOutlineOnMouseDown(“#ybarAccountMenu”,”#ybarAccountMenu + label”,e)e.addElementListener(t,”focusin”,(function()null==t)),e.addElementListener(t,”focusout”,g),e.addElementListener(s,”click”,g)}Object.keys(imageElementsConfig).forEach((function(e)var n=imageElementsConfig[e],t=document.querySelector(“.”.concat(Css$4[n.selector]));t&&(t.onerror=function()pictureOnErrorForSize(n.size,t))))}};initModule(“ybar-account-init”,(function(e)var n=document.getElementById(“ybarAccountContainer”),t=ybarAccountContainer:n,ybarAccountMenu:document.getElementById(“ybarAccountMenu”),ybarMobile:document.querySelector(“.”.concat(Css$4.mobile,” .”).concat(Css$4[“ybar-account-user-email”])),isSmartphone:document.querySelector(“.”.concat(Css$4.smart
    phone)),ybarMenuManagePub:document.getElementById(“ybarMenuManagePub”),arrowWrapper:document.getElementById(“smartphone-arrow”),downArrow:document.getElementById(“down-arrow”),upArrow:document.getElementById(“up-arrow”),otherAccWrapper:document.getElementById(“otherAccWrapper”),signInAccountMenu:document.querySelector(“.”.concat(Css$4[“ybar-mod-account”],” .”).concat(Css$4[“sign-in-menu”])),signInBtn:document.querySelector(“.”.concat(Css$4[“ybar-mod-account”],” .”).concat(Css$4[“ybar-login-btn”])),ybarModAccount:document.querySelector(“.”.concat(Css$4[“ybar-mod-account”])),yahooPlusImpression:n&&n.querySelector(“.”.concat(Css$4[“ybar-account-yahoo-plus-imp”])),crumb:document.querySelector(‘input[name=”crumb”]’),ybarAccMenuItemTemplate:document.getElementById(“ybarAccMenuItemTemplate”),generalSignin:document.getElementById(“generalSignin”),inSessionSignin:document.getElementById(“inSessionSignin”),smartphoneNotifContainer:document.getElementById(“smartphoneNotifContainer”),notificationMenu:document.getElementById(“smartphoneNotifMenu”),notifBadge:document.getElementById(“notif-badge”),profNotifBadge:document.querySelector(“.”.concat(Css$4[“prof-notif-badge”])),dropdownContainer:document.getElementById(“notifDropdownContainer”),ybarNotificationBody:document.getElementById(“ybarNotificationBody”),backButton:document.getElementById(“backButton”);init$3(e,t)));var Css$2=”popover-body”:”_yb_9437e”,”ybar-mail-item-desc”:”_yb_n05kf”,”ybar-mail-item-image”:”_yb_ai7jb”,”ybar-mail-item-link”:”_yb_1bfru”,”ybar-mail-item-name”:”_yb_15iye”,”ybar-mail-item-snippet”:”_yb_itd7q”,”ybar-mail-item-time”:”_yb_dpk7a”,”ybar-mail-item-unread”:”_yb_1586c”,”ybar-mail-link”:”_yb_x2igu”,”ybar-mail-list”:”_yb_18u37″,”ybar-mail-preview”:”_yb_2xtto”,”ybar-mail-signin-link”:”_yb_f7qyj”,”ybar-mod-mail”:”_yb_ulvfy”,”ybar-mod-mail-promo-imp”:”_yb_155in”,JwsRequestType,JwsRequestStatus;!function(e)e[e.COUNT=0]=”COUNT”,e[e.PREVIEW=1]=”PREVIEW”(JwsRequestType||(JwsRequestType=)),function(e)e[e.PENDING=0]=”PENDING”,e[e.COMPLETE=1]=”COMPLETE”(JwsRequestStatus||(JwsRequestStatus=));var jwsCache=new Map,getCache=function(e)var n=jwsCache.get(e);if(n)if(n.status===JwsRequestStatus.PENDING)return n.promise;var t=Date.now()-12e4;return n.data&&n.lastRequested>t?Promise.resolve(n.data):void 0,setCacheData=function(e,n)var t=lastRequested:Date.now(),status:JwsRequestStatus.COMPLETE,promise:Promise.resolve(n),data:n;jwsCache.set(e,t),setCachePromise=function(e,n)var t=lastRequested:Date.now(),status:JwsRequestStatus.PENDING,promise:n;jwsCache.set(e,t),Jws=function(){function e()return Object.defineProperty(e.prototype,”wssid”,get:function(),set:function(e),enumerable:!1,configurable:!0),Object.defineProperty(e.prototype,”appid”,get:function()void 0===e?void 0:e.appid;return t,set:function(e)window.YBAR=window.YBAR,enumerable:!1,configurable:!0),e.prototype.fetchPreview=function(e,n){var t=(void 0===e?:e).maxMessages,i=void 0===t?4:t;return __awaiter(this,void 0,void 0,(function(){var e,t,o,r=this;return __generator(this,(function(s){return e=getCache(JwsRequestType.PREVIEW),!n&&e?[2,e]:(1,t={data:responseType:”json”,requests:[id:”GetMailboxId”,uri:”/ws/v3/mailboxes/”,method:”GET”,filters:select:mailboxId:”$..mailboxes[?(@.isPrimary==true)].id”,suppressResponse:!0,requests:[id:”ListMessages”,uri:”/ws/v3/mailboxes/@.id==$(mailboxId)/messages/@.select==q?q=count%3A6+offset%3A0+folderType%3AINBOX+-sort%3Adate”,method:”GET”]]},o=this._fetch(t,1,(function(e)var n=r._normalizePreviewResponse(e,maxMessages:i);return setCacheData(JwsRequestType.PREVIEW,n),n)),setCachePromise(JwsRequestType.PREVIEW,o),[2,o])}))}))},e.prototype.fetchCount=function(e){return __awaiter(this,void 0,void 0,(function(){var n,t,i,o=this;return __generator(this,(function(r){return n=getCache(JwsRequestType.COUNT),!e&&n?[2,n]:(1,t={data:responseType:”json”,requests:[id:”GetMailboxId”,uri:”/ws/v3/mailboxes/”,method:”GET”,filters:select:mailboxId:”$..mailboxes[?(@.isPrimary==true)].id”,suppressResponse:!0,requests:[id:”ListDecos”,uri:”/ws/v3/mailboxes/@.id==$(mailboxId)/decos”,method:”GET”]]},i=this._fetch(t,1,(function(e)var n=o._normalizerCountResponse(e);return setCacheData(JwsRequestType.COUNT,n),n)),setCachePromise(JwsRequestType.COUNT,i),[2,i])}))}))},e.prototype._fetch=function(e,n,t){var i,o;return __awaiter(this,void 0,void 0,(function(){var r,s,a,c,l,d,u,p,f,m,h,v,g,y,b,_;return __generator(this,(function(w)switch(w.label)void 0===i?void 0:i.code)===d)return[2,this._handleWssidApiError(g,e,n,t)];throw y===l?new Error(“Session has expired”):new Error(“Mail Api Responded with an Error”);case 4:throw b=w.sent(),logError(“JWS: “.concat((_=b).message),_),b;case 5:return[2]))}))},e.prototype._normalizePreviewResponse=function(e,n)[]).map((function(e)return r._parseRawMessage(e))).filter((function(e,n)return!!(e&&n0)return t-=1,this.wssid=s,this._fetch(n,t,i);throw new Error(“Max retries with invalid WSSID reached”)throw new Error(“valid WSSID missing from API Response”),e.prototype._parseRawMessage=function(e)var n,t,i,o,r,s,a=e.id,c=e.snippet,l=e.headers,d=e.flags;return(null==l?void 0:l.date)&&(null===(n=null==l?void 0:l.from),e.prototype._getYmreqid=function()var e=(new Date).getTime();return”xxxxxxxx-xxxx-xxxx-09xx-xxxxxxxxxx00″.replace(new RegExp(“x”,”g”),(function()0;return e=Math.floor(e/16),n.toString(16))),e}(),loadAssets=function(e,n,t)for(var i,o,r=[],s=[],a=0;a0&&function(e)var n=document.createElement(“script”);n.src=e,n.type=”text/javascript”,n.async=!0,document.getElementsByTagName(“head”)[0].appendChild(n)(c))),10)},getNextGenMailPreview=function(e)postreq(url:”/fp_ngymtls_ms/_rcv/remote”,body:m_id:”react-wafer-mailpreview”,m_mode:”json”,ctrl:”MailPreview”,(function(n,t))),loaded=!1,init$2=function(e,n){var t=n.mailModule,i=n.mailLink,o=n.mailSigninLink,r=n.ybarMailMessages;if(t)var s=new Jws;if(e.addElementListener(t,”mouseenter”,(function()e.triggerEvent(“close-all-menus”),triggerRapidBeacon())),e.addEventListener(“close-all-menus”,(function()hideMailPopover(n))),e.onDestroy((function()hideMailPopover(n))),loaded=!1,loadUnreadCount(e,n,s),r)e.addElementListener(i,”mouseover”,(function()loadMessages(e,n,s),fireYahooImpBeacon(e,n))),e.addElementListener(i,”focus”,(function()loadMessages(e,n,s),triggerRapidBeacon(),fireYahooImpBeacon(e,n)));elsevar a=i.getAttribute(“data-redirect-params”);if(a&&””!==a)var c=i.href;e.onDestroy((function()i.href=c)),a=-1!==i.href.indexOf(“&activity=ybar-“)?””:a.replace(/\[\[pspid\]\]/,getSpaceId()),i.href=appendQorA(i.href)+a,(null==o?void 0:o.href)&&(o.href=appendQorA(o.href)+a)},mailBeaconTimeout=!1,triggerRapidBeacon=function(),sendRapid=function(e)beaconClick(“ybar”,(null==e?void 0:e.slk),relativeDate=function(e)if(!e)return””;var n=Math.round((new Date).getTime()/1e3)-e;return n86400?Math.floor(n/86400)+”d”:””,createMailItemElement=function(e,n,t,i)var o,r=getTemplateContent(n.ybarMailItemTemplate),s=null===(o=r.children),showMailPopover=function(e)var” n=””>0)if(i.style.visibility=”visible”,o)var t=n>999,s=r?”99+”:”999+”;o.textContent=t?s:n+””e.onDestroy((function()i.style.visibility=”hidden”,o&&(o.textContent=””))))).catch((function()))},loadMessages=function(e,n,t),loadMailPreview=function(e,n,t){t.fetchPreview().then((function(t){var i;if(t&&0!==t.length)var o=document.createElement(“ul”);o.className=Css$2[“ybar-mail-list”];for(var r=0;r