System.register(["../internal/math.cjs.js"],function(_export,_context){"use strict";var t;function n(t){return"nile-carousel-item"===t.tagName.toLowerCase();}function e(t,n){if(!t.length||!n)return null;var e=n.getBoundingClientRect();var r=null,o=0;return t.forEach(function(t){var n=t.getBoundingClientRect(),s=Math.max(0,Math.min(n.right,e.right)-Math.max(n.left,e.left));s>o&&(o=s,r=t);}),r;}function r(t,n,e){var r=(t-n)/e+1;return Math.ceil(r);}function o(t,n){return Math.floor(t/n);}function s(t,n){var e=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;return!!e||t<n-1;}function i(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;return!!n||t>0;}function u(t,n){return(t+n)%n==0;}function a(t,n){var e=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"smooth";var r=arguments.length>3?arguments[3]:undefined;r(!0),window.requestAnimationFrame(function(){if(!n)return;var o=n.getBoundingClientRect(),s=t.getBoundingClientRect(),i=s.left-o.left,u=s.top-o.top;if(i||u){var _t=(a=s,c=o,l=n.scrollLeft,f=n.scrollTop,{left:a.left-c.left+l,top:a.top-c.top+f});r(!0),n.scrollTo({left:_t.left,top:_t.top,behavior:e});}else r(!1);var a,c,l,f;});}function c(n,e,r){var o=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"smooth";var s=arguments.length>4&&arguments[4]!==undefined?arguments[4]:!1;if(!e.length)return null;var i,u;if(s){var _o=e.length;u=(n%_o+_o)%_o,i=t(u,0,e.length-r);}else i=t(n,0,e.length-r),u=t(n,0,e.length-1);return{newActiveSlide:i,slideToScroll:e[u]};}_export({a:o,b:i,c:s,d:c,e:a,f:e,g:r,i:n,s:u});return{setters:[function(_internalMathCjsJs){t=_internalMathCjsJs.c;}],execute:function execute(){}};});
//# sourceMappingURL=carousel-helpers.cjs.js.map
