Files
OverlayScrollbars/packages/overlayscrollbars/dist/overlayscrollbars.esm.min.js
T
2021-04-04 15:29:50 +02:00

1 line
18 KiB
JavaScript

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