UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

1 lines • 2.04 kB
import{I as e,L as t,lt as n,xt as r}from"./i18n.store-Bkc9i0ZB.js";import{$n as i,hn as a,ir as o,kt as s,lr as c,mt as l,qn as u}from"./_plugin-vue_export-helper-BZ1AqotW.js";e(),n();var d=Symbol.for(`vuetify:goto`);function f(){return{container:void 0,duration:300,layout:!1,offset:0,easing:`easeInOutCubic`,patterns:s}}function p(e){return m(e)??(document.scrollingElement||document.body)}function m(e){return typeof e==`string`?document.querySelector(e):i(e)}function h(e,t,n){if(typeof e==`number`)return t&&n?-e:e;let r=m(e),i=0;for(;r;)i+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return i}function g(e,t){return{rtl:t.isRtl,options:u(f(),e)}}async function _(e,t,n,r){let i=n?`scrollLeft`:`scrollTop`,s=u(r?.options??f(),t),l=r?.rtl.value,d=(typeof e==`number`?e:m(e))??0,g=s.container===`parent`&&d instanceof HTMLElement?d.parentElement:p(s.container),_=o()?s.patterns.instant:typeof s.easing==`function`?s.easing:s.patterns[s.easing];if(!_)throw TypeError(`Easing function "${s.easing}" not found.`);let v;if(typeof d==`number`)v=h(d,n,l);else if(v=h(d,n,l)-h(g,n,l),s.layout){let e=window.getComputedStyle(d).getPropertyValue(`--v-layout-top`);e&&(v-=parseInt(e,10))}v+=s.offset,v=y(g,v,!!l,!!n);let b=g[i]??0;if(v===b)return Promise.resolve(v);let x=performance.now();return new Promise(e=>requestAnimationFrame(function t(n){let r=(n-x)/s.duration,o=Math.floor(b+(v-b)*_(a(r,0,1)));if(g[i]=o,r>=1&&Math.abs(o-g[i])<10)return e(v);if(r>2)return c(`Scroll target is not reachable`),e(g[i]);requestAnimationFrame(t)}))}function v(e={}){let n=t(d),{isRtl:i}=l();if(!n)throw Error(`[Vuetify] Could not find injected goto instance`);let a={...n,rtl:r(()=>n.rtl.value||i.value)};async function o(t,n){return _(t,u(e,n),!1,a)}return o.horizontal=async(t,n)=>_(t,u(e,n),!0,a),o}function y(e,t,n,r){let{scrollWidth:i,scrollHeight:o}=e,[s,c]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight],l,u;return r?n?(l=-(i-s),u=0):(l=0,u=i-s):(l=0,u=o+-c),a(t,l,u)}export{g as n,v as r,d as t};