PageSourceSearch

https://tezido.com/bitrix/components/aspro/search.title.options/te…/.default/script.min.js?17706966005052

js tezido.com collected 2026-10-08 14:11:54 UTC 5,052 bytes, 1 lines download raw bytes

1(()=>{const e={},t=!(!window.SpeechRecognition&&!window.webkitSpeechRecognition),o=async e=>{e?.ASSETS&&BX.load(e.ASSETS),e?.EXT&&BX.loadExt(e.EXT)},n=async e=>{const r=e.target.closest(".search-title-options__button");if(!r)return;BX.removeCustomEvent("app.document.click",n),r.classList.add("loadings"),await BX.Aspro.Loader.addExt("popover"),r.classList.remove("loadings"),BX.Aspro.xPopover.get(r).toggle();const a=e=>{e&&((e=>{const t=document.querySelector(".xpopover .loading-state-before");t&&(t.insertAdjacentHTML("afterend",e),t.remove())})(e),(e=>{const t=document.createRange().createContextualFragment(e);document.querySelectorAll(".search-title-options__button").forEach((e=>{e.querySelector(".xpopover-template").content.replaceChildren(t.cloneNode(!0))}))})(e))};BX.ajax.runComponentAction("aspro:search.title.options","load",{mode:"ajax",data:{conditions:{voice:t?"Y":"N"}}}).then((e=>{a(e.data?.html),o(e.data?.componentResult)}))},r=()=>{document.querySelectorAll(".search-title__additional-option").forEach((e=>{e.remove()}))},a=t=>{r();document.querySelectorAll(".search-title-options").forEach((o=>{e[t]&&o.insertAdjacentHTML("afterend",e[t])}))};BX.addCustomEvent("app.document.click",n),BX.addCustomEvent("app.document.click",(t=>{(async t=>{const o=t.target.closest(".dropdown-select__list-item-label");if(!o)return;const{name:n,value:r}=o,s=(e,t)=>{const o=e.value===t;e.classList.toggle("dropdown-menu-item--current",o),e.toggleAttribute("disabled",o)};((e,t)=>{const o=BX.Aspro?.xPopover?.toggleNode?.closest?.("form");if(o){const n=o?.querySelectorAll(`.dropdown-select__list-item-label[name="${e}"]`);n.length&&n.forEach((e=>{s(e,t)}))}BX.Aspro?.xPopover?.hide?.()})(n,r),((e,t)=>{document.querySelectorAll(".search-title-options__button .xpopover-template").forEach((o=>{o.content.querySelectorAll(`[name="${e}"]`).forEach((e=>{s(e,t)}))}))})(n,r),(e=>{const t=e.closest('[name="type"]');if(!t)return;const o=BX.Aspro?.xPopover?.toggleNode?.closest("form"),n=t.value;BX.Aspro.Loader.addExt("set_cookie_on_domains").then((()=>{setCookieOnDomains(BX.message("SEARCH_AREA_COOKIE_NAME"),n)})),(()=>{const e=document.querySelectorAll(".title-search-result");e.length&&e.forEach((e=>{e.classList.add("hidden")}))})(),(e=>{const t={all:arAsproOptions.PAGES.SEARCH_PAGE_URL,catalog:arAsproOptions.PAGES.CATALOG_PAGE_URL};document.querySelectorAll(".search-title__form").forEach((o=>{o.setAttribute("action",t[e]),o.querySelector('input[name="type"]').value=e,o.querySelector('input[name="q"]').placeholder=BX.message(`SEARCH_AREA_${e.toUpperCase()}`),BX.message("SEARCH_AREA_DEFAULT",BX.message(`SEARCH_AREA_${e.toUpperCase()}`))}))})(n),(e=>{if(!e)return;const t=e.querySelector(".search-title__input");t?.setSelectionRange?.(t.value.length,t.value.length),t.focus()})(o)})(o),(async t=>{const o=t.closest('[name="additional"]');if(!o)return;BX.onCustomEvent("onAsproSearchOptionsChange");const n=e=>{const t=document.querySelectorAll(".search-title__additional-option");t.length&&t.forEach((t=>{t.toggleAttribute("disabled",e),t.classList.toggle("loading-state-before",e)}))};n(!0);try{const t=o.value;if(void 0===e[t]){const o=await BX.ajax.runComponentAction("aspro:search.title.options","getButton",{mode:"ajax",data:{option:t}});e[t]=o.data?.BUTTON}else BX.ajax.runComponentAction("aspro:search.title.options","refreshActiveButton",{data:{option:t}});a(t)}catch(e){console.error(e),n(!1)}})(o)})(t)}));BX.addCustomEvent("onAsproSearchOptionsHandleOption",(n=>{n.option&&((n=>{const s=document.querySelectorAll(`.search-title__additional-option--${n}`);if(s.length){const n=document.querySelector(".search-title-options__button");if(!n)return void r();try{let e=JSON.parse(n?.dataset?.options);e.length&&(e=e.filter((e=>"area"!==e)));const o=e.indexOf("voice");if(~o&&(t||e.splice(o,1)),!e.length)return void r()}catch(e){}const c=s[0].value;
1s.forEach((e=>{e.classList.add("loading-state-before")})),BX.ajax.runComponentAction("aspro:search.title.options","getDefaultButton",{mode:"ajax",data:{option:c}}).then((t=>{e[c]=t.data?.BUTTON,a(c),o(t.data)}))}})(n.option),(e=>{const t=document.querySelector(".xpopover");t?.querySelector(`.dropdown-select__list-item--${e}`)?.remove(),t?.querySelector(".dropdown-select__list-item")?.classList?.add?.("dropdown-menu-item--current");const o=document.querySelectorAll(".search-title-options__button .xpopover-template");if(o.length){let t="";o.forEach((o=>{t||(t=o.content.cloneNode(!0),t?.querySelector(`.dropdown-select__list-item--${e}`)?.remove(),t?.querySelector(".dropdown-select__list-item")?.classList?.add?.("dropdown-menu-item--current")),o.content.replaceChildren(t.cloneNode(!0))}))}})(n.option))})),BX.Aspro.Utils.readyDOM((()=>{const e=document.querySelector(".search-title-options__button");if(!e)return;const o=e?.dataset?.options;if(o)try{let n=JSON.parse(o);if(!n.length)return void e.remove();if(~n.indexOf("area"))return;const r=n.indexOf("voice");~r&&(t||n.splice(r,1)),n.length<=1&&e.remove()}catch(e){console.info(e)}})),BX.Aspro.Loader.addExt("popover")})();

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.