1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9897,569],{97138:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin-dashboard",function(){return r(34092)}])},94228:function(e,n,r){"use strict";r.d(n,{E:function(){return _}});var t=r(85893),i=r(67294),s=r(41664),a=r.n(s),o=r(11163),c=r(87635),l=r(95861),u=r.n(l);let d=[{label:"Users",href:"/admin-dashboard"},{label:"Negative Keywords",href:"/admin-dashboard/negative-keywords"},{label:"Promo Codes",href:"/admin-dashboard/promo-codes"}];var _=(0,i.memo)(function(){let e=(0,o.useRouter)(),{pathname:n}=e;return(0,t.jsx)("div",{className:u().buttonsGroup,children:d.map(e=>{let{label:r,href:i}=e;return(0,t.jsx)(a(),{href:i,className:(0,c.d)(u().button,n===i&&u().isActive),"aria-label":"Admin dashboard navigation button - ".concat(r),children:r},r)})})})},46940:function(e,n,r){"use strict";r.d(n,{I:function(){return Input}});var t=r(85893),i=r(87635),s=r(98),a=r.n(s);function Input(e){let{isTransparent:n,isSquare:r,customClass:s,className:o,prefix:c,postfix:l,isCleanable:u,readOnly:d,label:_,labelClassName:p,prefixClassName:f,...h}=e,{id:v}=h,b=!!c,x=!!l;return(0,t.jsxs)("div",{className:(0,i.d)(a().inputWrapper,o),children:[_&&(0,t.jsx)("label",{className:(0,i.d)(a().label,p),htmlFor:v,children:_}),b&&(0,t.jsx)("div",{className:(0,i.d)(a().prefix,f),children:c}),(0,t.jsx)("input",{...h,readOnly:d,className:(0,i.d)(a().container,s,n&&a()["container--transparent"],r&&a()["container--square"],b&&a()["container--with-prefix"],x&&a()["container--with-postfix"],u&&a()["container--is-cleanable"],d&&a()["container--readOnly"])}),x&&(0,t.jsx)("div",{className:a().postfix,children:l})]})}},58039:function(e,n,r){"use strict";r.d(n,{$:function(){return c}});var t=r(85893),i=r(67294),s=r(87635),a=r(63002),o=r.n(a),c=(0,i.memo)(function(e){let{height:n="30px",width:r="30px",borderWidth:i="5px",className:a}=e;return(0,t.jsx)("div",{className:(0,s.d)(o().spinner,a),style:{height:n,width:r,borderWidth:i},role:"presentation"})})},6394:function(e,n,r){"use strict";var t=r(67294),i=r(99392),s=r(24496);n.Z=()=>{let e=(0,i.Q)(e=>e.isFreeTrialBannerVisible),n=(0,i.Q)(e=>e.setIsFreeTrialBannerVisible),r=(0,s.D)(e=>e.setWasFreeTrialBannerForcefullyHidden);(0,t.useEffect)(()=>{e&&(n(!1),r(!0))},[e,n,r])}},34092:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSP:function(){return I},default:function(){return AdminDashboard}});var t=r(85893),i=r(67294);function _extends(){return(_extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var useLatest=function(e){var n=(0,i.useRef)(e);return n.current=e,n},useInView=function(e){var n=void 0===e?{}:e,r=n.root,t=n.rootMargin,s=n.threshold,a=void 0===s?0:s,o=n.trackVisibility,c=n.delay,l=n.unobserveOnEnter,u=n.onChange,d=n.onEnter,_=n.onLeave,p=(0,i.useState)({inView:!1,scrollDirection:{}}),f=p[0],h=p[1],v=(0,i.useRef)(!1),b=(0,i.useRef)({}),x=(0,i.useRef)(),m=(0,i.useRef)(!1),y=useLatest(u),w=useLatest(d),g=useLatest(_),j=(0,i.useRef)(),N=(0,i.useCallback)(function(){x.current&&(x.current.disconnect(),b.current={})},[]),A=(0,i.useCallback)(function(e){e&&e!==j.current&&(N(),j.current=e),x.current&&j.current&&x.current.observe(j.current)},[N]),I=(0,i.useCallback)(function(){if(j.current){var e=j.current.getBoundingClientRect(),n=e.x,r=e.y;b.current={x:n,y:r}}},[j]);return(0,i.useEffect)(function(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window))return console.error("\uD83D\uDCA1 react-cool-inview: the browser doesn't support Intersection Observer, please install polyfill: https://github.com/wellyshen/react-cool-inview#intersection-observer-polyfill"),function(){return null};var e=!0;return x.current=new IntersectionObserver(function(n){var r=n[0],t=r.intersectionRatio,i=r.isIntersecting,s=r.boundingClientRect,c=s.x,u=s.y,d=r.isVisible,_={},p=Array.isArray(a)?Math.min.apply(Math,a):a,f=void 0!==i?i:t>0;f=p>0?t>=p:f,c<b.current.x&&(_.horizontal="left"),c>b.current.x&&(_.horizontal="right"),b.current.x=c,u<b.current.y&&(_.vertical="up"),u>b.current.y&&(_.vertical="down"),b.current.y=u;var x={entry:r,scrollDirection:_,observe:A,unobserve:N};o&&(void 0!==d||m.current||(console.warn("\uD83D\uDCA1 react-cool-inview: the browser doesn't support Intersection Observer v2, fallback to v1 behavior"),m.current=!0),void 0!==d&&(f=d)),f&&!v.current&&(l&&N(),w.current&&w.current(x)),!f&&v.current&&g.current&&g.current(x),y.current&&y.current(_extends({},x,{inView:f})),e&&h({inView:f,scrollDirection:_,entry:r}),v.current=f},{root:r,rootMargin:t,threshold:a,trackVisibility:o,delay:c}),A(),function(){e=!1,N()}},[l,r,t,JSON.stringify(a),o,c,A,N]),_extends({},f,{observe:A,unobserve:N,updatePosition:I})},s=r(5152),a=r.n(s),o=r(94228),c=r(46940),l=r(58039),u=r(87635),d=r(9201),_=r.n(d),c
1omponents_UserRow=function(e){let{onClick:n,isUneven:r,email:i,id:s,username:a,role:o}=e;return(0,t.jsxs)("div",{onClick:n,className:(0,u.d)(_().row,r&&_().rowGray),children:[(0,t.jsx)("div",{children:s}),(0,t.jsx)("div",{className:_().isBold,children:a}),(0,t.jsx)("div",{children:i}),(0,t.jsx)("div",{children:o})]})},p=r(88767),f=r(95843),h=r(51339),v=r(84086),b=r(74521),x=r(76891),m=r(6394),y=r(35425),w=r(90410),g=r(35579),j=r(72021),N=r.n(j);let A=a()(async()=>(await Promise.all([r.e(4290),r.e(3272)]).then(r.bind(r,13272))).UserDataModal,{loadableGenerated:{webpack:()=>[13272]}});var I=!0;function AdminDashboard(e){let{userData:n}=e;(0,y.v)(n);let r=g.L.getState(),s=null!=n?n:r,{id:a,subscriber:u,flipperFlags:d}=s,{enableCommunityChallenge:_,enableNsfwGallery:j,enableFlashSales:I}=null!=d?d:{};(0,x.B)(_),(0,m.Z)();let{users:O,hasNextPage:E,fetchNextPage:D,isFetching:R,handleUsersSearch:k}=function(){var e;let n=(0,h.R)(e=>e.searchInput),r=(0,h.R)(e=>e.setSearchInput),{data:t,fetchNextPage:i,hasNextPage:s,isLoading:a,isFetching:o}=(0,p.useInfiniteQuery)(["/users",n],fetchUsers,{getNextPageParam:e=>{let{nextPageParam:n}=e;return n},cacheTime:36e5,staleTime:1/0,keepPreviousData:!0,refetchOnWindowFocus:!1,onError:e=>{(0,b.Eo)("Failed to fetch users"),(0,v.T)(e,"Users")}});async function fetchUsers(e){let{pageParam:r=1}=e,t=await f.h.get("users/?page=".concat(r).concat(n?"&username=".concat(n):"")),{data:i=[],status:s}=t,a=200===s&&20===i.length;return{data:i,nextPageParam:a?r+1:void 0}}let c=function(e,n,r){var t,i=r||{},s=i.noTrailing,a=void 0!==s&&s,o=i.noLeading,c=void 0!==o&&o,l=i.debounceMode,u=void 0===l?void 0:l,d=!1,_=0;function clearExistingTimeout(){t&&clearTimeout(t)}function wrapper(){for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=this,l=Date.now()-_;function exec(){_=Date.now(),n.apply(o,i)}function clear(){t=void 0}!d&&(c||!u||t||exec(),clearExistingTimeout(),void 0===u&&l>e?c?(_=Date.now(),a||(t=setTimeout(u?clear:exec,e))):exec():!0!==a&&(t=setTimeout(u?clear:exec,void 0===u?e-l:e)))}return wrapper.cancel=function(e){var n=(e||{}).upcomingOnly;clearExistingTimeout(),d=!(void 0!==n&&n)},wrapper}(500,e=>{r(e.target.value)},{debounceMode:!1!==(void 0!==(e=({}).atBegin)&&e)}),l=(null==t?void 0:t.pages.flatMap(e=>null==e?void 0:e.data))||[];return{users:l,fetchNextPage:i,hasNextPage:s,isLoading:a,isFetching:o,searchInput:n,handleUsersSearch:c}}(),[C,T]=(0,i.useState)(null),{observe:P}=useInView({rootMargin:"50px",threshold:.5,onEnter:()=>{D()}});return(0,t.jsxs)(w.Z,{title:"Admin Dashboard",className:N().container,userId:a,enableCommunityChallenge:_,enableNsfwGallery:j,enableFlashSales:I,isSubscriber:u,children:[!!C&&(0,t.jsx)(A,{data:C,onClose:()=>T(null)}),(0,t.jsxs)("div",{className:N().wrapper,children:[(0,t.jsx)(o.E,{}),(0,t.jsxs)("div",{className:N().header,children:[(0,t.jsx)("h1",{className:N().title,children:"Admin dashboard / Users"}),(0,t.jsx)(c.I,{placeholder:"Search users",onChange:k,"aria-label":"Search users input"})]}),(0,t.jsxs)("div",{className:N().content,children:[null==O?void 0:O.map((e,n)=>(0,t.jsx)(components_UserRow,{...e,isUneven:n%2!=0,onClick:()=>T(e)},e.id)),E&&(0,t.jsx)("div",{ref:P,className:N().loader,children:R&&(0,t.jsx)(l.$,{})})]})]})]})}},51339:function(e,n,r){"use strict";r.d(n,{R:function(){return s}});var t=r(14671);let i={searchInput:""},s=(0,t.Z)(e=>({...i,resetStore:()=>{e(i)},setSearchInput:n=>e({searchInput:n})}))},95861:function(e){e.exports={buttonsGroup:"style_buttonsGroup__UGBqq",button:"style_button__nsjDF",isActive:"style_isActive__ArrNR"}},98:function(e){e.exports={inputWrapper:"style_inputWrapper__5bDTw",postfix:"style_postfix__Yxssn",prefix:"style_prefix__unAm0",container:"style_container__A9KRu","container--transparent":"style_container--transparent__6Jk_w","container--square":"style_container--square__NPjwx","container--with-postfix":"style_container--with-postfix__tNItP","container--is-cleanable":"style_container--is-cleanable__2H28J","container--readOnly":"style_container--readOnly__yj8mP","footer-input":"style_footer-input__jvL8_",label:"style_label__93_nq"}},63002:function(e){e.exports={spinner:"style_spinner__VUvnz",spin:"style_spin__olFqF"}},9201:function(e){e.exports={row:"style_row__OUCDO",rowGray:"style_rowGray__XxvYN",isBold:"style_isBold__sXJd8"}},72021:function(e){e.exports={container:"Admin-dashboard_container__f8ujN",wrapper:"Admin-dashboard_wrapper__wrIVL",header:"Admin-dashboard_header__GHYk0",title:"Admin-dashboard_title__hLD9B",text:"Admin-dashboard_text__J1dLJ",content:"Admin-dashboard_content__HDpvE",loader:"Admin-dashboard_loader__8AoRw"}}},function(e){e.O(0,[1664,1403,4984,6005,9774,2888,179],function(){return e(e.s=97138)}),_N_E=e.O()}]);
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.