PageSourceSearch

https://www.ditp.go.th/_next/static/chunks/pages/post/tags/[tag]-8964316df986e753.js

js ditp.go.th collected 2026-10-02 04:05:01 UTC 11,898 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8084],{41047:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/post/tags/[tag]",function(){return n(43210)}])},3632:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var s=n(85893),r=n(41664),a=n.n(r),i=n(11163);function l(e){let{paths:t}=e,n=(0,i.useRouter)();return(0,s.jsx)("nav",{className:"text-gray-500 text-sm overflow-x-auto whitespace-nowrap custom-scroll",children:(0,s.jsx)("div",{className:"max-w-screen-xl mx-auto px-4",children:(0,s.jsxs)("div",{className:"flex space-x-2 items-center",children:[(0,s.jsx)("img",{src:"/icons/home.png",alt:"Profile",className:"w-4 h-4"}),t.filter(e=>e.label).map((e,r)=>(0,s.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[r>0&&(0,s.jsx)("span",{className:"text-gray-400",children:"/"}),r===t.length-1?(0,s.jsx)("span",{className:"text-black font-semibold",children:e.label}):e.link?(0,s.jsx)(a(),{href:e.link,legacyBehavior:!0,locale:n.locale,children:(0,s.jsx)("a",{className:"text-gray-400 hover:text-gray-600",children:e.label})}):(0,s.jsx)("div",{className:"text-gray-400 line-clamp-1",children:e.label})]},r))]})})})}},52467:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var s=n(85893),r=n(69740);function a(e){let{currentPage:t,totalPages:n,itemsPerPage:a,totalItems:i,setCurrentPage:l,setItemsPerPage:o,handlePageClick:d,disableScroll:c=!1}=e,u=()=>{c||(0,r.UK)()||window.scrollTo({top:0,behavior:"auto"})},m=e=>{u(),d(e)};return(0,s.jsx)("div",{className:"max-w-screen-xl mx-auto mt-8",children:(0,s.jsxs)("div",{className:"flex justify-center md:justify-between items-center",children:[(0,s.jsxs)("div",{className:"hidden md:flex md:flex-wrap lg:flex-row items-center",children:[(0,s.jsx)("label",{children:"Items per page"}),(0,s.jsx)("select",{value:a,onChange:e=>{o(Number(e.target.value)),l(1),u()},className:"ml-2 border rounded-md px-2 py-1",children:[10,20,50,100].map(e=>(0,s.jsx)("option",{value:e,children:e},e))}),(0,s.jsxs)("div",{className:"md:mt-2 lg:ml-2",children:["Showing ",(t-1)*a+1," -"," ",Math.min(t*a,i)," of ",i," ","Posts"]})]}),(0,s.jsxs)("div",{className:"flex md:space-x-2",children:[(0,s.jsxs)("button",{onClick:()=>m(t-1),disabled:1===t,className:"px-3 py-1 border rounded-2xl disabled:opacity-50 flex items-center gap-2",children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})}),(0,s.jsx)("div",{className:"hidden md:block",children:"Previous"})]}),(0,s.jsx)("div",{className:"flex items-center space-x-1",children:(()=>{let e=[];for(let s=0;s<Math.min(7,n);s++){let r;r=n<=7?s+1:t<=4?s<5?s+1:5===s?"...":n:t>n-4?0===s?1:1===s?"...":n-(6-s):0===s?1:1===s?"...":s<5?t-(3-s):5===s?"...":n,e.push(r)}return e})().map((e,n)=>(0,s.jsx)("button",{onClick:()=>"number"==typeof e?m(e):null,disabled:"..."===e,className:"px-3 py-1 rounded-lg w-8 h-8 flex items-center justify-center  ".concat(t===e?"bg-[#0E143B] text-white border-[#0E143B]":"text-[#00000080]"),children:e},n))}),(0,s.jsxs)("button",{onClick:()=>m(t+1),disabled:t===n,className:"px-3 py-1 border rounded-2xl disabled:opacity-50 flex items-center gap-2",children:[(0,s.jsx)("div",{className:"hidden md:block",children:"Next"}),(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})})]})]})]})})}},81640:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var s=n(85893),r=n(24985),a=n(63805);function i(e){var t,n,i,l,o,d,c,u,m,p;let{post:h}=e;return r.QP,(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsxs)("div",{className:"flex-shrink-0 w-72 md:flex md:flex-col md:w-full bg-white border rounded-lg overflow-hidden",children:[(0,s.jsx)("img",{className:"h-48 w-full object-cover object-top md:h-48 hover:opacity-75",src:null!==(p=null!==(m=null===(i=h.image)||void 0===i?void 0:null===(n=i.formats)||void 0===n?void 0:null===(t=n.small)||void 0===t?void 0:t.url)&&void 0!==m?m:null===(l=h.image)||void 0===l?void 0:l.url)&&void 0!==p?p:"/images/ditpimage.png",alt:"Home in Countryside"}),(0,s.jsxs)("div",{className:"flex flex-col h-40 justify-between",children:[(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"text-md text-pretty font-medium text-left line-clamp-2 hover:opacity-50",children:h.title}),(0,s.jsxs)("div",{className:"mt-1 text-gray-500 text-sm text-left line-clamp-1",children:[null===(o=h.region)||void 0===o?void 0:o.region_name," ",(null===(d=h.region)||void 0===d?void 0:d.region_name)&&(null===(c=h.category)||void 0===c?void 0:c.category_name)&&" • "," ",null===(u=h.category)||void 0===u?void 0:u.category_name]})]}),(0,s.jsx)("div",{className:"text-gray-500 text-sm text-left p-4",children:(0,a.vc)((null==h?void 0:h.publish_date)||(null==h?void 0:h.current_publish)||(null==h?void 0:h.createdAt),h.locale)})]})]})})}n(71061)},33452:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var s=n(85893);function r(){return(0,s.jsxs)("div",{className:"flex justify-center",children:[(0,s.jsxs)("div",{className:"relative flex-shrink-0 w-72 md:flex md:flex-col md:w-full bg-white border rounded-lg overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,s.jsx)("div",{className:"shimmer"})}),(0,s.jsx)("div",{className:"h-48 w-full bg-gray-200"}),(0,s.jsxs)("div",{className:"flex flex-col h-40 justify-between",children:[(0,s.jsxs)("div",{className:"p-4 space-y-2",children:[(0,s.jsx)("div",{className:"h-4 bg-gray-200 rounded w-11/12"}),(0,s.jsx)("div",{className:"h-4 bg-gray-200 rounded w-8/12"})]}),(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)("div",{className:"h-4 bg-gray-200 rounded w-6/12"})})]})]}),(0,s.jsx)("style",{children:"\n          .shimmer {\n            position: absolute;\n            top: 0;\n            left: -100%;\n            height: 100%;\n            width: 100%;\n            background: linear-gradient(\n              90deg,\n              rgba(255, 255, 255, 0) 0%,\n              rgba(255, 255, 255, 0.4) 50%,\n              rgba(255, 255, 255, 0) 100%\n            );\n            animation: shimmerMove 2s infinite;\n          }\n  \n          @keyframes shimmerMove {\n            0% {\n              left: -100%;\n            }\n            100% {\n              left: 100%;\n            }\n          }\n        "})]})}},43210:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return x},default:function(){return v}});var s=n(85893),r=n(41664),a=n.n(r),i=n(3632),l=n(76809),o=n(67294),d=n(81640),c=n(52467),u=n(11163),m=n(33452),p=n(66308),h=n(63805),x=!0;function v(e){var t;let{tag:n}=(0,u.useRouter)().query,r=new Date().toISOString(),[x,v]=(0,o.useState)(e.currentPage),[f,g]=(0,o.useState)(e.itemsPerPage),[y,_]=(0,o.useState)(e.tags||[]),[j,w]=(0,o.useState)(0),[b,N]=(0,o.useState)(0),[k,P]=(0,o.useState)(!1);(0,o.useEffect)(()=>{(async()=>{P(!0);try{let e=(x-1)*f,t=[{method:l.hi.getpostsquery,type:"delve_into_the_world_markets"},{method:l.hi.gettradequery,type:"trade_and_investment_guides"},{method:l.hi.getAboutditpquery,type:"about_ditp_2s"},{method:l.hi.getditphonestquery,type:"ditp_honest_transparent_no_corruptions"},{method:l.hi.getprocurementquery,type:"procurement_news"},{method:l.hi.getinternationalquery,type:"international_trade_promotion_funds"},{method:l.hi.getservicequery,type:"service_standard_posts"},{method:l.hi.getgovernmentquery,type:"government_information_center_posts"},{method:l.hi.getditpnewsquery,type:"ditp_news"},{method:l.hi.getapplyquery,type:"apply_for_work_posts"},{method:l.hi.getprivacyquery,type:"privacy_policy_posts"}],s=new URLSearchParams;s.append("filters[tag][$containsi]",n),s.append("filters[$or][0][publish_date][$lte]",r),s.append("filters[$or][1][publish_date][$null]","true");let a=await Promise.all(t.map(e=>e.method(s,1,1).then(t=>{var n,s,r;return{total:(null==t?void 0:null===(r=t.data)||void 0===r?void 0:null===(s=r.meta)||void 0===s?void 0:null===(n=s.pagination)||void 0===n?void 0:n.total)||0,type:e.type}}).catch(()=>({total:0,type:e.type})))),i=a.reduce((e,t)=>
1e+t.total,0);w(i),N(Math.ceil(i/f));let o=a.reduce((e,t)=>{let{type:n,total:s}=t;return e[n]=s,e},{}),d=[],c=f,u=e;for(let e of t){let t=o[e.type]||0;if(0===t||u>=t){u-=t;continue}let n=t-u,s=Math.min(n,c);if(s>0){let t=Math.floor(u/f)+1,n=u%f;if(d.push({method:e.method,type:e.type,page:t,limit:n+s,offset:n,itemsToTake:s}),(c-=s)<=0)break}u=0}let m=(await Promise.all(d.map(e=>e.method(s.toString(),e.page,e.limit).then(t=>{var n;return((null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.data)||[]).slice(e.offset,e.offset+e.itemsToTake).map(t=>({...t,type:e.type}))}).catch(()=>[])))).flat();_(m),P(!1)}catch(e){console.error("Error fetching data:",e),P(!1)}})()},[x,f]);let q=[{label:"หน้าหลัก",link:"/"},{label:n}],S=(e,t,n)=>{var s,r;let a=null===(s=n.category_post)||void 0===s?void 0:s.documentId,i=null===(r=n.post_type)||void 0===r?void 0:r.post_type_name;if("delve_into_the_world_markets"===e&&"uvluu0pei129kwambr2xwimo"===a)return!i||["Podcast","Presentation"].includes(i)?"":"blockdit"===i?(null==n?void 0:n.link_url)||"":"/post/post-knowledge/".concat(t);if("delve_into_the_world_markets"===e&&["xb5dcuaaa6brpgwtgte9ncmu","ndqk95ttxp9yqp8xapnnayfj"].includes(a))return"/international-foreign-market/Trade-Guide/".concat(t);switch(e){case"delve_into_the_world_markets":return"/post/".concat(t);case"trade_and_investment_guides":return"/international-foreign-market/Investment-Guide/".concat(t);case"ditp_news":return"/post/ditpnew/".concat(t);case"apply_for_works":return"/apply-for-work/".concat(t);case"about_ditp_2s":return"/post/about/about-ditp-2/".concat(t);case"ditp_honest_transparent_no_corruptions":return"/post/ditp-honest/".concat(t);case"procurement_news":return"/post/inthecountry/".concat(t);case"international_trade_promotion_funds":return"/post/international-trade-promotion-fund/".concat(t);case"service_standard_posts":return"/post/service-standard/".concat(t);case"government_information_center_posts":return"/post/government/".concat(t);case"privacy_policy_posts":return"/privacy-policy/".concat(t);case"apply_for_work_posts":return"/post/apply-for-work/".concat(t);default:return""}};return(0,s.jsxs)("div",{className:"pt-16 mb-16",children:[(0,s.jsx)(p.Z,{title:"".concat(n," - กรมส่งเสริมการค้าระหว่างประเทศ"),breadcrumbs:q}),(0,s.jsx)("div",{className:"sticky top-[60px] bg-white",children:(0,s.jsx)(i.Z,{paths:q})}),(0,s.jsxs)("div",{className:"max-w-screen-xl mx-auto px-4",children:[(0,s.jsxs)("div",{className:"mt-8",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-center items-center mt-12 mb-8 text-center",children:[(0,s.jsxs)("div",{className:"flex text-xl md:text-3xl",children:["Tags",(0,s.jsxs)("div",{className:"text-xl md:text-3xl font-semibold",children:['"',n,'"']})]}),(0,s.jsxs)("div",{className:"mt-4",children:[j,"โพสต์"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-4 gap-4",children:k?Array.from({length:f}).map((e,t)=>(0,s.jsx)(m.Z,{},t)):null===(t=(0,h.IU)(y))||void 0===t?void 0:t.map((e,t)=>{let n=S(e.type,null==e?void 0:e.documentId,e);return n?(0,s.jsx)(a(),{href:n,children:(0,s.jsx)(d.Z,{post:e})},t):(0,s.jsx)("div",{children:(0,s.jsx)(d.Z,{post:e})},t)})})]}),(0,s.jsx)(c.Z,{currentPage:x,totalPages:b,itemsPerPage:f,totalItems:j,setCurrentPage:v,setItemsPerPage:g,handlePageClick:e=>{v(e)}})]})]})}}},function(e){e.O(0,[2275,6308,1289,2888,9774,179],function(){return e(e.s=41047)}),_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.