Socket
Socket
Sign inDemoInstall

react-pannable

Package Overview
Dependencies
3
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

2

dist/react-pannable.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).ReactPannable={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t;function r(){return(r=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}var o={enabled:!1,target:null,startPoint:null,movePoint:null,moveTime:null,translation:null,velocity:null,interval:null};function a(e,t){switch(t.type){case"syncEnabled":return function(e,t){var n=t.enabled;if(!n)return o;return r({},e,{enabled:n})}(e,t);case"end":return function(e,t){if(!e.target)return e;return r({},e,{target:null,startPoint:null,movePoint:null,moveTime:null,translation:null,velocity:null,interval:null})}(e);case"track":return function(e,t){var n=(new Date).getTime();return r({},e,{target:t.target,startPoint:t.point,movePoint:t.point,moveTime:n,translation:null,velocity:null,interval:null})}(e,t);case"move":return function(e,t){var n=e.target,i=e.startPoint,o=e.movePoint,a=e.moveTime,l=e.translation,c=t.point,u=t.shouldStart;if(!n)return e;var s=(new Date).getTime(),d=s-a,f={x:c.x-i.x,y:c.y-i.y},h={x:(c.x-o.x)/d,y:(c.y-o.y)/d};if(l)return r({},e,{target:n,startPoint:i,movePoint:c,moveTime:s,translation:f,velocity:h,interval:d});if(0>=Math.sqrt(Math.pow(f.x,2)+Math.pow(f.y,2))||!u({target:n,translation:f,velocity:h,interval:d}))return r({},e,{target:n,startPoint:i,movePoint:c,moveTime:s,translation:null,velocity:null,interval:null});return r({},e,{target:n,startPoint:c,movePoint:c,moveTime:s,translation:{x:0,y:0},velocity:h,interval:d})}(e,t);default:return e}}var l="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function c(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n}var u={create:function(e){var t=e.transformTranslate,n=e.userSelect,r=i(e,["transformTranslate","userSelect"]);return t&&function(e,t){t.transform="translate3d("+e.x+"px, "+e.y+"px, 0)",t.WebkitTransform="translate3d("+e.x+"px, "+e.y+"px, 0)",t.msTransform="translate("+e.x+"px, "+e.y+"px)"}(t,r),n&&function(e,t){t.userSelect=e,t.WebkitUserSelect=e,t.msUserSelect=e}(n,r),r}};function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var i=function(){};return e&&e.addEventListener&&(e.addEventListener.apply(e,n),i=function(){e.removeEventListener.apply(e,n)}),i}var d=void 0!==typeof window&&"ontouchstart"in window;function f(e){var f=e.enabled,h=e.shouldStart,v=e.onStart,p=e.onMove,m=e.onEnd,y=e.onCancel,g=e.children,x=i(e,["enabled","shouldStart","onStart","onMove","onEnd","onCancel","children"]),b=t.useReducer(a,o),w=b[0],E=b[1],z=c(w).current,S=t.useRef(null),I=t.useRef({});I.current={shouldStart:h,onStart:v,onMove:p,onEnd:m,onCancel:y};var M=t.useCallback((function(e,t){E({type:"track",target:e,point:t})}),[]),C=t.useCallback((function(e){E({type:"move",point:e,shouldStart:I.current.shouldStart})}),[]),T=t.useCallback((function(){E({type:"end"})}),[]);t.useMemo((function(){E({type:"syncEnabled",enabled:f})}),[f]),l((function(){z.translation!==w.translation&&(w.translation?z.translation?I.current.onMove(w):I.current.onStart(w):z.translation&&(w.enabled?I.current.onEnd(z):I.current.onCancel(z)))}),[w]);var O=!!w.translation;l((function(){if(w.enabled){if(w.target){if(d){var e=function(e){e.preventDefault(),T()},t=s(w.target,"touchmove",(function(e){if(O&&e.cancelable&&e.preventDefault(),1===e.touches.length){var t=e.touches[0];C({x:t.pageX,y:t.pageY})}else T()})),n=s(w.target,"touchend",e),r=s(w.target,"touchcancel",e);return function(){t(),n(),r()}}var i=void 0!==typeof document?document.body:null,o=s(i,"mousemove",(function(e){O&&e.preventDefault(),1===e.buttons?C({x:e.pageX,y:e.pageY}):T()})),a=s(i,"mouseup",(function(e){e.preventDefault(),T()}));return function(){o(),a()}}var l=S.current;if(d){var c=s(l,"touchstart",(function(e){if(1===e.touches.length){var t=e.touches[0];M(t.target,{x:t.pageX,y:t.pageY})}}));return function(){c()}}var u=s(l,"mousedown",(function(e){1===e.buttons&&M(e.target,{x:e.pageX,y:e.pageY})}));return function(){u()}}}),[w.enabled,w.target,O,M,C,T]);var R=t.useMemo((function(){var e={};return O&&Object.assign(e,u.create({touchAction:"none",pointerEvents:"none",userSelect:"none"})),x.style&&Object.assign(e,x.style),e}),[O,x.style]);x.style=R;var k="function"==typeof g?g(w):g;return n.createElement("div",r({},x,{ref:S}),k)}function h(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}f.defaultProps={enabled:!0,shouldStart:function(){return!0},onStart:function(){},onMove:function(){},onEnd:function(){},onCancel:function(){}};var v=h((function(e){(e.exports={}).forEach=function(e,t){for(var n=0;e.length>n;n++){var r=t(e[n]);if(r)return r}}})),p=h((function(e){var t=e.exports={};t.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},t.isLegacyOpera=function(){return!!window.opera}})),m=h((function(e){(e.exports={}).getOption=function(e,t,n){var r=e[t];if(null==r&&void 0!==n)return n;return r}})),y=function(e){var t=(e=e||{}).reporter,n=m.getOption(e,"async",!0),r=m.getOption(e,"auto",!0);r&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var i,o=g(),a=!1;function l(){for(a=!0;o.size();){var e=o;o=g(),e.process()}a=!1}function c(){i=setTimeout(l,0)}return{add:function(e,t){!a&&r&&n&&0===o.size()&&c(),o.add(e,t)},force:function(e){a||(void 0===e&&(e=n),i&&(clearTimeout(i),i=null),e?c():l())}}};function g(){var e={},t=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:r>i&&(r=i),e[i]||(e[i]=[]),e[i].push(o),t++},process:function(){for(var t=r;n>=t;t++)for(var i=e[t],o=0;i.length>o;o++){(0,i[o])()}},size:function(){return t}}}function x(e){return e._erd}var b={initState:function(e){return e._erd={},x(e)},getState:x,cleanState:function(e){delete e._erd}},w=v.forEach,E=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState,i=e.idHandler;if(!n)throw Error("Missing required dependency: batchProcessor");if(!t)throw Error("Missing required dependency: reporter.");var o=function(){var e=document.createElement("div");e.style.cssText=l(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var t=document.createElement("div");t.style.cssText=l(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,r=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:r}}();function a(e){!function(e,t,n){if(!e.getElementById(t)){var r=n+"_animation",i=n+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+n+" > div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",o+="."+i+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",o+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");i.innerHTML=n,i.id=t,r(i)}(o+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style","erd_scroll_detection_container")}function l(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function c(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function u(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function s(e){return r(e).container.childNodes[0].childNodes[0].childNodes[0]}function d(e){return r(e).container.childNodes[0].childNodes[0].childNodes[1]}return a(window.document),{makeDetectable:function(e,a,u){function f(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(i.get(a),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;n.length>r;r++)t.log(n[r])}}function h(e){var t=r(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function v(){var e=window.getComputedStyle(a),t={};return t.position=e.position,t.width=a.offsetWidth,t.height=a.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function p(){if(f("storeStyle invoked."),r(a)){var e=v();r(a).style=e}else f("Aborting because element has been uninstalled")}function m(e,t,n){r(e).lastWidth=t,r(e).lastHeight=n}function y(){return 2*o.width+1}function g(){return 2*o.height+1}function x(e){return e+10+y()}function b(e){return e+10+g()}function E(e,t,n){var r=s(e),i=d(e),o=x(t),a=b(n),l=function(e){return 2*e+y()}(t),c=function(e){return 2*e+g()}(n);r.scrollLeft=o,r.scrollTop=a,i.scrollLeft=l,i.scrollTop=c}function z(){var e=r(a).container;if(!e){(e=document.createElement("div")).className="erd_scroll_detection_container",e.style.cssText=l(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),r(a).container=e,function(e){e.className+=" erd_scroll_detection_container_animation_active"}(e),a.appendChild(e);var t=function(){r(a).onRendered&&r(a).onRendered()};c(e,"animationstart",t),r(a).onAnimationStart=t}return e}function S(){if(f("Injecting elements"),r(a)){!function(){var n=r(a).style;if("static"===n.position){a.style.setProperty("position","relative",e.important?"important":"");var i=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};i(t,a,n,"top"),i(t,a,n,"right"),i(t,a,n,"bottom"),i(t,a,n,"left")}}();var n=r(a).container;n||(n=z());var i,u,s,d,h=o.width,v=o.height,p=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),m=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(i=(i=-(1+h))?i+"px":"0"),"top: "+(u=(u=-(1+v))?u+"px":"0"),"right: "+(d=(d=-h)?d+"px":"0"),"bottom: "+(s=(s=-v)?s+"px":"0")])),y=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),g=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),x=l(["position: absolute","left: 0","top: 0"]),b=l(["position: absolute","width: 200%","height: 200%"]),w=document.createElement("div"),E=document.createElement("div"),S=document.createElement("div"),I=document.createElement("div"),M=document.createElement("div"),C=document.createElement("div");w.dir="ltr",w.style.cssText=p,w.className="erd_scroll_detection_container",E.className="erd_scroll_detection_container",E.style.cssText=m,S.style.cssText=y,I.style.cssText=x,M.style.cssText=g,C.style.cssText=b,S.appendChild(I),M.appendChild(C),E.appendChild(S),E.appendChild(M),w.appendChild(E),n.appendChild(w),c(S,"scroll",T),c(M,"scroll",O),r(a).onExpandScroll=T,r(a).onShrinkScroll=O}else f("Aborting because element has been uninstalled");function T(){r(a).onExpand&&r(a).onExpand()}function O(){r(a).onShrink&&r(a).onShrink()}}function I(){function o(t,n,r){var i=function(e){return s(e).childNodes[0]}(t),o=x(n),a=b(r);i.style.setProperty("width",o+"px",e.important?"important":""),i.style.setProperty("height",a+"px",e.important?"important":"")}function l(l){var u=a.offsetWidth,s=a.offsetHeight,d=u!==r(a).lastWidth||s!==r(a).lastHeight;f("Storing current size",u,s),m(a,u,s),n.add(0,(function(){if(d)if(r(a))if(c()){if(e.debug)a.offsetWidth===u&&a.offsetHeight===s||t.warn(i.get(a),"Scroll: Size changed before updating detector elements.");o(a,u,s)}else f("Aborting because element container has not been initialized");else f("Aborting because element has been uninstalled")})),n.add(1,(function(){r(a)?c()?E(a,u,s):f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")})),d&&l&&n.add(2,(function(){r(a)?c()?l():f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")}))}function c(){return!!r(a).container}function u(){f("notifyListenersIfNeeded invoked");var e=r(a);return void 0===r(a).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?f("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?f("Not notifying: Size already notified"):(f("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void w(r(a).listeners,(function(e){e(a)})))}function v(){f("Scroll detected."),h(a)?f("Scroll event fired while unrendered. Ignoring..."):l(u)}if(f("registerListenersAndPositionElements invoked."),r(a)){r(a).onRendered=function(){if(f("startanimation triggered."),h(a))f("Ignoring since element is still unrendered...");else{f("Element rendered.");var e=s(a),t=d(a);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(f("Scrollbars out of sync. Updating detector elements..."),l(u))}},r(a).onExpand=v,r(a).onShrink=v;var p=r(a).style;o(a,p.width,p.height)}else f("Aborting because element has been uninstalled")}function M(){if(f("finalizeDomMutation invoked."),r(a)){var e=r(a).style;m(a,e.width,e.height),E(a,e.width,e.height)}else f("Aborting because element has been uninstalled")}function C(){u(a)}function T(){var e;f("Installing..."),r(a).listeners=[],e=v(),r(a).startSize={width:e.width,height:e.height},f("Element start size",r(a).startSize),n.add(0,p),n.add(1,S),n.add(2,I),n.add(3,M),n.add(4,C)}u||(u=a,a=e,e=null),e=e||{},f("Making detectable..."),!function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===window.getComputedStyle(e)}(a)?T():(f("Element is detached"),z(),f("Waiting until element is attached..."),r(a).onRendered=function(){f("Element is now attached"),T()})},addListener:function(e,t){if(!r(e).listeners.push)throw Error("Cannot add listener to an element that is not detectable.");r(e).listeners.push(t)},uninstall:function(e){var t=r(e);t&&(t.onExpandScroll&&u(s(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&u(d(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&u(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:a}},z=v.forEach;function S(e){return Array.isArray(e)||void 0!==e.length}function I(e){if(Array.isArray(e))return e;var t=[];return z(e,(function(e){t.push(e)})),t}function M(e){return e&&1===e.nodeType}function C(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}var T=null;"undefined"!=typeof window&&(T=function(e){var t,n;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var r=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var r=n(e);if(!r)throw Error("setId required the element to have a resize detection state.");var i=t.generate();return r.id=i,i}}}({idGenerator:(n=1,{generate:function(){return n++}}),stateHandler:b});t=r}var i=e.reporter;i||(i=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var r=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;arguments.length>n;n++)e(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n}(!1===i));var o=C(e,"batchProcessor",y({reporter:i})),a={};a.callOnAdd=!!C(e,"callOnAdd",!0),a.debug=!!C(e,"debug",!1);var l,c=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;o>i;++i)if(r[i]===t){r.splice(i,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}}(t),u=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}({stateHandler:b}),s=C(e,"strategy","object"),d=C(e,"important",!1),f={reporter:i,batchProcessor:o,stateHandler:b,idHandler:t,important:d};if("scroll"===s&&(p.isLegacyOpera()?(i.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),s="object"):p.isIE(9)&&(i.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),s="object")),"scroll"===s)l=E(f);else{if("object"!==s)throw Error("Invalid strategy name: "+s);l=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState;if(!t)throw Error("Missing required dependency: reporter.");function i(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function o(e){return r(e).object}return{makeDetectable:function(e,o,a){a||(a=o,o=e,e=null),e=e||{},p.isIE(8)?a(o):function(o,a){var l=i(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),c=!1,u=window.getComputedStyle(o),s=o.offsetWidth,d=o.offsetHeight;function f(){function n(){if("static"===u.position){o.style.setProperty("position","relative",e.important?"important":"");var n=function(t,n,r,i){var o=r[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",n),n.style.setProperty(i,"0",e.important?"important":""))};n(t,o,u,"top"),n(t,o,u,"right"),n(t,o,u,"bottom"),n(t,o,u,"left")}}""!==u.position&&(n(),c=!0);var i=document.createElement("object");i.style.cssText=l,i.tabIndex=-1,i.type="text/html",i.setAttribute("aria-hidden","true"),i.onload=function(){c||n(),function e(t,n){if(!t.contentDocument){var i=r(t);return i.checkForObjectDocumentTimeoutId&&window.clearTimeout(i.checkForObjectDocumentTimeoutId),void(i.checkForObjectDocumentTimeoutId=setTimeout((function(){i.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){a(o)}))},p.isIE()||(i.data="about:blank"),r(o)&&(o.appendChild(i),r(o).object=i,p.isIE()&&(i.data="about:blank"))}r(o).startSize={width:s,height:d},n?n.add(f):f()}(o,a)},addListener:function(e,t){function n(){t(e)}if(p.isIE(8))r(e).object={proxy:n},e.attachEvent("onresize",n);else{var i=o(e);if(!i)throw Error("Element is not detectable by this strategy.");i.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(e){if(r(e)){var t=o(e);t&&(p.isIE(8)?e.detachEvent("onresize",t.proxy):e.removeChild(t),r(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(e).checkForObjectDocumentTimeoutId),delete r(e).object)}}}}(f)}var h={};return{listenTo:function(e,n,r){function o(e){var t=c.get(e);z(t,(function(t){t(e)}))}function s(e,t,n){c.add(t,n),e&&n(t)}if(r||(r=n,n=e,e={}),!n)throw Error("At least one element required.");if(!r)throw Error("Listener required.");if(M(n))n=[n];else{if(!S(n))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=I(n)}var f=0,v=C(e,"callOnAdd",a.callOnAdd),p=C(e,"onReady",(function(){})),m=C(e,"debug",a.debug);z(n,(function(e){b.getState(e)||(b.initState(e),t.set(e));var a=t.get(e);if(m&&i.log("Attaching listener to element",a,e),!u.isDetectable(e))return m&&i.log(a,"Not detectable."),u.isBusy(e)?(m&&i.log(a,"System busy making it detectable"),s(v,e,r),h[a]=h[a]||[],void h[a].push((function(){++f===n.length&&p()}))):(m&&i.log(a,"Making detectable..."),u.markBusy(e,!0),l.makeDetectable({debug:m,important:d},e,(function(e){if(m&&i.log(a,"onElementDetectable"),b.getState(e)){u.markAsDetectable(e),u.markBusy(e,!1),l.addListener(e,o),s(v,e,r);var t=b.getState(e);if(t&&t.startSize)t.startSize.width===e.offsetWidth&&t.startSize.height===e.offsetHeight||o(e);h[a]&&z(h[a],(function(e){e()}))}else m&&i.log(a,"Element uninstalled before being detectable.");delete h[a],++f===n.length&&p()})));m&&i.log(a,"Already detecable, adding listener."),s(v,e,r),f++})),f===n.length&&p()},removeListener:c.removeListener,removeAllListeners:c.removeAllListeners,uninstall:function(e){if(!e)return i.error("At least one element is required.");if(M(e))e=[e];else{if(!S(e))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=I(e)}z(e,(function(e){c.removeAllListeners(e),l.uninstall(e),b.cleanState(e)}))},initDocument:function(e){l.initDocument&&l.initDocument(e)}}}({strategy:"scroll"}));var O=T;function R(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}function k(e){return!isNaN(parseFloat(e))&&isFinite(e)}function D(e){var o=e.width,a=e.height,u=e.onResize,s=e.children,d=i(e,["width","height","onResize","children"]),f=t.useState(null),h=f[0],v=f[1],p=c(h).current,m=t.useRef(),y=k(o)&&k(a),g=t.useRef({}),x=t.useRef({calculateSize:function(){var e=m.current,t={width:e.offsetWidth,height:e.offsetHeight};v((function(e){return R(e,t)?e:t}))}});g.current.onResize=u,t.useMemo((function(){var e=null;y&&(e={width:o,height:a}),v((function(t){return R(t,e)?t:e}))}),[y,o,a]),l((function(){p!==h&&h&&g.current.onResize(h)}),[h]),t.useEffect((function(){if(!y&&(x.current.calculateSize(),O)){var e=m.current;return O.listenTo(e,(function(){x.current.calculateSize()})),function(){O.uninstall(e)}}}),[y]);var b=t.useMemo((function(){var e={width:"100%",height:"100%"};return k(o)&&(e.width=o),k(a)&&(e.height=a),d.style&&Object.assign(e,d.style),e}),[o,a,d.style]);return d.style=b,n.createElement("div",r({},d,{ref:m}),h?"function"==typeof s?s(h):s:null)}function P(e,t){if(t){return Math.max(-2.5,Math.min(e["y"===t?"y":"x"],2.5))}var n={x:P(e,"x"),y:P(e,"y")};return n.x===e.x&&n.y===e.y?e:n}function A(e,t,n,r,i,o){if(o){var a="y"===o?["y","height"]:["x","width"],l=a[0],c=a[1],u=t[c],s=e[l];if(r[l])return s;var d=Math.min(u-n[c],0);return i&&u>0&&(d=u*Math.ceil(d/u)),Math.max(d,Math.min(s,0))}var f={x:A(e,t,n,r,i,"x"),y:A(e,t,n,r,i,"y")};return f.x===e.x&&f.y===e.y?e:f}function L(e,t,n,r,i,o){if(o){var a="y"===o?["y","height"]:["x","width"],l=a[0],c=a[1],u=e[l],s=t[l];if(r&&n[c]>0){var d=u/n[c];u=n[c]*(d=s>.5?Math.ceil(d):-.5>s?Math.floor(d):Math.round(d))}else i[l]&&(u+=.5*s*(s/i[l]));return u}return"object"!=typeof i&&(i=function(e,t){var n=t.x,r=t.y,i=Math.sqrt(n*n+r*r);return 0===i?{x:0,y:0}:{x:e*(n/i),y:e*(r/i)}}(i,t)),{x:L(e,t,n,r,i,"x"),y:L(e,t,n,r,i,"y")}}function j(e,t,n,r){var i=(new Date).getTime(),o=0;if(!t)return{endOffset:e,rate:t,duration:o,startTime:i};var a,l={x:e.x-n.x,y:e.y-n.y},c=Math.sqrt(Math.pow(l.x,2)+Math.pow(l.y,2));if(c){var u=Math.sqrt(.5*Math.pow(a=(r.x*l.x+r.y*l.y)/c,2)+t*c),s=(u-a)/t;0>s&&(u=a,s=0),o=s+u/t}else a=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),o=(Math.sqrt(2)+1)*a/t;return{endOffset:e,rate:t,duration:o,startTime:i,points:{x:[n.x,n.x+r.x*(o/3),e.x,e.x],y:[n.y,n.y+r.y*(o/3),e.y,e.y]}}}D.defaultProps={width:null,height:null,onResize:function(){}};var B={contentOffset:{x:0,y:0},contentVelocity:{x:0,y:0},drag:null,deceleration:null,size:{width:0,height:0},contentSize:{width:0,height:0},pannable:o,alwaysBounce:{x:!0,y:!0},isBoundless:{x:!1,y:!1},pagingEnabled:!1,directionalLockEnabled:!1};function H(e,t){switch(t.type){case"syncProps":return _(function(e,t){return r({},e,t.props)}(e,t));case"dragStart":return function(e,t){var n=e.contentOffset,i=e.pannable.velocity,o={x:1,y:1};e.directionalLockEnabled&&(Math.abs(i.x)>Math.abs(i.y)?o.y=0:o.x=0);return r({},e,{contentVelocity:{x:o.x*i.x,y:o.y*i.y},drag:{direction:o,startOffset:n},deceleration:null})}(e);case"dragMove":return function(e,t){var n=e.contentOffset,i=e.drag,o=e.pannable,a=o.translation,l=o.interval,c={x:i.startOffset.x+i.direction.x*a.x,y:i.startOffset.y+i.direction.y*a.y};return c=function e(t,n,r,i,o,a){if(a){var l="y"===a?["y","height","width"]:["x","width","height"],c=l[0],u=l[1],s=l[2],d=t[c],f=n[c];if(r[c])return d;var h=Math.min(i[u]-o[u],0),v=.5*Math.min(i[u],i[s]);return d>0?f?v*(1-v/(v+d)):0:h>d?f?h-v*(1-v/(v-d+h)):h:d}var p={x:e(t,n,r,i,o,"x"),y:e(t,n,r,i,o,"y")};return p.x===t.x&&p.y===t.y?t:p}(c,e.alwaysBounce,e.isBoundless,e.size,e.contentSize),r({},e,{contentOffset:c,contentVelocity:{x:(c.x-n.x)/l,y:(c.y-n.y)/l}})}(e);case"dragEnd":return function(e,t){var n=e.contentOffset,i=e.size,o=e.pagingEnabled,a=o?.025:.0025,l=P(e.contentVelocity),c=L(n,l,i,o,a);return r({},e,{contentVelocity:l,drag:null,deceleration:j(c,a,n,l)})}(e);case"dragCancel":return function(e,t){var n=e.contentOffset,i=e.drag,o=e.size,a=e.pagingEnabled,l=P(e.contentVelocity),c=L(i.startOffset,{x:0,y:0},o,a,.025);return r({},e,{contentVelocity:l,drag:null,deceleration:j(c,.025,n,l)})}(e);case"decelerate":return _(function(e,t){var n=e.deceleration;if(!n)return e;var i=function e(t,n,i){var o=t.duration,a=t.startTime,l=t.endOffset;if(i){var c,u=("y"===i?["y"]:["x"])[0],s=t.points[u],d=s[0],f=s[1],h=s[2],v=s[3],p=d-3*(d-f)*n+3*(d-2*f+h)*Math.pow(n,2)-(d-3*f+3*h-v)*Math.pow(n,3),m=(-3*(d-f)+6*(d-2*f+h)*n-3*(d-3*f+3*h-v)*Math.pow(n,2))/o;return(c={})[u+"Offset"]=p,c[u+"Velocity"]=m,c}var y=(new Date).getTime();if(n=1,o>0&&(n=(y-a)/o),0>n||n>=1)return{offset:l,velocity:{x:0,y:0},didEnd:!0};var g=r({},e(t,n,"x"),e(t,n,"y"));return{offset:{x:g.xOffset,y:g.yOffset},velocity:{x:g.xVelocity,y:g.yVelocity},didEnd:!1}}(n);return r({},e,{contentOffset:i.offset,contentVelocity:i.velocity,drag:null,deceleration:i.didEnd?null:n})}(e));case"scrollTo":return _(function(e,t){var n=e.contentOffset,i=e.size,o=t.value,a=o.offset,l=void 0===a?{x:0,y:0}:a,c=o.point,u=o.align,s=o.animated,d=o.rect,f=!e.drag&&s;d||(d=c?r({},c,{width:0,height:0}):{x:-l.x,y:-l.y,width:0,height:0});var h=function e(t,n,r,i,o){if(o){var a="y"===o?["y","height"]:["x","width"],l=a[0],c=a[1],u=-t[l],s=n[l],d=i[c]-t[c];if("auto"===s){var f=0>d?-1:1;u+=f*Math.max(0,Math.min(f*(r[l]-u),f*d))}else"start"===s?s=0:"center"===s?s=.5:"end"===s?s=1:("number"!=typeof s||isNaN(s))&&(s=0),u+=s*d;return u}"object"!=typeof n&&(n={x:n,y:n});return{x:e(t,n,r,i,"x"),y:e(t,n,r,i,"y")}}(d,u,n,i);return function(e,t){var n=e.contentOffset,i=e.contentVelocity,o=e.drag,a=e.deceleration,l=e.size,c=e.pagingEnabled,u=t.offset;if(!t.animated){if(o)return r({},e,{contentOffset:u,drag:r({},o,{startOffset:{x:o.startOffset.x+u.x-n.x,y:o.startOffset.y+u.y-n.y}}),deceleration:null});if(a){var s=L({x:a.endOffset.x+u.x-n.x,y:a.endOffset.y+u.y-n.y},{x:0,y:0},l,c,a.rate);return r({},e,{contentOffset:u,drag:null,deceleration:j(s,a.rate,u,i)})}return r({},e,{contentOffset:u})}var d=L(u,{x:0,y:0},l,c,.025);return r({},e,{drag:null,deceleration:j(d,.025,n,i)})}(e,{type:"setContentOffset",offset:h,animated:f})}(e,t));default:return e}}function _(e,t){var n=e.contentOffset,i=e.contentVelocity,o=e.drag,a=e.deceleration,l=e.size,c=e.contentSize,u=e.pagingEnabled,s=e.alwaysBounce,d=e.isBoundless;if(a){var f=a.endOffset,h=A(n,l,c,d,u);if(f!==A(f,l,c,d,u)&&n!==h){var v=n,p=P(i);return s.x||(p=r({},p,{x:0}),v=r({},v,{x:h.x})),s.y||(p=r({},p,{y:0}),v=r({},v,{y:h.y})),.025!==a.rate&&(f=L(v,p,l,u,.025)),r({},e,{contentOffset:v,contentVelocity:p,drag:null,deceleration:j(f=A(f,l,c,d,u),.025,v,p)})}}else if(!o){var m=L(n,i,l,u,.025);if((m=A(m,l,c,d,u)).x!==n.x||m.y!==n.y)return r({},e,{drag:null,deceleration:j(m,.025,n,i)})}return e}var W=n.createContext({width:null,height:null,visibleRect:{top:0,left:0,width:0,height:0},onResize:function(){}}),N=function(){},F=function(){};if("undefined"!=typeof window){N=window.requestAnimationFrame,F=window.cancelAnimationFrame;for(var q=["ms","moz","webkit","o"],V=0,X=0;4>X&&!N;++X)N=window[q[X]+"RequestAnimationFrame"],F=window[q[X]+"CancelAnimationFrame"]||window[q[X]+"CancelRequestAnimationFrame"];N||(N=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-V)),r=window.setTimeout((function(){e(t+n)}),n);return V=t+n,r},F=function(e){clearTimeout(e)})}var Y={position:"absolute",top:0,left:0,right:0,bottom:0};function G(e){var r=e.pannable,i=e.size,o=e.pagingEnabled,a=e.directionalLockEnabled,s=e.alwaysBounce,d=e.isBoundless,f=e.onScroll,h=e.onDragStart,v=e.onDragEnd,p=e.onDecelerationStart,m=e.onDecelerationEnd,y=e.onContentResize,g=e.renderBackground,x=e.renderOverlay,b=e.scrollTo,w=e.children,E=t.useReducer(H,B),z=E[0],S=E[1],I=c(z).current,M=t.useRef({_scrollTo:function(e){S({type:"scrollTo",value:e})}}),C=t.useRef({onPadContentResize:function(e){S({type:"syncProps",props:{contentSize:e}})}});C.current.onScroll=f,C.current.onDragStart=h,C.current.onDragEnd=v,C.current.onDecelerationStart=p,C.current.onDecelerationEnd=m,C.current.onContentResize=y,t.useMemo((function(){S({type:"syncProps",props:{size:i,pannable:r,alwaysBounce:s,isBoundless:d,pagingEnabled:o,directionalLockEnabled:a}})}),[i,r,s,d,o,a]),l((function(){I.pannable.translation!==z.pannable.translation&&S(z.pannable.translation?I.pannable.translation?{type:"dragMove"}:{type:"dragStart"}:z.pannable.enabled?{type:"dragEnd"}:{type:"dragCancel"}),I.contentSize!==z.contentSize&&C.current.onContentResize(z.contentSize);var e={size:z.size,contentSize:z.contentSize,contentOffset:z.contentOffset,contentVelocity:z.contentVelocity,dragging:!!z.drag,decelerating:!!z.deceleration};if(I.contentOffset!==z.contentOffset&&C.current.onScroll(e),I.drag!==z.drag&&(I.drag?z.drag||C.current.onDragEnd(e):C.current.onDragStart(e)),I.deceleration!==z.deceleration&&(I.deceleration?z.deceleration||C.current.onDecelerationEnd(e):C.current.onDecelerationStart(e)),z.deceleration){var t=N((function(){S({type:"decelerate"})}));return function(){F(t)}}}),[z]),t.useEffect((function(){b&&M.current._scrollTo(b)}),[b]);var T=g(z,M.current);null!==T&&(T=n.createElement("div",{style:Y},T));var O=x(z,M.current),R="function"==typeof w?w(z,M.current):w,k=t.useMemo((function(){return u.create({position:"absolute",overflow:"hidden",willChange:"transform",transformTranslate:z.contentOffset,width:z.contentSize.width,height:z.contentSize.height})}),[z.contentSize,z.contentOffset]),D=t.useMemo((function(){return{visibleRect:{x:-z.contentOffset.x,y:-z.contentOffset.y,width:z.size.width,height:z.size.height},onResize:C.current.onPadContentResize}}),[z.contentOffset,z.size]);return n.createElement(n.Fragment,null,T,n.createElement("div",{style:k},n.createElement(W.Provider,{value:D},R)),O)}var U=r({width:0,height:0,pagingEnabled:!1,directionalLockEnabled:!1,alwaysBounceX:!0,alwaysBounceY:!0,isBoundlessX:!1,isBoundlessY:!1,onScroll:function(){},onDragStart:function(){},onDragEnd:function(){},onDecelerationStart:function(){},onDecelerationEnd:function(){},onContentResize:function(){},renderBackground:function(){return null},renderOverlay:function(){return null},scrollTo:null},f.defaultProps);function J(e){var r=e.width,o=e.height,a=e.pagingEnabled,l=e.directionalLockEnabled,c=e.alwaysBounceX,u=e.alwaysBounceY,s=e.isBoundlessX,d=e.isBoundlessY,h=e.onScroll,v=e.onDragStart,p=e.onDragEnd,m=e.onDecelerationStart,y=e.onDecelerationEnd,g=e.onContentResize,x=e.renderBackground,b=e.renderOverlay,w=e.scrollTo,E=e.children,z=i(e,["width","height","pagingEnabled","directionalLockEnabled","alwaysBounceX","alwaysBounceY","isBoundlessX","isBoundlessY","onScroll","onDragStart","onDragEnd","onDecelerationStart","onDecelerationEnd","onContentResize","renderBackground","renderOverlay","scrollTo","children"]),S=t.useMemo((function(){return{width:r,height:o}}),[r,o]),I=t.useMemo((function(){return{x:c,y:u}}),[c,u]),M=t.useMemo((function(){return{x:s,y:d}}),[s,d]),C=t.useRef(),T=t.useRef({});T.current.shouldStart=z.shouldStart;var O=t.useCallback((function(e){var t=C.current;return!!t&&(!!function(e,t,n){var r=Math.abs(e.x)>Math.abs(e.y)?"width":"height";return n[r]>t[r]}(e.velocity,t.size,t.contentSize)&&T.current.shouldStart(e))}),[]),R=t.useMemo((function(){var e={overflow:"hidden",position:"relative",width:S.width,height:S.height};return z.style&&Object.assign(e,z.style),e}),[S,z.style]);return z.shouldStart=O,z.style=R,n.createElement(f,z,(function(e){return n.createElement(G,{pannable:e,size:S,pagingEnabled:a,directionalLockEnabled:l,alwaysBounce:I,isBoundless:M,onScroll:h,onDragStart:v,onDragEnd:p,onDecelerationStart:m,onDecelerationEnd:y,onContentResize:g,renderBackground:x,renderOverlay:b,scrollTo:w},(function(e,t){return C.current=e,"function"==typeof E?E(e,t):E}))}))}function K(e,t,n){if(!t)return t;if(n){var i,o="y"===n?["y","height"]:["x","width"],a=o[0],l=o[1];return(i={})[a]=t[a]-e[a],i[l]=t[l],i}return r({},K(e,t,"x"),K(e,t,"y"))}function Q(e,t,n){if(!t)return!0;if(n){var r="y"===n?["y","height"]:["x","width"],i=r[0],o=r[1];return e[i]+e[o]>=t[i]-.25*t[o]&&t[i]+1.25*t[o]>=e[i]}return Q(e,t,"x")&&Q(e,t,"y")}function Z(){}function $(){}J.defaultProps=U;function ee(e){var o=t.useContext(W),a=e.width,u=e.height,s=e.direction,d=e.rowSpacing,f=e.columnSpacing,h=e.itemWidth,v=e.itemHeight,p=e.itemCount,m=e.renderItem,y=e.children,g=i(e,["width","height","direction","rowSpacing","columnSpacing","itemWidth","itemHeight","itemCount","renderItem","children"]),x=k(a)?a:o.width,b=k(u)?u:o.height,w=t.useMemo((function(){return function(e){var t,n,r=e.spacing,i=e.itemSize,o=e.itemCount,a="x"===e.direction?["y","x","height","width","column","row"]:["x","y","width","height","row","column"],l=a[0],c=a[1],u=a[2],s=a[3],d=a[4],f=a[5],h=e.size[u],v=0,p=0,m=0,y=[];"number"!=typeof h?(m=o,0===i[u]?h=0:(h=o*i[u],o>1&&(h+=(o-1)*r[f]))):0===i[u]?m=o:(m=1,h>i[u]&&(m+=Math.floor((h-i[u])/(i[u]+r[f]))));m>0&&(p=Math.ceil(o/m));for(var g=0;p>g;g++){g>0&&(v+=r[d]);for(var x=0;m>x;x++){var b,w,E=x+g*m,z=0;if(m>1&&(z+=Math.round(x*((h-i[u])/(m-1)))),E>=o)break;y.push(((w={rect:(b={},b[l]=z,b[c]=v,b[u]=i[u],b[s]=i[s],b)})[d+"Index"]=g,w[f+"Index"]=x,w.itemIndex=E,w))}v+=i[s]}return{size:(t={},t[u]=h,t[s]=v,t),count:(n={},n[d]=p,n[f]=m,n),layoutList:y}}({direction:s,size:{width:x,height:b},spacing:{row:d,column:f},itemSize:{width:h,height:v},itemCount:p})}),[s,x,b,d,f,h,v,p]),E=c(w).current,z=t.useRef({});z.current.onResize=o.onResize,l((function(){E.size!==w.size&&R(E.size,w.size)||z.current.onResize(w.size)}),[w.size]);var S=w.layoutList.map((function(e){return function(e){var t=e.rect,i=e.itemIndex,a=e.visibleRect,l=e.needsRender,c=e.Item,u=!1,s=m(e),d="GridContent_"+i;if(n.isValidElement(s)&&s.type===c&&(void 0!==s.props.forceRender&&(u=s.props.forceRender),s.key&&(d=s.key),s=s.props.children),!l&&!u)return null;var f={position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height};return n.createElement(W.Provider,{key:d,value:r({},o,{width:null,height:null,visibleRect:a,onResize:$})},n.createElement("div",{style:f},s))}(r({},e,{visibleRect:K(e.rect,o.visibleRect),needsRender:Q(e.rect,o.visibleRect),Item:Z}))}));"function"==typeof y&&y(w);var I=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return w.size&&(e.width=w.size.width,e.height=w.size.height),g.style&&Object.assign(e,g.style),e}),[w.size,g.style]);return g.style=I,n.createElement("div",g,S)}function te(){}ee.defaultProps={width:null,height:null,direction:"y",rowSpacing:0,columnSpacing:0,itemWidth:0,itemHeight:0,itemCount:0,renderItem:function(){return null}};function ne(e){var o=t.useContext(W),a=e.width,u=e.height,s=e.direction,d=e.spacing,f=e.estimatedItemWidth,h=e.estimatedItemHeight,v=e.itemCount,p=e.renderItem,m=e.children,y=i(e,["width","height","direction","spacing","estimatedItemWidth","estimatedItemHeight","itemCount","renderItem","children"]),g=k(a)?a:o.width,x=k(u)?u:o.height,b=t.useState([]),w=b[0],E=b[1],z=t.useState({}),S=z[0],I=z[1],M=t.useMemo((function(){return function(e,t,n){var r,i=e.size,o=e.spacing,a=e.estimatedItemSize,l=e.itemCount,c="x"===e.direction?["y","x","height","width"]:["x","y","width","height"],u=c[0],s=c[1],d=c[2],f=c[3],h=0,v=0,p=[],m={};k(i[d])&&(m[d]=i[d]);for(var y=0;l>y;y++){var g,x=t[y]||null,b=n[x]||null,w=((g={})[u]=0,g[s]=v,g);b?Object.assign(w,b):(w[d]=void 0!==m[d]?m[d]:"function"==typeof a[d]?a[d](y):a[d],w[f]="function"==typeof a[f]?a[f](y):a[f]),p.push({rect:w,itemIndex:y,itemHash:x,itemSize:b}),w[f]>0&&(v+=w[f],l-1>y&&(v+=o)),w[d]>h&&(h=w[d])}return{size:(r={},r[d]=void 0!==m[d]?m[d]:h,r[f]=void 0!==m[f]?m[f]:v,r),layoutList:p}}({direction:s,size:{width:g,height:x},spacing:d,estimatedItemSize:{width:f,height:h},itemCount:v},w,S)}),[g,x,s,d,f,h,v,w,S]),C=c(M).current,T=t.useRef({});T.current.onResize=o.onResize,l((function(){C.size!==M.size&&R(C.size,M.size)||T.current.onResize(M.size)}),[M.size]);var O=[];var D=M.layoutList.map((function(e){return function(e){var t,i=e.rect,a=e.itemIndex,l=e.itemSize,c=e.visibleRect,u=e.needsRender,s=e.Item,d=!1,f=p(e),h="ListContent_"+a;n.isValidElement(f)&&f.type===s&&(void 0!==f.props.forceRender&&(d=f.props.forceRender),f.key&&(h=f.key),void 0!==f.props.hash&&(t=f.props.hash),f=f.props.children),void 0===t&&(t=h);var v=!u&&!d;if(l||-1===O.indexOf(t)||(v=!0),O[a]=t,v)return null;var m={position:"absolute",left:i.x,top:i.y,width:i.width,height:i.height};return n.createElement(W.Provider,{key:h,value:r({},o,{width:null,height:null},l,{visibleRect:c,onResize:function(e){I((function(n){var i;return r({},n,((i={})[t]=e,i))}))}})},n.createElement("div",{style:m},f))}(r({},e,{visibleRect:K(e.rect,o.visibleRect),needsRender:Q(e.rect,o.visibleRect),Item:te}))}));(function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(e[n]!==t[n])return!1;return!0})(w,O)||E(O),"function"==typeof m&&m(M);var P=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return M.size&&(e.width=M.size.width,e.height=M.size.height),y.style&&Object.assign(e,y.style),e}),[M.size,y.style]);return y.style=P,n.createElement("div",y,D)}function re(){}ne.defaultProps={width:null,height:null,direction:"y",spacing:0,estimatedItemWidth:0,estimatedItemHeight:0,itemCount:0,renderItem:function(){return null}};var ie={position:"absolute",top:0,left:0};function oe(e){var o=t.useContext(W),a=e.width,u=e.height,s=e.autoResizing,d=e.children,f=i(e,["width","height","autoResizing","children"]),h=k(a)?a:s?null:o.width,v=k(u)?u:s?null:o.height,p=k(h)&&k(v),m=t.useState(null),y=m[0],g=m[1],x=c(y).current,b=t.useRef(null),w=t.useRef({calculateSize:function(){var e=b.current,t={width:e.offsetWidth,height:e.offsetHeight};g((function(e){return R(e,t)?e:t}))}}),E=t.useRef({});E.current.onResize=o.onResize,t.useMemo((function(){var e=null;p&&(e={width:h,height:v}),g((function(t){return R(t,e)?t:e}))}),[p,h,v]),l((function(){x!==y&&y&&E.current.onResize(y)}),[y]),t.useEffect((function(){if(!p&&(w.current.calculateSize(),s&&O)){var e=b.current;return O.listenTo(e,(function(){w.current.calculateSize()})),function(){O.uninstall(e)}}}),[p,s]);var z=t.useMemo((function(){var e={position:"absolute"};return k(h)&&(e.width=h),k(v)&&(e.height=v),e}),[h,v]),S="function"==typeof d?d(y):d;p||(S=n.createElement("div",{style:ie},n.createElement("div",{style:z,ref:b},S)));var I=t.useMemo((function(){var e={position:"relative"};return y&&(e.width=y.width,e.height=y.height),f.style&&Object.assign(e,f.style),e}),[y,f.style]);return f.style=I,n.createElement("div",f,n.createElement(W.Provider,{value:r({},o,{width:null,height:null,onResize:re})},S))}oe.defaultProps={width:null,height:null,autoResizing:!1};var ae={loopCount:2,loopOffset:0,loopWidth:0,scrollTo:null,pad:B,direction:"x"};function le(e,t){switch(t.type){case"syncProps":return function(e,t){var n=e.loopCount,i=e.loopWidth,o=e.loopOffset,a=e.direction,l=e.pad,c=l.size,u=l.contentOffset,s="y"===a?"height":"width",d=l.contentSize[s]/n,f=2;0!==d&&(f+=Math.floor(c[s]/d));if(i!==d||n!==f)return r({},e,{loopCount:f,loopWidth:d});var h=function(e,t,n,r,i){var o;if(1===r||0===n)return[e,0];var a="y"===i?["height","y","x"]:["width","x","y"],l=a[1],c=a[2],u=t[a[0]],s=.5*(u-n*(r-1)),d=.5*(u-n*(r+1)),f=e[l],h=0;if(f>=d&&s>=f)return[e,0];d>f?h=Math.floor((s-f)/n):f>s&&(h=-Math.floor((f-d)/n));return[(o={},o[l]=f+=n*h,o[c]=e[c],o),h]}(u,c,i,n,a),v=h[0],p=h[1];if(u!==v)return r({},e,{loopOffset:o+p,scrollTo:{offset:v,animated:!1}});return e}(function(e,t){return r({},e,t.props)}(e,t));default:return e}}function ce(e){var r=e.pad,i=e.onAdjust,o=e.direction,a=e.children,c=t.useReducer(le,ae),u=c[0],s=c[1],d=t.useRef({});return d.current.onAdjust=i,t.useMemo((function(){s({type:"syncProps",props:{pad:r,direction:o}})}),[r,o]),l((function(){u.scrollTo&&d.current.onAdjust(u.scrollTo)}),[u.scrollTo]),n.createElement(ne,{direction:o,width:u.pad.size.width,height:u.pad.size.height,itemCount:u.loopCount,renderItem:function(e){return n.createElement(e.Item,{key:e.itemIndex+u.loopOffset,hash:"Loop",forceRender:!0},"function"==typeof a?a(u):a)}})}var ue=r({direction:"x"},J.defaultProps,{directionalLockEnabled:!0});function se(e){var t=e.direction,r=e.children,o=i(e,["direction","children"]);return"x"===t?(o.isBoundlessX=!0,o.alwaysBounceY=!1):(o.isBoundlessY=!0,o.alwaysBounceX=!1),n.createElement(J,o,(function(e,i){return n.createElement(ce,{pad:e,onAdjust:i._scrollTo,direction:t,children:r})}))}se.defaultProps=ue;var de={activeIndex:0,scrollTo:null,pad:B,direction:"x",loop:!0,itemCount:0};function fe(e,t){switch(t.type){case"syncProps":return function(e,t){var n=e.activeIndex,i=e.pad,o=function(e,t,n,r){var i="y"===r?["height","y"]:["width","x"],o=i[1],a=t[i[0]],l=0;a>0&&(l=Math.round(-e[o]/a));return l%n}(i.contentOffset,i.size,e.itemCount,e.direction);if(n!==o)return r({},e,{activeIndex:o});return e}(function(e,t){return r({},e,t.props)}(e,t));case"scrollToIndex":return he(e,t);case"next":return function(e,t){var n=e.itemCount,r=e.activeIndex+1;e.loop||(r%=n);return he(e,{value:{index:r,animated:t.animated}})}(e,t);default:return e}}function he(e,t){var n=e.activeIndex,i=e.itemCount,o=e.direction,a=e.loop,l=e.pad,c=l.contentOffset,u=l.size,s=t.value.animated,d=t.value.index;return"function"==typeof d&&(d=d({activeIndex:n,itemCount:i})),a||(d=Math.max(0,Math.min(d,i-1))),d===n?e:r({},e,{scrollTo:{offset:function(e,t,n,r){var i,o="y"===r?["height","y","x"]:["width","x","y"],a=o[1],l=o[2];return(i={})[a]=t[a]-e*n[o[0]],i[l]=t[l],i}(d-n,c,u,o),animated:s}})}function ve(e){var r=e.pad,i=e.direction,o=e.loop,a=e.autoplayEnabled,u=e.autoplayInterval,s=e.itemCount,d=e.onActiveIndexChange,f=e.onAdjust,h=e.scrollToIndex,v=e.children,p=t.useReducer(fe,de),m=p[0],y=p[1],g=c(m).current,x=t.useRef({});return x.current.onActiveIndexChange=d,x.current.onAdjust=f,t.useMemo((function(){y({type:"syncProps",props:{pad:r,direction:i,loop:o,itemCount:s}})}),[r,i,o,s]),l((function(){g.activeIndex!==m.activeIndex&&x.current.onActiveIndexChange({activeIndex:m.activeIndex,itemCount:m.itemCount})}),[m]),l((function(){m.scrollTo&&x.current.onAdjust(m.scrollTo)}),[m.scrollTo]),t.useEffect((function(){h&&y({type:"scrollToIndex",value:h})}),[h]),t.useEffect((function(){if(a&&!m.pad.drag&&!m.pad.deceleration){var e=setTimeout((function(){y({type:"next",animated:!0})}),u);return function(){clearTimeout(e)}}}),[a,u,m.pad.drag,m.pad.deceleration]),n.createElement(n.Fragment,null,"function"==typeof v?v(m):v)}var pe=r({direction:"x",loop:!0,autoplayEnabled:!0,autoplayInterval:5e3,itemCount:0,renderItem:function(){return null},onActiveIndexChange:function(){},scrollToIndex:null},J.defaultProps,{pagingEnabled:!0,directionalLockEnabled:!0});function me(e){var o=e.direction,a=e.loop,l=e.autoplayEnabled,c=e.autoplayInterval,u=e.itemCount,s=e.renderItem,d=e.onActiveIndexChange,f=e.scrollToIndex,h=e.children,v=i(e,["direction","loop","autoplayEnabled","autoplayInterval","itemCount","renderItem","onActiveIndexChange","scrollToIndex","children"]),p=v.width,m=v.height,y=v.renderOverlay,g=v.onMouseEnter,x=v.onMouseLeave,b=t.useState(!1),w=b[0],E=b[1],z=t.useRef({onPadMouseEnter:function(e){E(!1),z.current.onMouseEnter&&z.current.onMouseEnter(e)},onPadMouseLeave:function(e){E(!0),z.current.onMouseLeave&&z.current.onMouseLeave(e)}});z.current.onMouseEnter=g,z.current.onMouseLeave=x,t.useMemo((function(){E(l)}),[l]),l&&(v.onMouseEnter=z.current.onPadMouseEnter,v.onMouseLeave=z.current.onPadMouseLeave),v.renderOverlay=function(e,t){return n.createElement(n.Fragment,null,n.createElement(ve,{pad:e,direction:o,loop:a,autoplayEnabled:w,autoplayInterval:c,itemCount:u,onActiveIndexChange:d,onAdjust:t._scrollTo,scrollToIndex:f,children:h}),y(e,t))};var S=n.createElement(ee,{width:p,height:m,itemWidth:p,itemHeight:m,direction:o,itemCount:u,renderItem:s});return a?n.createElement(se,r({direction:o},v),S):("x"===o?v.alwaysBounceY=!1:v.alwaysBounceX=!1,n.createElement(J,v,S))}me.defaultProps=pe;var ye={scroll:null,scrollTo:null,pad:B};function ge(e,t){switch(t.type){case"syncProps":return function(e,t){return r({},e,t.props)}(e,t);case"scrollToIndex":return xe(e,t);case"scrollEnd":return function(e,t){return r({},e,{scroll:null})}(e);case"scrollRecalculate":return function(e,t){var n=t.list,r=e.scroll;if(!r)return e;return xe(e,{value:r,list:n})}(e,t);default:return e}}function xe(e,t){var n=t.value,i=n.index,o=n.align,a=n.animated;return r({},e,{scrollTo:{rect:function(e,t){var n=t.box,r=t.body,i={x:0,y:0,width:0,height:0};n&&(i=n.layoutList[1].rect);if(r){var o=r.layoutList[e=Math.max(0,Math.min(e,r.layoutList.length-1))];i={x:i.x+o.rect.x,y:i.y+o.rect.y,width:o.rect.width,height:o.rect.height}}return i}(i,t.list),align:o,animated:a},scroll:a?{index:i,align:o,animated:a}:null})}function be(e){var r=e.pad,i=e.scrollToIndex,o=e.listRef,a=e.onAdjust,u=e.children,s=t.useReducer(ge,ye),d=s[0],f=s[1],h=c(d).current;return t.useMemo((function(){f({type:"syncProps",props:{pad:r}})}),[r]),l((function(){d.scroll&&(h.pad.contentSize!==d.pad.contentSize&&f({type:"scrollRecalculate",list:o.current}),h.pad.deceleration!==d.pad.deceleration&&(d.pad.deceleration||f({type:"scrollEnd"})))})),l((function(){d.scrollTo&&a(d.scrollTo)}),[d.scrollTo,a]),t.useEffect((function(){i&&f({type:"scrollToIndex",value:i,list:o.current})}),[i,o]),n.createElement(n.Fragment,null,"function"==typeof u?u(d):u)}var we=r({direction:"y",spacing:0,itemCount:0,estimatedItemWidth:0,estimatedItemHeight:0,renderItem:function(){return null},renderHeader:function(){return null},renderFooter:function(){return null},scrollToIndex:null},J.defaultProps,{directionalLockEnabled:!0});function Ee(e){var r=e.direction,o=e.spacing,a=e.itemCount,l=e.estimatedItemWidth,c=e.estimatedItemHeight,u=e.renderItem,s=e.renderHeader,d=e.renderFooter,f=e.scrollToIndex,h=e.children,v=i(e,["direction","spacing","itemCount","estimatedItemWidth","estimatedItemHeight","renderItem","renderHeader","renderFooter","scrollToIndex","children"]),p=v.width,m=v.height,y=v.renderOverlay,g=t.useRef({});return v.renderOverlay=function(e,t){return n.createElement(n.Fragment,null,n.createElement(be,{pad:e,scrollToIndex:f,listRef:g,onAdjust:t._scrollTo,children:h}),y(e,t))},"x"===r?v.alwaysBounceY=!1:v.alwaysBounceX=!1,n.createElement(J,v,n.createElement(ne,{width:p,height:m,direction:r,itemCount:3,renderItem:function(e){var t=e.itemIndex,i=e.Item;return 0===t?s(e):2===t?d(e):n.createElement(i,{forceRender:!0},n.createElement(ne,{width:p,height:m,direction:r,spacing:o,itemCount:a,estimatedItemWidth:l,estimatedItemHeight:c,renderItem:u},(function(e){g.current.body=e})))}},(function(e){g.current.box=e})))}Ee.defaultProps=we,e.AutoResizing=D,e.Carousel=me,e.GridContent=ee,e.Infinite=Ee,e.ItemContent=oe,e.ListContent=ne,e.Loop=se,e.Pad=J,e.PadContext=W,e.Pannable=f,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).ReactPannable={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t;function r(){return(r=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}var o={enabled:!1,target:null,startPoint:null,movePoint:null,moveTime:null,translation:null,velocity:null,interval:null};function a(e,t){switch(t.type){case"syncEnabled":return function(e,t){var n=t.enabled;if(!n)return o;return r({},e,{enabled:n})}(e,t);case"end":return function(e,t){if(!e.target)return e;return r({},e,{target:null,startPoint:null,movePoint:null,moveTime:null,translation:null,velocity:null,interval:null})}(e);case"track":return function(e,t){var n=(new Date).getTime();return r({},e,{target:t.target,startPoint:t.point,movePoint:t.point,moveTime:n,translation:null,velocity:null,interval:null})}(e,t);case"move":return function(e,t){var n=e.target,i=e.startPoint,o=e.movePoint,a=e.moveTime,l=e.translation,c=t.point,u=t.shouldStart;if(!n)return e;var s=(new Date).getTime(),d=s-a,f={x:c.x-i.x,y:c.y-i.y},h={x:(c.x-o.x)/d,y:(c.y-o.y)/d};if(l)return r({},e,{target:n,startPoint:i,movePoint:c,moveTime:s,translation:f,velocity:h,interval:d});if(0>=Math.sqrt(Math.pow(f.x,2)+Math.pow(f.y,2))||!u({target:n,translation:f,velocity:h,interval:d}))return r({},e,{target:n,startPoint:i,movePoint:c,moveTime:s,translation:null,velocity:null,interval:null});return r({},e,{target:n,startPoint:c,movePoint:c,moveTime:s,translation:{x:0,y:0},velocity:h,interval:d})}(e,t);default:return e}}var l="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function c(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n}var u={create:function(e){var t=e.transformTranslate,n=e.userSelect,r=i(e,["transformTranslate","userSelect"]);return t&&function(e,t){t.transform="translate3d("+e.x+"px, "+e.y+"px, 0)",t.WebkitTransform="translate3d("+e.x+"px, "+e.y+"px, 0)",t.msTransform="translate("+e.x+"px, "+e.y+"px)"}(t,r),n&&function(e,t){t.userSelect=e,t.WebkitUserSelect=e,t.msUserSelect=e}(n,r),r}};function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var i=function(){};return e&&e.addEventListener&&(e.addEventListener.apply(e,n),i=function(){e.removeEventListener.apply(e,n)}),i}var d=void 0!==typeof window&&"ontouchstart"in window;function f(e){var f=e.enabled,h=e.shouldStart,v=e.onStart,p=e.onMove,m=e.onEnd,y=e.onCancel,g=e.children,x=i(e,["enabled","shouldStart","onStart","onMove","onEnd","onCancel","children"]),b=t.useReducer(a,o),w=b[0],E=b[1],z=c(w).current,S=t.useRef(null),I=t.useRef({});I.current={shouldStart:h,onStart:v,onMove:p,onEnd:m,onCancel:y};var M=t.useCallback((function(e,t){E({type:"track",target:e,point:t})}),[]),C=t.useCallback((function(e){E({type:"move",point:e,shouldStart:I.current.shouldStart})}),[]),T=t.useCallback((function(){E({type:"end"})}),[]);t.useMemo((function(){E({type:"syncEnabled",enabled:f})}),[f]),l((function(){z.translation!==w.translation&&(w.translation?z.translation?I.current.onMove(w):I.current.onStart(w):z.translation&&(w.enabled?I.current.onEnd(z):I.current.onCancel(z)))}),[w]);var O=!!w.translation;l((function(){if(w.enabled){if(w.target){if(d){var e=function(e){O&&e.cancelable&&e.preventDefault(),T()},t=s(w.target,"touchmove",(function(e){if(O&&e.cancelable&&e.preventDefault(),1===e.touches.length){var t=e.touches[0];C({x:t.pageX,y:t.pageY})}else T()})),n=s(w.target,"touchend",e),r=s(w.target,"touchcancel",e);return function(){t(),n(),r()}}var i=void 0!==typeof document?document.body:null,o=s(i,"mousemove",(function(e){O&&e.preventDefault(),1===e.buttons?C({x:e.pageX,y:e.pageY}):T()})),a=s(i,"mouseup",(function(e){O&&e.preventDefault(),T()}));return function(){o(),a()}}var l=S.current;if(d){var c=s(l,"touchstart",(function(e){if(1===e.touches.length){var t=e.touches[0];M(t.target,{x:t.pageX,y:t.pageY})}}));return function(){c()}}var u=s(l,"mousedown",(function(e){1===e.buttons&&M(e.target,{x:e.pageX,y:e.pageY})}));return function(){u()}}}),[w.enabled,w.target,O,M,C,T]);var R=t.useMemo((function(){var e={};return O&&Object.assign(e,u.create({touchAction:"none",pointerEvents:"none",userSelect:"none"})),x.style&&Object.assign(e,x.style),e}),[O,x.style]);x.style=R;var k="function"==typeof g?g(w):g;return n.createElement("div",r({},x,{ref:S}),k)}function h(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}f.defaultProps={enabled:!0,shouldStart:function(){return!0},onStart:function(){},onMove:function(){},onEnd:function(){},onCancel:function(){}};var v=h((function(e){(e.exports={}).forEach=function(e,t){for(var n=0;e.length>n;n++){var r=t(e[n]);if(r)return r}}})),p=h((function(e){var t=e.exports={};t.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},t.isLegacyOpera=function(){return!!window.opera}})),m=h((function(e){(e.exports={}).getOption=function(e,t,n){var r=e[t];if(null==r&&void 0!==n)return n;return r}})),y=function(e){var t=(e=e||{}).reporter,n=m.getOption(e,"async",!0),r=m.getOption(e,"auto",!0);r&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var i,o=g(),a=!1;function l(){for(a=!0;o.size();){var e=o;o=g(),e.process()}a=!1}function c(){i=setTimeout(l,0)}return{add:function(e,t){!a&&r&&n&&0===o.size()&&c(),o.add(e,t)},force:function(e){a||(void 0===e&&(e=n),i&&(clearTimeout(i),i=null),e?c():l())}}};function g(){var e={},t=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:r>i&&(r=i),e[i]||(e[i]=[]),e[i].push(o),t++},process:function(){for(var t=r;n>=t;t++)for(var i=e[t],o=0;i.length>o;o++){(0,i[o])()}},size:function(){return t}}}function x(e){return e._erd}var b={initState:function(e){return e._erd={},x(e)},getState:x,cleanState:function(e){delete e._erd}},w=v.forEach,E=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState,i=e.idHandler;if(!n)throw Error("Missing required dependency: batchProcessor");if(!t)throw Error("Missing required dependency: reporter.");var o=function(){var e=document.createElement("div");e.style.cssText=l(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var t=document.createElement("div");t.style.cssText=l(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,r=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:r}}();function a(e){!function(e,t,n){if(!e.getElementById(t)){var r=n+"_animation",i=n+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+n+" > div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",o+="."+i+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",o+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");i.innerHTML=n,i.id=t,r(i)}(o+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style","erd_scroll_detection_container")}function l(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function c(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function u(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function s(e){return r(e).container.childNodes[0].childNodes[0].childNodes[0]}function d(e){return r(e).container.childNodes[0].childNodes[0].childNodes[1]}return a(window.document),{makeDetectable:function(e,a,u){function f(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(i.get(a),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;n.length>r;r++)t.log(n[r])}}function h(e){var t=r(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function v(){var e=window.getComputedStyle(a),t={};return t.position=e.position,t.width=a.offsetWidth,t.height=a.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function p(){if(f("storeStyle invoked."),r(a)){var e=v();r(a).style=e}else f("Aborting because element has been uninstalled")}function m(e,t,n){r(e).lastWidth=t,r(e).lastHeight=n}function y(){return 2*o.width+1}function g(){return 2*o.height+1}function x(e){return e+10+y()}function b(e){return e+10+g()}function E(e,t,n){var r=s(e),i=d(e),o=x(t),a=b(n),l=function(e){return 2*e+y()}(t),c=function(e){return 2*e+g()}(n);r.scrollLeft=o,r.scrollTop=a,i.scrollLeft=l,i.scrollTop=c}function z(){var e=r(a).container;if(!e){(e=document.createElement("div")).className="erd_scroll_detection_container",e.style.cssText=l(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),r(a).container=e,function(e){e.className+=" erd_scroll_detection_container_animation_active"}(e),a.appendChild(e);var t=function(){r(a).onRendered&&r(a).onRendered()};c(e,"animationstart",t),r(a).onAnimationStart=t}return e}function S(){if(f("Injecting elements"),r(a)){!function(){var n=r(a).style;if("static"===n.position){a.style.setProperty("position","relative",e.important?"important":"");var i=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};i(t,a,n,"top"),i(t,a,n,"right"),i(t,a,n,"bottom"),i(t,a,n,"left")}}();var n=r(a).container;n||(n=z());var i,u,s,d,h=o.width,v=o.height,p=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),m=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(i=(i=-(1+h))?i+"px":"0"),"top: "+(u=(u=-(1+v))?u+"px":"0"),"right: "+(d=(d=-h)?d+"px":"0"),"bottom: "+(s=(s=-v)?s+"px":"0")])),y=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),g=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),x=l(["position: absolute","left: 0","top: 0"]),b=l(["position: absolute","width: 200%","height: 200%"]),w=document.createElement("div"),E=document.createElement("div"),S=document.createElement("div"),I=document.createElement("div"),M=document.createElement("div"),C=document.createElement("div");w.dir="ltr",w.style.cssText=p,w.className="erd_scroll_detection_container",E.className="erd_scroll_detection_container",E.style.cssText=m,S.style.cssText=y,I.style.cssText=x,M.style.cssText=g,C.style.cssText=b,S.appendChild(I),M.appendChild(C),E.appendChild(S),E.appendChild(M),w.appendChild(E),n.appendChild(w),c(S,"scroll",T),c(M,"scroll",O),r(a).onExpandScroll=T,r(a).onShrinkScroll=O}else f("Aborting because element has been uninstalled");function T(){r(a).onExpand&&r(a).onExpand()}function O(){r(a).onShrink&&r(a).onShrink()}}function I(){function o(t,n,r){var i=function(e){return s(e).childNodes[0]}(t),o=x(n),a=b(r);i.style.setProperty("width",o+"px",e.important?"important":""),i.style.setProperty("height",a+"px",e.important?"important":"")}function l(l){var u=a.offsetWidth,s=a.offsetHeight,d=u!==r(a).lastWidth||s!==r(a).lastHeight;f("Storing current size",u,s),m(a,u,s),n.add(0,(function(){if(d)if(r(a))if(c()){if(e.debug)a.offsetWidth===u&&a.offsetHeight===s||t.warn(i.get(a),"Scroll: Size changed before updating detector elements.");o(a,u,s)}else f("Aborting because element container has not been initialized");else f("Aborting because element has been uninstalled")})),n.add(1,(function(){r(a)?c()?E(a,u,s):f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")})),d&&l&&n.add(2,(function(){r(a)?c()?l():f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")}))}function c(){return!!r(a).container}function u(){f("notifyListenersIfNeeded invoked");var e=r(a);return void 0===r(a).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?f("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?f("Not notifying: Size already notified"):(f("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void w(r(a).listeners,(function(e){e(a)})))}function v(){f("Scroll detected."),h(a)?f("Scroll event fired while unrendered. Ignoring..."):l(u)}if(f("registerListenersAndPositionElements invoked."),r(a)){r(a).onRendered=function(){if(f("startanimation triggered."),h(a))f("Ignoring since element is still unrendered...");else{f("Element rendered.");var e=s(a),t=d(a);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(f("Scrollbars out of sync. Updating detector elements..."),l(u))}},r(a).onExpand=v,r(a).onShrink=v;var p=r(a).style;o(a,p.width,p.height)}else f("Aborting because element has been uninstalled")}function M(){if(f("finalizeDomMutation invoked."),r(a)){var e=r(a).style;m(a,e.width,e.height),E(a,e.width,e.height)}else f("Aborting because element has been uninstalled")}function C(){u(a)}function T(){var e;f("Installing..."),r(a).listeners=[],e=v(),r(a).startSize={width:e.width,height:e.height},f("Element start size",r(a).startSize),n.add(0,p),n.add(1,S),n.add(2,I),n.add(3,M),n.add(4,C)}u||(u=a,a=e,e=null),e=e||{},f("Making detectable..."),!function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===window.getComputedStyle(e)}(a)?T():(f("Element is detached"),z(),f("Waiting until element is attached..."),r(a).onRendered=function(){f("Element is now attached"),T()})},addListener:function(e,t){if(!r(e).listeners.push)throw Error("Cannot add listener to an element that is not detectable.");r(e).listeners.push(t)},uninstall:function(e){var t=r(e);t&&(t.onExpandScroll&&u(s(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&u(d(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&u(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:a}},z=v.forEach;function S(e){return Array.isArray(e)||void 0!==e.length}function I(e){if(Array.isArray(e))return e;var t=[];return z(e,(function(e){t.push(e)})),t}function M(e){return e&&1===e.nodeType}function C(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}var T=null;"undefined"!=typeof window&&(T=function(e){var t,n;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var r=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var r=n(e);if(!r)throw Error("setId required the element to have a resize detection state.");var i=t.generate();return r.id=i,i}}}({idGenerator:(n=1,{generate:function(){return n++}}),stateHandler:b});t=r}var i=e.reporter;i||(i=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var r=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;arguments.length>n;n++)e(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n}(!1===i));var o=C(e,"batchProcessor",y({reporter:i})),a={};a.callOnAdd=!!C(e,"callOnAdd",!0),a.debug=!!C(e,"debug",!1);var l,c=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;o>i;++i)if(r[i]===t){r.splice(i,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}}(t),u=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}({stateHandler:b}),s=C(e,"strategy","object"),d=C(e,"important",!1),f={reporter:i,batchProcessor:o,stateHandler:b,idHandler:t,important:d};if("scroll"===s&&(p.isLegacyOpera()?(i.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),s="object"):p.isIE(9)&&(i.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),s="object")),"scroll"===s)l=E(f);else{if("object"!==s)throw Error("Invalid strategy name: "+s);l=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState;if(!t)throw Error("Missing required dependency: reporter.");function i(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function o(e){return r(e).object}return{makeDetectable:function(e,o,a){a||(a=o,o=e,e=null),e=e||{},p.isIE(8)?a(o):function(o,a){var l=i(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),c=!1,u=window.getComputedStyle(o),s=o.offsetWidth,d=o.offsetHeight;function f(){function n(){if("static"===u.position){o.style.setProperty("position","relative",e.important?"important":"");var n=function(t,n,r,i){var o=r[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",n),n.style.setProperty(i,"0",e.important?"important":""))};n(t,o,u,"top"),n(t,o,u,"right"),n(t,o,u,"bottom"),n(t,o,u,"left")}}""!==u.position&&(n(),c=!0);var i=document.createElement("object");i.style.cssText=l,i.tabIndex=-1,i.type="text/html",i.setAttribute("aria-hidden","true"),i.onload=function(){c||n(),function e(t,n){if(!t.contentDocument){var i=r(t);return i.checkForObjectDocumentTimeoutId&&window.clearTimeout(i.checkForObjectDocumentTimeoutId),void(i.checkForObjectDocumentTimeoutId=setTimeout((function(){i.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){a(o)}))},p.isIE()||(i.data="about:blank"),r(o)&&(o.appendChild(i),r(o).object=i,p.isIE()&&(i.data="about:blank"))}r(o).startSize={width:s,height:d},n?n.add(f):f()}(o,a)},addListener:function(e,t){function n(){t(e)}if(p.isIE(8))r(e).object={proxy:n},e.attachEvent("onresize",n);else{var i=o(e);if(!i)throw Error("Element is not detectable by this strategy.");i.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(e){if(r(e)){var t=o(e);t&&(p.isIE(8)?e.detachEvent("onresize",t.proxy):e.removeChild(t),r(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(e).checkForObjectDocumentTimeoutId),delete r(e).object)}}}}(f)}var h={};return{listenTo:function(e,n,r){function o(e){var t=c.get(e);z(t,(function(t){t(e)}))}function s(e,t,n){c.add(t,n),e&&n(t)}if(r||(r=n,n=e,e={}),!n)throw Error("At least one element required.");if(!r)throw Error("Listener required.");if(M(n))n=[n];else{if(!S(n))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=I(n)}var f=0,v=C(e,"callOnAdd",a.callOnAdd),p=C(e,"onReady",(function(){})),m=C(e,"debug",a.debug);z(n,(function(e){b.getState(e)||(b.initState(e),t.set(e));var a=t.get(e);if(m&&i.log("Attaching listener to element",a,e),!u.isDetectable(e))return m&&i.log(a,"Not detectable."),u.isBusy(e)?(m&&i.log(a,"System busy making it detectable"),s(v,e,r),h[a]=h[a]||[],void h[a].push((function(){++f===n.length&&p()}))):(m&&i.log(a,"Making detectable..."),u.markBusy(e,!0),l.makeDetectable({debug:m,important:d},e,(function(e){if(m&&i.log(a,"onElementDetectable"),b.getState(e)){u.markAsDetectable(e),u.markBusy(e,!1),l.addListener(e,o),s(v,e,r);var t=b.getState(e);if(t&&t.startSize)t.startSize.width===e.offsetWidth&&t.startSize.height===e.offsetHeight||o(e);h[a]&&z(h[a],(function(e){e()}))}else m&&i.log(a,"Element uninstalled before being detectable.");delete h[a],++f===n.length&&p()})));m&&i.log(a,"Already detecable, adding listener."),s(v,e,r),f++})),f===n.length&&p()},removeListener:c.removeListener,removeAllListeners:c.removeAllListeners,uninstall:function(e){if(!e)return i.error("At least one element is required.");if(M(e))e=[e];else{if(!S(e))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=I(e)}z(e,(function(e){c.removeAllListeners(e),l.uninstall(e),b.cleanState(e)}))},initDocument:function(e){l.initDocument&&l.initDocument(e)}}}({strategy:"scroll"}));var O=T;function R(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}function k(e){return!isNaN(parseFloat(e))&&isFinite(e)}function D(e){var o=e.width,a=e.height,u=e.onResize,s=e.children,d=i(e,["width","height","onResize","children"]),f=t.useState(null),h=f[0],v=f[1],p=c(h).current,m=t.useRef(),y=k(o)&&k(a),g=t.useRef({}),x=t.useRef({calculateSize:function(){var e=m.current,t={width:e.offsetWidth,height:e.offsetHeight};v((function(e){return R(e,t)?e:t}))}});g.current.onResize=u,t.useMemo((function(){var e=null;y&&(e={width:o,height:a}),v((function(t){return R(t,e)?t:e}))}),[y,o,a]),l((function(){p!==h&&h&&g.current.onResize(h)}),[h]),t.useEffect((function(){if(!y&&(x.current.calculateSize(),O)){var e=m.current;return O.listenTo(e,(function(){x.current.calculateSize()})),function(){O.uninstall(e)}}}),[y]);var b=t.useMemo((function(){var e={width:"100%",height:"100%"};return k(o)&&(e.width=o),k(a)&&(e.height=a),d.style&&Object.assign(e,d.style),e}),[o,a,d.style]);return d.style=b,n.createElement("div",r({},d,{ref:m}),h?"function"==typeof s?s(h):s:null)}function P(e,t){if(t){return Math.max(-2.5,Math.min(e["y"===t?"y":"x"],2.5))}var n={x:P(e,"x"),y:P(e,"y")};return n.x===e.x&&n.y===e.y?e:n}function A(e,t,n,r,i,o){if(o){var a="y"===o?["y","height"]:["x","width"],l=a[0],c=a[1],u=t[c],s=e[l];if(r[l])return s;var d=Math.min(u-n[c],0);return i&&u>0&&(d=u*Math.ceil(d/u)),Math.max(d,Math.min(s,0))}var f={x:A(e,t,n,r,i,"x"),y:A(e,t,n,r,i,"y")};return f.x===e.x&&f.y===e.y?e:f}function L(e,t,n,r,i,o){if(o){var a="y"===o?["y","height"]:["x","width"],l=a[0],c=a[1],u=e[l],s=t[l];if(r&&n[c]>0){var d=u/n[c];u=n[c]*(d=s>.5?Math.ceil(d):-.5>s?Math.floor(d):Math.round(d))}else i[l]&&(u+=.5*s*(s/i[l]));return u}return"object"!=typeof i&&(i=function(e,t){var n=t.x,r=t.y,i=Math.sqrt(n*n+r*r);return 0===i?{x:0,y:0}:{x:e*(n/i),y:e*(r/i)}}(i,t)),{x:L(e,t,n,r,i,"x"),y:L(e,t,n,r,i,"y")}}function j(e,t,n,r){var i=(new Date).getTime(),o=0;if(!t)return{endOffset:e,rate:t,duration:o,startTime:i};var a,l={x:e.x-n.x,y:e.y-n.y},c=Math.sqrt(Math.pow(l.x,2)+Math.pow(l.y,2));if(c){var u=Math.sqrt(.5*Math.pow(a=(r.x*l.x+r.y*l.y)/c,2)+t*c),s=(u-a)/t;0>s&&(u=a,s=0),o=s+u/t}else a=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),o=(Math.sqrt(2)+1)*a/t;return{endOffset:e,rate:t,duration:o,startTime:i,points:{x:[n.x,n.x+r.x*(o/3),e.x,e.x],y:[n.y,n.y+r.y*(o/3),e.y,e.y]}}}D.defaultProps={width:null,height:null,onResize:function(){}};var B={contentOffset:{x:0,y:0},contentVelocity:{x:0,y:0},drag:null,deceleration:null,size:{width:0,height:0},contentSize:{width:0,height:0},pannable:o,alwaysBounce:{x:!0,y:!0},isBoundless:{x:!1,y:!1},pagingEnabled:!1,directionalLockEnabled:!1};function H(e,t){switch(t.type){case"syncProps":return _(function(e,t){return r({},e,t.props)}(e,t));case"dragStart":return function(e,t){var n=e.contentOffset,i=e.pannable.velocity,o={x:1,y:1};e.directionalLockEnabled&&(Math.abs(i.x)>Math.abs(i.y)?o.y=0:o.x=0);return r({},e,{contentVelocity:{x:o.x*i.x,y:o.y*i.y},drag:{direction:o,startOffset:n},deceleration:null})}(e);case"dragMove":return function(e,t){var n=e.contentOffset,i=e.drag,o=e.pannable,a=o.translation,l=o.interval,c={x:i.startOffset.x+i.direction.x*a.x,y:i.startOffset.y+i.direction.y*a.y};return c=function e(t,n,r,i,o,a){if(a){var l="y"===a?["y","height","width"]:["x","width","height"],c=l[0],u=l[1],s=l[2],d=t[c],f=n[c];if(r[c])return d;var h=Math.min(i[u]-o[u],0),v=.5*Math.min(i[u],i[s]);return d>0?f?v*(1-v/(v+d)):0:h>d?f?h-v*(1-v/(v-d+h)):h:d}var p={x:e(t,n,r,i,o,"x"),y:e(t,n,r,i,o,"y")};return p.x===t.x&&p.y===t.y?t:p}(c,e.alwaysBounce,e.isBoundless,e.size,e.contentSize),r({},e,{contentOffset:c,contentVelocity:{x:(c.x-n.x)/l,y:(c.y-n.y)/l}})}(e);case"dragEnd":return function(e,t){var n=e.contentOffset,i=e.size,o=e.pagingEnabled,a=o?.025:.0025,l=P(e.contentVelocity),c=L(n,l,i,o,a);return r({},e,{contentVelocity:l,drag:null,deceleration:j(c,a,n,l)})}(e);case"dragCancel":return function(e,t){var n=e.contentOffset,i=e.drag,o=e.size,a=e.pagingEnabled,l=P(e.contentVelocity),c=L(i.startOffset,{x:0,y:0},o,a,.025);return r({},e,{contentVelocity:l,drag:null,deceleration:j(c,.025,n,l)})}(e);case"decelerate":return _(function(e,t){var n=e.deceleration;if(!n)return e;var i=function e(t,n,i){var o=t.duration,a=t.startTime,l=t.endOffset;if(i){var c,u=("y"===i?["y"]:["x"])[0],s=t.points[u],d=s[0],f=s[1],h=s[2],v=s[3],p=d-3*(d-f)*n+3*(d-2*f+h)*Math.pow(n,2)-(d-3*f+3*h-v)*Math.pow(n,3),m=(-3*(d-f)+6*(d-2*f+h)*n-3*(d-3*f+3*h-v)*Math.pow(n,2))/o;return(c={})[u+"Offset"]=p,c[u+"Velocity"]=m,c}var y=(new Date).getTime();if(n=1,o>0&&(n=(y-a)/o),0>n||n>=1)return{offset:l,velocity:{x:0,y:0},didEnd:!0};var g=r({},e(t,n,"x"),e(t,n,"y"));return{offset:{x:g.xOffset,y:g.yOffset},velocity:{x:g.xVelocity,y:g.yVelocity},didEnd:!1}}(n);return r({},e,{contentOffset:i.offset,contentVelocity:i.velocity,drag:null,deceleration:i.didEnd?null:n})}(e));case"scrollTo":return _(function(e,t){var n=e.contentOffset,i=e.size,o=t.value,a=o.offset,l=void 0===a?{x:0,y:0}:a,c=o.point,u=o.align,s=o.animated,d=o.rect,f=!e.drag&&s;d||(d=c?r({},c,{width:0,height:0}):{x:-l.x,y:-l.y,width:0,height:0});var h=function e(t,n,r,i,o){if(o){var a="y"===o?["y","height"]:["x","width"],l=a[0],c=a[1],u=-t[l],s=n[l],d=i[c]-t[c];if("auto"===s){var f=0>d?-1:1;u+=f*Math.max(0,Math.min(f*(r[l]-u),f*d))}else"start"===s?s=0:"center"===s?s=.5:"end"===s?s=1:("number"!=typeof s||isNaN(s))&&(s=0),u+=s*d;return u}"object"!=typeof n&&(n={x:n,y:n});return{x:e(t,n,r,i,"x"),y:e(t,n,r,i,"y")}}(d,u,n,i);return function(e,t){var n=e.contentOffset,i=e.contentVelocity,o=e.drag,a=e.deceleration,l=e.size,c=e.pagingEnabled,u=t.offset;if(!t.animated){if(o)return r({},e,{contentOffset:u,drag:r({},o,{startOffset:{x:o.startOffset.x+u.x-n.x,y:o.startOffset.y+u.y-n.y}}),deceleration:null});if(a){var s=L({x:a.endOffset.x+u.x-n.x,y:a.endOffset.y+u.y-n.y},{x:0,y:0},l,c,a.rate);return r({},e,{contentOffset:u,drag:null,deceleration:j(s,a.rate,u,i)})}return r({},e,{contentOffset:u})}var d=L(u,{x:0,y:0},l,c,.025);return r({},e,{drag:null,deceleration:j(d,.025,n,i)})}(e,{type:"setContentOffset",offset:h,animated:f})}(e,t));default:return e}}function _(e,t){var n=e.contentOffset,i=e.contentVelocity,o=e.drag,a=e.deceleration,l=e.size,c=e.contentSize,u=e.pagingEnabled,s=e.alwaysBounce,d=e.isBoundless;if(a){var f=a.endOffset,h=A(n,l,c,d,u);if(f!==A(f,l,c,d,u)&&n!==h){var v=n,p=P(i);return s.x||(p=r({},p,{x:0}),v=r({},v,{x:h.x})),s.y||(p=r({},p,{y:0}),v=r({},v,{y:h.y})),.025!==a.rate&&(f=L(v,p,l,u,.025)),r({},e,{contentOffset:v,contentVelocity:p,drag:null,deceleration:j(f=A(f,l,c,d,u),.025,v,p)})}}else if(!o){var m=L(n,i,l,u,.025);if((m=A(m,l,c,d,u)).x!==n.x||m.y!==n.y)return r({},e,{drag:null,deceleration:j(m,.025,n,i)})}return e}var W=n.createContext({width:null,height:null,visibleRect:{top:0,left:0,width:0,height:0},onResize:function(){}}),N=function(){},F=function(){};if("undefined"!=typeof window){N=window.requestAnimationFrame,F=window.cancelAnimationFrame;for(var q=["ms","moz","webkit","o"],V=0,X=0;4>X&&!N;++X)N=window[q[X]+"RequestAnimationFrame"],F=window[q[X]+"CancelAnimationFrame"]||window[q[X]+"CancelRequestAnimationFrame"];N||(N=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-V)),r=window.setTimeout((function(){e(t+n)}),n);return V=t+n,r},F=function(e){clearTimeout(e)})}var Y={position:"absolute",top:0,left:0,right:0,bottom:0};function G(e){var r=e.pannable,i=e.size,o=e.pagingEnabled,a=e.directionalLockEnabled,s=e.alwaysBounce,d=e.isBoundless,f=e.onScroll,h=e.onDragStart,v=e.onDragEnd,p=e.onDecelerationStart,m=e.onDecelerationEnd,y=e.onContentResize,g=e.renderBackground,x=e.renderOverlay,b=e.scrollTo,w=e.children,E=t.useReducer(H,B),z=E[0],S=E[1],I=c(z).current,M=t.useRef({_scrollTo:function(e){S({type:"scrollTo",value:e})}}),C=t.useRef({onPadContentResize:function(e){S({type:"syncProps",props:{contentSize:e}})}});C.current.onScroll=f,C.current.onDragStart=h,C.current.onDragEnd=v,C.current.onDecelerationStart=p,C.current.onDecelerationEnd=m,C.current.onContentResize=y,t.useMemo((function(){S({type:"syncProps",props:{size:i,pannable:r,alwaysBounce:s,isBoundless:d,pagingEnabled:o,directionalLockEnabled:a}})}),[i,r,s,d,o,a]),l((function(){I.pannable.translation!==z.pannable.translation&&S(z.pannable.translation?I.pannable.translation?{type:"dragMove"}:{type:"dragStart"}:z.pannable.enabled?{type:"dragEnd"}:{type:"dragCancel"}),I.contentSize!==z.contentSize&&C.current.onContentResize(z.contentSize);var e={size:z.size,contentSize:z.contentSize,contentOffset:z.contentOffset,contentVelocity:z.contentVelocity,dragging:!!z.drag,decelerating:!!z.deceleration};if(I.contentOffset!==z.contentOffset&&C.current.onScroll(e),I.drag!==z.drag&&(I.drag?z.drag||C.current.onDragEnd(e):C.current.onDragStart(e)),I.deceleration!==z.deceleration&&(I.deceleration?z.deceleration||C.current.onDecelerationEnd(e):C.current.onDecelerationStart(e)),z.deceleration){var t=N((function(){S({type:"decelerate"})}));return function(){F(t)}}}),[z]),t.useEffect((function(){b&&M.current._scrollTo(b)}),[b]);var T=g(z,M.current);null!==T&&(T=n.createElement("div",{style:Y},T));var O=x(z,M.current),R="function"==typeof w?w(z,M.current):w,k=t.useMemo((function(){return u.create({position:"absolute",overflow:"hidden",willChange:"transform",transformTranslate:z.contentOffset,width:z.contentSize.width,height:z.contentSize.height})}),[z.contentSize,z.contentOffset]),D=t.useMemo((function(){return{visibleRect:{x:-z.contentOffset.x,y:-z.contentOffset.y,width:z.size.width,height:z.size.height},onResize:C.current.onPadContentResize}}),[z.contentOffset,z.size]);return n.createElement(n.Fragment,null,T,n.createElement("div",{style:k},n.createElement(W.Provider,{value:D},R)),O)}var U=r({width:0,height:0,pagingEnabled:!1,directionalLockEnabled:!1,alwaysBounceX:!0,alwaysBounceY:!0,isBoundlessX:!1,isBoundlessY:!1,onScroll:function(){},onDragStart:function(){},onDragEnd:function(){},onDecelerationStart:function(){},onDecelerationEnd:function(){},onContentResize:function(){},renderBackground:function(){return null},renderOverlay:function(){return null},scrollTo:null},f.defaultProps);function J(e){var r=e.width,o=e.height,a=e.pagingEnabled,l=e.directionalLockEnabled,c=e.alwaysBounceX,u=e.alwaysBounceY,s=e.isBoundlessX,d=e.isBoundlessY,h=e.onScroll,v=e.onDragStart,p=e.onDragEnd,m=e.onDecelerationStart,y=e.onDecelerationEnd,g=e.onContentResize,x=e.renderBackground,b=e.renderOverlay,w=e.scrollTo,E=e.children,z=i(e,["width","height","pagingEnabled","directionalLockEnabled","alwaysBounceX","alwaysBounceY","isBoundlessX","isBoundlessY","onScroll","onDragStart","onDragEnd","onDecelerationStart","onDecelerationEnd","onContentResize","renderBackground","renderOverlay","scrollTo","children"]),S=t.useMemo((function(){return{width:r,height:o}}),[r,o]),I=t.useMemo((function(){return{x:c,y:u}}),[c,u]),M=t.useMemo((function(){return{x:s,y:d}}),[s,d]),C=t.useRef(),T=t.useRef({});T.current.shouldStart=z.shouldStart;var O=t.useCallback((function(e){var t=C.current;return!!t&&(!!function(e,t,n){var r=Math.abs(e.x)>Math.abs(e.y)?"width":"height";return n[r]>t[r]}(e.velocity,t.size,t.contentSize)&&T.current.shouldStart(e))}),[]),R=t.useMemo((function(){var e={overflow:"hidden",position:"relative",width:S.width,height:S.height};return z.style&&Object.assign(e,z.style),e}),[S,z.style]);return z.shouldStart=O,z.style=R,n.createElement(f,z,(function(e){return n.createElement(G,{pannable:e,size:S,pagingEnabled:a,directionalLockEnabled:l,alwaysBounce:I,isBoundless:M,onScroll:h,onDragStart:v,onDragEnd:p,onDecelerationStart:m,onDecelerationEnd:y,onContentResize:g,renderBackground:x,renderOverlay:b,scrollTo:w},(function(e,t){return C.current=e,"function"==typeof E?E(e,t):E}))}))}function K(e,t,n){if(!t)return t;if(n){var i,o="y"===n?["y","height"]:["x","width"],a=o[0],l=o[1];return(i={})[a]=t[a]-e[a],i[l]=t[l],i}return r({},K(e,t,"x"),K(e,t,"y"))}function Q(e,t,n){if(!t)return!0;if(n){var r="y"===n?["y","height"]:["x","width"],i=r[0],o=r[1];return e[i]+e[o]>=t[i]-.25*t[o]&&t[i]+1.25*t[o]>=e[i]}return Q(e,t,"x")&&Q(e,t,"y")}function Z(){}function $(){}J.defaultProps=U;function ee(e){var o=t.useContext(W),a=e.width,u=e.height,s=e.direction,d=e.rowSpacing,f=e.columnSpacing,h=e.itemWidth,v=e.itemHeight,p=e.itemCount,m=e.renderItem,y=e.children,g=i(e,["width","height","direction","rowSpacing","columnSpacing","itemWidth","itemHeight","itemCount","renderItem","children"]),x=k(a)?a:o.width,b=k(u)?u:o.height,w=t.useMemo((function(){return function(e){var t,n,r=e.spacing,i=e.itemSize,o=e.itemCount,a="x"===e.direction?["y","x","height","width","column","row"]:["x","y","width","height","row","column"],l=a[0],c=a[1],u=a[2],s=a[3],d=a[4],f=a[5],h=e.size[u],v=0,p=0,m=0,y=[];"number"!=typeof h?(m=o,0===i[u]?h=0:(h=o*i[u],o>1&&(h+=(o-1)*r[f]))):0===i[u]?m=o:(m=1,h>i[u]&&(m+=Math.floor((h-i[u])/(i[u]+r[f]))));m>0&&(p=Math.ceil(o/m));for(var g=0;p>g;g++){g>0&&(v+=r[d]);for(var x=0;m>x;x++){var b,w,E=x+g*m,z=0;if(m>1&&(z+=Math.round(x*((h-i[u])/(m-1)))),E>=o)break;y.push(((w={rect:(b={},b[l]=z,b[c]=v,b[u]=i[u],b[s]=i[s],b)})[d+"Index"]=g,w[f+"Index"]=x,w.itemIndex=E,w))}v+=i[s]}return{size:(t={},t[u]=h,t[s]=v,t),count:(n={},n[d]=p,n[f]=m,n),layoutList:y}}({direction:s,size:{width:x,height:b},spacing:{row:d,column:f},itemSize:{width:h,height:v},itemCount:p})}),[s,x,b,d,f,h,v,p]),E=c(w).current,z=t.useRef({});z.current.onResize=o.onResize,l((function(){E.size!==w.size&&R(E.size,w.size)||z.current.onResize(w.size)}),[w.size]);var S=w.layoutList.map((function(e){return function(e){var t=e.rect,i=e.itemIndex,a=e.visibleRect,l=e.needsRender,c=e.Item,u=!1,s=m(e),d="GridContent_"+i;if(n.isValidElement(s)&&s.type===c&&(void 0!==s.props.forceRender&&(u=s.props.forceRender),s.key&&(d=s.key),s=s.props.children),!l&&!u)return null;var f={position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height};return n.createElement(W.Provider,{key:d,value:r({},o,{width:null,height:null,visibleRect:a,onResize:$})},n.createElement("div",{style:f},s))}(r({},e,{visibleRect:K(e.rect,o.visibleRect),needsRender:Q(e.rect,o.visibleRect),Item:Z}))}));"function"==typeof y&&y(w);var I=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return w.size&&(e.width=w.size.width,e.height=w.size.height),g.style&&Object.assign(e,g.style),e}),[w.size,g.style]);return g.style=I,n.createElement("div",g,S)}function te(){}ee.defaultProps={width:null,height:null,direction:"y",rowSpacing:0,columnSpacing:0,itemWidth:0,itemHeight:0,itemCount:0,renderItem:function(){return null}};function ne(e){var o=t.useContext(W),a=e.width,u=e.height,s=e.direction,d=e.spacing,f=e.estimatedItemWidth,h=e.estimatedItemHeight,v=e.itemCount,p=e.renderItem,m=e.children,y=i(e,["width","height","direction","spacing","estimatedItemWidth","estimatedItemHeight","itemCount","renderItem","children"]),g=k(a)?a:o.width,x=k(u)?u:o.height,b=t.useState([]),w=b[0],E=b[1],z=t.useState({}),S=z[0],I=z[1],M=t.useMemo((function(){return function(e,t,n){var r,i=e.size,o=e.spacing,a=e.estimatedItemSize,l=e.itemCount,c="x"===e.direction?["y","x","height","width"]:["x","y","width","height"],u=c[0],s=c[1],d=c[2],f=c[3],h=0,v=0,p=[],m={};k(i[d])&&(m[d]=i[d]);for(var y=0;l>y;y++){var g,x=t[y]||null,b=n[x]||null,w=((g={})[u]=0,g[s]=v,g);b?Object.assign(w,b):(w[d]=void 0!==m[d]?m[d]:"function"==typeof a[d]?a[d](y):a[d],w[f]="function"==typeof a[f]?a[f](y):a[f]),p.push({rect:w,itemIndex:y,itemHash:x,itemSize:b}),w[f]>0&&(v+=w[f],l-1>y&&(v+=o)),w[d]>h&&(h=w[d])}return{size:(r={},r[d]=void 0!==m[d]?m[d]:h,r[f]=void 0!==m[f]?m[f]:v,r),layoutList:p}}({direction:s,size:{width:g,height:x},spacing:d,estimatedItemSize:{width:f,height:h},itemCount:v},w,S)}),[g,x,s,d,f,h,v,w,S]),C=c(M).current,T=t.useRef({});T.current.onResize=o.onResize,l((function(){C.size!==M.size&&R(C.size,M.size)||T.current.onResize(M.size)}),[M.size]);var O=[];var D=M.layoutList.map((function(e){return function(e){var t,i=e.rect,a=e.itemIndex,l=e.itemSize,c=e.visibleRect,u=e.needsRender,s=e.Item,d=!1,f=p(e),h="ListContent_"+a;n.isValidElement(f)&&f.type===s&&(void 0!==f.props.forceRender&&(d=f.props.forceRender),f.key&&(h=f.key),void 0!==f.props.hash&&(t=f.props.hash),f=f.props.children),void 0===t&&(t=h);var v=!u&&!d;if(l||-1===O.indexOf(t)||(v=!0),O[a]=t,v)return null;var m={position:"absolute",left:i.x,top:i.y,width:i.width,height:i.height};return n.createElement(W.Provider,{key:h,value:r({},o,{width:null,height:null},l,{visibleRect:c,onResize:function(e){I((function(n){var i;return r({},n,((i={})[t]=e,i))}))}})},n.createElement("div",{style:m},f))}(r({},e,{visibleRect:K(e.rect,o.visibleRect),needsRender:Q(e.rect,o.visibleRect),Item:te}))}));(function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(e[n]!==t[n])return!1;return!0})(w,O)||E(O),"function"==typeof m&&m(M);var P=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return M.size&&(e.width=M.size.width,e.height=M.size.height),y.style&&Object.assign(e,y.style),e}),[M.size,y.style]);return y.style=P,n.createElement("div",y,D)}function re(){}ne.defaultProps={width:null,height:null,direction:"y",spacing:0,estimatedItemWidth:0,estimatedItemHeight:0,itemCount:0,renderItem:function(){return null}};var ie={position:"absolute",top:0,left:0};function oe(e){var o=t.useContext(W),a=e.width,u=e.height,s=e.autoResizing,d=e.children,f=i(e,["width","height","autoResizing","children"]),h=k(a)?a:s?null:o.width,v=k(u)?u:s?null:o.height,p=k(h)&&k(v),m=t.useState(null),y=m[0],g=m[1],x=c(y).current,b=t.useRef(null),w=t.useRef({calculateSize:function(){var e=b.current,t={width:e.offsetWidth,height:e.offsetHeight};g((function(e){return R(e,t)?e:t}))}}),E=t.useRef({});E.current.onResize=o.onResize,t.useMemo((function(){var e=null;p&&(e={width:h,height:v}),g((function(t){return R(t,e)?t:e}))}),[p,h,v]),l((function(){x!==y&&y&&E.current.onResize(y)}),[y]),t.useEffect((function(){if(!p&&(w.current.calculateSize(),s&&O)){var e=b.current;return O.listenTo(e,(function(){w.current.calculateSize()})),function(){O.uninstall(e)}}}),[p,s]);var z=t.useMemo((function(){var e={position:"absolute"};return k(h)&&(e.width=h),k(v)&&(e.height=v),e}),[h,v]),S="function"==typeof d?d(y):d;p||(S=n.createElement("div",{style:ie},n.createElement("div",{style:z,ref:b},S)));var I=t.useMemo((function(){var e={position:"relative"};return y&&(e.width=y.width,e.height=y.height),f.style&&Object.assign(e,f.style),e}),[y,f.style]);return f.style=I,n.createElement("div",f,n.createElement(W.Provider,{value:r({},o,{width:null,height:null,onResize:re})},S))}oe.defaultProps={width:null,height:null,autoResizing:!1};var ae={loopCount:2,loopOffset:0,loopWidth:0,scrollTo:null,pad:B,direction:"x"};function le(e,t){switch(t.type){case"syncProps":return function(e,t){var n=e.loopCount,i=e.loopWidth,o=e.loopOffset,a=e.direction,l=e.pad,c=l.size,u=l.contentOffset,s="y"===a?"height":"width",d=l.contentSize[s]/n,f=2;0!==d&&(f+=Math.floor(c[s]/d));if(i!==d||n!==f)return r({},e,{loopCount:f,loopWidth:d});var h=function(e,t,n,r,i){var o;if(1===r||0===n)return[e,0];var a="y"===i?["height","y","x"]:["width","x","y"],l=a[1],c=a[2],u=t[a[0]],s=.5*(u-n*(r-1)),d=.5*(u-n*(r+1)),f=e[l],h=0;if(f>=d&&s>=f)return[e,0];d>f?h=Math.floor((s-f)/n):f>s&&(h=-Math.floor((f-d)/n));return[(o={},o[l]=f+=n*h,o[c]=e[c],o),h]}(u,c,i,n,a),v=h[0],p=h[1];if(u!==v)return r({},e,{loopOffset:o+p,scrollTo:{offset:v,animated:!1}});return e}(function(e,t){return r({},e,t.props)}(e,t));default:return e}}function ce(e){var r=e.pad,i=e.onAdjust,o=e.direction,a=e.children,c=t.useReducer(le,ae),u=c[0],s=c[1],d=t.useRef({});return d.current.onAdjust=i,t.useMemo((function(){s({type:"syncProps",props:{pad:r,direction:o}})}),[r,o]),l((function(){u.scrollTo&&d.current.onAdjust(u.scrollTo)}),[u.scrollTo]),n.createElement(ne,{direction:o,width:u.pad.size.width,height:u.pad.size.height,itemCount:u.loopCount,renderItem:function(e){return n.createElement(e.Item,{key:e.itemIndex+u.loopOffset,hash:"Loop",forceRender:!0},"function"==typeof a?a(u):a)}})}var ue=r({direction:"x"},J.defaultProps,{directionalLockEnabled:!0});function se(e){var t=e.direction,r=e.children,o=i(e,["direction","children"]);return"x"===t?(o.isBoundlessX=!0,o.alwaysBounceY=!1):(o.isBoundlessY=!0,o.alwaysBounceX=!1),n.createElement(J,o,(function(e,i){return n.createElement(ce,{pad:e,onAdjust:i._scrollTo,direction:t,children:r})}))}se.defaultProps=ue;var de={activeIndex:0,scrollTo:null,pad:B,direction:"x",loop:!0,itemCount:0};function fe(e,t){switch(t.type){case"syncProps":return function(e,t){var n=e.activeIndex,i=e.pad,o=function(e,t,n,r){var i="y"===r?["height","y"]:["width","x"],o=i[1],a=t[i[0]],l=0;a>0&&(l=Math.round(-e[o]/a));return l%n}(i.contentOffset,i.size,e.itemCount,e.direction);if(n!==o)return r({},e,{activeIndex:o});return e}(function(e,t){return r({},e,t.props)}(e,t));case"scrollToIndex":return he(e,t);case"next":return function(e,t){var n=e.itemCount,r=e.activeIndex+1;e.loop||(r%=n);return he(e,{value:{index:r,animated:t.animated}})}(e,t);default:return e}}function he(e,t){var n=e.activeIndex,i=e.itemCount,o=e.direction,a=e.loop,l=e.pad,c=l.contentOffset,u=l.size,s=t.value.animated,d=t.value.index;return"function"==typeof d&&(d=d({activeIndex:n,itemCount:i})),a||(d=Math.max(0,Math.min(d,i-1))),d===n?e:r({},e,{scrollTo:{offset:function(e,t,n,r){var i,o="y"===r?["height","y","x"]:["width","x","y"],a=o[1],l=o[2];return(i={})[a]=t[a]-e*n[o[0]],i[l]=t[l],i}(d-n,c,u,o),animated:s}})}function ve(e){var r=e.pad,i=e.direction,o=e.loop,a=e.autoplayEnabled,u=e.autoplayInterval,s=e.itemCount,d=e.onActiveIndexChange,f=e.onAdjust,h=e.scrollToIndex,v=e.children,p=t.useReducer(fe,de),m=p[0],y=p[1],g=c(m).current,x=t.useRef({});return x.current.onActiveIndexChange=d,x.current.onAdjust=f,t.useMemo((function(){y({type:"syncProps",props:{pad:r,direction:i,loop:o,itemCount:s}})}),[r,i,o,s]),l((function(){g.activeIndex!==m.activeIndex&&x.current.onActiveIndexChange({activeIndex:m.activeIndex,itemCount:m.itemCount})}),[m]),l((function(){m.scrollTo&&x.current.onAdjust(m.scrollTo)}),[m.scrollTo]),t.useEffect((function(){h&&y({type:"scrollToIndex",value:h})}),[h]),t.useEffect((function(){if(a&&!m.pad.drag&&!m.pad.deceleration){var e=setTimeout((function(){y({type:"next",animated:!0})}),u);return function(){clearTimeout(e)}}}),[a,u,m.pad.drag,m.pad.deceleration]),n.createElement(n.Fragment,null,"function"==typeof v?v(m):v)}var pe=r({direction:"x",loop:!0,autoplayEnabled:!0,autoplayInterval:5e3,itemCount:0,renderItem:function(){return null},onActiveIndexChange:function(){},scrollToIndex:null},J.defaultProps,{pagingEnabled:!0,directionalLockEnabled:!0});function me(e){var o=e.direction,a=e.loop,l=e.autoplayEnabled,c=e.autoplayInterval,u=e.itemCount,s=e.renderItem,d=e.onActiveIndexChange,f=e.scrollToIndex,h=e.children,v=i(e,["direction","loop","autoplayEnabled","autoplayInterval","itemCount","renderItem","onActiveIndexChange","scrollToIndex","children"]),p=v.width,m=v.height,y=v.renderOverlay,g=v.onMouseEnter,x=v.onMouseLeave,b=t.useState(!1),w=b[0],E=b[1],z=t.useRef({onPadMouseEnter:function(e){E(!1),z.current.onMouseEnter&&z.current.onMouseEnter(e)},onPadMouseLeave:function(e){E(!0),z.current.onMouseLeave&&z.current.onMouseLeave(e)}});z.current.onMouseEnter=g,z.current.onMouseLeave=x,t.useMemo((function(){E(l)}),[l]),l&&(v.onMouseEnter=z.current.onPadMouseEnter,v.onMouseLeave=z.current.onPadMouseLeave),v.renderOverlay=function(e,t){return n.createElement(n.Fragment,null,n.createElement(ve,{pad:e,direction:o,loop:a,autoplayEnabled:w,autoplayInterval:c,itemCount:u,onActiveIndexChange:d,onAdjust:t._scrollTo,scrollToIndex:f,children:h}),y(e,t))};var S=n.createElement(ee,{width:p,height:m,itemWidth:p,itemHeight:m,direction:o,itemCount:u,renderItem:s});return a?n.createElement(se,r({direction:o},v),S):("x"===o?v.alwaysBounceY=!1:v.alwaysBounceX=!1,n.createElement(J,v,S))}me.defaultProps=pe;var ye={scroll:null,scrollTo:null,pad:B};function ge(e,t){switch(t.type){case"syncProps":return function(e,t){return r({},e,t.props)}(e,t);case"scrollToIndex":return xe(e,t);case"scrollEnd":return function(e,t){return r({},e,{scroll:null})}(e);case"scrollRecalculate":return function(e,t){var n=t.list,r=e.scroll;if(!r)return e;return xe(e,{value:r,list:n})}(e,t);default:return e}}function xe(e,t){var n=t.value,i=n.index,o=n.align,a=n.animated;return r({},e,{scrollTo:{rect:function(e,t){var n=t.box,r=t.body,i={x:0,y:0,width:0,height:0};n&&(i=n.layoutList[1].rect);if(r){var o=r.layoutList[e=Math.max(0,Math.min(e,r.layoutList.length-1))];i={x:i.x+o.rect.x,y:i.y+o.rect.y,width:o.rect.width,height:o.rect.height}}return i}(i,t.list),align:o,animated:a},scroll:a?{index:i,align:o,animated:a}:null})}function be(e){var r=e.pad,i=e.scrollToIndex,o=e.listRef,a=e.onAdjust,u=e.children,s=t.useReducer(ge,ye),d=s[0],f=s[1],h=c(d).current;return t.useMemo((function(){f({type:"syncProps",props:{pad:r}})}),[r]),l((function(){d.scroll&&(h.pad.contentSize!==d.pad.contentSize&&f({type:"scrollRecalculate",list:o.current}),h.pad.deceleration!==d.pad.deceleration&&(d.pad.deceleration||f({type:"scrollEnd"})))})),l((function(){d.scrollTo&&a(d.scrollTo)}),[d.scrollTo,a]),t.useEffect((function(){i&&f({type:"scrollToIndex",value:i,list:o.current})}),[i,o]),n.createElement(n.Fragment,null,"function"==typeof u?u(d):u)}var we=r({direction:"y",spacing:0,itemCount:0,estimatedItemWidth:0,estimatedItemHeight:0,renderItem:function(){return null},renderHeader:function(){return null},renderFooter:function(){return null},scrollToIndex:null},J.defaultProps,{directionalLockEnabled:!0});function Ee(e){var r=e.direction,o=e.spacing,a=e.itemCount,l=e.estimatedItemWidth,c=e.estimatedItemHeight,u=e.renderItem,s=e.renderHeader,d=e.renderFooter,f=e.scrollToIndex,h=e.children,v=i(e,["direction","spacing","itemCount","estimatedItemWidth","estimatedItemHeight","renderItem","renderHeader","renderFooter","scrollToIndex","children"]),p=v.width,m=v.height,y=v.renderOverlay,g=t.useRef({});return v.renderOverlay=function(e,t){return n.createElement(n.Fragment,null,n.createElement(be,{pad:e,scrollToIndex:f,listRef:g,onAdjust:t._scrollTo,children:h}),y(e,t))},"x"===r?v.alwaysBounceY=!1:v.alwaysBounceX=!1,n.createElement(J,v,n.createElement(ne,{width:p,height:m,direction:r,itemCount:3,renderItem:function(e){var t=e.itemIndex,i=e.Item;return 0===t?s(e):2===t?d(e):n.createElement(i,{forceRender:!0},n.createElement(ne,{width:p,height:m,direction:r,spacing:o,itemCount:a,estimatedItemWidth:l,estimatedItemHeight:c,renderItem:u},(function(e){g.current.body=e})))}},(function(e){g.current.box=e})))}Ee.defaultProps=we,e.AutoResizing=D,e.Carousel=me,e.GridContent=ee,e.Infinite=Ee,e.ItemContent=oe,e.ListContent=ne,e.Loop=se,e.Pad=J,e.PadContext=W,e.Pannable=f,Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -113,3 +113,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";

