text: /*!
   * float-sidebar - Lightweight (2kb gzipped), zero-dependency javascript library for making float sidebars based on the finite state machine
   * @version v1.2.3
   * @link https://github.com/vursen/FloatSidebar.js
   * @author Sergey Vinogradov
   * @license The MIT License (MIT)
   */
  !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.FloatSidebar=n():t.FloatSidebar=n()}(window,(function(){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){"use strict";e.r(n);var o,i="START",r="TOP_FIXED",s="UNFIXED",u="BOTTOM_FIXED",a="FINISH";function p(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var c,f=(p(o={},i,(function(t,n){var e=n.$sideInner;e.style.position="absolute",e.style.top="0",e.style.bottom="auto"})),p(o,r,(function(t,n){var e=n.$sideInner;e.style.position="fixed",e.style.top=t.topSpacing+"px",e.style.bottom="auto"})),p(o,s,(function(t,n){var e=n.$sideInner;e.style.position="absolute",e.style.top=t.sideInnerTop-t.startPoint+"px",e.style.bottom="auto"})),p(o,u,(function(t,n){var e=n.$sideInner;e.style.position="fixed",e.style.top="auto",e.style.bottom=t.bottomSpacing+"px"})),p(o,a,(function(t,n){var e=n.$sideInner;e.style.position="absolute",e.style.top="auto",e.style.bottom="0"})),o);function d(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var l=(d(c={},i,[{to:a,when:function(t){return[!0===t.isSideInnerFitsPath,t.viewportTop+t.sideInnerHeight>=t.finishPoint]}},{to:u,when:function(t){return[!0===t.isSideInnerFitsPath,!1===t.isSideInnerFitsViewport,t.viewportBottom>=t.sideInnerBottom+t.bottomSpacing]}},{to:r,when:function(t){return[!0===t.isSideInnerFitsPath,!0===t.isSideInnerFitsViewport,t.viewportTop>=t.startPoint-t.topSpacing]}}]),d(c,r,[{to:i,when:function(t){return[!1===t.isSideInnerFitsPath]}},{to:i,when:function(t){return[t.viewportTop<=t.startPoint-t.topSpacing]}},{to:a,when:function(t){return[t.sideInnerBottom>=t.finishPoint]}},{to:s,when:function(t){return["down"===t.scrollDirection,!1===t.isSideInnerFitsViewport]}}]),d(c,s,[{to:i,when:function(t){return[!1===t.isSideInnerFitsPath]}},{to:r,when:function(t){return[t.viewportTop<=t.sideInnerTop-t.topSpacing]}},{to:r,when:function(t){return[!0===t.isSideInnerFitsViewport,t.viewportBottom>=t.sideInnerBottom+t.bottomSpacing]}},{to:u,when:function(t){return[!1===t.isSideInnerFitsViewport,t.viewportBottom>=t.sideInnerBottom+t.bottomSpacing]}}]),d(c,u,[{to:i,when:function(t){return[!1===t.isSideInnerFitsPath]}},{to:s,when:function(t){return["up"===t.scrollDirection]}},{to:r,when:function(t){return[!0===t.isSideInnerFitsViewport]}},{to:a,when:function(t){return[t.sideInnerBottom>=t.finishPoint]}}]),d(c,a,[{to:i,when:function(t){return[!1===t.isSideInnerFitsPath]}},{to:u,when:function(t){return[t.sideInnerBottom+t.bottomSpacing<=t.finishPoint,t.viewportBottom<=t.finishPoint]}},{to:r,when:function(t){return[t.viewportTop<=t.sideInnerTop-t.topSpacing]}}]),c);var h=function(t){var n=t.actions,e=t.transitions,o=t.initialState;return{findTransitionFor:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e[o].find((function(t){return t.when.apply(void 0,n).every((function(t){return t}))}))},performTransition:function(t){var e=t.to;return function(){o=e,n[e].apply(n,arguments)}}}};var v=function(t,n){var e=t.getBoundingClientRect();return{top:e.top+n,bottom:e.bottom+n,height:e.height}};var m=function(t,n){var e=n.$viewport,o=n.$relative,i=n.$sideInner,r=n.$sideOuter,s=n.topSpacing,u=n.bottomSpacing,a={},p=function(){var t,n=function(t){var n=t.clientHeight||t.innerHeight,e=t.scrollTop||t.pageYOffset;return{top:e,bottom:e+n,height:n}}(e),p=v(i,n.top),c=v(r,n.top),f=v(o,n.top),d=(t=n.top,a.viewportTop<t?"down":a.viewportTop>t?"up":"notChanged"),l=c.top,h=f.bottom,m=h-l,w=p.height+s+u<n.height,b=p.height<m,g=Math.max(p.height,m);return{startPoint:l,finishPoint:h,topSpacing:s,bottomSpacing:u,scrollDirection:d,isSideInnerFitsPath:b,isSideInnerFitsViewport:w,sideOuterHeight:g,viewportTop:n.top,viewportBottom:n.bottom,sideInnerTop:p.top,sideInnerBottom:p.bottom,sideInnerHeight:p.height}},c=function(t){var n=void 0;return function(){n||(n=requestAnimationFrame((function(){n=null,t()})))}}((function(){var n=p();t(a,n),a=n}));return{start:function(){e.addEventListener("scroll",c),e.addEventListener("resize",c),c()},stop:function(){e.removeEventListener("scroll",c),e.removeEventListener("resize",c)},tick:c}};n.default=function(t){var n=t.viewport||window,e=t.sidebar,o=t.sidebarInner||e.firstElementChild,r=t.relative,s=t.topSpacing||0,u=t.bottomSpacing||0,a=h({actions:f,transitions:l,initialState:i}),p=m((function(t,n){var i=a.findTransitionFor(n);i&&a.performTransition(i)(n,{$sideInner:o,$sideOuter:e,$relative:r}),c(t,n)}),{$viewport:n,$sideOuter:e,$sideInner:o,$relative:r,topSpacing:s,bottomSpacing:u}),c=function(t,n){Math.abs((t.sideOuterHeight||0)-n.sideOuterHeight)>=1&&(e.style.height=n.sideOuterHeight+"px")};return requestAnimationFrame((function(){e.style.willChange="height",o.style.width="inherit",o.style.transform="translateZ(0)",o.style.willChange="transform",p.start()})),{forceUpdate:function(){p.tick()},destroy:function(){p.stop()}}}}]).default}));