PageSourceSearch

https://www.active.com/packs/js/2741-7aa31377b71da17f.chunk.js

js active.com collected 2026-09-24 08:30:05 UTC 6,551 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2741],{16295:function(e,l,s){s.r(l),s.d(l,{default:function(){return V}});var a=s(74848),t=s(96540),n=s(13709),r=s.n(n),i=s(90760),u=s(13330),c=s(2714),d=s.n(c),o=s(25483),m=s.n(o),j=s(34723),f=s.n(j),v=s(863),x=e=>{let{baseParams:l}=e,s=(0,t.useRef)(null),[n,r]=(0,t.useState)(!1),{sortHandler:u,sort:c}=(0,v.f)();return(0,t.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&r(!1)};return n?document.addEventListener("click",e):document.removeEventListener("click",e),()=>{document.removeEventListener("click",e)}},[n]),(0,a.jsx)(d(),{ref:s,preAddon:(0,a.jsx)("i",{className:"ic-sort"}),postAddon:(0,a.jsx)("i",{className:n?"ic-angle-up-bold":"ic-angle-down-bold"}),onClick:()=>r(!0),value:c,onChange:e=>{r(!1),u(e)},"aria-label":"ButtonDropdown",className:"sort-dropdown",menuAutoWidth:!1,...(0,i.UZ)({...l,value:c}),children:(0,a.jsxs)(m(),{children:[(0,a.jsx)(f(),{value:"participant_desc",children:"Most popular"}),(0,a.jsx)(f(),{value:"difficultylevel_asc",children:"Difficulty"})]})})},h=s(35408),g=s.n(h),p=s(77522),_=s.n(p),b=s(48964),$=s.n(b),N=s(91935),y=s.n(N),A=s(38051);let{useFiltersCategoriesQuery:C,useFiltersDifficultyQuery:k,useFiltersDurationQuery:L,useFiltersStatusQuery:D}=s(11494).Ay.injectEndpoints({endpoints:e=>({filtersCategories:e.query({query:e=>{let l=(0,A.AB)(e);return`/api/v2/filters/challenge_categories?${l}`}}),filtersDifficulty:e.query({query:e=>{let l=(0,A.AB)(e);return`/api/v2/filters/challenge_difficulty?${l}`}}),filtersDuration:e.query({query:e=>{let l=(0,A.AB)(e);return`/api/v2/filters/challenge_duration?${l}`}}),filtersStatus:e.query({query:e=>{let l=(0,A.AB)(e);return`/api/v2/filters/challenge_status?${l}`}})})});var E=s(93021),z=s.n(E),q=s(71062),w=s.n(q),B=(0,t.memo)(e=>{let{durationList:l}=e;return l.map(e=>{let{name:l,value:s,count:t}=e;return(0,a.jsxs)(w(),{"data-testid":`duration-${l}`,className:"group__item",value:`${s}`,size:"lg",children:[`${l}`," ",`(${t})`]},`${l}`)})}),S=()=>[{name:"All",value:""},{name:"2 weeks",value:"14"},{name:"1 month",value:"30"},{name:"1 year",value:"30"},{name:"1 week",value:"7"}].map(e=>{let{name:l,value:s}=e;return(0,a.jsx)(w(),{className:"group__item",value:`${s}`,size:"lg",children:`${l}`},`${l}`)}),F=()=>{let{durationUpdateHandler:e,duration:l,params:s}=(0,v.f)(),{data:t=[],isLoading:n,isFetching:r}=L(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"sub-title",children:"Duration"}),(0,a.jsx)(z(),{disabled:r,name:"duration",className:"group",value:l,onChange:e,children:n?(0,a.jsx)(S,{}):(0,a.jsx)(B,{durationList:t})})]})},O=(0,t.memo)(e=>{let{difficultyList:l}=e;return l.map(e=>{let{name:l,value:s,count:t}=e;return(0,a.jsxs)(w(),{"data-testid":`difficulty-${l}`,className:"group__item",value:`${s}`,size:"lg",children:[`${l}`," ",`(${t})`]},`${l}`)})}),U=()=>[{name:"All",value:""},{name:"Starter",value:"1"},{name:"Medium",value:"2"},{name:"Expert",value:"3"}].map(e=>{let{name:l,value:s}=e;return(0,a.jsx)(w(),{className:"group__item",value:`${s}`,size:"lg",children:`${l}`},`${l}`)}),R=()=>{let{difficultyUpdateHandler:e,difficulty:l,params:s}=(0,v.f)(),{data:t=[],isLoading:n,isFetching:r}=k(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"sub-title",children:"Difficulty"}),(0,a.jsx)(z(),{disabled:r,name:"difficulty",className:"group",value:l,onChange:e,children:n?(0,a.jsx)(U,{}):(0,a.jsx)(O,{difficultyList:t})})]})},H=s(25777),I=s.n(H),K=s(570),M=s.n(K),P=e=>{let{categoriesList:l}=e;return l?.map(e=>{let{name:l,value:s,count:t}=e;return(0,a.jsxs)(M(),{className:"group__item",value:s,size:"lg",children:[`${l}`," ",null!==t&&`(${t})`]},l)})},Z=()=>[{name:"All",value:""},{name:"Running",value:"running"},{name:"Cycling",value:"1"},{name:"Steps",value:"2"}].map(e=>{let{name:l,value:s}=e;return(0,a.jsx)(M(),{className:"group__item",value:`${s}`,size:"lg",children:`${l}`},`${l}`)}),W=()=>{let{categoriesUpdateHandler:e,categories:l,params:s}=(0,v.f)(),{data:t=[],isLoading:n,isFetching:r}=C(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"sub-title",children:"Category"}),(0,a.jsx)(I(),{disabled:r,name:"categories",className:"group",value:l,onCh
1ange:e,children:n?(0,a.jsx)(Z,{}):(0,a.jsx)(P,{categoriesList:t})})]})},G=e=>{let{statusList:l}=e;return l?.map(e=>{let{name:l,value:s,count:t}=e;return(0,a.jsxs)(w(),{className:"group__item",value:s,size:"lg",children:[`${l}`," ",null!==t&&`(${t})`]},l)})},J=()=>[{name:"All",value:""},{name:"Available to join",value:"available"}].map(e=>{let{name:l,value:s}=e;return(0,a.jsx)(w(),{className:"group__item",value:`${s}`,size:"lg",children:`${l}`},`${l}`)}),Q=()=>{let{statusUpdateHandler:e,status:l,params:s}=(0,v.f)(),{data:t=[],isLoading:n,isFetching:r}=D(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"sub-title",children:"Status"}),(0,a.jsx)(z(),{disabled:r,name:"status",className:"group",value:l,onChange:e,children:n?(0,a.jsx)(J,{}):(0,a.jsx)(G,{statusList:t})})]})},T=e=>{let{category:l}=e,{setOpen:s,initFromParams:t,applyHandler:n,resetHandler:r}=(0,v.f)();return(0,a.jsxs)(g(),{className:"search-filter-modal",shown:!0,size:"md",children:[(0,a.jsxs)("header",{className:"modal-header d-block",children:[(0,a.jsx)("div",{className:"slider"}),(0,a.jsxs)("div",{className:"title",children:["Filters",(0,a.jsx)(_(),{"data-testid":"close-btn",onClick:()=>{t(),s(!1)},icon:"ic-cross-bold",alt:"close button"})]})]}),(0,a.jsxs)($(),{className:"modal-body filter-modal-body","data-testid":"search-filter-modal",children:[(0,a.jsx)(F,{}),(0,a.jsx)(R,{}),!l&&(0,a.jsx)(W,{}),(0,a.jsx)(Q,{})]}),(0,a.jsxs)(y(),{children:[(0,a.jsx)("button",{className:"btn-reset",onClick:r,children:"Reset"}),(0,a.jsx)("button",{className:"btn-apply",onClick:n,children:"Apply"})]})]})},V=e=>{let{category:l}=e,{filtersOnClickHandler:s,open:n,filtersCount:c}=(0,v.f)();(0,t.useEffect)(()=>{document?.body?.style?.setProperty("--mask-bg-color",`rgba(0, 0, 0,${.15*!!n})`)},[n]);let d={...(0,u.A)(),element:"search filters"};return(0,a.jsxs)("div",{className:"events-filter","data-pos":(0,i.$k)(d),children:[(0,a.jsx)(x,{baseParams:d}),(0,a.jsxs)(r(),{"data-testid":"filters-btn",selected:n,className:"filters-btn",onClick:s,size:"md",preIcon:"ic-funnel",postIcon:n?"ic-angle-up-bold":"ic-angle-down-bold",...(0,i.UZ)({...d}),children:["Filters",c>0&&(0,a.jsxs)("span",{className:"filters-count","data-testid":"filters-count",children:["(",c,")"]})]},"filters-btn"),n&&(0,a.jsx)(T,{category:l})]})}}}]);

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.