var onTouchEnd = function onTouchEnd(evt) {
evt.preventDefault();
if (isMoving && evt.cancelable) {
evt.preventDefault();
}
end();

@@ -143,3 +146,6 @@ };

var onMouseUp = function onMouseUp(evt) {
evt.preventDefault();
if (isMoving) {
evt.preventDefault();
}
end();

@@ -146,0 +152,0 @@ };

@@ -130,3 +130,6 @@ "use strict";

var onTouchEnd = function onTouchEnd(evt) {
evt.preventDefault();
if (isMoving && evt.cancelable) {
evt.preventDefault();
}
end();

@@ -160,3 +163,6 @@ };

var onMouseUp = function onMouseUp(evt) {
evt.preventDefault();
if (isMoving) {
evt.preventDefault();
}
end();

@@ -163,0 +169,0 @@ };

{
"name": "react-pannable",
"version": "4.0.0",
"version": "4.0.1",
"description": "Flexible and Customizable Layouts for Scrolling Content with React",

@@ -5,0 +5,0 @@ "keywords": [

@@ -22,4 +22,2 @@ # react-pannable

- [`<Player />`](/packages/pannable/docs/player.md) - Used to manage the playback of the paging content
#### [`<Pad />`](/packages/pannable/docs/pad.md) - Handles scrolling of content

@@ -26,0 +24,0 @@

@@ -100,3 +100,5 @@ import React, { useMemo, useCallback, useRef, useReducer } from 'react';

const onTouchEnd = evt => {
evt.preventDefault();
if (isMoving && evt.cancelable) {
evt.preventDefault();
}

@@ -140,3 +142,5 @@ end();

const onMouseUp = evt => {
evt.preventDefault();
if (isMoving) {
evt.preventDefault();
}

@@ -143,0 +147,0 @@ end();

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc