mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-23 02:20:37 +03:00
11 lines
28 KiB
JavaScript
11 lines
28 KiB
JavaScript
/*!
|
|
* OverlayScrollbars
|
|
* Version: 2.0.0-beta.0
|
|
*
|
|
* Copyright (c) Rene Haas | KingSora.
|
|
* https://github.com/KingSora
|
|
*
|
|
* Released under the MIT license.
|
|
*/
|
|
|
|
const OverlayScrollbars=function(t){"use strict";function e(t,n){if(g(t))for(let e=0;e<t.length&&!1!==n(t[e],e,t);e++);else t&&e(Object.keys(t),(e=>n(t[e],e,t)));return t}function n(t,n){const o=u(n);if(f(n)||o){let e=o?"":{};if(t){const r=window.getComputedStyle(t,null);e=o?xt(t,r,n):n.reduce(((e,n)=>(e[n]=xt(t,r,n),e)),e)}return e}t&&e(C(n),(e=>$t(t,e,n[e])))}const o=(t,e)=>{const{o:n,u:o,_:r}=t;let i,s=n;const l=(t,e)=>{const n=s,l=t,c=e||(o?!o(n,l):n!==l);return(c||r)&&(s=l,i=n),[s,c,i]};return[e?t=>l(e(s,i),t):l,t=>[s,!!t,i]]},r=Node.ELEMENT_NODE,{toString:i,hasOwnProperty:s}=Object.prototype,l=t=>void 0===t,c=t=>null===t,a=t=>l(t)||c(t)?`${t}`:i.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),d=t=>"number"==typeof t,u=t=>"string"==typeof t,h=t=>"boolean"==typeof t,p=t=>"function"==typeof t,f=t=>Array.isArray(t),w=t=>"object"==typeof t&&!f(t)&&!c(t),g=t=>{const e=!!t&&t.length,n=d(e)&&e>-1&&e%1==0;return!(!(f(t)||!p(t)&&n)||e>0&&w(t)&&!(e-1 in t))},b=t=>{if(!t||!w(t)||"object"!==a(t))return!1;let e;const n="constructor",o=t[n],r=o&&o.prototype,i=s.call(t,n),c=r&&s.call(r,"isPrototypeOf");if(o&&!i&&!c)return!1;for(e in t);return l(e)||s.call(t,e)},v=t=>{const e=HTMLElement;return!!t&&(e?t instanceof e:t.nodeType===r)},y=t=>{const e=Element;return!!t&&(e?t instanceof e:t.nodeType===r)},m=(t,e,n)=>t.indexOf(e,n),x=(t,e,n)=>(n||u(e)||!g(e)?t.push(e):Array.prototype.push.apply(t,e),t),$=t=>{const n=Array.from,o=[];return n&&t?n(t):(t instanceof Set?t.forEach((t=>{x(o,t)})):e(t,(t=>{x(o,t)})),o)},O=t=>!!t&&0===t.length,S=(t,n,o)=>{e(t,(t=>t&&t.apply(void 0,n||[]))),!o&&(t.length=0)},L=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),C=t=>t?Object.keys(t):[],E=(t,n,o,r,i,s,l)=>{const a=[n,o,r,i,s,l];return"object"==typeof t&&!c(t)||p(t)||(t={}),e(a,(n=>{e(C(n),(e=>{const o=n[e];if(t===o)return!0;const r=f(o);if(o&&(b(o)||r)){const n=t[e];let i=n;r&&!f(n)?i=[]:r||b(n)||(i={}),t[e]=E(i,o)}else t[e]=o}))})),t},M=t=>{for(const e in t)return!1;return!0},P=(t,e,n,o)=>{if(l(o))return n?n[t]:e;n&&(u(o)||d(o))&&(n[t]=o)},A=(t,e,n)=>{if(l(n))return t?t.getAttribute(e):null;t&&t.setAttribute(e,n)},R=(t,e,n,o)=>{if(n){const r=A(t,e)||"",i=new Set(r.split(" "));i[o?"add":"delete"](n),A(t,e,$(i).join(" ").trim())}},T=(t,e)=>{t&&t.removeAttribute(e)},z=(t,e)=>P("scrollLeft",0,t,e),B=(t,e)=>P("scrollTop",0,t,e),k=Element.prototype,D=(t,e)=>{const n=[],o=e?y(e)?e:null:document;return o?x(n,o.querySelectorAll(t)):n},H=(t,e)=>!!y(t)&&(k.matches||k.msMatchesSelector).call(t,e),I=t=>t?$(t.childNodes):[],Y=t=>t?t.parentElement:null,V=(t,e)=>{if(y(t)){const n=k.closest;if(n)return n.call(t,e);do{if(H(t,e))return t;t=Y(t)}while(t)}return null},j=(t,n,o)=>{if(o&&t){let r,i=n;g(o)?(r=document.createDocumentFragment(),e(o,(t=>{t===i&&(i=t.previousSibling),r.appendChild(t)}))):r=o,n&&(i?i!==n&&(i=i.nextSibling):i=t.firstChild),t.insertBefore(r,i||null)}},F=(t,e)=>{j(t,null,e)},W=(t,e)=>{j(Y(t),t&&t.nextSibling,e)},_=t=>{if(g(t))e($(t),(t=>_(t)));else if(t){const e=Y(t);e&&e.removeChild(t)}},K=t=>{const e=document.createElement("div");return t&&A(e,"class",t),e},N=t=>{const n=K();return n.innerHTML=t.trim(),e(I(n),(t=>_(t)))},X=t=>t.charAt(0).toUpperCase()+t.slice(1),Z=["-webkit-","-moz-","-o-","-ms-"],G=["WebKit","Moz","O","MS","webkit","moz","o","ms"],J={},q={},U=t=>{let n=q[t];if(L(q,t))return n;const o=X(t),r=K().style;return e(Z,(e=>{const i=e.replace(/-/g,""),s=[t,e+t,i+o,X(i)+o];return!(n=s.find((t=>void 0!==r[t])))})),q[t]=n||""},Q=t=>{let n=J[t]||window[t];return L(J,t)||(e(G,(e=>(n=n||window[e+X(t)],!n))),J[t]=n),n},tt=Q("MutationObserver"),et=Q("IntersectionObserver"),nt=Q("ResizeObserver"),ot=Q("cancelAnimationFrame"),rt=Q("requestAnimationFrame"),it=window.setTimeout,st=window.clearTimeout,lt=/[^\x20\t\r\n\f]+/g,ct=(t,e,n)=>{const o=t&&t.classList;let r,i=0,s=!1;if(o&&e&&u(e)){const t=e.match(lt)||[];for(s=t.length>0;r=t[i++];)s=!!n(o,r)&&s}return s},at=(t,e)=>{ct(t,e,((t,e)=>t.remove(e)))},dt=(t,e)=>(ct(t,e,((t,e)=>t.add(e))),at.bind(0,t,e)),ut=(t,n,o,r)=>{if(t&&n){let i=!0;return e(o,(e=>{(r?r(t[e]):t[e])!==(r?r(n[e]):n[e])&&(i=!1)})),i}return!1},ht=(t,e)=>ut(t,e,["w","h"]),pt=(t,e)=>ut(t,e,["x","y"]),ft=(t,e)=>ut(t,e,["t","r","b","l"]),wt=(t,e,n)=>ut(t,e,["width","height"],n&&(t=>Math.round(t))),gt=()=>{},bt=t=>{let e;const n=t?it:rt,o=t?st:ot;return[r=>{o(e),e=n(r,p(t)?t():t)},()=>o(e)]},vt=(t,e)=>{let n,o,r,i=gt;const{g:s,v:l,p:c}=e||{},a=function(e){i(),st(n),n=o=void 0,i=gt,t.apply(this,e)},u=t=>c&&o?c(o,t):t,h=()=>{i!==gt&&a(u(r)||r)},f=function(){const t=$(arguments),e=p(s)?s():s,c=d(e)&&e>=0;if(c){const s=p(l)?l():l,c=d(s)&&s>=0,f=e>0?it:rt,w=e>0?st:ot,g=u(t)||t,b=a.bind(0,g);i();const v=f(b,e);i=()=>w(v),c&&!n&&(n=it(h,s)),o=r=g}else a(t)};return f.m=h,f},yt={opacity:1,zindex:1},mt=(t,e)=>{const n=e?parseFloat(t):parseInt(t,10);return n==n?n:0},xt=(t,e,n)=>null!=e?e[n]||e.getPropertyValue(n):t.style[n],$t=(t,e,n)=>{try{const{style:o}=t;l(o[e])?o.setProperty(e,n):o[e]=((t,e)=>!yt[t.toLowerCase()]&&d(e)?`${e}px`:e)(e,n)}catch(s){}},Ot=t=>"rtl"===n(t,"direction"),St=(t,e,o)=>{const r=e?`${e}-`:"",i=o?`-${o}`:"",s=`${r}top${i}`,l=`${r}right${i}`,c=`${r}bottom${i}`,a=`${r}left${i}`,d=n(t,[s,l,c,a]);return{t:mt(d[s]),r:mt(d[l]),b:mt(d[c]),l:mt(d[a])}},{round:Lt}=Math,Ct={w:0,h:0},Et=t=>t?{w:t.offsetWidth,h:t.offsetHeight}:Ct,Mt=t=>t?{w:t.clientWidth,h:t.clientHeight}:Ct,Pt=t=>t?{w:t.scrollWidth,h:t.scrollHeight}:Ct,At=t=>{const e=parseFloat(n(t,"height"))||0,o=parseFloat(n(t,"width"))||0;return{w:o-Lt(o),h:e-Lt(e)}},Rt=t=>t.getBoundingClientRect();let Tt;const zt=t=>t.split(" "),Bt=(t,n,o,r)=>{e(zt(n),(e=>{t.removeEventListener(e,o,r)}))},kt=(t,n,o,r)=>{var i;const s=(()=>{if(l(Tt)){Tt=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){Tt=!0}}))}catch(t){}}return Tt})(),c=null!=(i=s&&r&&r.S)?i:s,a=r&&r.$||!1,d=r&&r.C||!1,u=[],h=s?{passive:c,capture:a}:a;return e(zt(n),(e=>{const n=d?r=>{t.removeEventListener(e,n,a),o&&o(r)}:o;x(u,Bt.bind(null,t,e,n,a)),t.addEventListener(e,n,h)})),S.bind(0,u)},Dt=t=>t.stopPropagation(),Ht=t=>t.preventDefault(),It={x:0,y:0},Yt=t=>{const e=t?Rt(t):0;return e?{x:e.left+window.pageYOffset,y:e.top+window.pageXOffset}:It},Vt=(t,n)=>{e(f(n)?n:[n],t)},jt=t=>{const n=new Map,o=(t,e)=>{if(t){const o=n.get(t);Vt((t=>{o&&o[t?"delete":"clear"](t)}),e)}else n.forEach((t=>{t.clear()})),n.clear()},r=(t,e)=>{const r=n.get(t)||new Set;return n.set(t,r),Vt((t=>{t&&r.add(t)}),e),o.bind(0,t,e)};return e(C(t),(e=>{r(e,t[e])})),[r,o,(t,o)=>{const r=n.get(t);e($(r),(t=>{o&&!O(o)?t.apply(0,o):t()}))}]},Ft=t=>JSON.stringify(t,((t,e)=>{if(p(e))throw new Error;return e})),Wt={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},_t=(t,n)=>{const o={};return e(C(n).concat(C(t)),(e=>{const r=t[e],i=n[e];if(w(r)&&w(i))E(o[e]={},_t(r,i));else if(L(n,e)&&i!==r){let t=!0;if(f(r)||f(i))try{Ft(r)===Ft(i)&&(t=!1)}catch(G){}t&&(o[e]=i)}})),o},Kt="os-environment",Nt=`${Kt}-flexbox-glue`,Xt=`${Nt}-max`,Zt="data-overlayscrollbars",Gt=`${Zt}-overflow-x`,Jt=`${Zt}-overflow-y`,qt="overflowVisible",Ut="scrollbarHidden",Qt="updating",te="os-padding",ee="os-viewport",ne=`${ee}-arrange`,oe="os-content",re=`${ee}-scrollbar-hidden`,ie=`os-overflow-visible`,se="os-size-observer",le=`${se}-appear`,ce=`${se}-listener`,ae=`${ce}-scroll`,de=`${ce}-item`,ue=`${de}-final`,he="os-trinsic-observer",pe="os-scrollbar",fe=`${pe}-rtl`,we=`${pe}-horizontal`,ge=`${pe}-vertical`,be=`${pe}-track`,ve=`${pe}-handle`,ye=`${pe}-visible`,me=`${pe}-cornerless`,xe=`${pe}-transitionless`,$e=`${pe}-interaction`,Oe=`${pe}-unusable`,Se=`${pe}-auto-hidden`,Le=`${pe}-wheel`,Ce=`${be}-interactive`,Ee=`${ve}-interactive`,Me={},Pe=()=>Me,Ae="__osOptionsValidationPlugin",Re=3333333,Te="scroll",ze="__osSizeObserverPlugin",Be=(()=>({[ze]:{O:(t,e,o)=>{const r=N(`<div class="${de}" dir="ltr"><div class="${de}"><div class="${ue}"></div></div><div class="${de}"><div class="${ue}" style="width: 200%; height: 200%"></div></div></div>`);F(t,r),dt(t,ae);const i=r[0],s=i.lastChild,l=i.firstChild,c=null==l?void 0:l.firstChild;let a,d=Et(i),u=d,h=!1;const p=()=>{z(l,Re),B(l,Re),z(s,Re),B(s,Re)},f=t=>{a=0,h&&(d=u,e(!0===t))},w=t=>{u=Et(i),h=!t||!ht(u,d),t?(Dt(t),h&&!a&&(ot(a),a=rt(f))):f(!1===t),p()},g=x([],[kt(l,Te,w),kt(s,Te,w)]);return n(c,{width:Re,height:Re}),rt(p),[o?w.bind(0,!1):p,g]}}}))();let ke=0;const{round:De,abs:He}=Math,Ie="__osScrollbarsHidingPlugin",Ye=(()=>({[Ie]:{T:t=>{const{A:e,I:n,L:o}=t,r=!(o||e||!n.x&&!n.y)&&document.createElement("style");return r&&(A(r,"id",`${ne}-${ke}`),ke++),r},H:(t,o,r,i,s,l,c)=>[(e,o,l,c)=>{if(t){const{M:t}=s(),{P:a,D:d}=e,{x:u,y:h}=d,{x:p,y:f}=a,w=t[c?"paddingRight":"paddingLeft"],g=t.paddingTop,b=o.w+l.w,v=o.h+l.h,y={w:f&&h?`${f+b-w}px`:"",h:p&&u?`${p+v-g}px`:""};if(i){const{sheet:t}=i;if(t){const{cssRules:e}=t;if(e){e.length||t.insertRule(`#${A(i,"id")} + .${ne}::before {}`,0);const n=e[0].style;n.width=y.w,n.height=y.h}}}else n(r,{"--os-vaw":y.w,"--os-vah":y.h})}return t},(i,a,d)=>{if(t){const u=d||l(i),{M:h}=s(),{D:p}=u,{x:f,y:w}=p,g={},b=t=>e(t.split(" "),(t=>{g[t]=h[t]}));f&&b("marginBottom paddingTop paddingBottom"),w&&b("marginLeft marginRight paddingLeft paddingRight");const v=n(r,C(g));return at(r,ne),o||(g.height=""),n(r,g),[()=>{c(u,a,t,v),n(r,v),dt(r,ne)},u]}return[gt]}],R:()=>{let t={w:0,h:0},e=0;return(n,o,r)=>{const i={w:window.innerWidth,h:window.innerHeight},s={w:i.w-t.w,h:i.h-t.h};if(0===s.w&&0===s.h)return;const l=He(s.w),c=He(s.h),a={w:He(De(i.w/(t.w/100))),h:He(De(i.h/(t.h/100)))},d=(()=>{const t=window.screen.deviceXDPI||0,e=window.screen.logicalXDPI||1;return window.devicePixelRatio||t/e})(),u=l>2&&c>2,h=!((t,e)=>{const n=He(t),o=He(e);return!(n===o||n+1===o||n-1===o)})(a.w,a.h);if(u&&h&&d!==e&&d>0){const[t,e]=o();E(n.k,t),e&&r()}t=i,e=d}}}}))();let Ve;const je=(t,e,n,o)=>{F(t,e);const r=Mt(e),i=Et(e),s=At(n);return o&&_(e),{x:i.h-r.h+s.h,y:i.w-r.w+s.w}},Fe=(t,e)=>{const o="hidden";n(t,{overflowX:o,overflowY:o,direction:"rtl"}),z(t,0);const r=Yt(t),i=Yt(e);z(t,-999);const s=Yt(e);return{i:r.x===i.x,n:i.x!==s.x}},We=(t,e)=>{const n=dt(t,Nt),o=Rt(t),r=Rt(e),i=wt(r,o,!0),s=dt(t,Xt),l=Rt(t),c=Rt(e),a=wt(c,l,!0);return n(),s(),i&&a},_e=()=>(Ve||(Ve=(()=>{const{body:t}=document,e=N(`<div class="${Kt}"><div></div></div>`)[0],r=e.firstChild,[i,,s]=jt(),[l,c]=o({o:je(t,e,r),u:pt},je.bind(0,t,e,r,!0)),[a]=c(),d=(t=>{let e=!1;const o=dt(t,re);try{e="none"===n(t,U("scrollbar-width"))||"none"===window.getComputedStyle(t,"::-webkit-scrollbar").getPropertyValue("display")}catch(r){}return o(),e})(e),u={x:0===a.x,y:0===a.y},h={elements:{host:null,padding:!d,viewport:t=>d&&t===t.ownerDocument.body&&t,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=E({},Wt),f={k:a,I:u,A:d,L:"-1"===n(e,"zIndex"),B:Fe(e,r),V:We(e,r),j:t=>i("_",t),Y:E.bind(0,{},h),q(t){E(h,t)},F:E.bind(0,{},p),G(t){E(p,t)},N:E({},h),X:E({},p)};if(T(e,"style"),_(e),!(d||u.x&&u.y)){let t;window.addEventListener("resize",(()=>{const e=Pe()[Ie];t=t||e&&e.R(),t&&t(f,l,s.bind(0,"_"))}))}return f})()),Ve),Ke=(t,e)=>p(t)?t.apply(0,e):t,Ne=(t,e,n,o)=>{const r=l(o)?n:o;return Ke(r,t)||e()},Xe=(t,e,n,o)=>{const r=l(o)?n:o,i=Ke(r,t);return!!i&&(v(i)?i:e())},Ze=new WeakMap,Ge=t=>Ze.get(t),Je=(t,e)=>t?e.split(".").reduce(((t,e)=>t&&L(t,e)?t[e]:void 0),t):void 0,qe=(t,e,n)=>o=>[Je(t,o),n||void 0!==Je(e,o)],Ue=t=>{let e=t;return[()=>e,t=>{e=E({},e,t)}]},Qe="tabindex",tn=K.bind(0,""),en=t=>{F(Y(t),I(t)),_(t)},nn=t=>{const e=_e(),{Y:n,A:o}=e,r=Pe()[Ie],i=r&&r.T,{elements:s}=n(),{host:l,viewport:c,padding:a,content:d}=s,u=v(t),h=u?{}:t,{elements:p}=h,{host:f,padding:w,viewport:g,content:b}=p||{},y=u?t:h.target,$=H(y,"textarea"),O=y.ownerDocument,L=y===O.body,E=O.defaultView,M=Ne.bind(0,[y]),P=Xe.bind(0,[y]),z=M(tn,c,g),B=z===y,k=B&&L,D=O.activeElement,V=!B&&E.top===E&&D===y,K={W:y,J:$?M(tn,l,f):y,K:z,Z:!B&&P(tn,a,w),tt:!B&&P(tn,d,b),nt:!B&&!o&&i&&i(e),ot:k?O.documentElement:z,st:k?O:z,et:E,ct:O,rt:$,U:L,lt:u,it:B,ut:(t,e)=>B?((t,e,n)=>{const o=A(t,e)||"";return new Set(o.split(" ")).has(n)})(z,Zt,e):((t,e)=>ct(t,e,((t,e)=>t.contains(e))))(z,t),dt:(t,e,n)=>B?R(z,Zt,e,n):(n?dt:at)(z,t)},N=C(K).reduce(((t,e)=>{const n=K[e];return x(t,!(!n||Y(n))&&n)}),[]),X=t=>t?m(N,t)>-1:null,{W:Z,J:G,Z:J,K:q,tt:U,nt:Q}=K,tt=[],et=$&&X(G);let nt=$?Z:I([U,q,J,G,Z].find((t=>!1===X(t))));const ot=U||q;return[K,()=>{const t=((t,e)=>(A(t,Zt,e),T.bind(0,t,Zt)))(G,B?"viewport":"host"),e=dt(J,te),n=dt(q,!B&&ee),r=dt(U,oe),i=L?dt(Y(y),re):gt;if(et&&(W(Z,G),x(tt,(()=>{W(G,Z),_(G)}))),F(ot,nt),F(G,J),F(J||G,!B&&q),F(q,U),x(tt,(()=>{i(),t(),T(q,Gt),T(q,Jt),X(U)&&en(U),X(q)&&en(q),X(J)&&en(J),e(),n(),r()})),o&&!B&&x(tt,at.bind(0,q,re)),Q&&(((t,e)=>{j(Y(t),t,e)})(q,Q),x(tt,_.bind(0,Q))),V){const t=A(q,Qe);A(q,Qe,"-1"),q.focus();const e=kt(O,"pointerdown keydown",(()=>{t?A(q,Qe,t):T(q,Qe),e()}))}else D&&D.focus&&D.focus();nt=0},S.bind(0,tt)]},on=(t,e)=>{const{tt:o}=t,[r]=e;return t=>{const{V:e}=_e(),{ft:i}=r(),{_t:s}=t,l=(o||!e)&&s;return l&&n(o,{height:i?"":"100%"}),{ht:l,gt:l}}},rn=(t,e)=>{const[r,i]=e,{J:s,Z:l,K:c,it:a}=t,[d,u]=o({u:ft,o:St()},St.bind(0,s,"padding",""));return(t,e,o)=>{let[s,h]=u(o);const{A:p,V:f}=_e(),{vt:w}=r(),{ht:g,gt:b,wt:v}=t,[y,m]=e("paddingAbsolute");(g||h||!f&&b)&&([s,h]=d(o));const x=!a&&(m||v||h);if(x){const t=!y||!l&&!p,e=s.r+s.l,o=s.t+s.b,r={marginRight:t&&!w?-e:0,marginBottom:t?-o:0,marginLeft:t&&w?-e:0,top:t?-s.t:0,right:t?w?-s.r:"auto":0,left:t?w?"auto":-s.l:0,width:t?`calc(100% + ${e}px)`:""},a={paddingTop:t?s.t:0,paddingRight:t?s.r:0,paddingBottom:t?s.b:0,paddingLeft:t?s.l:0};n(l||c,r),n(c,a),i({Z:s,bt:!t,M:l?a:E({},r,a)})}return{yt:x}}},{max:sn}=Math,ln=sn.bind(0,0),cn="visible",an="hidden",dn=42,un={u:ht,o:{w:0,h:0}},hn={u:pt,o:{x:an,y:an}},pn=(t,e,n)=>n?dt(t,e):at(t,e),fn=t=>0===t.indexOf(cn),wn=(t,e)=>{const[r,i]=e,{J:s,Z:l,K:c,nt:a,it:d,dt:u,U:h,et:p}=t,{k:f,V:w,A:g,I:b}=_e(),v=Pe()[Ie],y=!d&&!g&&(b.x||b.y),m=h&&d,[x,$]=o(un,At.bind(0,c)),[O,S]=o(un,Pt.bind(0,c)),[L,C]=o(un),[E,M]=o(un),[P]=o(hn),T=(t,e)=>{if(n(c,{height:""}),e){const{bt:e,Z:o}=r(),{St:i,P:l}=t,a=At(s),d=Mt(s),u="content-box"===n(c,"boxSizing"),h=e||u?o.b+o.t:0,p=!(b.x&&u);n(c,{height:d.h+a.h+(i.x&&p?l.x:0)-h})}},z=(t,e)=>{const o=g||t?0:dn,r=(t,r,i)=>{const s=n(c,t),l="scroll"===(e?e[t]:s);return[s,l,l&&!g?r?o:i:0,r&&!!o]},[i,s,l,a]=r("overflowX",b.x,f.x),[d,u,h,p]=r("overflowY",b.y,f.y);return{xt:{x:i,y:d},St:{x:s,y:u},P:{x:l,y:h},D:{x:a,y:p}}},B=(t,e,n,o)=>{const{P:i,D:s}=t,{x:l,y:c}=s,{x:a,y:d}=i,{M:u}=r(),h=e?"marginLeft":"marginRight",p=e?"paddingLeft":"paddingRight",f=u[h],w=u.marginBottom,g=u[p],b=u.paddingBottom;o.width=`calc(100% + ${d+-1*f}px)`,o[h]=-d+f,o.marginBottom=-a+w,n&&(o[p]=g+(c?d:0),o.paddingBottom=b+(l?a:0))},[k,D]=v?v.H(y,w,c,a,r,z,B):[()=>y,()=>[gt]];return(t,e,o)=>{const{ht:a,$t:h,gt:f,yt:v,_t:y,wt:H}=t,{ft:I,vt:Y}=r(),[V,j]=e("showNativeOverlaidScrollbars"),[F,W]=e("overflow"),_=V&&b.x&&b.y,K=!d&&!w&&(a||f||h||j||y),N=fn(F.x),X=fn(F.y),Z=N||X;let G,J=$(o),q=S(o),U=C(o),Q=M(o);if(j&&g&&u(re,Ut,!_),K&&(G=z(_),T(G,I)),a||v||f||H||j){Z&&u(ie,qt,!1);const[t,e]=D(_,Y,G),[n,r]=J=x(o),[i,s]=q=O(o),l=Mt(c);let a=i,d=l;t(),(s||r||j)&&e&&!_&&k(e,i,n,Y)&&(d=Mt(c),a=Pt(c));const h={w:ln(sn(i.w,a.w)+n.w),h:ln(sn(i.h,a.h)+n.h)},f={w:ln(m?p.innerWidth:d.w+ln(l.w-i.w)+n.w),h:ln(m?p.innerHeight:d.h+ln(l.h-i.h)+n.h)};Q=E(f),U=L(((t,e)=>{const n=window.devicePixelRatio%1!=0?1:0,o={w:ln(t.w-e.w),h:ln(t.h-e.h)};return{w:o.w>n?o.w:0,h:o.h>n?o.h:0}})(h,f),o)}const[tt,et]=Q,[nt,ot]=U,[rt,it]=q,[st,lt]=J,ct={x:nt.w>0,y:nt.h>0},at=N&&X&&(ct.x||ct.y)||N&&ct.x&&!ct.y||X&&ct.y&&!ct.x;if(v||H||lt||it||et||ot||W||j||K){const t={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},e=((t,e,n,o)=>{const r=(t,e)=>{const n=fn(t),o=e&&n&&t.replace(`${cn}-`,"")||"";return[e&&!n?t:"",fn(o)?"hidden":o]},[i,s]=r(n.x,e.x),[l,c]=r(n.y,e.y);return o.overflowX=s&&l?s:i,o.overflowY=c&&i?c:l,z(t,o)})(_,ct,F,t),o=k(e,rt,st,Y);d||B(e,Y,o,t),K&&T(e,I),d?(A(s,Gt,t.overflowX),A(s,Jt,t.overflowY)):n(c,t)}R(s,Zt,qt,at),pn(l,ie,at),!d&&pn(c,ie,Z);const[dt,ut]=P(z(_).xt);return i({xt:dt,Ct:{x:tt.w,y:tt.h},Ot:{x:nt.w,y:nt.h},Tt:ct}),{Et:ut,At:et,zt:ot}}},gn=(t,n,o)=>{const r={},i=n||{};return e(C(t).concat(C(i)),(e=>{const n=t[e],s=i[e];r[e]=!!(o||n||s)})),r},bn=3333333,vn=t=>t&&(t.height||t.width),yn=(t,e,n)=>{const{It:r=!1,Lt:i=!1}=n||{},s=Pe()[ze],{B:l}=_e(),c=N(`<div class="${se}"><div class="${ce}"></div></div>`)[0],a=c.firstChild,d=Ot.bind(0,t),[u]=o({o:void 0,_:!0,u:(t,e)=>!(!t||!vn(t)&&vn(e))}),p=t=>{const n=f(t)&&t.length>0&&w(t[0]),o=!n&&h(t[0]);let i=!1,s=!1,a=!0;if(n){const[e,,n]=u(t.pop().contentRect),o=vn(e),r=vn(n);i=!n||!o,s=!r&&o,a=!i}else o?[,a]=t:s=!0===t;if(r&&a){const e=o?t[0]:Ot(c);z(c,e?l.n?-bn:l.i?0:bn:bn),B(c,bn)}i||e({ht:!o,Ht:o?t:void 0,Lt:!!s})},g=[];let b=!!i&&p;return[()=>{S(g),_(c)},()=>{if(nt){const t=new nt(p);t.observe(a),x(g,(()=>{t.disconnect()}))}else if(s){const[t,e]=s.O(a,p,i);b=t,x(g,e)}if(r){const[t]=o({o:!d()},d);x(g,kt(c,"scroll",(e=>{const n=t(),[o,r]=n;r&&(at(a,"ltr rtl"),dt(a,o?"rtl":"ltr"),p(n)),Dt(e)})))}b&&(dt(c,le),x(g,kt(c,"animationstart",b,{C:!!nt}))),F(t,c)}]},mn=(t,e)=>{let n;const r=K(he),i=[],[s]=o({o:!1}),l=(t,n)=>{if(t){const o=s((t=>0===t.h||t.isIntersecting||t.intersectionRatio>0)(t)),[,r]=o;if(r)return!n&&e(o),[o]}},c=(t,e)=>{if(t&&t.length>0)return l(t.pop(),e)};return[()=>{S(i),_(r)},()=>{if(et)n=new et((t=>c(t)),{root:t}),n.observe(r),x(i,(()=>{n.disconnect()}));else{const t=()=>{const t=Et(r);l(t)},[e,n]=yn(r,t);x(i,e),n(),t()}F(t,r)},()=>{if(n)return c(n.takeRecords(),!0)}]},xn=(t,n,o,r)=>{let i=!1;const{Mt:s,Pt:l,Dt:c,Rt:a,kt:d,Bt:h}=r||{},p=vt((()=>{i&&o(!0)}),{g:33,v:99}),[f,w]=((t,n,o)=>{let r,i=!1;const s=s=>{if(o){const l=o.reduce(((e,n)=>{if(n){const o=n[0],r=n[1],i=r&&o&&(s?s(o):D(o,t));i&&i.length&&r&&u(r)&&x(e,[i,r.trim()],!0)}return e}),[]);e(l,(t=>e(t[0],(e=>{const o=t[1],s=r.get(e);if(s){const t=s[0],e=s[1];t===o&&e()}const l=kt(e,o,(t=>{i?(l(),r.delete(e)):n(t)}));r.set(e,[o,l])}))))}};return o&&(r=new WeakMap,s()),[()=>{i=!0},s]})(t,p,c),g=l||[],b=(s||[]).concat(g),v=(i,s)=>{const l=d||gt,c=h||gt,p=[],f=[];let b=!1,v=!1,y=!1;return e(i,(e=>{const{attributeName:o,target:i,type:s,oldValue:d,addedNodes:h}=e,w="attributes"===s,$="childList"===s,O=t===i,S=w&&u(o)?A(i,o):0,L=0!==S&&d!==S,C=m(g,o)>-1&&L;if(n&&!O){const n=!w,s=w&&C,u=s&&a&&H(i,a),p=(u?!l(i,o,d,S):n||s)&&!c(e,!!u,t,r);x(f,h),v=v||p,y=y||$}!n&&O&&L&&!l(i,o,d,S)&&(x(p,o),b=b||C)})),y&&!O(f)&&w((t=>f.reduce(((e,n)=>(x(e,D(t,n)),H(n,t)?x(e,n):e)),[]))),n?(!s&&v&&o(!1),[!1]):!O(p)||b?(!s&&o(p,b),[p,b]):void 0},y=new tt((t=>v(t)));return y.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:b,subtree:n,childList:n,characterData:n}),i=!0,[()=>{i&&(f(),y.disconnect(),i=!1)},()=>{if(i){p.m();const t=y.takeRecords();return!O(t)&&v(t,!0)}}]},$n=`[${Zt}]`,On=`.${ee}`,Sn=["tabindex"],Ln=["wrap","cols","rows"],Cn=["id","class","style","open"],En=(t,n,r)=>{let i,s,l;const[,c]=n,{J:a,K:h,tt:w,rt:g,it:b,ut:v,dt:$}=t,{V:O}=_e(),[S]=o({u:ht,o:{w:0,h:0}},(()=>{const t=v(ie,qt),e=v(ne,""),n=e&&z(h),o=e&&B(h);$(ie,qt),$(ne,""),$("",Qt,!0);const r=Pt(w),i=Pt(h),s=At(h);return $(ie,qt,t),$(ne,"",e),$("",Qt),z(h,n),B(h,o),{w:i.w+r.w+s.w,h:i.h+r.h+s.h}})),L=g?Ln:Cn.concat(Ln),M=vt(r,{g:()=>i,v:()=>s,p(t,e){const[n]=t,[o]=e;return[C(n).concat(C(o)).reduce(((t,e)=>(t[e]=n[e]||o[e],t)),{})]}}),P=t=>{e(t||Sn,(t=>{if(m(Sn,t)>-1){const e=A(a,t);u(e)?A(h,t,e):T(h,t)}}))},R=(t,e)=>{const[n,o]=t,i={_t:o};return c({ft:n}),!e&&r(i),i},k=({ht:t,Ht:e,Lt:n})=>{const o=!t||n?r:M;let i=!1;if(e){const[t,n]=e;i=n,c({vt:t})}o({ht:t,wt:i})},D=(t,e)=>{const[,n]=S(),o={gt:n};return n&&!e&&(t?r:M)(o),o},H=(t,e,n)=>{const o={$t:e};return e?!n&&M(o):b||P(t),o},[I,Y,j]=w||!O?mn(a,R):[gt,gt,gt],[F,W]=b?[gt,gt]:yn(a,k,{Lt:!0,It:!0}),[_,K]=xn(a,!1,H,{Pt:Cn,Mt:Cn.concat(Sn)}),N=b&&nt&&new nt(k.bind(0,{ht:!0}));return N&&N.observe(a),P(),[()=>{I(),F(),l&&l[0](),N&&N.disconnect(),_()},()=>{W(),Y()},()=>{const t={},e=K(),n=j(),o=l&&l[1]();return e&&E(t,H.apply(0,x(e,!0))),n&&E(t,R.apply(0,x(n,!0))),o&&E(t,D.apply(0,x(o,!0))),t},t=>{const[e]=t("update.ignoreMutation"),[n,o]=t("update.attributes"),[r,c]=t("update.elementEvents"),[a,u]=t("update.debounce"),g=t=>p(e)&&e(t);if((c||o)&&(l&&(l[1](),l[0]()),l=xn(w||h,!0,D,{Pt:L.concat(n||[]),Mt:L.concat(n||[]),Dt:r,Rt:$n,Bt:(t,e)=>{const{target:n,attributeName:o}=t;return!(e||!o||b)&&((t,e,n)=>{const o=t&&V(t,e),r=t&&((t,e)=>{const n=e?y(e)?e:null:document;return n?n.querySelector(t):null})(n,o),i=V(r,e)===o;return!(!o||!r)&&(o===t||r===t||i&&V(V(t,n),e)!==o)})(n,$n,On)||!!V(n,`.${pe}`)||!!g(t)}})),u)if(M.m(),f(a)){const t=a[0],e=a[1];i=d(t)&&t,s=d(e)&&e}else d(a)?(i=a,s=!1):(i=!1,s=!1)}]},Mn={x:0,y:0},Pn={Z:{t:0,r:0,b:0,l:0},bt:!1,M:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},Ct:Mn,Ot:Mn,xt:{x:"hidden",y:"hidden"},Tt:{x:!1,y:!1},ft:!1,vt:!1},{round:An,max:Rn,sign:Tn}=Math,zn=()=>performance.now(),Bn=(t,e,n,o)=>{let r=0;const i=zn(),s=()=>{const l=zn(),c=l-i>=n,a=1-(Rn(0,i+n-l)/n||0),d=c||1===a;o((e-t)*a+t,d),r=d?0:rt(s)};return s(),()=>ot(r)},kn=(t,e)=>kt(t,"mousedown",kt.bind(0,e,"click",Dt,{C:!0,$:!0}),{$:!0}),Dn=(t,e,n,o,r,i)=>{const{B:s}=_e(),{qt:l,Ft:c,Gt:a}=n,d=`scroll${i?"Left":"Top"}`,u=i?"width":"height",h=i?"w":"h",p=i?"x":"y",f=(t,e)=>t[p]-e[p],w=(t,e)=>n=>{const{Ot:u}=r(),f=Et(c)[h]-Et(l)[h],w=e*n/f*u[p],g=Ot(a)&&i?s.n||s.i?1:-1:1;o[d]=t+w*g};return kt(c,"pointerdown",(n=>{const r=V(n.target,`.${ve}`)===l;if(((t,e,n)=>{const o=e.scrollbars,{button:r,isPrimary:i,pointerType:s}=t,{pointers:l}=o;return 0===r&&i&&o[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)})(n,t,r)){const t=!r&&n.shiftKey,i=w(o[d]||0,1/(t=>{const{width:e,height:n}=Rt(t),{w:o,h:r}=Et(t);return{x:An(e)/o||1,y:An(n)/r||1}})(o)[p]),s=n[p],a=Rt(l),h=Rt(c),g=a[u],b=f(a,h)+g/2,v=s-h[p],y=r?0:v-b,m=[kt(e,"selectstart",(t=>Ht(t)),{S:!1}),kt(c,"pointermove",(e=>{const n=e[p]-s;(r||t)&&i(y+n)}))];if(t)i(y);else if(!r){let t=0,e=gt;const n=o=>{e=Bn(o,o+g*Tn(y),133,((o,r)=>{i(o);const s=f(Rt(l),h);if(r&&!(v>=s&&v<=s+g)){if(t)n(o);else{const t=setTimeout((()=>{n(o)}),222);e=()=>{clearTimeout(t)}}t++}}))};n(0),x(m,(()=>e()))}kt(c,"pointerup",(t=>{S(m),c.releasePointerCapture(t.pointerId)}),{C:!0}),c.setPointerCapture(n.pointerId)}}))},{min:Hn,max:In,abs:Yn,round:Vn}=Math,jn=(t,e,n,o)=>{if(o){const t=n?"x":"y",{Ot:e,Ct:r}=o,i=r[t],s=e[t];return In(0,Hn(1,i/(i+s)))}const r=n?"w":"h",i=Et(t)[r],s=Et(e)[r];return In(0,Hn(1,i/s))},Fn=(t,o,r)=>{const{Y:i}=_e(),{scrollbars:s}=i(),{slot:l}=s,{ct:c,W:a,J:d,K:u,lt:p,ot:f}=o,{scrollbars:w}=p?{}:t,{slot:g}=w||{},b=Xe([a,d,u],(()=>d),l,g),v=(t,n,o)=>{const r=o?dt:at;e(t,(t=>{r(t.Gt,n)}))},y=(t,o)=>{e(t,(t=>{const[e,r]=o(t);n(e,r)}))},m=(t,e,n)=>{y(t,(t=>{const{qt:o,Ft:r}=t;return[o,{[n?"width":"height"]:`${(100*jn(o,r,n,e)).toFixed(3)}%`}]}))},$=(t,e,n)=>{const o=n?"X":"Y";y(t,(t=>{const{qt:r,Ft:i,Gt:s}=t,l=((t,e,n,o,r,i)=>{const{B:s}=_e(),l=i?"x":"y",c=i?"Left":"Top",{Ot:a}=o,d=Vn(a[l]),u=Yn(n[`scroll${c}`]),h=i&&r,p=s.i?u:d-u,f=Hn(1,(h?p:u)/d),w=jn(t,e,i);return 1/w*(1-w)*f})(r,i,f,e,Ot(s),n);return[r,{transform:l==l?`translate${o}(${(100*l).toFixed(3)}%)`:""}]}))},L=[],C=[],E=[],M=(t,e,n)=>{const o=h(n),r=!o||!n;(!o||n)&&v(C,t,e),r&&v(E,t,e)},P=t=>{const e=t?we:ge,n=t?C:E,o=O(n)?xe:"",i=K(`${pe} ${e} ${o}`),s=K(be),l=K(ve),a={Gt:i,Ft:s,qt:l};return F(i,s),F(s,l),x(n,a),x(L,[_.bind(0,i),r(a,M,c,d,f,t)]),a},A=P.bind(0,!0),R=P.bind(0,!1);return A(),R(),[{Nt:t=>{m(C,t,!0),m(E,t)},Xt:t=>{$(C,t,!0),$(E,t)},Ut:M,Wt:{Jt:C,Kt:A,Zt:y.bind(0,C)},Qt:{Jt:E,Kt:R,Zt:y.bind(0,E)}},()=>{F(b,C[0].Gt),F(b,E[0].Gt),it((()=>{M(xe)}),300)},S.bind(0,L)]},Wn=(t,n,o)=>{const{F:r,j:i}=_e(),s=Pe(),a=v(t),d=a?t:t.target,u=Ge(d);if(n&&!u){let u=!1;const h=s[Ae],f=t=>{const e=t||{},n=h&&h.O;return n?n(e,!0):e},w=E({},r(),f(n)),[g,b,v]=jt(o),[y,m,x]=((t,n)=>{const o=qe(n,{}),r=Ue(Pn),[i,s,l]=jt(),[c]=r,[a,d,u]=nn(t),h=((t,n)=>{const{W:o,K:r,dt:i,it:s}=t,{A:l,I:c,V:a}=_e(),d=!l&&(c.x||c.y),u=[on(t,n),rn(t,n),wn(t,n)];return(t,n,l)=>{const c=gn(E({ht:!1,yt:!1,wt:!1,_t:!1,At:!1,zt:!1,Et:!1,$t:!1,gt:!1},n),{},l),h=d||!a,p=h&&z(r),f=h&&B(r);i("",Qt,!0);let w=c;return e(u,(e=>{w=gn(w,e(w,t,!!l)||{},l)})),z(r,p),B(r,f),i("",Qt),s||(z(o,0),B(o,0)),w}})(a,r),p=(t,e,n)=>{const o=C(t).some((e=>t[e]));(o||!M(e)||n)&&l("u",[t,e,n])},[f,w,g,b]=En(a,r,(t=>{p(h(o,t),{},!1)})),v=c.bind(0);return v.Vt=t=>{i("u",t)},v.jt=()=>{const{W:t,K:e}=a,n=z(t),o=B(t);w(),d(),z(e,n),B(e,o)},v.Yt=a,[(t,e)=>{const o=qe(n,t,e);b(o),p(h(o,g(),e),t,!!e)},v,()=>{s(),f(),u()}]})(t,w),[$,O,L]=((t,e,n)=>{let o,r,i,s,l,c=0;const a=Ue({}),[d]=a,[u,h]=bt(),[p,f]=bt(),[w,g]=bt(100),[b,v]=bt(100),[y,m]=bt((()=>c)),[x,$,O]=Fn(t,n.Yt,((t,e)=>(n,o,r,i,s,l)=>{const{Gt:c}=n,[a,d]=bt(333),u=!!s.scrollBy;let h=!0;return S.bind(0,[kt(c,"pointerenter",(()=>{o($e,!0)})),kt(c,"pointerleave pointercancel",(()=>{o($e)})),kt(c,"wheel",(t=>{const{deltaX:e,deltaY:n,deltaMode:r}=t;u&&h&&0===r&&Y(c)===i&&s.scrollBy({left:e,top:n,behavior:"smooth"}),h=!1,o(Le,!0),a((()=>{h=!0,o(Le)})),Ht(t)}),{S:!1,$:!0}),kn(c,r),Dn(t,r,n,s,e,l),d])})(e,n)),{J:L,K:C,ot:E,st:M,it:P,U:A}=n.Yt,{Wt:R,Qt:T,Ut:k,Nt:D,Xt:H}=x,{Zt:I}=R,{Zt:V}=T,j=t=>{const{Gt:e}=t,n=P&&!A&&Y(e)===C&&e;return[n,{transform:n?`translate(${z(E)}px, ${B(E)}px)`:""}]},F=(t,e)=>{if(m(),t)k(Se);else{const t=()=>k(Se,!0);c>0&&!e?y(t):t()}},W=()=>{s=r,s&&F(!0)},_=[g,m,v,f,h,O,kt(L,"pointerover",W,{C:!0}),kt(L,"pointerenter",W),kt(L,"pointerleave",(()=>{s=!1,r&&F(!1)})),kt(L,"pointermove",(()=>{o&&u((()=>{g(),F(!0),b((()=>{o&&F(!1)}))}))})),kt(M,"scroll",(()=>{p((()=>{H(n()),i&&F(!0),w((()=>{i&&!s&&F(!1)}))})),P&&I(j),P&&V(j)}))],K=d.bind(0);return K.Yt=x,K.jt=$,[(t,s,a)=>{const{At:d,zt:u,Et:h,wt:p}=a,f=qe(e,t,s),w=n(),{Ot:g,xt:b,vt:v}=w,[y,m]=f("scrollbars.theme"),[x,$]=f("scrollbars.visibility"),[O,S]=f("scrollbars.autoHide"),[L]=f("scrollbars.autoHideDelay"),[C,E]=f("scrollbars.dragScroll"),[M,P]=f("scrollbars.clickScroll"),R=d||u||p||s,T=h||$||s,z=(t,e)=>{const n="visible"===x||"auto"===x&&"scroll"===t;return k(ye,n,e),n};if(c=L,m&&(k(l),k(y,!0),l=y),S&&(o="move"===O,r="leave"===O,i="never"!==O,F(!i,!0)),E&&k(Ee,C),P&&k(Ce,M),T){const t=z(b.x,!0),e=z(b.y,!1);k(me,!(t&&e))}R&&(D(w),H(w),k(Oe,!g.x,!0),k(Oe,!g.y,!1),k(fe,v&&!A))},K,S.bind(0,_)]})(t,w,m),P=(t,e)=>{y(t,!!e)},A=i(P.bind(0,{},!0)),R=t=>{(t=>{Ze.delete(t)})(d),A(),L(),x(),u=!0,v("destroyed",[T,!!t]),b()},T={options(t){if(t){const e=_t(w,f(t));M(e)||(E(w,e),P(e))}return E({},w)},on:g,off:(t,e)=>{t&&e&&b(t,e)},state(){const{Ct:t,Ot:e,xt:n,Tt:o,Z:r,bt:i,vt:s}=m();return E({},{overflowEdge:t,overflowAmount:e,overflowStyle:n,hasOverflow:o,padding:r,paddingAbsolute:i,directionRTL:s,destroyed:u})},elements(){const{W:t,J:e,Z:n,K:o,tt:r,ot:i,st:s}=m.Yt,{Wt:l,Qt:c}=O.Yt,a=t=>{const{qt:e,Ft:n,Gt:o}=t;return{scrollbar:o,track:n,handle:e}},d=t=>{const{Jt:e,Kt:n}=t,o=a(e[0]);return E({},o,{clone:()=>{const t=a(n());return $({},!0,{}),t}})};return E({},{target:t,host:e,padding:n||o,viewport:o,content:r||o,scrollOffsetElement:i,scrollEventElement:s,scrollbarHorizontal:d(l),scrollbarVertical:d(c)})},update:t=>(P({},t),T),destroy:R.bind(0)};return m.Vt(((t,e,n)=>{$(e,n,t)})),e(C(s),(t=>{const e=s[t];p(e)&&e(Wn,T)})),((t,e)=>{const{nativeScrollbarsOverlaid:n,body:o}=t||{},{U:r}=e,{Y:i,I:s,A:a}=_e(),{nativeScrollbarsOverlaid:d,body:u}=i().cancel,h=null!=n?n:d,p=l(o)?u:o,f=(s.x||s.y)&&h,w=r&&(c(p)?!a:p);return!!f||!!w})(!a&&t.cancel,m.Yt)?(R(!0),T):(m.jt(),O.jt(),((t,e)=>{Ze.set(t,e)})(d,T),v("initialized",[T]),m.Vt(((t,e,n)=>{const{ht:o,wt:r,_t:i,At:s,zt:l,Et:c,gt:a,$t:d}=t;v("updated",[T,{updateHints:{sizeChanged:o,directionChanged:r,heightIntrinsicChanged:i,overflowEdgeChanged:s,overflowAmountChanged:l,overflowStyleChanged:c,contentMutation:a,hostMutation:d},changedOptions:e,force:n}])})),T.update(!0))}return u};return Wn.plugin=t=>{e(f(t)?t:[t],(t=>{const e=C(t)[0];Me[e]=t[e]}))},Wn.valid=t=>{const e=t&&t.elements,n=p(e)&&e();return b(n)&&!!Ge(n.target)},Wn.env=()=>{const{k:t,I:e,A:n,B:o,V:r,L:i,N:s,X:l,Y:c,q:a,F:d,G:u}=_e();return E({},{scrollbarsSize:t,scrollbarsOverlaid:e,scrollbarsHiding:n,rtlScrollBehavior:o,flexboxGlue:r,cssCustomProperties:i,staticDefaultInitialization:s,staticDefaultOptions:l,getDefaultInitialization:c,setDefaultInitialization:a,getDefaultOptions:d,setDefaultOptions:u})},t.OverlayScrollbars=Wn,t.scrollbarsHidingPlugin=Ye,t.sizeObserverPlugin=Be,Object.defineProperties(t,{tn:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),t}({}); |