PageSourceSearch

https://rrf3dshop.ru/bitrix/templates/aspro-premier/js/conditional…/search-title.min.js?17676251977517

js rrf3dshop.ru collected 2026-10-06 08:46:03 UTC 7,517 bytes, 1 lines download raw bytes

1if(!BX.Aspro.Utils.isFunction("JCTitleSearch2"))function JCTitleSearch2(t){var e=this;this.arParams={AJAX_PAGE:t.AJAX_PAGE,CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,INPUT_ID_TMP:t.INPUT_ID_TMP,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN),DROPDOWN_TYPE:t.DROPDOWN_TYPE},t.WAIT_IMAGE&&(this.arParams.WAIT_IMAGE=t.WAIT_IMAGE),t.MIN_QUERY_LEN<=0&&(t.MIN_QUERY_LEN=1),this.cache=[],this.cache_key=null,this.startText="",this.running=!1,this.needRunAgain=!1,this.currentRow=-1,this.RESULT=null,this.CONTAINER=null,this.INPUT=null,this.TYPE=null,this.WAIT=null,this.ShowResult=function(t){if(document.activeElement===this.INPUT){BX.type.isString(t)&&(e.RESULT.innerHTML=t),""!==e.RESULT.innerHTML?e.RESULT.classList.remove("hidden"):e.RESULT.classList.add("hidden");var s,i,n,a=e.adjustResultNode(),r=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},!0);if(r&&(i=BX.findChild(r,{tag:"th"},!0)),i){var o=BX.pos(r);o.width=o.right-o.left;var l=BX.pos(i);l.width=l.right-l.left,i.style.width=l.width+"px",e.RESULT.style.width=a.width+l.width+"px",e.RESULT.style.left=a.left-l.width-1+"px",o.width-l.width>a.width&&(e.RESULT.style.width=a.width+l.width-1+"px"),o=BX.pos(r),(s=BX.pos(e.RESULT)).right>o.right&&(e.RESULT.style.width=o.right-o.left+"px")}r&&(n=BX.findChild(e.RESULT,{class:"title-search-fader"},!0)),n&&i&&(s=BX.pos(e.RESULT),n.style.left=s.right-s.left-18+"px",n.style.width="18px",n.style.top="0px",n.style.height=s.bottom-s.top+"px",n.classList.remove("hidden")),"function"==typeof InitScrollBar&&InitScrollBar()}},this.onKeyPress=function(t){var s,i=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},!0);if(!i)return!1;var n=i.rows.length;switch(t){case 27:return e.RESULT.classList.add("hidden"),e.currentRow=-1,e.UnSelectAll(),!0;case 40:e.RESULT.classList.contains("hidden")&&e.RESULT.classList.remove("hidden");var a=-1;for(s=0;s<n;s++)if(!BX.findChild(i.rows[s],{class:"title-search-separator"},!0)){if(-1==a&&(a=s),e.currentRow<s){e.currentRow=s;break}"title-search-selected"==i.rows[s].className&&(i.rows[s].className="")}return s==n&&e.currentRow!=s&&(e.currentRow=a),i.rows[e.currentRow].className="title-search-selected",!0;case 38:e.RESULT.classList.contains("hidden")&&e.RESULT.classList.remove("hidden");var r=-1;for(s=n-1;s>=0;s--)if(!BX.findChild(i.rows[s],{class:"title-search-separator"},!0)){if(-1==r&&(r=s),e.currentRow>s){e.currentRow=s;break}"title-search-selected"==i.rows[s].className&&(i.rows[s].className="")}return s<0&&e.currentRow!=s&&(e.currentRow=r),i.rows[e.currentRow].className="title-search-selected",!0;case 13:if(!e.RESULT.classList.contains("hidden"))for(s=0;s<n;s++)if(e.currentRow==s&&!BX.findChild(i.rows[s],{class:"title-search-separator"},!0)){var o=BX.findChild(i.rows[s],{tag:"a"},!0);if(o)return window.location=o.href,!0}return!1}return!1},this.onTimeout=function(){e.onChange((function(){setTimeout(e.onTimeout,500)}))},this.onChange=function(t){if(e.running)return void(e.needRunAgain=!0);e.running=!0;let s="catalog";if(this.TYPE&&(s=this.TYPE.value),(e.INPUT.value!=e.oldValue&&e.INPUT.value!=e.startText||s!=e.oldType)&&(e.oldValue=e.INPUT.value,e.oldType=s,e.INPUT.value.length>=e.arParams.MIN_QUERY_LEN)){if(e.cache_key=e.arParams.INPUT_ID+"|"+e.INPUT.value+"|"+s,null==e.cache[e.cache_key]){if(e.WAIT){var i=BX.pos(e.INPUT),n=i.bottom-i.top-2;e.WAIT.style.top=i.top+1+"px",e.WAIT.style.height=n+"px",e.WAIT.style.width=n+"px",e.WAIT.style.left=i.right-n+2+"px",e.WAIT.classList.remove("hidden")}return void BX.ajax.post(e.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:e.arParam
1s.INPUT_ID_TMP,q:e.INPUT.value,l:e.arParams.MIN_QUERY_LEN,type:s},(function(s){e.cache[e.cache_key]=s,BX.Aspro.Loader.add({ext:"prices"}).then((function(){e.ShowResult(s),e.currentRow=-1,e.EnableMouseEvents(),e.WAIT&&e.WAIT.classList.add("hidden"),t&&t(),e.running=!1,e.needRunAgain&&(e.needRunAgain=!1,e.onChange(t))}))}))}e.ShowResult(e.cache[e.cache_key]),e.currentRow=-1,e.EnableMouseEvents()}t&&t(),e.running=!1},this.UnSelectAll=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},!0);if(t)for(var s=t.rows.length,i=0;i<s;i++)t.rows[i].className=""},this.EnableMouseEvents=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},!0);if(t)for(var s=t.rows.length,i=0;i<s;i++)BX.findChild(t.rows[i],{class:"title-search-separator"},!0)||(t.rows[i].id="row_"+i,t.rows[i].onmouseover=function(t){e.currentRow!=this.id.substr(4)&&(e.UnSelectAll(),this.className="title-search-selected",e.currentRow=this.id.substr(4))},t.rows[i].onmouseout=function(t){this.className="",e.currentRow=-1})},this.onFocusLost=function(){setTimeout((()=>{e.RESULT.classList.add("hidden")}),0)},this.onFocusGain=function(){e.RESULT.innerHTML.length&&e.ShowResult(),e.onChange()},this.onKeyDown=function(t){if(t||(t=window.event),!e.RESULT.classList.contains("hidden")&&e.onKeyPress(t.keyCode))return BX.PreventDefault(t)},this.adjustResultNode=function(){var t,s;BX.findParent(e.CONTAINER,BX.is_fixed);return e.RESULT.style.position=this.arParams.DROPDOWN_TYPE||"absolute",t=BX.pos(e.CONTAINER),s=BX.pos(e.INPUT),"absolute"===this.arParams.DROPDOWN_TYPE&&(t.width=t.right-t.left,e.RESULT.style.top="100%",e.RESULT.style.left="0px",e.INPUT.closest(".inline-search-block.with-close")?e.RESULT.style.width=s.width+"px":e.RESULT.style.width=t.width+"px"),t},this._onContainerLayoutChange=function(){e.RESULT.classList.contains("hidden")||""===e.RESULT.innerHTML||e.adjustResultNode()},this.Init=function(){if(this.INPUT=document.getElementById(this.arParams.INPUT_ID),!this.INPUT)return;this.INPUT.search=this,this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID),BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange),this.RESULT=this.CONTAINER.appendChild(document.createElement("DIV")),this.RESULT.className=`title-search-result theme-root hidden ${this.arParams.INPUT_ID}`,this.startText=this.oldValue=this.INPUT.value,BX.bind(this.INPUT,"focus",(function(t){e.onFocusGain()})),BX.bind(this.INPUT,"blur",(function(t){$(t.relatedTarget).closest(".title-search-result").length||setTimeout((function(){$(e.INPUT).closest("form").find(".dropdown-select.searchtype .dropdown-select__title.opened").length||e.onFocusLost()}),100)})),BX.browser.IsSafari()||BX.browser.IsIE()?this.INPUT.onkeydown=this.onKeyDown:this.INPUT.onkeypress=this.onKeyDown,BX.bind(this.INPUT,"bxchange",(function(t){e.onChange()})),this.arParams.WAIT_IMAGE&&(this.WAIT=document.body.appendChild(document.createElement("DIV")),this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')",this.WAIT.style.backgroundRepeat="none",this.WAIT.classList.add("hidden"),this.WAIT.style.position=this.arParams.DROPDOWN_TYPE||"absolute",this.WAIT.style.zIndex="1100"),this.TYPE=this.CONTAINER?this.CONTAINER.querySelector('.dropdown-select.searchtype input[name="type"]'):null,this.TYPE&&BX.bind(this.TYPE,"change",(function(){e.onChange()}));let t=$(e.INPUT).closest(".search").find(".btn-clear-search");BX.bind(t[0],"click",(function(t){setTimeout((function(){e.onChange(),e.INPUT.focus(),e.RESULT.innerHTML=""}),0)}))},BX.ready((function(){e.Init()}))}BX.addCustomEvent("app.document.click",(t=>{if(t.target.closest(".btn-clear-search")){t.target.closest("form").querySelector('input[name="q"]').value="",BX.onCustomEvent("onAsproSearchSync")}}));{let t=null;BX.addCustomEvent("onAsproSearchSync",((e="")=>{t||(t=document.querySelectorAll(".search-title__input")),t.length>1&&t.forEach((t=>{t.value=e}))}))}

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.