PageSourceSearch

https://goodkind.id/static/HomePosts-e1c8b97a.js

js goodkind.id collected 2026-10-02 18:56:59 UTC 6,373 bytes, 1 lines download raw bytes

1import{aA as B,aI as L,aJ as C,ay as I,aj as T,am as p,ap as x,ak as V,av as _,aL as g,aQ as m,ag as b,aR as y,ax as E,aM as R,aS as M,aT as j,au as v,aw as H,aY as k,aZ as G,a_ as W}from"./vendor-0c264265.js";import{ci as O,cj as Y,ck as $,U as D,$ as f,_ as K,a6 as J}from"./common-f18f7efb.js";import"./vue-cropperjs-31b024e5.js";/* empty css                  */import"./topojson-client-146a93e9.js";import"./swiper-3232ef62.js";function Q(a){const t=window._immediateData||{},o=t[a];return t[a]=null,window._immediateData=t,o}const Z={banners:"BANNER",tickets:"FEATURED_TICKETS",menus:"HOME_MENUS"},S=B("home",{state:()=>({posts:[],banners:[],reviews:[],tickets:[],leaders:[],areas:[],videos:[],menus:[],menuBottoms:[]}),actions:{setDataFromImmediate(a){const t=Q(Z[a]);if(t)return this[a]=O(t),!0},async fetchPosts(){var o;const a=await Y(),t=((o=a==null?void 0:a.body)==null?void 0:o.data)||[];this.posts=t},fetchNewestPost(){this.posts=[];const a={name:"FEATURED_POSTS"};return this.getConstant(a).then(t=>{const o=t.map((c,h)=>h===0?c:{...c,hashTags:c!=null&&c.hashTags?JSON.parse(c==null?void 0:c.hashTags):[]});this.posts=o})},fetchBanners(){if(this.setDataFromImmediate("banners"))return;const t={name:"BANNER"};return this.getConstant(t).then(o=>{this.banners=o})},fetchReviews(){this.reviews=[];const a={name:"TESTIMONY"};return this.getConstant(a).then(t=>{this.reviews=t})},fetchTickets(){if(this.setDataFromImmediate("tickets"))return;const t={name:"FEATURED_TICKETS"};return this.getConstant(t).then(o=>{this.tickets=o})},fetchLeaders(){this.leaders=[];const a={name:"FEATURED_LEADERS"};return this.getConstant(a).then(t=>{this.leaders=t})},fetchAreas(){this.areas=[];const a={name:"FEATURED_AREAS"};return this.getConstant(a).then(t=>{this.areas=t})},async getConstant({name:a}){return $({name:a}).then(t=>{let o=[];if(t!=null&&t.body){const c=t.body.data||{};o=O(c)}return o})},fetchVideos(){this.videos=[];const a={name:"FEATURED_VIDEOS"};return this.getConstant(a).then(t=>{this.videos=t})},fetchMenus(){if(this.setDataFromImmediate("menus"))return;const t={name:"HOME_MENUS"};return this.getConstant(t).then(o=>{this.menus=o})},fetchMenuBottoms(){this.menuBottoms=[];const a={name:"MENU_BOTTOM"};return this.getConstant(a).then(t=>{this.menuBottoms=t})}}});const q=a=>(G("data-v-2ece54ee"),a=a(),W(),a),z={class:"bg-gradient py-10 lg:py-20 px-5 xl:px-0"},X={class:"relative max-w-7xl w-full mx-auto flex flex-col gap-4 lg:gap-10 bg-gradient"},tt={class:"flex flex-col gap-4 lg:gap-8"},et=q(()=>m("h2",{class:"font-heading text-gray-neutral/100 text-3xl md:text-4xl font-bold w-full lg:w-6/12"}," Masih ada orang baik dan peduli masih ada di sekitar-mu ",-1)),at={class:"flex justify-between items-center -mx-4 sm:mx-0 gap-6"},st={class:"flex gap-2 w-full overflow-x-auto scroll-transparent px-4 sm:px-0"},nt={class:"flex flex-col gap-5"},ot={class:"grid lg:grid-cols-2 gap-3 sm:gap-6",ref:"homePostRef"},rt=M("Lihat Semua "),ct={__name:"HomePosts",setup(a){var A,w;const t=C(()=>I(()=>import("./HomepagePostCard-3d2bc2ea.js"),["static/HomepagePostCard-3d2bc2ea.js","static/vendor-0c264265.js","static/vendor-f3ceb1f7.css","static/common-f18f7efb.js","static/vue-cropperjs-31b024e5.js","static/topojson-client-146a93e9.js","static/swiper-3232ef62.js","static/swiper-66964a81.css","static/common-b817750f.css","static/cropperjs-e3e0c608.css","static/HomepagePostCard-1d6b77ca.css"])),o=C(()=>I(()=>import("./GkIconArrowRightRounded-a4e32f28.js"),["static/GkIconArrowRightRounded-a4e32f28.js","static/vendor-0c264265.js","static/vendor-f3ceb1f7.css"])),c=T([]),h=p(()=>{var u,r;const s=S().posts;let n=D().getValue("HOMEPAGE_COMMUNITIES")||{};n=((u=Object.values(n))==null?void 0:u.map(e=>({leader:{name:e==null?void 0:e.name,picUrl:e==null?void 0:e.image,status:"VERIFIED"},category:"COMMUNITY",path:e==null?void 0:e.path,content:e==null?void 0:e.description})))||[];let l=D().getValue("HOMEPAGE_SUARA_WARGA")||{};return l=((r=Object.values(l))==null?void 0:r.map(e=>({user:{name:e==null?void 0:e.name,profilePic:e==null?void 0:e.image,status:"VERIFIED"},category:"SUARA_WARGA",path:e==null?void 0:e.path,content:e==null?void 0:e.description})))||[],[...s,...n,...l]}),P=p(()=>i.value==="ALL"),F=p(()=>h.value.map(s=>s.category));p(()=>{var r;const s=(r=f)==null?void 0:r[i.value];if(i.value==="COMMUNITY")return{text:"Ajukan Komunitas",to:"/komunitas/create"};if(i.value==="SUARA_WARGA")return{text:"Lihat Suara Warga",to:"/suara-warga"};if(!s)return;let n=i.value.toLowerCase(),l=s==null?void 0:s.text,u=`/post/create?type=${n}`;return n==="report"&&(u="/wilayah"),{text:`Buat ${l}`,to:u}});const d=p(()=>[...Object.keys(f).map(n=>{var l;return{label:(l=f[n])==null?void 0:l.label,value:n}})].filter(n=>F.value.includes(n.value)||n.label==="Semua")),i=T((w=(A=d.value)==null?void 0:A[0])==null?void 0:w.value),U=p(()=>i.value?P.value?h.value.slice(0,6):h.value.filter(s=>s.category===i.value).slice(0,6):[]),N=({feed:s,idx:n})=>{var l,u,r,e;c.value=[...c.value,{promotion_id:String(s==null?void 0:s.id),promotion_name:((l=s==null?void 0:s.title)==null?void 0:l.toLowerCase())||((u=K(s==null?void 0:s.content))==null?void 0:u.toLowerCase()),creative_name:(e=(r=f[s.category])==null?void 0:r.text)==null?void 0:e.toLowerCase(),creative_slot:"article feed",index:n+1}]};return x(()=>i.value,()=>{c.value=[]}),x(()=>d.value,()=>{var s,n;d.value.length&&(i.value=(n=(s=d.value)==null?void 0:s[0])==null?void 0:n.value)},{immediate:!0}),x(()=>c.value,s=>{s.length===6&&J({feature:"homepage",items:c.value})}),V(()=>{S().posts.length||S().fetchPosts()}),(s,n)=>{const l=k("gk-button"),u=k("router-link");return _(),g("div",z,[m("div",X,[m("div",tt,[et,m("div",at,[m("ul",st,[(_(!0),g(b,null,y(v(d),r=>(_(),g("li",{key:r.value},[E(l,{onClick:e=>i.value=r.value,outlined:i.value!==r.value,class:"whitespace-nowrap"},{default:R(()=>[M(j(r.label),1)]),_:2},1032,["onClick","outlined"])]))),128))])]),m("div",nt,[m("div",ot,[(_(!0),g(b,null,y(v(U),(r,e)=>(_(),H(v(t),{key:r.id,onOnSee:()=>N({feed:r,idx:e}),data:r,index:e+1},null,8,["onOnSee","data","index"]))),128))],512)])]),E(u,{class:"lg:w-fit w-full text-sm px-5 mx-auto py-4 rounded-xl flex justify-center items-center gap-2 text-white font-schibsted font-bold bg-primary-hover",to:"/dukung-kami"},{default:R(()=>[rt,E(v(o))]),_:1})])])}}},dt=L(ct,[["__scopeId","data-v-2ece54ee"]]);export{dt as default};

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.