1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1305],{1305:function(e,t,n){n.r(t);var r=n(6042),i=n(9396),l=n(9534),u=n(9815),c=n(7997),a=n(1720),o=n(6246),s=n(3321),v=n(782),f=n(9594),d=n(5778),h=n(7847);t.default=function(e){var t=e.autoplay,n=e.next,p=e.previous,S=e.children,E=e.setActiveCard,C=(e.device,e.activeCar),g=(0,l.Z)(e,["autoplay","next","previous","children","setActiveCard","device","activeCar"]),O=a.default.Children.toArray(S),_=(0,o.Z)(null===O||void 0===O?void 0:O.length,t).ref,W=(0,a.useState)(0),x=W[0],Z=W[1],w=(0,a.useState)([]),y=w[0],A=w[1],L=(0,h.s)();(0,a.useEffect)((function(){C!==x&&E(x)}),[x]),(0,a.useEffect)((function(){C!==x&&Z(C)}),[C]);var m=function(e){return function(){if("previous"===e){var t=x-1;t>=0&&Z(t)}if("next"===e){var n=x+1;n<=(null===O||void 0===O?void 0:O.length)-1&&(Z(n),y.includes(n)||(A((0,u.Z)(y).concat([n])),L(v.w.SHOW_MORE_TOP10_MODELS),(0,f.hR)(d.D.TYP_TOP_10_SHOW_MORE_CLICK)))}}};return(0,c.BX)(s.C5,{className:0===x?"first":x===(null===O||void 0===O?void 0:O.length)-1?"last":void 0,children:[(0,c.tZ)(s.K6,(0,i.Z)((0,r.Z)({ref:_},g),{children:S})),p?(0,c.tZ)(s.a7,{disabled:0===x,onClick:m("previous"),className:"previous",children:p}):null,n?(0,c.tZ)(s.a7,{disabled:x===(null===O||void 0===O?void 0:O.length)-1,onClick:m("next"),className:"next",children:n}):null]})}},6246:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(1720),i=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"),l=function(e,t){var n=Math.pow(10,t||0
1);return Math.round(e*n)/n},u=function(e,t){var n=e-1,u=(0,r.useRef)(null),c=(0,r.useState)(0),a=c[0],o=c[1],s=(0,r.useState)(null),v=s[0],f=s[1],d=(0,r.useState)(null),h=d[0],p=d[1],S=(0,r.useState)(null),E=S[0],C=S[1],g=function(){if(u.current){var e=u.current,t=e.scrollLeft,r=e.scrollWidth-e.clientWidth;if(0!==t)if(t>r){var i=l(100*n/100,0);a!==i&&o(i)}else{var c=l(t/r*100*n/100,0);a!==c&&o(c)}else 0!==a&&o(0)}},O=function(){var e=u.current;if(e){var t=e.scrollWidth>e.clientWidth,n=e.querySelector(":scope > *");if(n){var r=n.offsetWidth,i=e.clientWidth,c=l(i/r,0);h!==t&&p(t),C(c>2?r:null)}}};return(0,r.useEffect)((function(){return u.current&&O(),window.addEventListener("resize",O),function(){window.removeEventListener("resize",O)}}),[null===u||void 0===u?void 0:u.current,h]),(0,r.useEffect)((function(){var e,r=u.current;if(r&&r.addEventListener("scroll",g),t){var i=a+1;e=setInterval((function(){f(i<=n?i:0)}),t)}return function(){r&&r.removeEventListener("scroll",g),clearInterval(e)}}),[a,e]),(0,r.useEffect)((function(){var e=u.current;if(e&&null!==v){var t=e.scrollLeft,r=(e.scrollWidth-e.clientWidth)/n*v,l=v>a?t+E:t-E;i&&(e.style.scrollSnapType="none",setTimeout((function(){e.style.scrollSnapType=""}),500)),e.scroll({left:E?l:r,behavior:"smooth"}),f(null)}}),[v,E]),{ref:u,active:a,setActive:f,hasScroll:h}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.