You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
13 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1247],{1247:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var o=n(93196),r=n.n(o),i=n(67294),s=(n(45697),n(91033)),a=null;"undefined"!==typeof CSS&&CSS.supports&&(CSS.supports("position","sticky")?a="sticky":CSS.supports("position","-webkit-sticky")&&(a="-webkit-sticky"));var c=!1;try{var l=Object.defineProperty({},"passive",{get:function(){c={passive:!0}}});window.addEventListener("testPassive",null,l),window.removeEventListener("testPassive",null,l)}catch(f){}var h=function(e){function t(t){var n=e.call(this,t)||this;return n.registerContainerRef=function(e){a&&(n.node=e,e?(n.scrollPane=function(e){for(var t=e;t=t.parentElement;){var n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if("auto"===n||"scroll"===n)return t}return window}(n.node),n.latestScrollY=n.scrollPane===window?window.scrollY:n.scrollPane.scrollTop,n.scrollPane.addEventListener("scroll",n.handleScroll,c),n.scrollPane.addEventListener("mousewheel",n.handleScroll,c),n.scrollPane===window?(window.addEventListener("resize",n.handleWindowResize),n.handleWindowResize()):(n.rosp=new s.default(n.handleScrollPaneResize),n.rosp.observe(n.scrollPane),n.handleScrollPaneResize()),n.ropn=new s.default(n.handleParentNodeResize),n.ropn.observe(n.node.parentNode),n.handleParentNodeResize(),n.ron=new s.default(n.handleNodeResize),n.ron.observe(n.node),n.handleNodeResize({initial:!0}),n.initial()):(n.scrollPane.removeEventListener("mousewheel",n.handleScroll,c),n.scrollPane.removeEventListener("scroll",n.handleScroll,c),n.scrollPane===window?window.removeEventListener("resize",n.getMeasurements):n.rosp.disconnect(),n.ropn.disconnect(),n.ron.disconnect(),n.scrollPane=null))},n.getCurrentOffset=function(){if("relative"===n.mode)return n.offset;var e=n.props,t=e.offsetTop,o=e.offsetBottom;return"stickyTop"===n.mode?Math.max(0,n.scrollPaneOffset+n.latestScrollY-n.naturalTop+t):"stickyBottom"===n.mode?Math.max(0,n.scrollPaneOffset+n.latestScrollY+n.viewPortHeight-(n.naturalTop+n.nodeHeight+o)):void 0},n.handleWindowResize=function(){n.viewPortHeight=window.innerHeight,n.scrollPaneOffset=0},n.handleScrollPaneResize=function(){n.viewPortHeight=n.scrollPane.offsetHeight,n.scrollPane.firstChild.offsetParent===n.scrollPane?n.scrollPaneOffset=n.scrollPane.getBoundingClientRect().top:n.scrollPaneOffset=0},n.handleParentNodeResize=function(){var e=n.node.parentNode,t=getComputedStyle(e,null),o=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);n.naturalTop=function(e,t){var n=e,o=0;t.firstChild&&t.firstChild.offsetParent!==t&&(o+=e.offsetTop-t.offsetTop,t=e.offsetParent,o+=-e.offsetTop);do{o+=n.offsetTop,n=n.offsetParent}while(n&&n!==t);return o}(e,n.scrollPane)+o+n.scrollPaneOffset;var i=n.parentHeight;n.parentHeight=e.getBoundingClientRect().height-(o+r),"relative"===n.mode&&i>n.parentHeight&&n.changeToStickyBottomIfBoxTooLow(n.latestScrollY),i!==n.parentHeight&&"relative"===n.mode&&(n.latestScrollY=Number.POSITIVE_INFINITY,n.handleScroll())},n.handleNodeResize=function(e){var t=(void 0===e?{}:e).initial,o=n.nodeHeight;if(n.nodeHeight=n.node.getBoundingClientRect().height,!t&&o!==n.nodeHeight){var r=n.props,i=r.offsetTop,s=r.offsetBottom;if(n.nodeHeight+i+s<=n.viewPortHeight)n.mode=void 0,n.initial();else{var a=n.parentHeight-n.nodeHeight;n.offset=Math.max(0,Math.min(a,n.getCurrentOffset())),n.changeMode("relative")}}},n.handleScroll=function(){var e=n.props,t=e.offsetTop,o=e.offsetBottom,r=n.scrollPane===window?window.scrollY:n.scrollPane.scrollTop;if(r!==n.latestScrollY){if(n.nodeHeight+t+o<=n.viewPortHeight)return n.initial(),void(n.latestScrollY=r);var i=r-n.latestScrollY;n.offset=n.getCurrentOffset(),i>0?"stickyTop"===n.mode?r+n.scrollPaneOffset+t>n.naturalTop&&(r+n.scrollPaneOffset+n.viewPortHeight<=n.naturalTop+n.nodeHeight+n.offset+o?n.changeMode("relative"):n.changeMode("stickyBottom")):"relative"===n.mode&&n.changeToStickyBottomIfBoxTooLow(r):"stickyBottom"===n.mode?n.scrollPaneOffset+r+n.viewPortHeight<n.naturalTop+n.parentHeight+o&&(n.scrollPaneOffset+r+t>=n.naturalTop+n.offset?n.changeMode("relative"):n.changeMode("stickyTop")):"relative"===n.mode&&n.scrollPaneOffset+r+t<n.naturalTop+n.offset&&n.changeMode("stickyTop"),n.latestScrollY=r}},t.offset,n}r()(t,e);var n=t.prototype;return n.changeMode=function(e){var t=this.props,n=t.onChangeMode,o=t.offsetTop,r=t.offsetBottom;n(this.mode,e),this.mode=e,"relative"===e?(this.node.style.position="relative",this.node.style.top=this.offset+"px"):(this.node.style.position=a,this.node.style.top="stickyBottom"===e?this.viewPortHeight-this.nodeHeight-r+"px":o+"px"),this.offset=this.getCurrentOffset()},n.initial=function(){this.props.bottom?"stickyBottom"!==this.mode&&this.changeMode("stickyBottom"):"stickyTop"!==this.mode&&this.changeMode("stickyTop")},n.changeToStickyBottomIfBoxTooLow=function(e){var t=this.props.offsetBottom;e+this.scrollPaneOffset+this.viewPortHeight>=this.naturalTop+this.nodeHeight+this.offset+t&&this.changeMode("stickyBottom")},n.render=function(){var e=this.props,t=e.children,n=e.className,o=e.style;return i.createElement("div",{className:n,style:o,ref:this.registerContainerRef},t)},t}(i.Component);h.defaultProps={onChangeMode:function(){},offsetTop:0,offsetBottom:0}},93196:function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},91033:function(e,t,n){"use strict";n.r(t);var o=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var r=o[n];e.call(t,r[1],r[0])}},t}()}(),r="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,i="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),s="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],c="undefined"!==typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,o=!1,r=0;function i(){n&&(n=!1,e()),o&&c()}function a(){s(i)}function c(){var e=Date.now();if(n){if(e-r<2)return;o=!0}else n=!0,o=!1,setTimeout(a,t);r=e}return c}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},f=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},d=_(0,0,0,0);function u(e){return parseFloat(e)||0}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+u(e["border-"+n+"-width"])}),0)}function v(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return d;var o=f(e).getComputedStyle(e),r=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var r=o[n],i=e["padding-"+r];t[r]=u(i)}return t}(o),i=r.left+r.right,s=r.top+r.bottom,a=u(o.width),c=u(o.height);if("border-box"===o.boxSizing&&(Math.round(a+i)!==t&&(a-=p(o,"left","right")+i),Math.round(c+s)!==n&&(c-=p(o,"top","bottom")+s)),!function(e){return e===f(e).document.documentElement}(e)){var l=Math.round(a+i)-t,h=Math.round(c+s)-n;1!==Math.abs(l)&&(a-=l),1!==Math.abs(h)&&(c-=h)}return _(r.left,r.top,a,c)}var g="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof f(e).SVGGraphicsElement}:function(e){return e instanceof f(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return r?g(e)?function(e){var t=e.getBBox();return _(0,0,t.width,t.height)}(e):v(e):d}function _(e,t,n,o){return{x:e,y:t,width:n,height:o}}var w=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),y=function(e,t){var n=function(e){var t=e.x,n=e.y,o=e.width,r=e.height,i="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(i.prototype);return h(s,{x:t,y:n,width:o,height:r,top:n,right:t+o,bottom:r+n,left:t}),s}(t);h(this,{target:e,contentRect:n})},b=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new o,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof f(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new w(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof f(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),P="undefined"!==typeof WeakMap?new WeakMap:new o,O=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),o=new b(t,n,this);P.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=P.get(this))[e].apply(t,arguments)}}));var E="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:O;t.default=E}}]);
//# sourceMappingURL=1247-d555090fc7792ba1.js.map