PageSourceSearch

https://balliq.app/assets/useKeyboardAwareInput-DUoQhZF5.js

js balliq.app collected 2026-09-24 14:08:54 UTC 4,111 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bh9WltZ1.js","assets/index-D7X09KaW.js"])))=>i.map(i=>d[i]);
2import{_ as b}from"./preload-helper-D6ZZRfBn.js";import{r as d}from"./react-PZFeUDsy.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="76b7a672-2316-44ce-80c3-0e44e331ce03",o._sentryDebugIdIdentifier="sentry-dbid-76b7a672-2316-44ce-80c3-0e44e331ce03")}catch{}})();const m=100,v=(()=>{try{return typeof window>"u"?!1:window.location?.protocol==="capacitor:"||document.documentElement.classList.contains("native-app")?!0:!!(window.Capacitor&&window.Capacitor.isNativePlatform&&window.Capacitor.isNativePlatform())}catch{return!1}})(),h={active:!1};if(typeof window<"u"){const o=()=>{h.active=!0},e=u=>{(!u.touches||u.touches.length===0)&&(h.active=!1)};window.addEventListener("touchstart",o,{passive:!0}),window.addEventListener("touchend",e,{passive:!0}),window.addEventListener("touchcancel",e,{passive:!0})}function g(o){let e=o;for(;e&&e.nodeType===1&&e!==document.body&&e!==document.documentElement;){try{const u=window.getComputedStyle(e).overflowY;if((u==="auto"||u==="scroll")&&e.scrollHeight>e.clientHeight+1)return!0}catch{}e=e.parentNode}return!1}function L(o){if(typeof window>"u")return 0;if(v)return window.innerHeight-o;const e=window.visualViewport;return e?e.offsetTop+e.height:window.innerHeight}function k(o,{gap:e=12,min:u=132,max:l=360,kbInset:p=0}={}){const[t,s]=d.useState(l),n=d.useRef(null);return n.current=()=>{const r=o.current;if(!r||typeof window>"u")return;const i=r.getBoundingClientRect(),f=L(p)-i.bottom-e;s(Math.max(u,Math.min(l,Math.round(f))))},d.useEffect(()=>{const r=()=>n.current&&n.current();r();const i=typeof window<"u"?window.visualViewport:null;return i&&(i.addEventListener("resize",r),i.addEventListener("scroll",r)),window.addEventListener("resize",r),()=>{i&&(i.removeEventListener("resize",r),i.removeEventListener("scroll",r)),window.removeEventListener("resize",r)}},[]),d.useEffect(()=>{h.active||n.current()}),t}function H(){const o=d.useRef(null),[e,u]=d.useState(0),l=d.useRef(0);l.current=e,d.useEffect(()=>{if(!v)return;let t=!1;const s=[];return b(async()=>{const{Keyboard:n}=await import("./index-Bh9WltZ1.js");return{Keyboard:n}},__vite__mapDeps([0,1])).then(({Keyboard:n})=>{if(t||!n)return;const r=(i,f)=>{const a=n.addListener(i,f);Promise.resolve(a).then(c=>{c&&s.push(c)}).catch(()=>{})};r("keyboardWillShow",i=>u(Math.round(i?.keyboardHeight||0))),r("keyboardDidShow",i=>u(Math.round(i?.keyboardHeight||0))),r("keyboardWillHide",()=>u(0)),r("keyboardDidHide",()=>u(0))}).catch(()=>{}),()=>{t=!0,s.forEach(n=>{try{n.remove()}catch{}})}},[]),d.useEffect(()=>{if(v)return;const t=typeof window<"u"?window.visualViewport:null;if(!t)return;const s=()=>{const n=window.innerHeight-t.height-t.offsetTop;u(n>m?Math.round(n):0)};return s(),t.addEventListener("resize",s),t.addEventListener("scroll",s),()=>{t.removeEventListener("resize",s),t.removeEventListener("scroll",s)}},[]);const p=d.useCallback(()=>{const t=o.current;if(!t||document.activeElement!==t||h.active||l.current<=m)return;const s=requestAnimationFrame(()=>{try{t.scrollIntoView({block:"center",behavior:"smooth"})}catch{}});return()=>cancelAnimationFrame(s)},[]);return d.useEffect(()=>{if(typeof window>"u")return;let t=null,s=null,n=!1,r=!1;const i=a=>{const c=a.touches&&a.touches[0];t=c?c.clientY:null,s=c?c.clientX:null,n=!1,r=v?g(a.target):!0},f=a=>{if(n||t==null||!r)return;const c=o.current;if(!c||document.activeElement!==c||l.current<=m)return;const w=a.touches&&a.touches[0];if(!w)return;const y=Math.abs(w.clientY-t),E=Math.abs(w.clientX-(s??w.clientX));if(y>18&&y>E){n=!0;try{c.blur()}catch{}}};return window.addEventListener("touchstart",i,{passive:!0}),window.addEventListener("touchmove",f,{passive:!0}),()=>{window.removeEventListener("touchstart",i),window.removeEventListener("touchmove",f)}},[]),{inputRef:o,kbInset:e,keepInputVisible:p}}export{k as a,H as u};

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.