PageSourceSearch

https://hrad-veveri.cz/build/716.c55cf04d.js

js hrad-veveri.cz collected 2026-10-02 09:59:28 UTC 6,374 bytes, 1 lines download raw bytes

1(self.webpackChunkporta_frontend_starter_kit=self.webpackChunkporta_frontend_starter_kit||[]).push([[716],{7338:function(e){e.exports=function(){"use strict";function e(e){var t=document,n=e.container||t.createElement("div"),i=e.preventSubmit||0;n.id=n.id||"autocomplete-"+g();var r,o,a=n.style,c=e.debounceWaitMs||0,u=e.disableAutoSelect||!1,s=n.parentElement,d=[],l="",f=2,p=e.showOnFocus,v=0,m=!1,h=!1;if(void 0!==e.minLength&&(f=e.minLength),!e.input)throw new Error("input undefined");var b=e.input;function g(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}function E(){var e=n.parentNode;e&&e.removeChild(n)}function w(){o&&window.clearTimeout(o)}function A(){n.parentNode||(s||t.body).appendChild(n)}function L(){return!!n.parentNode}function y(){v++,d=[],l="",r=void 0,b.setAttribute("aria-activedescendant",""),b.setAttribute("aria-expanded","false"),E()}function k(){if(L()){b.setAttribute("aria-expanded","true"),a.height="auto",a.width=b.offsetWidth+"px";var i,r=0;o(),o(),e.customize&&i&&e.customize(b,i,n,r)}function o(){var e=t.documentElement,n=e.clientTop||t.body.clientTop||0,o=e.clientLeft||t.body.clientLeft||0,c=window.pageYOffset||e.scrollTop,u=window.pageXOffset||e.scrollLeft,s=(i=b.getBoundingClientRect()).top+b.offsetHeight+c-n,d=i.left+u-o;a.top=s+"px",a.left=d+"px",(r=window.innerHeight-(i.top+b.offsetHeight))<0&&(r=0),a.top=s+"px",a.bottom="",a.left=d+"px",a.maxHeight=r+"px"}}function x(){n.innerHTML="",b.setAttribute("aria-activedescendant","");var i=function(e,n,i){var r=t.createElement("div");return r.textContent=e.label||"",r};e.render&&(i=e.render);var o=function(e,n){var i=t.createElement("div");return i.textContent=e,i};e.renderGroup&&(o=e.renderGroup);var a=t.createDocumentFragment(),c=g();if(d.forEach((function(t,u){if(t.group&&t.group!==c){c=t.group;var s=o(t.group,l);s&&(s.className+=" group",a.appendChild(s))}var d=i(t,l,u);d&&(d.id=n.id+"_"+u,d.setAttribute("role","option"),d.addEventListener("click",(function(n){h=!0;try{e.onSelect(t,b)}finally{h=!1}y(),n.preventDefault(),n.stopPropagation()})),t===r&&(d.className+=" selected",d.setAttribute("aria-selected","true"),b.setAttribute("aria-activedescendant",d.id)),a.appendChild(d))})),n.appendChild(a),d.length<1){if(!e.emptyMsg)return void y();var u=t.createElement("div");u.id=n.id+"_"+g(),u.className="empty",u.textContent=e.emptyMsg,n.appendChild(u),b.setAttribute("aria-activedescendant",u.id)}A(),k(),N()}function C(){L()&&x()}function T(){C()}function S(e){e.target!==n?C():e.preventDefault()}function D(){h||W(0)}function N(){var e=n.getElementsByClassName("selected");if(e.length>0){var t=e[0],i=t.previousElementSibling;if(i&&-1!==i.className.indexOf("group")&&!i.previousElementSibling&&(t=i),t.offsetTop<n.scrollTop)n.scrollTop=t.offsetTop;else{var r=t.offsetTop+t.offsetHeight,o=n.scrollTop+n.offsetHeight;r>o&&(n.scrollTop+=r-o)}}}function _(){var e=d.indexOf(r);r=-1===e?void 0:d[(e+d.length-1)%d.length],M(e)}function H(){var e=d.indexOf(r);r=d.length<1?void 0:-1===e?d[0]:d[(e+1)%d.length],M(e)}function M(e){d.length>0&&(q(e),O(d.indexOf(r)),N())}function O(e){var i=t.getElementById(n.id+"_"+e);i&&(i.classList.add("selected"),i.setAttribute("aria-selected","true"),b.setAttribute("aria-activedescendant",i.id))}function q(e){var i=t.getElementById(n.id+"_"+e);i&&(i.classList.remove("selected"),i.removeAttribute("aria-selected"),b.removeAttribute("aria-activedescendant"))}function z(e,t){var n=L();if("Escape"===t)y();else{if(!n||d.length<1)return;"ArrowUp"===t?_():H()}e.preventDefault(),n&&e.stopPropagation()}function B(t){if(r){2===i&&t.preventDefault(),h=!0;try{e.onSelect(r,b)}finally{h=!1}y()}1===i&&t.preventDefault()}function P(e){var t=e.key;switch(t){case"ArrowUp":case"ArrowDown":case"Escape":z(e,t);break;case"Enter":B(e)}}function R(){p&&W(1)}function W(e){b.value.length>=f||1===e?(w(),o=window.setTimeout((function(){return X(b.value,e,b.selectionStart||0)}),0===e||2===e?c:0)):y()}function X(t,n,i){if(!m){var o=++v;e.fetch(t,(function(e){v===o&&e&&(l=t,r=(d=e).length<1||u?void 0:d[0],x())}),n,i)}}function F(t){e.keyup?e.keyup({event:t,fetch:function(){return W(0)}}):L()||"ArrowDown"!==t.key||W(0)}function G(t){e.click&&e.click({event:t,fetch:function(){return W(2)}})}function I(){setTimeout((function(){t.activeElement!==b&&y()}),200)}function U(){X(b.value,3,b.selectionStart||0)}function Y(){b.removeEventListener("focus",R),b.removeEventListener("keyup",F),b.removeEventListener("click",G),b.removeEventListener("keydown",P),b.removeEventListener("input",D),b.removeEventListener("blur",I),window.removeEventListener("resize",T),t.removeEventListener("scroll",S,!0),b.removeAttribute("role"),b.removeAttribute("aria-expanded"),b.removeAttribute("aria-autocomplete"),b.removeAttribute("aria-controls"),b.removeAttribute("aria-activedescendant"),b.removeAttribute("aria-owns"),b.removeAttribute("aria-haspopup"),w(),y(),m=!0}return n.className="autocomplete "+(e.className||""),n.setAttribute("role","listbox"),b.setAttribute("role","combobox"),b.setAttribute("aria-expanded","fal
1se"),b.setAttribute("aria-autocomplete","list"),b.setAttribute("aria-controls",n.id),b.setAttribute("aria-owns",n.id),b.setAttribute("aria-activedescendant",""),b.setAttribute("aria-haspopup","listbox"),a.position="absolute",n.addEventListener("mousedown",(function(e){e.stopPropagation(),e.preventDefault()})),n.addEventListener("focus",(function(){return b.focus()})),E(),b.addEventListener("keyup",F),b.addEventListener("click",G),b.addEventListener("keydown",P),b.addEventListener("input",D),b.addEventListener("blur",I),b.addEventListener("focus",R),window.addEventListener("resize",T),t.addEventListener("scroll",S,!0),{destroy:Y,fetch:U}}return e}()},2716:(e,t,n)=>{"use strict";n.r(t),n.d(t,{initAutocomplete:()=>c});var i=n(7338),r=n.n(i),o=n(9669),a=n.n(o);const c=()=>{a().defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const e=document.querySelectorAll(".autocomplete-input"),t=document.querySelector("#exactMatch");for(const n of e)r()({minLength:3,input:n,fetch:(e,t)=>{e=e.toLowerCase(),a().get("/npu/cs/autocomplete/sight",{params:{query:e}}).then((function(e){t(e.data)})).catch((function(e){console.log(e)}))},onSelect:e=>{n.value=e.label,t&&(t.checked=!0),n.dispatchEvent(new Event("change")),n.blur()}});if(t)for(const n of e)n.addEventListener("keyup",(()=>{t.checked=!1}))}}}]);

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.