mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-20 17:30:36 +03:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
const t=Node.ELEMENT_NODE,{toString:e,hasOwnProperty:n}=Object.prototype;function o(t){return void 0===t}function r(t){return null===t}const i=t=>o(t)||r(t)?""+t:e.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase();function s(t){return"number"==typeof t}function l(t){return"string"==typeof t}function c(t){return"function"==typeof t}function a(t){return Array.isArray(t)}function u(t){return"object"==typeof t&&!a(t)&&!r(t)}function d(t){const e=!!t&&t.length,n=s(e)&&e>-1&&e%1==0;return!!(a(t)||!c(t)&&n)&&(!(e>0&&u(t))||e-1 in t)}function _(t){if(!t||!u(t)||"object"!==i(t))return!1;let e;const r=t.constructor,s=r&&r.prototype,l=n.call(t,"constructor"),c=s&&n.call(s,"isPrototypeOf");if(r&&!l&&!c)return!1;for(e in t);return o(e)||n.call(t,e)}function v(e){const n=window.Element;return!!e&&(n?e instanceof n:e.nodeType===t)}function h(t,e,n,r){if(o(r))return n?n[t]:e;n&&(n[t]=r)}function f(t,e,n){if(o(n))return t?t.getAttribute(e):null;t&&t.setAttribute(e,n)}function b(t,e){return h("scrollLeft",0,t,e)}function g(t,e){return h("scrollTop",0,t,e)}function p(t,e){if(d(t))for(let n=0;n<t.length&&!1!==e(t[n],n,t);n++);else t&&p(Object.keys(t),n=>e(t[n],n,t));return t}const w=(t,e,n)=>t.indexOf(e,n),y=(t,e,n)=>(n||l(e)||!d(e)?t.push(e):Array.prototype.push.apply(t,e),t),m=t=>{if(Array.from)return Array.from(t);const e=[];return p(t,t=>{y(e,t)}),e},x=t=>t&&0===t.length,S=(t,e)=>{const n=t=>t&&t(e);t instanceof Set?t.forEach(n):p(t,n)},z=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),M=t=>t?Object.keys(t):[];function C(t,e,n,o,i,s,l){const u=[e,n,o,i,s,l];return"object"==typeof t&&!r(t)||c(t)||(t={}),p(u,e=>{p(M(e),n=>{const o=e[n];if(t===o)return!0;const r=a(o);if(o&&(_(o)||r)){const e=t[n];let i=e;r&&!a(e)?i=[]:r||_(e)||(i={}),t[n]=C(i,o)}else t[n]=o})}),t}function O(t){for(const e in t)return!1;return!0}const L=/[^\x20\t\r\n\f]+/g,A=(t,e,n)=>{let o,r=0,i=!1;if(t&&l(e)){const s=e.match(L)||[];for(i=s.length>0;o=s[r++];)i=!!n(t.classList,o)&&i}return i},I=(t,e)=>{A(t,e,(t,e)=>t.add(e))},T=(t,e)=>{A(t,e,(t,e)=>t.remove(e))},j=Element.prototype,E=(t,e)=>{const n=[],o=e?v(e)?e:null:document;return o?y(n,o.querySelectorAll(t)):n},R=(t,e)=>{if(v(t)){return(j.matches||j.msMatchesSelector).call(t,e)}return!1},$=t=>t?m(t.childNodes):[],V=t=>t?t.parentElement:null,q=(t,e,n)=>{if(n){let o,r=e;t&&(d(n)?(o=document.createDocumentFragment(),p(n,t=>{t===r&&(r=t.previousSibling),o.appendChild(t)})):o=n,e&&(r?r!==e&&(r=r.nextSibling):r=t.firstChild),t.insertBefore(o,r||null))}},H=(t,e)=>{q(t,null,e)},k=(t,e)=>{q(t,t&&t.firstChild,e)},B=(t,e)=>{q(V(t),t&&t.nextSibling,e)},D=t=>{if(d(t))p(m(t),t=>D(t));else if(t){const e=V(t);e&&e.removeChild(t)}},F=t=>{const e=document.createElement("div");return t&&f(e,"class",t),e},G=t=>{const e=F();return e.innerHTML=t.trim(),p($(e),t=>D(t))},N={w:0,h:0},P=()=>({w:window.innerWidth,h:window.innerHeight}),U=t=>t?{w:t.offsetWidth,h:t.offsetHeight}:N;let W;const Y=t=>t.split(" "),X=(t,e,n,o)=>{p(Y(e),e=>{t.removeEventListener(e,n,o)})},J=(t,e,n,r)=>{const i=(()=>{if(o(W)){W=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){W=!0}}))}catch(t){}}return W})(),s=i&&r&&r.t||!1,l=r&&r.o||!1,c=r&&r.s||!1,a=[],u=i?{passive:s,capture:l}:l;return p(Y(e),e=>{const o=c?r=>{t.removeEventListener(e,o,l),n&&n(r)}:n;y(a,X.bind(null,t,e,o,l)),t.addEventListener(e,o,u)}),S.bind(0,a)},K=t=>t.stopPropagation(),Q=t=>t.preventDefault(),Z=(t,e,n)=>{if(t&&e){let o=!0;return p(n,n=>{t[n]!==e[n]&&(o=!1)}),o}return!1},tt=(t,e)=>Z(t,e,["w","h"]),et=(t,e)=>Z(t,e,["x","y"]),nt=["WebKit","Moz","O","MS","webkit","moz","o","ms"],ot={},rt=t=>{let e=ot[t]||window[t];return z(ot,t)||(p(nt,n=>{var o;return e=e||window[n+(o=t,o.charAt(0).toUpperCase()+o.slice(1))],!e}),ot[t]=e),e},it=rt("MutationObserver"),st=rt("IntersectionObserver"),lt=rt("ResizeObserver"),ct=rt("cancelAnimationFrame"),at=rt("requestAnimationFrame"),ut=()=>{},dt=(t,e,n)=>{let o,r;const i=s(e)&&e>0,l=s(n)&&n>0,c=i?window.clearTimeout:ct,a=i?window.setTimeout:at,u=function(e){r=l?performance.now():0,o&&c(o),t.apply(this,e)};return function(){const t=u.bind(this,arguments),i=!!l&&performance.now()-r>=n;o&&c(o),o=i?t():a(t,e)}},_t={animationiterationcount:1,columncount:1,fillopacity:1,flexgrow:1,flexshrink:1,fontweight:1,lineheight:1,opacity:1,order:1,orphans:1,widows:1,zindex:1,zoom:1},vt=(t,e,n)=>null!=e?e.getPropertyValue(n):t.style[n],ht=(t,e,n)=>{try{t&&void 0!==t.style[e]&&(t.style[e]=((t,e)=>!_t[t.toLowerCase()]&&s(e)?e+"px":e)(e,n))}catch(o){}};function ft(t,e){const n=l(e);if(a(e)||n){let o=n?"":{};if(t){const r=window.getComputedStyle(t,null);o=n?vt(t,r,e):e.reduce((e,n)=>(e[n]=vt(t,r,n),e),o)}return o}p(M(e),n=>ht(t,n,e[n]))}const bt={x:0,y:0},gt=t=>{const e=t?(t=>t.getBoundingClientRect())(t):0;return e?{x:e.left+window.pageYOffset,y:e.top+window.pageXOffset}:bt},pt=(t,e)=>{const{l:n,u:o,_:r}=e||{};let i,s=o;return{v:(e,o)=>{const l=s,c=t?t(o,s,i):o,a=e||(n?!n(l,c):l!==c);return(a||r)&&(s=c,i=l),{g:s,p:i,m:a}},S:t=>({g:s,p:i,m:!!t})}};var wt=function(t){var e={exports:{}};return t(e,e.exports),e.exports}((function(t){function e(){return t.exports=e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},e.apply(this,arguments)}t.exports=e}));const{stringify:yt}=JSON,mt=["__TPL_","_TYPE__"],xt=["boolean","number","string","array","object","function","null"].reduce((t,e)=>(t[e]=mt[0]+e+mt[1],t),{}),St=(t,e,n,r,s)=>{const c={},u=wt({},t);return p(M(e).filter(e=>z(t,e)),d=>{const v=o(n[d])?{}:n[d],h=t[d],f=e[d],b=_(f),g=s?s+".":"";if(b&&_(h)){const t=St(h,f,v,r,g+d);c[d]=t.M,u[d]=t.C,p([u,c],t=>{O(t[d])&&delete t[d]})}else if(!b){let t=!1;const e=[],n=[],s=i(h);if(p(a(f)?f:[f],r=>{let i;p(xt,(t,e)=>{t===r&&(i=e)});const c=o(i);if(c&&l(h)){const n=r.split(" ");t=!!n.find(t=>t===h),y(e,n)}else t=xt[s]===r;return y(n,c?xt.string:i),!t}),t){(a(h)||_(h)?yt(h)!==yt(v):h!==v)&&(c[d]=h)}else r&&console.warn(`The option "${g}${d}" wasn't set, because it doesn't accept the type [ ${s.toUpperCase()} ] with the value of "${h}".\r\nAccepted types are: [ ${n.join(", ").toUpperCase()} ].\r\n${e.length>0?`\r\nValid strings are: [ ${e.join(", ")} ].`:""}`);delete u[d]}}),{C:u,M:c}},zt=(t,e,n,o)=>St(t,e,n||{},o||!1);let Mt;const{abs:Ct,round:Ot}=Math,Lt=(t,e)=>{H(t,e);const n=(o=e)?{w:o.clientWidth,h:o.clientHeight}:N;var o;const r=U(e);return{x:r.h-n.h,y:r.w-n.w}},At=(t,e)=>{ft(t,{overflowX:"hidden",overflowY:"hidden",direction:"rtl"}),b(t,0);const n=gt(t),o=gt(e);b(t,-999);const r=gt(e);return{i:n.x===o.x,n:o.x!==r.x}},It=(t,e)=>{I(t,"os-environment-flexbox-glue");const n=U(t),o=U(e),r=tt(o,n);I(t,"os-environment-flexbox-glue-max");const i=U(t),s=U(e),l=tt(s,i);return r&&l},Tt=()=>{const t=window.screen.deviceXDPI||0,e=window.screen.logicalXDPI||1;return window.devicePixelRatio||t/e},jt=()=>{const{body:t}=document,e=G('<div class="os-environment"><div></div></div>')[0],n=e.firstChild,o=new Set,r=Lt(t,e),i={x:0===r.x,y:0===r.y},s={O:!1,L:r,A:i,I:!1,T:At(e,n),j:It(e,n),R(t){o.add(t)},$(t){o.delete(t)}};var l,c;if(c="style",(l=e)&&l.removeAttribute(c),D(e),!i.x||!i.y){let n=P(),i=Tt(),s=r;window.addEventListener("resize",()=>{if(o.size){const r=P(),l={w:r.w-n.w,h:r.h-n.h};if(0===l.w&&0===l.h)return;const c={w:Ct(l.w),h:Ct(l.h)},a={w:Ct(Ot(r.w/(n.w/100))),h:Ct(Ot(r.h/(n.h/100)))},u=Tt(),d=c.w>2&&c.h>2,_=!((t,e)=>{const n=Ct(t),o=Ct(e);return!(n===o||n+1===o||n-1===o)})(a.w,a.h),v=u!==i&&i>0;if(d&&_&&v){const n=Mt.L=Lt(t,e);D(e),s.x===n.x&&s.y===n.y||S(o),s=n}n=r,i=u}})}return s},Et=()=>(Mt||(Mt=jt()),Mt),Rt=t=>{H(V(t),$(t)),D(t)},$t=e=>{const n=function(e){const n=window.HTMLElement;return!!e&&(n?e instanceof n:e.nodeType===t)}(e),r=n?{}:{V:e.host,q:e.target,H:e.padding,k:e.viewport,B:e.content};if(n){const t=F("os-padding"),n=F("os-viewport"),o=F("os-content");H(t,n),H(n,o),r.q=e,r.H=t,r.k=n,r.B=o}let{q:i,H:s,k:l,B:c}=r;const a=[],u=R(i,"textarea"),d=!u&&R(i,"body"),_=u?r.V||F():i,v=t=>u?i:$(t);if(u&&_!==r.V&&(B(i,_),y(a,()=>{B(_,i),D(_)})),n)H(c,v(i)),H(_,s),y(a,()=>{H(_,$(c)),D(s),T(_,"os-host")});else{const t=c||l||s||_,e=o(s),n=o(l),i=o(c),u=v(t);s=r.H=e?F():s,l=r.k=n?F():l,c=r.B=i?F():c,H(_,s),H(s||_,l),H(l,c);H(c||l,u),y(a,()=>{i&&Rt(c),n&&Rt(l),e&&Rt(s),T(_,"os-host"),T(s,"os-padding"),T(l,"os-viewport"),T(c,"os-content")})}I(_,"os-host"),I(s,"os-padding"),I(l,"os-viewport"),I(c,"os-content");const h=i.ownerDocument,f=h.body,b={D:h.defaultView,F:h,G:V(f),N:f,P:u,U:d},g=wt({},r,{V:_}),{I:p,A:w}=Et();if(p)y(a,T.bind(0,l,"os-viewport-scrollbar-styled"));else if((w.x||w.y)&&g.B){const t=F("os-content-arrange");k(l,t),y(a,D.bind(0,t)),g.W=t}return{Y:g,X:b,J:()=>{S(a)}}},Vt=(t,e)=>t&&e.split(".").reduce((t,e)=>t&&z(t,e)?t[e]:void 0,t),qt=t=>{const{V:e,H:n,k:o,B:r,W:i}=t.K.Y,{v:s,S:l}=pt(()=>{return(t=r||o)?{w:t.scrollWidth,h:t.scrollHeight}:N;var t},{l:tt}),{v:c,S:a}=pt(t=>({x:Math.max(0,Math.round(100*(t.Z.w-t.tt.w))/100),y:Math.max(0,Math.round(100*(t.Z.h-t.tt.h))/100)}),{l:et}),u=(t,e,n,o)=>{const r="visible-scroll"===n,i=e>0&&("scroll"===n||"hidden"===n);return i&&(o[t?"overflowX":"overflowY"]=n),{et:!i,nt:r?"scroll":"hidden"}};return((t,e)=>(n,o,r)=>e(!!r,n,e=>({g:Vt(t.ot,e),m:r||void 0!==Vt(o,e)}))||{})(t,(t,d,_)=>{const{rt:v,it:h,st:f,lt:p,ct:w}=d,{j:y,I:m,A:x}=Et(),{g:S,m:z}=_("nativeScrollbarsOverlaid.show"),M=!y&&(f||w||p||z),C=S&&x.x&&x.y;let O=a(),L=l();if(z&&m&&(C?T(o,"os-viewport-scrollbar-styled"):I(o,"os-viewport-scrollbar-styled")),f||w){const e=U(n),l=U(r||o),a=U(i);L=s(t);const{g:u}=L;O=c(t,{Z:{w:Math.max(u.w,a.w),h:Math.max(u.h,a.h)},tt:{w:e.w+Math.max(0,l.w-u.w),h:e.h+Math.max(0,l.h-u.h)}})}const{g:A,m:j}=v,{g:E,m:R}=L,{g:$,m:V}=O,{g:q,m:H}=_("overflow");if(R||V||H||z||j&&!m||M){const t={overflowY:"",overflowX:"",marginTop:"",marginRight:"",marginBottom:"",marginLeft:"",maxWidth:""},n={borderTop:"",borderRight:"",borderBottom:"",borderLeft:""},{et:s,nt:l}=u(!0,$.x,q.x,t),{et:c,nt:a}=u(!1,$.y,q.y,t);s&&!c&&(t.overflowX=l),c&&!s&&(t.overflowY=a);const{at:d,ut:_}=((t,e,n,o,s)=>{const{L:l,A:c,I:a}=Et(),{x:u,y:d}=c,_="scroll"===o.overflowX,v="scroll"===o.overflowY,h=n?"marginLeft":"marginRight",f=n?"borderLeft":"borderRight",b=r&&!e?42:0,g={x:u?b:l.x,y:d?b:l.y};return a||(_&&(o.marginBottom=-g.x,s.borderBottom=u&&b?"42px solid transparent":""),v&&(o.maxWidth=`calc(100% + ${g.y}px)`,o[h]=-g.y,s[f]=d&&b?"42px solid transparent":""),i&&ft(i,{width:v&&!e?b+t.w:"",height:_&&!e?b+t.h:""})),{at:g,ut:{x:_,y:v}}})(E,C,A,t,n);M&&((t,n,r)=>{const i=b(o),s=g(o);ft(o,{maxHeight:""}),t&&ft(o,{maxHeight:e.clientHeight+(n?r:0)}),b(o,i),g(o,s)})(!!h.g,_.x,d.x),ft(o,t),ft(r,n)}})},Ht={direction:["rtl"]},kt=t=>{let e=!1;return p(ft(t,["direction"]),(t,n)=>{e=e||w(Ht[n],t)>-1}),e},Bt=t=>t&&(t.height||t.width),Dt=(t,e,n)=>{const{dt:o=!1,_t:r=!1}=n||{},{T:i}=Et(),s=G('<div class="os-size-observer"><div class="os-size-observer-listener"></div></div>')[0],l=s.firstChild,{v:c}=pt(0,{_:!0,l:(t,e)=>!(!t||!Bt(t)&&Bt(e))}),u=t=>{const n=t&&"boolean"==typeof t.g;let r=!1;if(a(t)&&t.length>0){const{p:e,g:n,m:o}=c(0,t.pop().contentRect);r=!e||!Bt(n)}else n&&t.m;if(o){const e=n?t.g:kt(s);b(s,e?i.n?-3333333:i.i?0:3333333:3333333),g(s,3333333)}r||e(n?t:void 0)},d=[];let _,v=!!r&&u;if(lt){const t=new lt(u);t.observe(l),y(d,()=>t.disconnect())}else{const t=G('<div class="os-size-observer-listener-item" dir="ltr"><div class="os-size-observer-listener-item"><div class="os-size-observer-listener-item-final"></div></div><div class="os-size-observer-listener-item"><div class="os-size-observer-listener-item-final" style="width: 200%; height: 200%"></div></div></div>');H(l,t),I(l,"os-size-observer-listener-scroll");const e=t[0],n=e.lastChild,o=e.firstChild,i=null==o?void 0:o.firstChild;let s,c=U(l),a=c,_=!1;const h=()=>{b(o,3333333),g(o,3333333),b(n,3333333),g(n,3333333)},f=()=>{s=0,_&&(c=a,u())},p=t=>(a=U(l),_=!t||!tt(a,c),t&&_&&!s?(ct(s),s=at(f)):t||f(),h(),t&&(Q(t),K(t)),!1);y(d,[J(o,"scroll",p),J(n,"scroll",p)]),ft(i,{width:3333333,height:3333333}),h(),v=r?()=>p():h}if(o){_=pt(()=>kt(s));const{v:t}=_;y(d,J(s,"scroll",e=>{const n=t(),{g:o,m:r}=n;return r&&(ft(l,o?{left:"auto",right:0}:{left:0,right:"auto"}),u(n)),Q(e),K(e),!1}))}return v&&(I(s,"os-size-observer-appear"),y(d,J(s,"animationstart",v,{s:!!lt}))),k(t,s),{J(){S(d),D(s)},vt:t=>({rt:_?_.S(t):{g:!1,p:!1,m:!1}})}},Ft=(t,e,n,r)=>{let i;const s=()=>{n.forEach((t,e)=>{X(e,t,r)}),n.clear()},l=e=>{if(i){p(i.reduce((n,o)=>{if(o){const r=o[0],i=o[1],s=i&&r&&(e?e(r):E(r,t));s&&y(n,[s,c(i)?i(s):i],!0)}return n},[]),t=>{const e=t[0],i=t[1];p(e,t=>{((t,e)=>{const i=n.get(t),s=o(i),l=()=>{n.set(t,e),J(t,e,r)};s||e===i?s&&l():(X(t,i,r),l())})(t,i)})})}},a=t=>{i=t,s(),l()};return e&&a(e),{J:s,ht:l,v:a}},Gt=(t,e,n)=>{let o=!1;const{ft:r,bt:i,gt:s,pt:c,wt:a,yt:u,xt:d}=n||{},{ht:_,J:v,v:h}=Ft(t,r&&c,new Map,dt(()=>{o&&e([],!1,!0)},84)),b=s||[],g=(i||[]).concat(b),m=o=>{const i=u||ut,s=d||ut,c=[],v=[];let h=!1,g=!1,m=!1;p(o,e=>{const{attributeName:o,target:u,type:d,oldValue:_,addedNodes:p}=e,x="attributes"===d,S="childList"===d,z=t===u,M=x&&l(o)?f(u,o):0,C=0!==M&&_!==M,O=C&&z&&!r&&!i(u,o,_,M),L=w(b,o)>-1&&C;if(O&&y(c,o),r){const r=!x,l=x&&L&&!z,c=l&&a&&R(u,a),d=(c?!i(u,o,_,M):r||l)&&!s(e,!!c,t,n);y(v,p),g=g||d,m=m||S}h=h||O&&L}),m&&!x(v)&&_(t=>v.reduce((e,n)=>(y(e,E(t,n)),R(n,t)?y(e,n):e),[])),(!x(c)||h||g)&&e(c,h,g)},S=new it(m);return S.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:g,subtree:r,childList:r,characterData:r}),o=!0,{St:()=>{o&&(v(),S.disconnect(),o=!1)},zt:t=>{h(o&&r&&t)},v:()=>{o&&m(S.takeRecords())}}},Nt=["id","class","style","open"],Pt={g:!1,p:!1,m:!1},Ut={g:!1,p:!1,m:!1},Wt=(t,e)=>{const{V:n,k:o,B:r}=e.Y,{I:i,j:s,R:l,$:c}=Et(),a=[];y(a,qt({ot:t,K:e}));const u=(t,e,n)=>{let{rt:o,it:r,st:i=n||!1,lt:s=n||!1,ct:l=n||!1}=t||{};const c=o||(d?d.vt(n).rt:Pt),u=r||(_?_.vt(n).it:Ut);p(a,t=>{const{st:o,lt:r,ct:a}=t({rt:c,it:u,st:i,lt:s,ct:l},e,n);i=o||i,s=r||s,l=a||l})},d=Dt(n,t=>{u({rt:t,st:!t})},{_t:!0,dt:!i}),_=((t,e)=>{const n=G('<div class="os-trinsic-observer"></div>')[0],o=[],{v:r,S:i}=pt(t=>0===t.h||t.isIntersecting||t.intersectionRatio>0,{u:!1});if(st){const i=new st(t=>{if(t&&t.length>0){const n=t.pop();if(n){const t=r(0,n);t.m&&e(t)}}},{root:t});i.observe(n),y(o,()=>i.disconnect())}else y(o,Dt(n,()=>{const t=U(n),o=r(0,t);o.m&&e(o)}).J);return k(t,n),{J(){S(o),D(n)},vt:t=>({it:i(t)})}})(n,t=>{u({it:t})}),v=(Gt(n,()=>{requestAnimationFrame(()=>{u({lt:!0})})},{gt:Nt,bt:Nt}),Gt(r||o,()=>{requestAnimationFrame(()=>{u({ct:!0})})},{ft:!0,gt:Nt,bt:Nt,pt:t.updating.elementEvents}),(t,e)=>{u(null,t,e)}),h=v.bind(null,null,!0);return l(h),console.log("flexboxGlue",s),{v,J(){c(h)}}},Yt=xt.number,Xt=[xt.string,xt.array,xt.null],Jt=[!0,xt.boolean],Kt=[!1,xt.boolean],Qt={resize:["none","none both horizontal vertical"],paddingAbsolute:Kt,updating:{elementEvents:[[["img","load"]],[xt.array,xt.null]],contentMutationDebounce:[80,Yt],hostMutationDebounce:[0,Yt],resizeDebounce:[0,Yt]},overflow:{x:["scroll","visible-hidden visible-scroll scroll hidden"],y:["scroll","visible-hidden visible-scroll scroll hidden"]},scrollbars:{visibility:["auto","visible hidden auto"],autoHide:["never","never scroll leavemove"],autoHideDelay:[800,Yt],dragScroll:Jt,clickScroll:Kt,touch:Jt},textarea:{dynWidth:Kt,dynHeight:Kt,inheritedAttrs:[["style","class"],Xt]},nativeScrollbarsOverlaid:{show:Kt,initialize:Kt}},{Mt:Zt,ot:te}=function t(e){const n={Mt:{},ot:{}};return p(M(e),o=>{const r=e[o];if(a(r))n.Mt[o]=r[1],n.ot[o]=r[0];else{const e=t(r);n.Mt[o]=e.Mt,n.ot[o]=e.ot}}),n}(Qt),ee=(t,e,n)=>{const o=C({},te,zt(e||{},Zt,null,!0).M),r=$t(t),i=Wt(o,r),s={options(t){if(t){const{M:e}=zt(t,Zt,o,!0);O(e)||(C(o,e),i.v(e))}return o},update(t){i.v(null,t)}};return s.update(!0),s};export default()=>[Et(),ee(document.body),G(' <div class="os-host"> <div class="os-resize-observer-host"></div> <div class="os-padding"> <div class="os-viewport"> <div class="os-content"> fdfhdfgh </div> </div> </div> <div class="os-scrollbar os-scrollbar-horizontal"> <div class="os-scrollbar-track"> <div class="os-scrollbar-handle"></div> </div> </div> <div class="os-scrollbar os-scrollbar-vertical"> <div class="os-scrollbar-track"> <div class="os-scrollbar-handle"></div> </div> </div> <div class="os-scrollbar-corner"></div> </div>')]; |