PageSourceSearch

https://thefix.media/_next/static/chunks/app/search/page-35ca38031fffc9cf.js

js thefix.media collected 2026-10-02 02:56:03 UTC 12,719 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2959],{1715:(e,t,r)=>{"use strict";r.d(t,{default:()=>A});var n=r(95155),s=r(42342),a=r(12115);let l=()=>(0,n.jsx)("svg",{width:"7",height:"11.15",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M2.7998 6.00005L6.6998 9.90005C6.88314 10.0834 6.9748 10.3167 6.9748 10.6C6.9748 10.8834 6.88314 11.1167 6.6998 11.3C6.51647 11.4834 6.28314 11.575 5.9998 11.575C5.71647 11.575 5.48314 11.4834 5.2998 11.3L0.699805 6.70005C0.599805 6.60005 0.528971 6.49172 0.487305 6.37505C0.445638 6.25838 0.424805 6.13338 0.424805 6.00005C0.424805 5.86672 0.445638 5.74172 0.487305 5.62505C0.528971 5.50838 0.599805 5.40005 0.699805 5.30005L5.2998 0.700049C5.48314 0.516715 5.71647 0.425049 5.9998 0.425049C6.28314 0.425049 6.51647 0.516715 6.6998 0.700049C6.88314 0.883382 6.9748 1.11672 6.9748 1.40005C6.9748 1.68338 6.88314 1.91672 6.6998 2.10005L2.7998 6.00005Z",fill:"#38404E"})});var o=r(29300),i=r.n(o),c=r(35695);function u(e){let{pagination:t}=e,r=(0,c.useRouter)(),s=(0,c.usePathname)(),o=(0,c.useSearchParams)(),u=e=>{let t=new URLSearchParams(o);t.set("page",e.toString()),r.replace("".concat(s,"?").concat(t.toString()))},d=(0,a.useMemo)(()=>t.pages<5?Array(t.pages).fill(0).map((e,t)=>t+1):t.page>t.pages-2?[1,"...",t.pages-3,t.pages-2,t.pages-1,t.pages]:3===t.page?[1,t.page-1,t.page,t.page+1,"...",t.pages]:t.page>3?[1,"...",t.page-1,t.page,t.page+1,"...",t.pages]:[1,2,3,"...",t.pages],[t]),p="border border-[#DBE3E8] rounded-md w-[32px] h-[32px] flex items-center justify-center";return(0,n.jsxs)("div",{className:"flex gap-[6px] mt-[44px] justify-center",children:[(0,n.jsx)("button",{className:p,onClick:()=>t.prev&&u(t.prev),disabled:!t.prev,children:(0,n.jsx)(l,{})}),null==d?void 0:d.map((e,r)=>(0,n.jsx)(a.Fragment,{children:"..."===e?(0,n.jsx)("span",{className:p,children:"..."}):(0,n.jsx)("button",{className:i()("".concat(p," text-base font-semibold leading-[100%]"),{"bg-[#0F4168] text-white border-primary-text":e===t.page}),onClick:()=>u(+e),disabled:e===t.page,children:e})},"page-".concat(r))),(0,n.jsx)("button",{className:"".concat(p," rotate-180"),onClick:()=>t.next&&u(t.next),disabled:!t.next,children:(0,n.jsx)(l,{})})]})}var d=r(46776),p=r(91451);let x=e=>{let{setActiveTab:t,tab:r,isActiveTab:s}=e,a=(0,c.useRouter)(),l=(0,c.usePathname)(),o=(0,c.useSearchParams)();return(0,n.jsxs)("li",{onClick:()=>{let e=new URLSearchParams(o);e.set("page","1"),a.replace("".concat(l,"?").concat(e.toString())),t(r.id)},className:i()("py-[14px] flex gap-[8px] justify-center items-center cursor-pointer border-b-[3px] border-b-solid transition-all hover:text-[#0f4168] hover:border-[#0f4168]",s?"text-[#0f4168] border-[#0f4168]":"text-gray-600 border-[#E7ECF0]"),children:[(0,n.jsx)("span",{className:i()("text-[#ABAFB7]",s&&"!text-[#0f4168]"),children:r.title}),(0,n.jsx)("span",{className:i()("text-black font-[700]",s&&"text-[#0f4168]"),children:r.count})]},r.id)},f=e=>{let{tabs:t,setActiveTab:r,activeTab:s}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-[12px] md:gap-[16px] mb-[44px]",children:[(0,n.jsx)("p",{className:"font-inter text-[16px] leading-[1.2] text-[#ABAFB7]",children:"We found the following results for your query:"}),(0,n.jsx)("ul",{className:"grid md:grid-cols-3 gap-[12px]",children:t.map(e=>(0,n.jsx)(x,{isActiveTab:e.id===s,setActiveTab:r,tab:e},e.id))})]})},h=e=>{let{children:t,items:r,isActive:s,query:a}=e;return s?(0,n.jsx)("div",{children:r.length>0?t:(0,n.jsxs)("div",{className:"flex flex-col gap-[12px]",children:[(0,n.jsx)("p",{className:"font-inter font-[700] text-[18px] leading-[1.2]",children:"No results found"}),a?(0,n.jsxs)("p",{children:["We couldn't find anything matching your search for the word"," ",(0,n.jsxs)("span",{className:"font-[700] text-[#0f4168]",children:["\xab",a,"\xbb"]}),"."]}):(0,n.jsx)("p",{children:"We couldn't find anything"})]})}):null};var m=r(6874),g=r.n(m);let v=e=>{let{count:t,text:r}=e;return(0,n.jsxs)("div",{className:"flex gap-[6px] font-inter text-[14px] leading-[1.2] text-[#ABAFB7] font-medium items-center",children:[(0,n.jsx)("span",{className:"font-extrabold text-[#38404E] leading-[1]",children:t})," ",r]})},j=e=>{var t,r;let{tag:s}=e;return(0,n.jsxs)("article",{className:"flex border-[#DBE3E8] border-b-[1px] border-solid pb-[20px] gap-[16px]",children:[(0,n.jsx)("div",{className:"w-[64px] h-[64px] md:w-[76px] md:h-[76px] bg-[#F5F7F9] rounded-full flex justify-center items-center",children:(0,n.jsx)("span",{className:"font-inter font-[600] text-[#ABAFB7] text-[36px]",children:"#"})}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 flex-1 justify-center",children:[(0,n.jsx)("p",{className:"text-[18px]/[1] font-bold text-black",children:(0,n.jsx)(g(),{prefetch:!1,href:s.url||"",children:s.name})}),(0,n.jsxs)("div",{className:"flex gap-[16px]",children:[(0,n.jsx)(v,{text:"Articles",count:(null===(t=s.count)||void 0===t?void 0:t.posts)||0}),(0,n.jsx)(v,{text:"Followers",count:(null===(r=s.count)||void 0===r?void 0:r.followers)||0})]})]})]},s.id)},b=e=>
1e?e.split(" ").filter(Boolean).reduce((e,t,r)=>{var n;return r>1?e:e="".concat(e).concat(null!==(n=t[0])&&void 0!==n?n:"")},""):"",w=e=>{var t,r;let{author:s}=e;return(0,n.jsxs)("article",{className:"pb-[20px] flex gap-[16px] border-b-[1px] border-solid border-[#DBE3E8]",children:[s.profile_image?(0,n.jsx)("div",{className:"bg-cover bg-center w-[64px] h-[64px] md:w-[76px] md:h-[76px] rounded-full",style:{backgroundImage:"url(".concat(s.profile_image,")")}}):(0,n.jsx)("div",{className:"bg-[#E7ECF0] rounded-full w-[64px] h-[64px] md:w-[76px] md:h-[76px] flex justify-center items-center text-[#0F4168] font-inter font-[700] text-[32px]",children:b(s.name)}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 flex-1 justify-center",children:[(0,n.jsx)("p",{className:"text-[18px]/[1] font-bold text-black",children:(0,n.jsx)(g(),{prefetch:!1,href:s.url||"",children:s.name})}),(0,n.jsxs)("div",{className:"flex gap-[16px]",children:[(0,n.jsx)(v,{text:"Articles",count:(null===(t=s.count)||void 0===t?void 0:t.posts)||0}),(0,n.jsx)(v,{text:"Followers",count:(null===(r=s.count)||void 0===r?void 0:r.followers)||0})]})]})]},s.id)},N=e=>{let{authorsCount:t=0,tagsCount:r=0,postsCount:n=0}=e;return[{title:"Articles: ",count:n,id:"posts"},{title:"Tags: ",count:r,id:"tags"},{title:"Authors: ",count:t,id:"authors"}]},y="id,title,url,slug,custom_excerpt,excerpt,published_at,feature_image,feature_image_alt,feature_image_caption,primary_tag,primary_author,tags.count.posts,tags.count.followers,authors.count.posts,authors.count.followers";function A(e){let{query:t,currentPage:r}=e,[l,o]=(0,a.useState)({posts:[],authors:[],tags:[]}),[i,c]=(0,a.useState)("posts"),[x,m]=(0,a.useState)(!1),[g,v]=(0,a.useState)({}),b=(0,a.useMemo)(()=>g[i],[g,i]),A=(0,a.useMemo)(()=>{var e,t,r;return N({authorsCount:(null===(e=g.authors)||void 0===e?void 0:e.total)||0,tagsCount:(null===(t=g.tags)||void 0===t?void 0:t.total)||0,postsCount:(null===(r=g.posts)||void 0===r?void 0:r.total)||0})},[g]);return(0,a.useEffect)(()=>{let e=async()=>{m(!0);try{var e,n,a,l,i,c,u,d,p,x,f,h;let m=await (0,s.g3)({filterName:t,limit:16,page:r,fields:y,include:"posts,tags,authors,tags.count.posts,tags.count.followers,authors.count.posts,authors.count.followers"});v({posts:null==m?void 0:null===(n=m.posts)||void 0===n?void 0:null===(e=n.meta)||void 0===e?void 0:e.pagination,authors:null==m?void 0:null===(l=m.authors)||void 0===l?void 0:null===(a=l.meta)||void 0===a?void 0:a.pagination,tags:null==m?void 0:null===(c=m.tags)||void 0===c?void 0:null===(i=c.meta)||void 0===i?void 0:i.pagination}),o({posts:null!==(x=null==m?void 0:null===(u=m.posts)||void 0===u?void 0:u.data)&&void 0!==x?x:[],authors:null!==(f=null==m?void 0:null===(d=m.authors)||void 0===d?void 0:d.data)&&void 0!==f?f:[],tags:null!==(h=null==m?void 0:null===(p=m.tags)||void 0===p?void 0:p.data)&&void 0!==h?h:[]})}catch(e){console.log("getSearchPosts error: ",e)}finally{m(!1)}},n=async()=>{m(!0);try{var e;let t=await (0,s.K5)({limit:16,fields:y,page:r});v({posts:null==t?void 0:null===(e=t.meta)||void 0===e?void 0:e.pagination,authors:void 0,tags:void 0}),o({posts:null!=t?t:[],authors:[],tags:[]})}catch(e){console.log("getSearchPosts error: ",e)}finally{m(!1)}};if(!t){c("posts"),o({posts:[],authors:[],tags:[]}),v({}),n();return}e()},[t,r]),(0,n.jsx)("section",{className:"max-w-[816px] w-full",children:x?(0,n.jsx)(p.A,{}):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(f,{activeTab:i,setActiveTab:c,tabs:A}),(0,n.jsxs)("div",{className:"flex flex-col gap-[24px] mt-[32px]",children:[(0,n.jsx)(h,{isActive:"posts"===i,items:l.posts,query:t,children:(0,n.jsx)("div",{className:"grid gap-[20px]",children:l.posts.map(e=>(0,n.jsx)(d.A,{view:"horizontal",mobileVertical:!0,isShowAuthor:!0,isShowPrimaryTag:!0,className:"max-w-[816px]",post:e},e.uuid||e.id))})}),(0,n.jsx)(h,{isActive:"authors"===i,items:l.authors,query:t,children:(0,n.jsx)("div",{className:"grid gap-[20px]",children:l.authors.map(e=>(0,n.jsx)(w,{author:e},e.id))})}),(0,n.jsx)(h,{isActive:"tags"===i,items:l.tags,query:t,children:(0,n.jsx)("div",{className:"grid gap-[20px]",children:l.tags.map(e=>(0,n.jsx)(j,{tag:e},e.id))})})]}),b&&b.pages>1&&(0,n.jsx)(u,{pagination:b})]})})}},20719:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,6874,23)),Promise.resolve().then(r.t.bind(r,33063,23)),Promise.resolve().then(r.bind(r,59932)),Promise.resolve().then(r.bind(r,1715)),Promise.resolve().then(r.bind(r,96038)),Promise.resolve().then(r.bind(r,18421))},59932:(e,t,r)=>{"use strict";r.d(t,{default:()=>u});var n=r(95155),s=r(98118),a=r(82122),l=r(29300),o=r.n(l),i=r(35695),c=r(12115);function u(e){var t;let{className:r=""}=e,l=(0,i.useSearchParams)(),u=(null===(t=l.get("query"))||void 0===t?void 0:t.toString())||"",d=(0,i.usePathname)(),p=(0,i.useRouter)(),[x,f]=(0,c.useState)(u);(0,c.useEffect)(()=>{f(u)},[u]);let h=function(e,t,r,n){var s=this,a=(0,c.useRef)(null),l=(0,c.useRef)(0),o=(0,c.useRef)(0),i=(0,c.useRef)(null),u=(0,c.useRef)([]),d=(0,c.useRef)(),p=(0,c.useRef)(),x=(0,c.useRef)(e),f=(0,c.useRef)(!0);x.current=e;var h="undefined"!=typeof window,m=!t&&0!==t&&h;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var g=!!(r=r||{}).leading,v=!("trailing"in r)||!!r.trailing,j="maxWait"in r,b="debounceOnServer"in r&&!!r.debounceOnServer,w=j?Math.max(+r.maxWait||0,t):null;return(0,c.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,c.useMemo)(function(){var e=function(e){var t=u.current,r=d.current;return u.current=d.current=null,l.current=e,o.current=o.current||e,p.current=x.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(i.current),i.current=m?requestAnimationFrame(e):setTimeout(e,t)},c=function(e){if(!f.current)return!1;var r=e-a.current;return!a.current||r>=t||r<0||j&&e-l.current>=w},N=function(t){return i.current=null,v&&u.current?e(t):(u.current=d.current=null,p.current)},y=function e(){var n=Date.now();
1if(g&&o.current===l.current&&A(),c(n))return N(n);if(f.current){var s=t-(n-a.current);r(e,j?Math.min(s,w-(n-l.current)):s)}},A=function(){n&&n({})},C=function(){if(h||b){var n=Date.now(),o=c(n);if(u.current=[].slice.call(arguments),d.current=s,a.current=n,o){if(!i.current&&f.current)return l.current=a.current,r(y,t),g?e(a.current):p.current;if(j)return r(y,t),e(a.current)}return i.current||r(y,t),p.current}};return C.cancel=function(){i.current&&(m?cancelAnimationFrame(i.current):clearTimeout(i.current)),l.current=0,u.current=a.current=d.current=i.current=null},C.isPending=function(){return!!i.current},C.flush=function(){return i.current?N(Date.now()):p.current},C},[g,j,t,w,v,m,h,b,n])}(e=>{let t=new URLSearchParams(l);t.set("page","1"),e.trim()?t.set("query",e):t.delete("query"),p.replace("".concat(d,"?").concat(t.toString()))},600),m=()=>{u&&(h(""),f(""))},g=e=>{h(e.target.value),f(e.target.value)};return(0,n.jsxs)("div",{className:o()("",r),children:[(0,n.jsx)("button",{className:o()("absolute right-[12px] top-[13px]",{"left-[12px] w-[26px] h-[26px]":!u}),children:(0,n.jsx)(s.WI,{fillColor:"#38404e"})}),!!u&&(0,n.jsx)("button",{onClick:()=>m(),className:"absolute left-[12px] top-[13px]",children:(0,n.jsx)(a.A,{fill:"#38404e"})}),(0,n.jsx)("input",{className:"min-h-[48px] border border-silver-1 outline-none tracking-[-1px] rounded-lg w-full pl-[44px] text-[18px] font-normal text-dark placeholder-[#ABAFB7] placeholder:text-[14px] md:placeholder:text-base placeholder:tracking-[0px]",type:"text",name:"search",placeholder:"Enter your request to search for materials",onChange:e=>g(e),value:x})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[661,6874,6766,6798,3883,3558,2740,989,5131,6776,8441,1684,7358],()=>t(20719)),_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.