PageSourceSearch

https://www.hotely.cz/wsngo/js/nds-sheet-controller.js?v=440064

js hotely.cz collected 2026-09-24 10:14:04 UTC 5,000 bytes, 1 lines download raw bytes

1(()=>{if(window.ndsSheet)return;const u="[data-nds-sheet-close]",y=".nds-modal",A=`${y}[aria-modal="true"]`,V=`[data-nds-scroll-lock],${A}`,L='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),summary,[tabindex]:not([tabindex="-1"])',i=new WeakMap;let a=null;document.addEventListener("pointerdown",t=>{a=t.target},!0);const D=t=>!!(a&&a!==t&&t.contains(a)),M=t=>t?document.querySelector(`#${CSS.escape(t)}`):null,d=t=>!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length>0),f=t=>Array.prototype.filter.call(t.querySelectorAll(L),d),q=t=>Array.prototype.filter.call(document.querySelectorAll(t),e=>!e.hidden&&d(e)),m=t=>t?.id?Array.prototype.slice.call(document.querySelectorAll(`[aria-controls="${CSS.escape(t.id)}"]`)):[],c=()=>{const t=Array.prototype.some.call(document.querySelectorAll(V),e=>!e.hidden);document.documentElement.toggleAttribute("data-nds-scroll-locked",t)},p=(t,e)=>{const r=e?"true":"false";m(t).forEach(n=>{n.setAttribute("aria-expanded",r)})},I=t=>{if(window.ndsAfterPaint){window.ndsAfterPaint(t);return}setTimeout(()=>{t()},0)},h=t=>{if(t)try{t.focus({preventScroll:!0})}catch{t.focus()}},T=t=>{const e=Array.prototype.filter.call(t.querySelectorAll(u),d)[0];h(e||f(t)[0])},C=(t,e=i.get(t))=>{if(e&&e.tabIndex>=0)return e;const r=m(t).filter(n=>n.tabIndex>=0);return r.find(n=>d(n))||r[0]||e},O=t=>!!t&&i.has(t),_=()=>Array.prototype.slice.call(document.querySelectorAll(A)),$=t=>{const e=window.visualViewport;e&&(t.style.top=`${String(e.offsetTop)}px`,t.style.left=`${String(e.offsetLeft)}px`,t.style.width=`${String(e.width)}px`,t.style.height=`${String(e.height)}px`,t.style.right="auto",t.style.bottom="auto")},K=t=>{t.style.top="",t.style.left="",t.style.width="",t.style.height="",t.style.right="",t.style.bottom=""},S=()=>{const t=new Set(_());Array.prototype.forEach.call(document.querySelectorAll(y),e=>{t.has(e)?$(e):K(e)})};let g=0;const w=()=>{g||(g=requestAnimationFrame(()=>{g=0,S()}))},P=(t,e)=>{t?.hidden&&(i.set(t,e||document.activeElement),t.hidden=!1,t.setAttribute("aria-modal","true"),p(t,!0),c(),S(),t.dispatchEvent(new CustomEvent("nds-sheet-open",{bubbles:!0})),I(()=>{t.hidden||T(t)}))},x=(t,e)=>{if(!t||t.hidden)return;t.hidden=!0,t.removeAttribute("aria-modal"),p(t,!1),c(),S(),t.dispatchEvent(new CustomEvent("nds-sheet-close",{bubbles:!0}));const r=i.get(t);i.delete(t),!e&&I(()=>{const n=C(t,r);!t.hidden||!n||!document.contains(n)||h(n)})},k=(t,e)=>{const r=f(e);if(r.length===0)return;const n=r[0],o=r.at(-1);if(!e.contains(document.activeElement)){t.preventDefault(),(t.shiftKey?o:n).focus();return}t.shiftKey&&document.activeElement===n?(t.preventDefault(),o.focus()):!t.shiftKey&&document.activeElement===o&&(t.preventDefault(),n.focus())},B="[data-nds-sheet-drag]",R=.25,W=.5,H=24,z=100,G=250;let s=null;const b=new WeakSet,N=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,Y=(t,e,r)=>{let n=0;const o=l=>{l&&l.target!==t||(clearTimeout(n),t.removeEventListener("transitionend",o),b.delete(t),r&&r(),t.style.removeProperty("transform"),t.style.removeProperty("transition"))};if(N()){o();return}b.add(t),t.style.transition="transform var(--duration-normal) var(--ease-default)",t.style.transform=e,t.addEventListener("transitionend",o),n=setTimeout(o,G)},Q=t=>{t.querySelector(u)?.click(),t.hidden||x(t)};document.addEventListener("pointerdown",t=>{const e=t.target.closest?.(B);if(!e||s||t.button>0)return;const r=e.closest(".nds-modal"),n=e.closest(".nds-modal__body");!r||r.hidden||!n||b.has(n)||(t.preventDefault(),e.setPointerCapture?.(t.pointerId),n.style.transition="none",s={dy:0,lastTime:t.timeStamp,lastY:t.clientY,overlay:r,panel:n,pointerId:t.pointerId,speed:0,startY:t.clientY})}),document.addEventListener("pointermove",t=>{if(!s||t.pointerId!==s.pointerId)return;const e=t.timeStamp-s.lastTime;e>0&&(s.speed=(t.clientY-s.lastY)/e),s.lastTime=t.timeStamp,s.lastY=t.clientY,s.dy=Math.max(0,t.clientY-s.startY),s.panel.style.transform=`translateY(${String(s.dy)}px)`});const F=t=>{if(!s||t.pointerId!==s.pointerId)return;const{dy:e,overlay:r,panel:n}=s,l=t.timeStamp-s.lastTime<=z&&s.speed>W&&e>H;if(s=null,e===0){n.style.removeProperty("transition");return}if(t.type==="pointerup"&&(e>n.offsetHeight*R||l)){Y(n,"translateY(100%)",()=>{Q(r)});return}Y(n,"translateY(0)")};document.addEventListener("pointerup",F),document.addEventListener("pointercancel",F),window.ndsSheet={CLOSE:u,close:x,elementById:M,FOCUSABLE:L,focusFirst:T,focusQuietly:h,isVisible:d,open:P,openOverlays:q,owns:O,pressStartedInside:D,restoreTarget:C,setExpanded:p,trapTab:k,triggersFor:m,visibleFocusable:f};
1const E=window.visualViewport;E&&(E.addEventListener("resize",w),E.addEventListener("scroll",w)),new MutationObserver(t=>{t.some(e=>e.target.classList?.contains("nds-modal"))&&(w(),c())}).observe(document.documentElement,{attributeFilter:["aria-modal"],attributes:!0,subtree:!0}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",c):c()})();

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.