PageSourceSearch

https://www.ditp.go.th/_next/static/chunks/pages/post/post-type/[id]-09c4096818c83c57.js

js ditp.go.th collected 2026-10-02 04:04:52 UTC 9,801 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1817],{15365:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/post/post-type/[id]",function(){return s(95390)}])},3632:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var l=s(85893),n=s(41664),i=s.n(n),a=s(11163);function r(e){let{paths:t}=e,s=(0,a.useRouter)();return(0,l.jsx)("nav",{className:"text-gray-500 text-sm overflow-x-auto whitespace-nowrap custom-scroll",children:(0,l.jsx)("div",{className:"max-w-screen-xl mx-auto px-4",children:(0,l.jsxs)("div",{className:"flex space-x-2 items-center",children:[(0,l.jsx)("img",{src:"/icons/home.png",alt:"Profile",className:"w-4 h-4"}),t.filter(e=>e.label).map((e,n)=>(0,l.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[n>0&&(0,l.jsx)("span",{className:"text-gray-400",children:"/"}),n===t.length-1?(0,l.jsx)("span",{className:"text-black font-semibold",children:e.label}):e.link?(0,l.jsx)(i(),{href:e.link,legacyBehavior:!0,locale:s.locale,children:(0,l.jsx)("a",{className:"text-gray-400 hover:text-gray-600",children:e.label})}):(0,l.jsx)("div",{className:"text-gray-400 line-clamp-1",children:e.label})]},n))]})})})}},52467:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});var l=s(85893),n=s(69740);function i(e){let{currentPage:t,totalPages:s,itemsPerPage:i,totalItems:a,setCurrentPage:r,setItemsPerPage:d,handlePageClick:o,disableScroll:c=!1}=e,m=()=>{c||(0,n.UK)()||window.scrollTo({top:0,behavior:"auto"})},u=e=>{m(),o(e)};return(0,l.jsx)("div",{className:"max-w-screen-xl mx-auto mt-8",children:(0,l.jsxs)("div",{className:"flex justify-center md:justify-between items-center",children:[(0,l.jsxs)("div",{className:"hidden md:flex md:flex-wrap lg:flex-row items-center",children:[(0,l.jsx)("label",{children:"Items per page"}),(0,l.jsx)("select",{value:i,onChange:e=>{d(Number(e.target.value)),r(1),m()},className:"ml-2 border rounded-md px-2 py-1",children:[10,20,50,100].map(e=>(0,l.jsx)("option",{value:e,children:e},e))}),(0,l.jsxs)("div",{className:"md:mt-2 lg:ml-2",children:["Showing ",(t-1)*i+1," -"," ",Math.min(t*i,a)," of ",a," ","Posts"]})]}),(0,l.jsxs)("div",{className:"flex md:space-x-2",children:[(0,l.jsxs)("button",{onClick:()=>u(t-1),disabled:1===t,className:"px-3 py-1 border rounded-2xl disabled:opacity-50 flex items-center gap-2",children:[(0,l.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,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})}),(0,l.jsx)("div",{className:"hidden md:block",children:"Previous"})]}),(0,l.jsx)("div",{className:"flex items-center space-x-1",children:(()=>{let e=[];for(let l=0;l<Math.min(7,s);l++){let n;n=s<=7?l+1:t<=4?l<5?l+1:5===l?"...":s:t>s-4?0===l?1:1===l?"...":s-(6-l):0===l?1:1===l?"...":l<5?t-(3-l):5===l?"...":s,e.push(n)}return e})().map((e,s)=>(0,l.jsx)("button",{onClick:()=>"number"==typeof e?u(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},s))}),(0,l.jsxs)("button",{onClick:()=>u(t+1),disabled:t===s,className:"px-3 py-1 border rounded-2xl disabled:opacity-50 flex items-center gap-2",children:[(0,l.jsx)("div",{className:"hidden md:block",children:"Next"}),(0,l.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,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})})]})]})]})})}},81640:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var l=s(85893),n=s(24985),i=s(63805);function a(e){var t,s,a,r,d,o,c,m,u,x;let{post:h}=e;return n.QP,(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.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,l.jsx)("img",{className:"h-48 w-full object-cover object-top md:h-48 hover:opacity-75",src:null!==(x=null!==(u=null===(a=h.image)||void 0===a?void 0:null===(s=a.formats)||void 0===s?void 0:null===(t=s.small)||void 0===t?void 0:t.url)&&void 0!==u?u:null===(r=h.image)||void 0===r?void 0:r.url)&&void 0!==x?x:"/images/ditpimage.png",alt:"Home in Countryside"}),(0,l.jsxs)("div",{className:"flex flex-col h-40 justify-between",children:[(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsx)("div",{className:"text-md text-pretty font-medium text-left line-clamp-2 hover:opacity-50",children:h.title}),(0,l.jsxs)("div",{className:"mt-1 text-gray-500 text-sm text-left line-clamp-1",children:[null===(d=h.region)||void 0===d?void 0:d.region_name," ",(null===(o=h.region)||void 0===o?void 0:o.region_name)&&(null===(c=h.category)||void 0===c?void 0:c.category_name)&&" • "," ",null===(m=h.category)||void 0===m?void 0:m.category_name]})]}),(0,l.jsx)("div",{className:"text-gray-500 text-sm text-left p-4",children:(0,i.vc)((null==h?void 0:h.publish_date)||(null==h?void 0:h.current_publish)||(null==h?void 0:h.createdAt),h.locale)})]})]})})}s(71061)},33452:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});var l=s(85893);function n(){return(0,l.jsxs)("div",{className:"flex justify-center",children:[(0,l.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,l.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,l.jsx)("div",{className:"shimmer"})}),(0,l.jsx)("div",{className:"h-48 w-full bg-gray-200"}),(0,l.jsxs)("div",{className:"flex flex-col h-40 justify-between",children:[(0,l.jsxs)("div",{className:"p-4 space-y-2",children:[(0,l.jsx)("div",{className:"h-4 bg-gray-200 rounded w-11/12"}),(0,l.jsx)("div",{className:"h-4 bg-gray-200 rounded w-8/12"})]}),(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)("div",{className:"h-4 bg-gray-200 rounded w-6/12"})})]})]}),(0,l.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        "})]})}},95390:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return v},default:function(){return p}});var l=s(85893),n=s(41664),i=s.n(n),a=s(3632),r=s(76809),d=s(67294),o=s(81640),c=s(52467),m=s(11163),u=s(66308),x=s(33452),h=s(63805),v=!0;function p(e){var t,s,n,v;let{id:p}=(0,m.useRouter)().query,{locale:f}=(0,m.useRouter)(),[g,j]=(0,d.useState)(e.currentPage),[b,w]=(0,d.useState)(e.itemsPerPage),[y,N]=(0,d.useState)(e.posttypes.data||[]),[_,k]=(0,d.useState)(0),[P,C]=(0,d.useState)(0),[S,Z]=(0,d.useState)(!1);(0,d.useEffect)(()=>{(async()=>{Z(!0);try{let e=new URLSearchParams;e.append("filters[post_type][documentId][$in]",p);let t=(await r.hi.getdelveintoteworldresult(e,f,g,b)).data;k(t.meta.pagination.total),C(t.meta.pagination.pageCount),N(t.data)}catch(e){console.error("Error fetching data: ",e)}finally{Z(!1)}})()},[g,b]);let E=[{label:"หน้าหลัก",link:"/"},{label:null===(t=y[0])||void 0===t?void 0:t.post_type.post_type_name}],I=(e,t,s)=>{var l,n;let i=null===(l=s.category_post)||void 0===l?void 0:l.documentId,a=null===(n=s.post_type)||void 0===n?void 0:n.post_type_name;if("uvluu0pei129kwambr2xwimo"===i)return!a||["Podcast","Presentation"].includes(a)?"":"blockdit"===a?(null==s?void 0:s.link_url)||"":"/post/post-knowledge/".concat(t);if("delve_into_the_world_markets"===e&&["xb5dcuaaa6brpgwtgte9ncmu","ndqk95ttxp9yqp8xapnnayfj"].includes(i))return"/international-foreign-market/Trade-Guide/".concat(t);switch(e){case i:return"/post/".concat(t);case"trade_and_investment_guides":return"/international-foreign-market/Investment-Guide/".concat(t);default:return""}};return(0,l.jsxs)("div",{className:"pt-16 mb-16",children:[(0,l.jsx)(u.Z,{title:"".concat(null===(s=y[0])||void 0===s?void 0:s.post_type.post_type_name," - กรมส่งเสริมการค้าระหว่างประเทศ"),breadcrumbs:E}
1),(0,l.jsx)("div",{className:"sticky top-[60px] bg-white",children:(0,l.jsx)(a.Z,{paths:E})}),(0,l.jsxs)("div",{className:"max-w-screen-xl mx-auto px-4",children:[(0,l.jsxs)("div",{className:"mt-8",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-center items-center mt-12 mb-8 text-center",children:[(0,l.jsxs)("div",{className:"flex text-xl md:text-3xl",children:["ประเภทข้อมูล",(0,l.jsxs)("div",{className:"text-xl md:text-3xl font-semibold",children:['"',null===(n=y[0])||void 0===n?void 0:n.post_type.post_type_name,'"']})]}),(0,l.jsxs)("div",{className:"mt-4",children:[_,"โพสต์"]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-4 gap-4",children:S?Array.from({length:b}).map((e,t)=>(0,l.jsx)(x.Z,{},t)):null===(v=(0,h.IU)(y))||void 0===v?void 0:v.map((e,t)=>{let s=I(e.type,null==e?void 0:e.documentId,e);return s?(0,l.jsx)(i(),{href:s,children:(0,l.jsx)(o.Z,{post:e})},t):(0,l.jsx)("div",{children:(0,l.jsx)(o.Z,{post:e})},t)})})]}),(0,l.jsx)(c.Z,{currentPage:g,totalPages:P,itemsPerPage:b,totalItems:_,setCurrentPage:j,setItemsPerPage:w,handlePageClick:e=>{j(e)}})]})]})}}},function(e){e.O(0,[2275,6308,1289,2888,9774,179],function(){return e(e.s=15365)}),_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.