1var K=Object.defineProperty,q=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var F=(d,r,i)=>r in d?K(d,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):d[r]=i,h=(d,r)=>{for(var i in r||(r={}))Y.call(r,i)&&F(d,i,r[i]);if(j)for(var i of j(r))Z.call(r,i)&&F(d,i,r[i]);return d},S=(d,r)=>q(d,W(r));import{j as e,b as t,N as l,r as D}from"./main.9a4c9a70.js";import{N as B}from"./NcModal.173747f7.js";import{G as J,a as X,P as M}from"./queryGraphql.f7b54b20.js";import{B as A}from"./ButtonPrimary.575d3118.js";import{C as R,a as ee}from"./CardCategory1Skeleton.d681539a.js";import{D as O}from"./DataStatementBlockV2.49bfc0f5.js";import{a as v,u as se}from"./useQuery.242ac0b5.js";import{u as V}from"./useLazyQuery.5ac1e84c.js";import{T as ie}from"./Tag.628d2170.js";import{S as ne}from"./index.9e3c451e.js";import{A as ae,S as re}from"./SectionTrendingCategories.16f159a8.js";import{N as oe}from"./NcImage.775aecc9.js";import{C as te}from"./Card11.3c0ad2fa.js";import{C as le}from"./Card11Skeleton.b1431acc.js";const de=()=>{const r=v` 2 ${J} 3 `,[i,{loading:f,error:a,data:n,fetchMore:p}]=V(r,{notifyOnNetworkStatusChange:!0}),E=()=>{n!=null&&n.categories.edges.length||i({variables:{first:20,orderby:null,hideEmpty:!0}})},N=(o,{fetchMoreResult:s})=>{var C,c,x;return(C=s==null?void 0:s.categories)!=null&&C.edges.length?S(h({},s),{categories:S(h({},s.categories),{edges:[...(c=o==null?void 0:o.categories)==null?void 0:c.edges,...(x=s==null?void 0:s.categories)==null?void 0:x.edges]})}):o},y=()=>{!p||p({variables:{first:20,after:(n==null?void 0:n.categories.pageInfo.endCursor)||null},updateQuery:N})},_=f&&!(n!=null&&n.categories.edges.length),T=()=>t("div",{className:"flex flex-col items-center space-y-8",children:[e(O,{data:(n==null?void 0:n.categories.edges)||[],isSkeleton:_,error:a}),t("div",{className:"w-full grid gap-6 grid-cols-1 sm:grid-cols-2 sm:py-2 md:gap-8 md:grid-cols-3 lg:grid-cols-4 xl:md:grid-cols-5",children:[_&&Array.from("iiiiiiiiiiiiiiiiiiii").map((o,s)=>e(R,{},s)),((n==null?void 0:n.categories.edges)||[]).map(o=>e(ee,{taxonomy:o.node,size:"normal"},o.node.id))]}),(n==null?void 0:n.categories.pageInfo.hasNextPage)&&e(A,{loading:f,onClick:y,children:l.showMeMore})]});return e("div",{className:"nc-ModalCats",children:e(B,{onOpenModal:E,triggerText:t("span",{children:[e("span",{className:"hidden sm:inline",children:l.otherCategories})," ",e("span",{className:"inline sm:hidden",children:l.categories})]}),modalTitle:l.discoverOtherCategories,renderContent:T})})},ce=()=>{const r=v` 4 ${X} 5 `,[i,{error:f,data:a,fetchMore:n,loading:p}]=V(r,{notifyOnNetworkStatusChange:!0}),E=()=>{a!=null&&a.tags.edges.length||i({variables:{first:30}})},N=(o,{fetchMoreResult:s})=>{var C,c,x;return(C=s==null?void 0:s.tags)!=null&&C.edges.length?S(h({},s),{tags:S(h({},s.tags),{edges:[...(c=o==null?void 0:o.tags)==null?void 0:c.edges,...(x=s==null?void 0:s.tags)==null?void 0:x.edges]})}):o},y=()=>{!n||n({variables:{first:30,after:(a==null?void 0:a.tags.pageInfo.endCursor)||null},updateQuery:N})},_=p&&!(a!=null&&a.tags.edges.length),T=()=>t("div",{className:"flex flex-col items-center space-y-5",children:[e(O,{data:(a==null?void 0:a.tags.edges)||[],isSkeleton:_,error:f}),t("div",{className:"w-full flex flex-wrap dark:text-neutral-200",children:[_&&Array.from("iiiiiiiiiiiiiiiiiiiiiiiiiiii").map((o,s)=>e(ne,{height:"38px",className:"mr-2.5 mb-2",width:"90px"},s)),((a==null?void 0:a.tags.edges)||[]).map(o=>e(ie,{tag:o.node,className:"mr-2 mb-2"},o.node.id))]}),(a==null?void 0:a.tags.pageInfo.hasNextPage)&&e(A,{loading:p,onClick:y,children:l.showMeMore})]});return e("div",{className:"nc-ModalTags",children:e(B,{contentExtraClass:"max-w-screen-md",onOpenModal:E,triggerText:t("span",{children:[e("span",{className:"hidden sm:inline",children:l.otherTags})," ",e("span",{className:"inline sm:hidden",children:l.tags})]}),modalTitle:l.discoverOtherTags,renderContent:T})})},$=[{name:l.mostRecent,value:"DATE"},{name:l.mostLiked,value:"FAVORITES_COUNT"},{name:l.mostDiscussed,value:"COMMENT_COUNT"},{name:l.mostViewed,value:"VIEWS_COUNT"}
5],Q=$,me=({className:d="",termId:r,termData:i,isCategory:f,isFormatAudio:a,isFormatVideo:n,isTag:p,sectionCategoriesTrending:E})=>{var I,k,w;const N=((I=frontendObject.allSettings)==null?void 0:I.readingSettingsPostsPerPage)||20,[y,_]=D.exports.useState(Q[0].value);let T={};p?T={order:"DESC",field:y,tagIn:[r],first:N}:T={order:"DESC",field:y,categoryIn:[r],first:N};const o=v` 6 ${M} 7 `,{loading:s,error:C,data:c,fetchMore:x}=se(o,{notifyOnNetworkStatusChange:!0,variables:T}),P=(c==null?void 0:c.posts.edges)||[],H=(m,{fetchMoreResult:g})=>{var L,u,G;return(L=g==null?void 0:g.posts)!=null&&L.edges.length?S(h({},g),{posts:S(h({},g.posts),{edges:[...(u=m==null?void 0:m.posts)==null?void 0:u.edges,...(G=g==null?void 0:g.posts)==null?void 0:G.edges]})}):m},U=m=>{_(m.value)},z=()=>{if(!x)return;const m=P.map(g=>g.node.postId);x({variables:{first:N,notIn:m},updateQuery:H})},b=s&&!P.length;return t("div",{className:`nc-PageArchive ${d}`,"data-nc-id":"PageArchive",children:[e("div",{className:"w-full px-2 xl:max-w-screen-2xl mx-auto",children:t("div",{className:"rounded-3xl relative aspect-w-16 aspect-h-12 sm:aspect-h-8 lg:aspect-h-7 xl:aspect-h-5 overflow-hidden ",children:[e(
7oe,{containerClassName:"absolute inset-0",src:((k=i.ncTaxonomyMeta.featuredImage)==null?void 0:k.sourceUrl)||"https://images.pexels.com/photos/2662116/pexels-photo-2662116.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260",className:"object-cover w-full h-full"}),t("div",{className:"absolute inset-0 bg-black text-white bg-opacity-30 flex flex-col items-center justify-center text-center",children:[t("h2",{className:"inline-block align-middle text-4xl sm:text-5xl font-semibold md:text-7xl",children:[p?"#":"",i.name]}),i.description&&e("div",{className:"hidden md:block max-w-xl text-sm mt-3 text-neutral-100",dangerouslySetInnerHTML:{__html:i.description}}),e("span",{className:"block mt-2 sm:mt-4 text-neutral-200",children:`${i.count||0} ${l.articles}`})]})]})}),i.description&&e("div",{className:"container block md:hidden max-w-xl text-sm mt-4",dangerouslySetInnerHTML:{__html:i.description}}),t("div",{className:"container py-16 lg:pb-28 lg:pt-24 space-y-16 lg:space-y-28",children:[t("div",{children:[t("div",{className:"flex flex-col sm:items-center sm:justify-between sm:flex-row",children:[t("div",{className:"flex space-x-2.5",children:[e(de,{}),e(ce,{})]}),e("div",{className:"block my-4 border-b w-full border-neutral-100 sm:hidden"}),e("div",{className:"flex justify-end",children:e(ae,{onChangeSelect:U,lists:Q})})]}),e(O,{className:"my-5",data:P,error:C,isSkeleton:b}),b||P.length?t("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 2xl:gap-8 mt-8 lg:mt-10",children:[b&&Array.from("88888888").map((m,g)=>e(le,{},g)),P.map(m=>e(te,{post:m.node},m.node.id))]}):null,((w=c==null?void 0:c.posts.pageInfo)==null?void 0:w.hasNextPage)&&e("div",{className:"flex justify-center mt-12 lg:mt-16",children:e(A,{onClick:z,loading:s,children:l.showMeMore})})]}),E.enable&&e(re,S(h({},E),{parentId:Number(r),isCategory:!!f}))]})]})};var Oe=Object.freeze(Object.defineProperty({__proto__:null,ARCHIVE_PAGE_FILTERS:$,default:me},Symbol.toStringTag,{value:"Module"}));export{$ as A,de as M,Oe as P,ce as a};
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.