Yahoo Search – Web Search

April 1, 2021


Yahoo Search – Web Search8){return m}if(c.indexOf(” “)!==-1){return m}if(YAHOO.ULT.has_ctrl_char(c)||YAHOO.ULT.has_ctrl_char(l)){return m}b[c]=l=YAHOO.ULT.escape_multibyte_if_necessary(l);j[g++]=c}j=j.sort();var h=[];for(g=0;g1024){return m}h=”;_”+n+”=”+YAHOO.ULT.encode64(h);var e=”(;_”+n+”=[0-9a-zA-Z._-]+)”;m.replace(new RegExp(e),””);g=m.indexOf(“/*”);if(g===-1){g=m.indexOf(“/?”)}if(g===-1){g=m.indexOf(“?”)}if(g===-1){return m+h}else{return m.substr(0,g)+h+m.substr(g)}};YAHOO.ULT.has_ctrl_char=function(c){var b=0;for(;b>2;j=((m&3)>4);g=((k&15)>6);f=h&63;if(isNaN(k)){g=f=64}else{if(isNaN(h)){f=64}}b=b+YAHOO.ULT.BASE64_STR.charAt(l)+YAHOO.ULT.BASE64_STR.charAt(j)+YAHOO.ULT.BASE64_STR.charAt(g)+YAHOO.ULT.BASE64_STR.charAt(f);m=k=h=””;l=j=g=f=””}while(c>>0;if(typeof h!==”function”){throw new TypeError(h+” is not a function”)}if(arguments.length>1){e=b}c=0;while(c>>0;if(typeof c!==”function”){throw new TypeError()}var f=[];var b=arguments.length>=2?arguments[1]:void 0;for(var e=0;e>>0;if(typeof j!==”function”){throw new TypeError(j+” is not a function”)}if(arguments.length>1){b=i}a=new Array(g);c=0;while(c0){B=B+(B.indexOf(“?”)===-1?”?”:”&”)+E.join(“&”)}return B}function j(B){z(B);m(B)}function y(B){if(typeof B.trim===”function”){return B.trim()}else{return B.replace(/^s+|s+$/gm,””)}}function z(C){if(k&&k<9&&typeof C.createTextRange!=="undefined"){var B=C.createTextRange();B.collapse(false);B.select()}else{if(typeof C.selectionStart==="number"){C.selectionStart=C.selectionEnd=C.value.length}}}function m(B){if("focus" in B){B.focus()}}function l(D,E,B){if(k&&k<9&&typeof D.createTextRange!=="undefined"){var C=D.createTextRange();C.moveStart("character",E);C.moveEnd("character",B);C.select()}else{D.selectionStart=E;D.selectionEnd=B;m(D)}}function b(B){return B.replace(/[u00A0-u9999&]/gim,function(C){return"&#"+C.charCodeAt(0)+";"})}function t(E,C,D,B){if(!B){B=false}if(E.addEventListener){E.addEventListener(C,D,B)}else{if(E.attachEvent){E.attachEvent("on"+C,D)}else{return false}}}function v(D,B,C){if(D.removeEventListener){D.removeEventListener(B,C)}else{if(D.detachEvent){D.detachEvent("on"+B,C)}else{return false}}}function r(E,B,D){var C;if(typeof w.CustomEvent==="function"){C=new w.CustomEvent(B,{detail:D});E.dispatchEvent(C)}else{if(typeof d.createEvent==="function"){C=d.createEvent("CustomEvent");C.initCustomEvent(B,false,false,D);E.dispatchEvent(C)}else{if(typeof d.attachEvent){document.documentElement[B]=D}}}}function x(B){B.returnValue=false;B.cancelBubble=true;B.preventDefault&&B.preventDefault();B.stopPropagation&&B.stopPropagation();B.stopImmediatePropagation&&B.stopImmediatePropagation()}function p(){return Math.round((new Date()).getTime()/1000)}function h(B){return B.replace(/[-[]/{}()*+?.\^$|]/g,"\$&")}function A(B){return function(C,E,D){return E&&!(/s/).test(D)?C:B.replace(/{s}/g,D)}}function o(D,B){if(D.classList){return D.classList.contains(B)}else{var C=new RegExp("(\s|^)"+h(B)+"(\s|$)");return D.className.match(C)}}function s(D,B){if(D.classList){B&&D.classList.remove(B)}else{var C=new RegExp("(\s|^)"+h(B)+"(\s|$)");D.className=y(D.className.replace(C," "))}}function e(C,B){if(C.classList){B&&C.classList.add(B)}else{if(!o(C,B)){C.className+=(" "+h(B))}}}function u(B,F,C){var D="(&[^;s]*)?(%needles)";var E=C.split(/[s|,]+/).filter(function(G){return G!==""}).sort(function(H,G){return G.length-H.length}).map(function(G){return h(G)});if(!E.length){return F}D=D.replace("%needles",E.join("|"));F=F.replace(new RegExp(D,"gi"),A(B));return F}function n(){return document.scrollingElement||document.documentElement}function f(E,D){if(!w.YAHOO.SB.config.i13n){return}var C=w.YAHOO.SB.config.i13n;var B=D?"b":"p";if(!E.s){if(E._S){E.s=E._S}else{if(C.spaceid){E.s=C.spaceid}}}delete E._S;if((!E.mtestid)&&C.mtestid){E.mtestid=C.mtestid}E.t=E.t||+(new Date()).getTime();(new Image()).src=c("https://"+w.YAHOO.SB.config.beacon_host+"/"+B,E)}function a(){this.config={}}a.prototype={set:function(C,B,D){C.setAttribute(B,D)},get:function(C,B){return C.getAttribute(B)},ieVer:k,merge:g,extend:q,buildUrl:c,stopPropagation:x,setFocus:j,cursorEnd:z,select:l,hasClass:o,removeClass:s,addClass:e,trim:y,htmlEncode:b,ae:t,de:v,ts:p,bold:u,fireEvent:r,getScrollingEle:n,sendViewBeacon:f,debug:function(B){if(this.config.debug&&w.console&&w.console.log){w.console.log(B)}}};w.YAHOO.NBClass=w.YAHOO.SBClass=a;w.YAHOO.NB=w.YAHOO.SB=new a()})();!function(){var aI,ap,aG,aV,ay,aX,aE=window,ai=document,aL=aE.YAHOO,a7=aL.NB,aF={},an="before_get_assist",ax="before_display_data",aD="before_init_view",aM="after_init_view",aH="before_parse_data",aK="before_update_assist",aY="after_update_list",aw="after_create_item",aq="before_show_sa",az="after_reset_view",am="after_hide_view",bg="after_init_controller",a1="click_assist",ba="before_query_assist",bf="before_key_submit",ak="before_button_submit",aA="before_submit_query",aC="after_item_highlight",bb="after_item_reset_highlight",bd="before_sb_focus",aj="after_sb_focus",a4="before_sb_blur",aU="after_sb_blur",av="before_beacon",a8="after_set_ylc",a3="after_reset_controller",a2=9,a9=42;function a0(b,a){var d,a=(b=b||{}).tag||a||"div",c=ai.createElement(a);for(d in b.css&&(c.className=b.css),b.text&&(c.textContent=b.text),b.attrs){a7.set(c,d,b.attrs[d])}for(d in b.style){c.style[d]=b.style[d]}return b.wrap?((a=a0(b.wrap)).appendChild(c),a):c}function ao(a){this.config=a||{},this.listeners={},this.cb={}}function aP(){}function bc(){}function aZ(){}function a5(){var b=this.app.view.elems,a=b.sbClear;a&&(0D.minQuery&&y&&y.r&&y.r.length&&(O=y.sqpos)){for(var P=””,G=y.r,q=0;qP.length?G[q].k:P}var x=z.config,B=H.createElem,z=B(x.sa,”div”),L=B(x.saList,”ul”),N=(x.boldTag,[P,y.q.substr(0,O)]);z.className+=” “+D.css,z.style.position=”absolute”,z.style.left=”-9999px”,A.saTray.appendChild(z).appendChild(L);for(q=0;qC.clientWidth-J){O=0;break}}else{w=j+M}}z.outerHTML=””}H.sqpos=O,H.toleft=w}function bq(b){var a=this.sqpos;a&&(b.k=b.k.substr(a),b.q=b.q.substr(a))}function bn(b){var a=b.parentNode,h=this,c=h.sqpos,f=h.toleft,d=h.config,g=h.app.view.elems.sbForm,b=d.formCSS;c?(a.className+=” “+d.css,a.style.left=f+”px”,a.style.position=”absolute”,a7.hasClass(g,b)||(g.className+=” “+b)):ae.call(h)}function ae(){a7.removeClass(this.app.view.elems.sbForm,this.config.formCSS)}function ac(){this.config={css:”sa-subtray”,formCSS:”sf-subtray”,offset:5,delta:0,minQuery:0}}function ad(b,a){var d=a.m,c=this.idxs;””!==a.q||d in c||(c[d]=b.idx)}function ab(q){var h,g=this,v=g.config,k=g.idxs,b=v.grps,d=g.createElem;for(h in k){var m,p=b[“m”+h],l=(m=b[h])&&m.text||p&&p.text,j=m&&m.css||p&&p.css;l&&((m=d(v.hdr,”div”)).appendChild(d(v.icon,”span”)),p=m.appendChild(d(v.title,”span”)),m.className+=j?” “+j:””,p.textContent=l,q.insertBefore(m,g.app.view.items[k[h]].li))}g.idxs={}}function aJ(){this.config={hdr:{css:”sa-grp-hdr”},icon:{css:”sa-grp-hdr-icon”},title:{css:”sa-grp-hdr-title”},grps:{m13:{text:”Recent Searches”,css:”history”},m9:{text:”Trending Now”,css:”trending”}}}}function aa(){this.selectedIndex=-1}function bk(){function b(){var a=p.selectedIndex;0<=a&&(a7.removeClass(g[a].li,k.css),p.app.notify(bb))}function m(a){a7.hasClass(a,k.css)||(a.className+=" "+k.css),p.app.notify(aC)}var p=this,k=p.config,i=p.app.view,g=i.items,q=i.elems,n=q.sbInput,j=q.saTray,q=a7.ieVer,d=!1;a7.ae(j,"mouseover",function(c){for(var a=c.target||c.srcElement;a&&a!=j;){var f=a7.get(a,"pos"),e=f?i.items[f]:{};if(e&&a===e.li){b(),p.selectedIndex=f,m(a);break}a=a.parentNode}}),a7.ae(j,"mouseout",function(a){b()}),a7.ae(n,"keydown",function(c){var a=c.keyCode,o=p.selectedIndex;switch(a){case 38:case 40:if(!g.length){return}b();for(var f,l=g.length;40==a?o<0||l-1<=o?o=0:o++:o<=0?o=l-1:o--,!(f=g[o]).li.parentNode;){}p.selectedIndex=o,i.assistItem=f,n.value=f.data.k,m(f.li),a7.stopPropagation(c),d=!0;break;case 9:case 39:if(9==a&&k.useDefaultTab){return}var h=n.value.length;if(n.selectionEnd==h&&n.selectionStart==h){if(!g.length){return}(0<=o||n.value!==g[0].data.k)&&(n.value=(0<=o?g[o]:g[0]).data.k,i.show(),a7.stopPropagation(c))}else{9==a&&(n.selectionEnd=n.selectionStart=n.value.length,a7.stopPropagation(c))}}}),q&&(8===q&&a7.ae(n,"propertychange",function(a){"value"===a.propertyName&&!0!==d&&i.show(),d=!1}),9===q&&(p.onSelctionChange=function(a){ai.activeElement===n&&i.show()}))}function bi(){var a=a7.ieVer;a&&9===a&&!this.ie9_attached&&(a7.ae(ai,"selectionchange",this.onSelctionChange),this.ie9_attached=!0)}function bp(){var a=a7.ieVer;a&&9===a&&this.ie9_attached&&(a7.de(ai,"selectionchange",this.onSelctionChange),this.ie9_attached=!1)}function bh(){this.config={css:"highlight",useDefaultTab:!1}}aL.SA=(ap=[],ao.prototype={jsonp:function(b){var a=ai.getElementsByTagName("head")[0],c=ai.createElement("script");a7.set(c,"type","text/javascript"),a7.set(c,"src",b),a.appendChild(c),a7.ae(c,"load",function(){a.removeChild(c)})},createElem:a0,getElemStyleValue:function(b,a){if(aE.getComputedStyle){return aE.getComputedStyle(b).getPropertyValue(a)}if(b.currentStyle){return a=a.replace(/-([a-z]){1}/g,function(d,c){return c.toUpperCase()}),b.currentStyle[a]}return""},on:function(b,a,d){var c;b&&a&&((c=this.listeners)[b]||(c[b]=[]),c[b].push({thisArg:d||this,fn:a}))},notify:function(b,c){var a=this.listeners;if(!a[b]){return !1}a[b].forEach(function(e){var d=e.thisArg,e=e.fn;e&&e.apply&&1!=d.config.disable&&e.apply(d,c||[])})},init:function(k){var f,d,l,g,b=this,c=b.config,h=c.plugins={};for(g in b.view=f=new aI.viewClass(),b.model=d=new aI.modelClass(),b.control=l=new aI.controlClass(),aF){var j=new aF[g]();h[g]=j.config=j.config||{},j.createElem=a0,j.init(b)}"object"==typeof k&&a7.merge(c,k),b.ready=f.init(b)&&d.init(b)&&l.init(b)}},aG=ao,aI={ver:"assistjs-v1.0.119",apps:ap,plugs:aF,add:function(b,a){aF[b]=a},msg:{BEFORE_GET_ASSIST:an,BEFORE_DISPLAY_DATA:ax,BEFORE_INIT_VIEW:aD,AFTER_INIT_VIEW:aM,BEFORE_PARSE_DATA:aH,BEFORE_UPDATE_ASSIST:aK,AFTER_UPDATE_LIST:aY,AFTER_CREATE_ITEM:aw,BEFORE_SHOW_SA:aq,AFTER_RESET_VIEW:az,AFTER_HIDE_VIEW:am,AFTER_INIT_CONTROLLER:bg,CLICK_ASSIST:a1,BEFORE_QUERY_ASSIST:ba,BEFORE_KEY_SUBMIT:bf,BEFORE_BUTTON_SUBMIT:ak,BEFORE_SUBMIT_QUERY:aA,BEFORE_SB_FOCUS:bd,AFTER_SB_FOCUS:aj,BEFORE_SB_BLUR:a4,AFTER_SB_BLUR:aU,BEFORE_BEACON:av,AFTER_SET_YLC:a8,AFTER_RESET_CONTROLLER:a3,AFTER_ITEM_HIGHLIGHT:aC,AFTER_ITEM_RESET_HIGHLIGHT:bb},markers:{GOSSIP_MARKER_SEARCH_HISTORY:13,GOSSIP_MARKER_TRENDING:a2,GOSSIP_MARKER_PEOPLE_ALSO_SEARCH_FOR:a9},init:function(b){var a=a7.ieVer;if(a&&a<8){return !1}var c=new aG(this.initConfig?this.initConfig():{});if(c.init(b),!c.ready){return !1}c.config.customEvent&&8===a&&(ai.documentElement.assistSelection=null),c.idx=ap.length,ap.push(c),!this.latency&&aE.performance&&"function"==typeof aE.performance.now&&(this.latency=aE.performance.now())}}),aI.controlClass=(aV="ylcAssist",ay="ylcKey",aX="ylcBtn",aP.prototype={init:function(A){function G(b){B.pqstr="",B.pqstrl=0,B.pos=0;var a=I.sbForm.fr2,f=I.sbInput.value,c=z.data;switch(B.query=encodeURIComponent(f),B.qstrl=f.length,B.t_stmp=a7.ts(),B.gprid=c.l&&c.l.gprid?c.l.gprid:"",B.n_sugg=c.r?c.r.length:0,a&&(B.fr2=a.value),K.assistItem&&(B.pos=K.assistItem.idx+1),b){case aV:var d=K.lastInput;a7.merge(B,k[aV]),B.pqstr=d,B.pqstrl=d.length;break;case ay:a7.merge(B,k[ay]);break;default:a7.merge(B,k[aX])}J(a8),y.lastActn=B.t4}function x(b){var a=I.sbInput.value;!(a=I.mustHaveInput?I.mustHaveInput.value:a)||""===a||void 0!==a.trim&&""===a.trim()||(J(aA),b?a7.fireEvent(F,b,{data:K.assistItem}):D.submit(),setTimeout(function(){g()},400))}var z,K,k,I,F,D,q,L,B,C,w,j,m,y=this,H=a7.ieVer,J=function(b,a){A.notify(b,a)},g=function(){F.blur(),K.reset(),J(a3)};return y.model=z=A.model,y.view=K=A.view,y.config=k=A.config,y.customEvent=L=k.customEvent||{},y.lastActn="",y.ylc=B={},a7.merge(B,k.ylc),I=K.elems,F=I.sbInput,D=I.sbForm,q=I.sbSubmit,C=k.autofocus,(!H||9<=H)&&a7.ae(F,"input",function(){K.show()}),H&&a7.ae(aE,"load",function(){C=!1}),a7.ae(F,"focus",function(){C||(J(bd),k.sbScrollTop&&(ai.body.scrollTop=0),K.triggered||K.show(),J(aj))}),a7.ae(F,"blur",function(a){a.relatedTarget&&D.contains&&D.contains(a.relatedTarget)||(J(a4),J(aU))}),a7.ae(F,"click",function(){K.triggered||K.show()}),a7.ae(F,"keydown",function(a){switch(y.lastActn="key_"+a.keyCode,a.keyCode){case 13:a.preventDefault(),J(bf),G(ay),x(L.customKeyBoard);break;case 27:F.blur(),K.hide(),a7.stopPropagation(a)}}),q?a7.ae(q,"click",function(a){a.preventDefault(),J(ak),G(aX),x(L.customBtn)}):a7.ae(D,"submit",function(){J(ak),G(aX),J(aA),setTimeout(function(){g()},400)}),"ontouchstart" in aE&&(m=function(b,a){return(/touch/.test(b.type)?(b.originalEvent||b).changedTouches[0]:b)["page"+a]},a7.ae(ai,"touchstart",function(a){K.shown&&(w=m(a,"X"),j=m(a,"Y"))}),a7.ae(ai,"touchend",function(a){K.shown&&(5<=Math.abs(m(a,"X")-w)||5<=Math.abs(m(a,"Y")-j))&&a.preventDefault()})),a7.ae(ai,"click",function(b){if(K.shown){for(var a=b.target||b.srcElement,d=!1;a;){if(a===D||a===I.saTray){return}var c=a7.get(a,"pos"),c=c?K.items[c]:{};if(J(a1,[function(){d=!0},a,c]),d){return}if(a===c.li){return F.value=c.data.k,K.assistItem=c,J(ba),G(aV),void x(L.customSelection)}if((a=a.parentNode)===ai){break}}k.hideOnOutsideClick&&K.hide()}}),J(bg),!0},beacon:function(b,a,h){var c,f,d,g;h&&(g=(c=this).customEvent,f=c.config,c.model.app.notify(av,[h]),d="sa_rt" in h?{rt:h.sa_rt,q:h.cqry,la:c.lastActn,n:h.nitems,s:h._S}:{},c.lastActn=h.t4,g[b]?a7.fireEvent(a,g[b],h):aL.ULT?(b=(g=aL.ULT).BEACON,f.saBeacon&&(g.BEACON=location.protocol+"//"+a7.buildUrl(f.saBeacon,d)),g.beacon_click(h),g.BEACON=b):aL.SaBeacon&&aL.SaBeacon(h))}},aP),aI.modelClass=(bc.prototype={init:function(b){var a=this;return a.app=b,a.view=b.view,a.config=b.config,a.cbIdx=0,a.data={},!0},fetch:function(){var b,a=this,h=a.app,c="sacb"+a.cbIdx++,f=a.view,d={pq:f.origQuery,command:f.elems.sbInput.value,t_stmp:a7.ts(),callback:"YAHOO.SA.apps["+h.idx+"].cb."+c},f=a.config.saBE,g=h.cb;for(b in a7.merge(d,f.params),g){g.hasOwnProperty(b)&&(g[b]=function(){})}g[c]=function(e){a.read(e||{}),g[c]=function(){}},h.notify(an,[d]),a.getAssist(f,d)},getAssist:function(b,a){this.app.jsonp(b.host+a7.buildUrl(b.base,a))},read:function(a){this.data=a,this.app.notify(ax,[a]),this.view.dropdown(a)}},bc),aI.viewClass=(aZ.prototype={init:function(k){var f,d,l,g,b,c=this;c.app=k,c.model=k.model,c.config=f=k.config,c.elems=d={},c.items=[],c.assistItem=null,k.notify(aD);var h,j=f.elems;for(h in j){d[h]||(d[h]=ai.getElementById(j[h]))}return l=d.sbInput,b=d.saTray,!!((g=d.sbForm)&&l&&b)&&(c.origQuery=c.lastInput=l.value,a7.set(l,"role","combobox"),a7.set(l,"aria-autocomplete","both"),c.origAction=g.action,f.autofocus&&a7.setFocus(l),k.notify(aM),a7.ae(aE,"load",function(){d.saAria=ai.body.appendChild(k.createElem(f.saAria,"div"))}),!0)},dropdown:function(D){var m=this,j=m.config,G=m.app,x=D&&D.r?D.r.length:0,b=m.elems,g=b.saAria,z=b.saTray,C=b.sbForm,y=m.app.createElem,w=j.noQueryClass,q=j.typingClass,B=j.noResultClass,b=y(j.sa,"div"),k=y(j.saList,"ul");if(a7.hasClass(ai.body,q)||(ai.body.className+=" "+q),""==D.q?a7.hasClass(z,w)||(z.className+=" "+w):a7.removeClass(z,w),m.shown=!0,m.clearAssist(),x){b.appendChild(k),G.notify(aH,[D]);for(var A=0;ASource