1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[23528],{12913:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ir/investor-services/investor-kits",function(){return l(64825)}])},64825:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return Y}});var a=l(85893),n=l(25675),r=l.n(n),i=l(67294),s=l(93967),c=l.n(s),o=l(93162),d=l(55733),u=l.n(d),h=l(89124),m=l.n(h);let f=["Q1","Q2","Q3","Q4"],b=e=>"ttbQuickDownloadInvestorKits_".concat(e,".zip"),x=[{key:"annual_report",name:"c-annual-report",title:"Annual Report"}],y=()=>({file_en:"",file_th:"",filesize_en:"0",filesize_th:"0"}),v=()=>Array.from({length:4},()=>y()),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return 0;let l=e.trim().toUpperCase(),a=Number.parseFloat(l.replace(/MB|KB|BYTES/g,"").replace(/,/g,"").trim());return Number.isFinite(a)?l.includes("MB")?a:l.includes("KB")?a/1024:l.includes("BYTES")?a/1048576:t?a:a/1048576:0},g=e=>p(e,!0),j=e=>e.files[0]?e.files[0]:{annual_report:[y()],qfs:v(),mda:v(),invest:v()},w=e=>{let t="th"===e?"th":"en";return{localeKey:t,fileField:"th"===t?"file_th":"file_en",filesizeField:"th"===t?"filesize_th":"filesize_en"}},k=function(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null!==(t=e[l])&&void 0!==t?t:y()},N=e=>e?e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9à¸-à¹-_.\s]/g,"").trim().replace(/\s+/g,"-").slice(0,80):"",_=e=>{try{let t=window.location.origin,l=new URL(e,t);if(!l.pathname.endsWith("/api/media-proxy"))return null;let a=l.searchParams.get("url");if(!a)return null;let n=decodeURIComponent(a).split("?")[0].split("/").pop();return n&&n.trim().length>0?n:null}catch(e){return console.error(e),null}},E=e=>{let t=_(e);if(t)return t;let l=e.split("?")[0].split("/").pop();return l&&l.trim().length>0?l:null},S=e=>{let t=E(e);if(!t)return".pdf";let l=t.lastIndexOf(".");return -1===l||l===t.length-1?".pdf":t.slice(l)},C=e=>{var t;let{title:l,moduleTitle:a,year:n,link:r,fallbackIndex:i,extraLabel:s}=e,c=S(r),o="".concat(a," ").concat(n).concat(s?" ".concat(s):""),d=null!==(t=[N(l),N(o)].find(e=>e&&e.length>0))&&void 0!==t?t:"document-".concat(i+1);return"".concat(d).concat(c)},F=[{key:"qfs",name:"c-qfs",title:"Quarterly Financial Statements"},{key:"mda",name:"c-mda",title:"MD&A"},{key:"invest",name:"c-ip",title:"Investor Presentation"}],z=(e,t)=>E(e)||"document-".concat(t+1,".pdf"),A=async e=>{let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch file from ".concat(e));return t.blob()},L=async(e,t)=>{let l=t.map(async(t,l)=>{let{link:a,name:n}=t,r=await A(a),i=n&&n.trim().length>0?n:z(a,l);e.file(i,r)});await Promise.all(l)},q=e=>{let{name:t,title:l,value:n,filesize:r,disabled:i,year:s,filename:c}=e;return(0,a.jsx)("input",{name:t,type:"checkbox",value:n,"data-file-size":r,"data-file-name":c,"data-year":s,"data-role":"item",title:l,disabled:i})},D="input[data-role='item'][data-file-size]",T="input[data-role='master']",I=()=>Array.from(document.querySelectorAll(D)),B=()=>I().filter(e=>e.checked),O=e=>e.reduce((e,t)=>{let l=g(t.dataset.fileSize);return Number.isFinite(l)?e+l:e},0),P=()=>B().map((e,t)=>{var l;let a=z(e.value,t),n=null===(l=e.dataset.fileName)||void 0===l?void 0:l.trim();return{link:e.value,name:n&&n.length>0?n:a}}).filter(e=>!!e.link),M=()=>{I().forEach(e=>{e.checked=!1})},K=()=>Array.from(document.querySelectorAll(T)),Q=()=>{K().forEach(e=>{e.checked=!1,e.indeterminate=!1})},R=e=>{let{item:t,locale:l,localeKey:n,fileField:r,filesizeField:i}=e,s=j(t),c="th"===l?t.year+543:t.year,o="th"===l?t.status_download_all_th:t.status_download_all_en;return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("label",{className:"col-1 text-center",children:c})}),x.map((e,t)=>W(e,s,r,i,c,n,t)),F.map((e,t)=>X(e,s,r,i,c,n,t)),(0,a.jsxs)("td",{className:"text-center",children:[(0,a.jsx)("br",{}),(0,a.jsx)("input",{name:"c-download-all","data-year":c.toString(),"data-role":"master",type:"checkbox",title:"th"===l?"à¸à¸²à¸§à¸à¹à¹à¸«à¸¥à¸à¸à¸±à¹à¸à¸«à¸¡à¸":"Download All",disabled:!o})]})]})},U=e=>{let{pageTitle:t,locale:l,localeKey:n,investorkits:i,fileField:s,filesizeField:o,downloadError:d,handleDownloadSelected:u,handleClearSelections:h,isDownloading:m,getDownloadButtonLabel:f}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"container my-4",children:[(0,a.jsx)("h1",{children:t}),(0,a.jsx)("br",{})]}),(0,a.jsxs)("div",{className:"content py-2 py-md-0 investor-kits-year container",children:[(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"mobile-table-wrapper mf-list-table ba-table benefit-table single-line bg-row mb
1-3 w-100",children:[(0,a.jsxs)("div",{className:"scrolltable-guildline",children:[(0,a.jsx)("p",{className:"text-white",children:"th"===l?"à¹à¸¥à¸·à¹à¸à¸à¹à¸à¸·à¹à¸à¸à¸¹à¸£à¸²à¸¢à¸¥à¸°à¹à¸à¸µà¸¢à¸":"Scroll to view details"}),(0,a.jsx)(r(),{src:"/global/assets/img/batch4/homeloan/fingericon.png",alt:"th"===l?"à¹à¸¥à¸·à¹à¸à¸à¹à¸à¸·à¹à¸à¸à¸¹à¸£à¸²à¸¢à¸¥à¸°à¹à¸à¸µà¸¢à¸":"Scroll to view details",width:32,height:50,priority:!0})]}),(0,a.jsxs)("table",{className:"table table-striped shadow mobile-width",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"bg-navy text-center text-white",children:"\xa0"}),(0,a.jsx)("th",{className:"bg-navy text-center text-white",children:(0,a.jsx)("p",{children:"th"===l?"à¹à¸à¸ 56-1 One Report":"F56-1 One Report"})}),(0,a.jsx)("th",{className:"bg-navy text-center text-white",children:(0,a.jsx)("p",{children:"th"===l?"à¸à¸à¸à¸²à¸£à¹à¸à¸´à¸":"Quarterly Financial Statements"})}),(0,a.jsx)("th",{className:"bg-navy text-center text-white",children:(0,a.jsx)("p",{children:"th"===l?"à¸à¸³à¸à¸à¸´à¸à¸²à¸¢à¹à¸¥à¸°à¸§à¸´à¹à¸à¸£à¸²à¸°à¸«à¹à¸à¸¥à¸à¸²à¸£à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸":"MD&A"})}),(0,a.jsx)("th",{className:"bg-navy text-center text-white",children:"th"===l?(0,a.jsxs)("p",{children:["à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸³à¹à¸ªà¸à¸ ",(0,a.jsx)("br",{})," à¸à¸±à¸à¸¥à¸à¸à¸¸à¸"]}):(0,a.jsx)("p",{children:"Investor Presentation"})}),(0,a.jsx)("th",{className:"bg-navy text-center text-white",children:(0,a.jsx)("p",{children:"th"===l?"à¸à¸²à¸§à¸à¹à¹à¸«à¸¥à¸à¸à¸±à¹à¸à¸«à¸¡à¸":"Download All"})})]})}),(0,a.jsx)("tbody",{children:i.map(e=>(0,a.jsx)(R,{item:e,locale:l,localeKey:n,fileField:s,filesizeField:o},"investor-kits-".concat(e.year)))})]})]})}),(0,a.jsx)("br",{}),(0,a.jsxs)("div",{className:"row justify-content-center",children:[(0,a.jsxs)("div",{className:"col-12 mb-4 text-center",children:["th"===l?"à¸à¸à¸²à¸à¹à¸à¸¥à¹à¸à¸²à¸§à¸à¹à¹à¸«à¸¥à¸":"Size of selected files(uncompressed)"," ",(0,a.jsx)("input",{name:"total-size",id:"total-size",type:"text",defaultValue:"0",readOnly:!0})," MB"]}),d?(0,a.jsx)("div",{className:"col-12 my-2 text-center text-danger small",id:"warning-area",children:d}):(0,a.jsx)("div",{className:"col-12 my-2 text-center text-danger small",id:"warning-area"}),(0,a.jsxs)("div",{className:"col-12 mb-4 text-center",children:[(0,a.jsxs)("button",{type:"button",className:c()("btn mr-3 mt-3",m?"btn-navy":"btn-primary"),onClick:u,disabled:m,children:[f(),m&&(0,a.jsx)("i",{className:"fa fa-spinner fa-pulse fa-fw"})]}),(0,a.jsx)("button",{type:"button",id:"clearInvestorKits",className:"btn btn-secondary mt-3",onClick:h,disabled:m,children:"th"===l?"ลà¹à¸²à¸à¸à¹à¸à¸¡à¸¹à¸¥":"Clear"})]})]})]})]})},W=(e,t,l,n,r,i,s)=>{var c,o;let d=k(t[e.key]),u=null!==(c=d[l])&&void 0!==c?c:"",h=null!==(o=d[n])&&void 0!==o?o:"0",m=C({title:"th"===i?d.title_th:d.title_en,moduleTitle:e.title,year:r,link:u,fallbackIndex:10*r+s});return(0,a.jsx)("td",{className:"text-center",children:(0,a.jsxs)("label",{children:[r,(0,a.jsx)("br",{}),(0,a.jsx)(q,{name:e.name,title:e.title,value:u,filesize:h,disabled:""===u,year:r,filename:m})]})},"".concat(e.key,"-single"))},X=(e,t,l,n,r,i,s)=>(0,a.jsx)("td",{className:"text-center",children:f.map((c,o)=>{var d,u;let h=k(t[e.key],o),m=null!==(d=h[l])&&void 0!==d?d:"",f=null!==(u=h[n])&&void 0!==u?u:"0",b=C({title:"th"===i?h.title_th:h.title_en,moduleTitle:"".concat(e.title," ").concat(c),year:r,link:m,extraLabel:c,fallbackIndex:100*r+10*s+o});return(0,a.jsxs)("label",{className:"text-center mb-0 mr-3",children:[c,(0,a.jsx)("br",{}),(0,a.jsx)(q,{name:e.name,title:e.title,value:m,filesize:f,disabled:""===m,year:r,filename:b})]},"".concat(e.key,"-").concat(c))})},"".concat(e.key,"-quarter"));var Y=!0;t.default=e=>{let{pageTitle:t,locale:l="th",investorkits:n=[]}=e||{},{fileField:r,filesizeField:s,localeKey:c}=w(l),[d,h]=(0,i.useState)(!1),[f,x]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=[],t=[],l=e=>{if(!e)return;let t=e.querySelector(".scrolltable-guildline");t&&"0"!==t.style.opacity&&(t.style.transition="opacity 0.3s",t.style.opacity="0",setTimeout(()=>{t.style.display="none"},300))},a=()=>{let a=document.querySelectorAll(".ba-table-tab .nav-item"),n=document.querySelector(".ba-table-tab .mf-list-table.ba-table .table-div");a.forEach((t,l)=>{let a=()=>
1{if(n){let e=window.innerWidth/2;n.scrollTo({left:Math.round(e*l),behavior:"smooth"})}};t.addEventListener("click",a),e.push({el:t,handler:a})});let r=document.querySelectorAll(".mf-list-table");["mouseover","mousedown","touchmove"].forEach(e=>{r.forEach(a=>{let n=()=>l(a);a.addEventListener(e,n),t.push({el:a,evt:e,handler:n})})})};if("complete"===document.readyState||"interactive"===document.readyState)setTimeout(a,400);else{let e=()=>{setTimeout(a,400),document.removeEventListener("DOMContentLoaded",e)};document.addEventListener("DOMContentLoaded",e)}return()=>{e.forEach(e=>{let{el:t,handler:l}=e;t.removeEventListener("click",l)}),t.forEach(e=>{let{el:t,evt:l,handler:a}=e;t.removeEventListener(l,a)}),e=[],t=[]}},[]);let y=(0,i.useCallback)(()=>{let e=O(B()),t=document.getElementById("total-size");t&&(t.value=e.toFixed(2))},[]),v=(0,i.useCallback)(async e=>{let t=e.filter(e=>!!e.link);if(0===t.length)throw Error("NO_FILE_SELECTED");let a=new(u());await L(a,t);let n=await a.generateAsync({type:"blob"});(0,o.saveAs)(n,b(l))},[l]),p=(0,i.useCallback)(async()=>{if(d)return;let e=P();if(0===e.length){x("th"===l?"à¸à¸£à¸¸à¸à¸²à¹à¸¥à¸·à¸à¸à¹à¸à¸à¸ªà¸²à¸£à¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ 1 รายà¸à¸²à¸£":"Please select at least one document.");return}x(null),h(!0);try{await v(e)}catch(e){x("th"===l?"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸²à¸§à¸à¹à¹à¸«à¸¥à¸à¹à¸à¸¥à¹à¹à¸à¹ à¸à¸£à¸¸à¸à¸²à¸¥à¸à¸à¹à¸«à¸¡à¹à¸à¸µà¸à¸à¸£à¸±à¹à¸":"Unable to download files. Please try again."),console.error(e)}finally{h(!1)}},[v,d,l]),g=(0,i.useCallback)(()=>{p()},[p]),j=(0,i.useCallback)(e=>Array.from(document.querySelectorAll("".concat(D,"[data-year='").concat(e,"']"))),[]),k=(0,i.useCallback)(e=>document.querySelector("".concat(T,"[data-year='").concat(e,"']")),[]),N=(0,i.useCallback)(e=>{let t=k(e);if(!t)return;let l=j(e).filter(e=>!e.disabled);if(0===l.length){t.checked=!1,t.indeterminate=!1;return}let a=l.filter(e=>e.checked).length;t.checked=a===l.length,t.indeterminate=a>0&&a<l.length},[j,k]),_=(0,i.useCallback)((e,t)=>{j(e).forEach(e=>{e.disabled||(e.checked=t)})},[j]),E=(0,i.useCallback)(e=>{let t=e.target;if(!t)return;let l=Number(t.dataset.year);Number.isFinite(l)&&(_(l,t.checked),x(null),y(),N(l))},[x,N,_,y]),S=(0,i.useCallback)(e=>{let t=e.target;if(!t)return;let l=Number(t.dataset.year);Number.isFinite(l)&&(x(null),y(),N(l))},[x,N,y]),C=(0,i.useCallback)(()=>{M(),Q(),y(),x(null)},[y]);return(0,i.useEffect)(()=>{y();let e=document.querySelectorAll(D),t=document.querySelectorAll(T);e.forEach(e=>{e.addEventListener("change",S)}),t.forEach(e=>{e.addEventListener("change",E)});let l=new Set;return e.forEach(e=>{e.dataset.year&&l.add(e.dataset.year)}),l.forEach(e=>{let t=Number(e);Number.isFinite(t)&&N(t)}),()=>{e.forEach(e=>{e.removeEventListener("change",S)}),t.forEach(e=>{e.removeEventListener("change",E)})}},[S,E,n,N,y]),(0,a.jsx)("div",{className:m()["investor-kits"],children:(0,a.jsx)(U,{pageTitle:t,locale:l,localeKey:c,investorkits:n,fileField:r,filesizeField:s,downloadError:f,handleDownloadSelected:g,handleClearSelections:C,isDownloading:d,getDownloadButtonLabel:()=>d?"th"===l?"à¸à¸³à¸¥à¸±à¸à¸à¸²à¸§à¸à¹à¹à¸«à¸¥à¸...":"Downloading...":"th"===l?"à¸à¸²à¸§à¸à¹à¹à¸«à¸¥à¸":"Download"})})}},89124:function(e){e.exports={"investor-kits":"styles_investor-kits__RaG_l"}}},function(e){e.O(0,[50354,92888,49774,40179],function(){return e(e.s=12913)}),_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.