PageSourceSearch

https://www.epson.com.mm/_ui/_v202608182013/responsive/common/js/acc.autocomplete.min.js

js epson.com.mm collected 2026-10-08 03:42:57 UTC 7,822 bytes, 1 lines download raw bytes

1ACC.autocomplete={_autoload:["bindSearchAutocomplete","bindSearchAutocompleteNew","bindSearchAutocompleteService"],bindSearchAutocomplete:function(){$.widget("custom.yautocomplete",$.ui.autocomplete,{_create:function(){var a=this.element.data("options");this._setOptions({minLength:a.minCharactersBeforeRequest,displayProductImages:a.displayProductImages,delay:a.waitTimeBeforeRequest,autocompleteUrl:a.autocompleteUrl,source:this.source,maxProductResults:3});$.ui.autocomplete.prototype._create.call(this)},options:{cache:{},focus:function(){return false},select:function(a,b){if(b.item.url==undefined){return false}window.location.href=b.item.url}},_renderItem:function(d,f){var b=this;var g=document.getElementsByClassName("row search-form-row")[0].getAttribute("data-learn-more");var h=document.getElementsByClassName("row search-form-row")[0].getAttribute("data-support");if(f.type=="autoSuggestion"){var c="<a href='"+f.url+"' title='"+f.value+"'><div class='name'>"+f.value+"</div></a>";return $('<li class="ui-menu-item__autoSuggestion">').data("item.autocomplete",f).append(c).appendTo(d)}else{if(f.type=="productResult"){var a=b.options.maxProductResults,e=d.find(".ui-menu-item__product").length;if(e<a){var c="";if(f.image!=null){c+="<span class='thumb'><a href='"+f.url+"' data-tl_sku='"+f.code+"' title='"+f.value+"'><img src='"+f.image+"'  title='"+f.value+"' alt='"+f.value+"'/></a></span>"}c+="<span class='meta'>";c+="	<span class='name'><a href='"+f.url+"' data-tl_sku='"+f.code+"' title='"+f.value+"'>"+f.value+"</a></span>";c+="	<span class='links'>";c+="		<a href='"+f.url+"' data-tl_sku='"+f.code+"' title='"+f.value+"'>"+g+"</a>";if((f.supportUrl===undefined||f.supportUrl===null)==false){c+="		<a href='"+f.supportUrl+"' data-tl_sku='"+f.code+"' title='"+f.value+"'>"+h+"</a>"}c+="	</span>";c+="</span>";return $('<li class="ui-menu-item__product">').data("item.autocomplete",f).append(c).appendTo(d)}else{return $("").data("item.autocomplete",f).append(c).appendTo(d)}}}},source:function(d,b){var a=this;var c=d.term.toLowerCase();if(c in a.options.cache){return b(a.options.cache[c])}$.getJSON(a.options.autocompleteUrl,{term:d.term},function(f){var e=[];if(f.suggestions!=null){$.each(f.suggestions,function(g,h){e.push({value:h.term,url:ACC.config.encodedContextPath+"/search?text="+h.term,type:"autoSuggestion"})})}if(f.products!=null){$.each(f.products,function(h,k){var j=(k.supportProductId!=null)?ACC.config.encodedContextPath+k.supportProductId:null;var g=null;if(k.images!=null&&a.options.displayProductImages){$.each(k.images,function(i,l){if(l.imageType=="PRIMARY"&&l.format=="product"){g=l.url}})}e.push({value:k.name,code:k.code,desc:k.description,manufacturer:k.manufacturer,url:ACC.config.encodedContextPath+k.url,supportUrl:j,price:(k.price!=null&&k.price!="undefined")?k.price.formattedValue:"",type:"productResult",image:g})})}a.options.cache[c]=e;if(e.length>0){ACC.analytics.fireTealiumEvent("","","nav","SEARCH")}return b(e)})}});$search=$(".js-site-search-input");if($search.length>0){$search.yautocomplete()}},bindSearchAutocompleteNew:function(){$.widget("custom.yautocomplete",$.ui.autocomplete,{_create:function(){var a=this.element.data("options");this._setOptions({minLength:a.minCharactersBeforeRequest,displayProductImages:a.displayProductImages,delay:a.waitTimeBeforeRequest,autocompleteUrl:a.autocompleteUrl,source:this.source,maxProductResults:12});$.ui.autocomplete.prototype._create.call(this)},options:{cache:{},focus:function(){return false},select:function(a,b){if(b.item.url==undefined){return false}window.location.href=b.item.url}},_renderItem:function(e,g){var c=this;if(g.type=="autoSuggestion"){var d="<a href='"+g.url+"' title='"+g.value+"'><div class='name'>"+g.value+"</div></a>";return $('<li class="ui-menu-item__autoSuggestion">').data("item.autocomplete",g).append(d).appendTo(e)}else{if(g.type=="productResult"){var a=c.options.maxProductResults,f=e.find(".ui-menu-item__product").length;if(f<a){var d="";var h=g.url;if($(".ui-autocomplete-input[data-rightnow]").length){var b=$(".ui-autocomplete-input[data-rightnow]").data("rightnow");if(b.length>1){h=b+"/app/ask/p_model_name/"+g.value}else{h+="#contact"}}
1d+="<span class='meta'>";d+="	<span class='name'><a href='"+h+"' data-tl_sku='"+g.code+"' title='"+g.value+"'>"+g.value+"</a></span>";d+="	<span class='links'>";d+="	</span>";d+="</span>";return $('<li class="ui-menu-item__product">').data("item.autocomplete",g).append(d).appendTo(e)}else{return $("").data("item.autocomplete",g).append(d).appendTo(e)}}}},source:function(d,b){var a=this;var c=d.term.toLowerCase();if(c in a.options.cache){return b(a.options.cache[c])}$.getJSON(a.options.autocompleteUrl,{term:d.term},function(f){var e=[];if(f.suggestions!=null){$.each(f.suggestions,function(g,h){e.push({value:h.term,url:ACC.config.encodedContextPath+"/search?text="+h.term,type:"autoSuggestion"})})}if(f.products!=null){$.each(f.products,function(g,h){e.push({value:h.name,code:h.code,desc:h.description,manufacturer:h.manufacturer,url:ACC.config.encodedContextPath+h.url,price:(h.price!=null&&h.price!="undefined")?h.price.formattedValue:"",type:"productResult"})})}a.options.cache[c]=e;return b(e)})}});$search_new=$(".js-site-search-input-new");if($search_new.length>0){$search_new.yautocomplete()}},bindSearchAutocompleteService:function(){$.widget("custom.yautocomplete",$.ui.autocomplete,{_create:function(){var a=this.element.data("options");this._setOptions({minLength:a.minCharactersBeforeRequest,displayProductImages:a.displayProductImages,delay:a.waitTimeBeforeRequest,autocompleteUrl:a.autocompleteUrl,source:this.source,maxProductResults:12});$.ui.autocomplete.prototype._create.call(this)},options:{cache:{},focus:function(){return false},select:function(a,b){if(b.item.url==undefined){return false}window.location.href=b.item.url}},_renderItem:function(d,h){var b=this;var g=document.getElementsByClassName("row search-form-row-service")[0].getAttribute("data-contact-us");var e=document.getElementsByClassName("row search-form-row-service")[0].getAttribute("data-service");if(h.type=="autoSuggestion"){var c="<a href='"+h.url+"' title='"+h.value+"'><div class='name'>"+h.value+"</div></a>";return $('<li class="ui-menu-item__autoSuggestion">').data("item.autocomplete",h).append(c).appendTo(d)}else{if(h.type=="productResult"){var a=b.options.maxProductResults,f=d.find(".ui-menu-item__product").length;if(f<a){var c="";c+="<span class='meta'>";c+="	<span class='name'>"+h.value+"</span>";c+="	<span class='links'>";if(h.showService){c+="<a href='"+h.serviceUrl+"' data-tl_sku='"+h.code+"' title='"+h.value+"'>"+e+"</a>"}c+="	<a href='"+h.contactUrl+"' data-tl_sku='"+h.code+"' title='"+h.value+"'>"+g+"</a>";c+="	</span>";c+="</span>";return $('<li class="ui-menu-item__product">').data("item.autocomplete",h).append(c).appendTo(d)}else{return $("").data("item.autocomplete",h).append(c).appendTo(d)}}}},source:function(d,b){var a=this;var c=d.term.toLowerCase();if(c in a.options.cache){return b(a.options.cache[c])}$.getJSON(a.options.autocompleteUrl,{term:d.term},function(f){var e=[];if(f.suggestions!=null){$.each(f.suggestions,function(g,h){e.push({value:h.term,url:ACC.config.encodedContextPath+"/search?text="+h.term,type:"autoSuggestion"})})}if(f.products!=null){$.each(f.products,function(g,h){e.push({value:h.name,code:h.code,contactUrl:ACC.config.encodedContextPath+h.url+"#contact",showService:h.showServiceLocatorCTA,serviceUrl:ACC.config.encodedContextPath+"/servicelocator?productCode="+h.code,type:"productResult"})})}a.options.cache[c]=e;return b(e)})}});$search_new=$(".js-site-search-input-service");if($search_new.length>0){$search_new.yautocomplete()}}};$("#GlobalSearch").on("click",function(){var a=$("#search_form");var b=a.find("#searchText");var c=a.find("#GlobalSearch");a.submit()});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.