PageSourceSearch

https://sup-d.com/_next/static/chunks/5229-82feae204b25664f.js

js sup-d.com collected 2026-10-06 05:33:23 UTC 28,819 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5229],{44510:function(e,t,o){var r=o(64836);t.Z=void 0;var n=r(o(64938)),i=o(85893),a=(0,n.default)((0,i.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");t.Z=a},50891:function(e,t,o){var r=o(64836);t.Z=void 0;var n=r(o(64938)),i=o(85893),a=(0,n.default)((0,i.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"}),"Email");t.Z=a},11145:function(e,t,o){var r=o(64836);t.Z=void 0;var n=r(o(64938)),i=o(85893),a=(0,n.default)((0,i.jsx)("path",{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"}),"Phone");t.Z=a},26307:function(e,t,o){var r=o(64836);t.Z=void 0;var n=r(o(64938)),i=o(85893),a=(0,n.default)((0,i.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");t.Z=a},68357:function(e,t,o){var r=o(64836);t.Z=void 0;var n=r(o(64938)),i=o(85893),a=(0,n.default)((0,i.jsx)("path",{d:"M11 6.83 9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83V21h-2z"}),"Straight");t.Z=a},11165:function(e,t,o){var r=o(85893),n=o(67294),i=o(83321),a=o(78797),s=o(22607),l=o(73324);let d=[{id:"demo-room-1",name:"ห้องนั่งเล่น",panoramaUrl:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/livingroom.png",status:l.a.CONFIRMED,jobId:"demo-job-1",firstImageUrl:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/normal-livingroom.png",secondImageUrl:"https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=400&h=300&fit=crop",hotSpots:[{id:"hs-1",pitch:0,yaw:-93.27871326676197,type:"scene",text:"ไปห้องน้ำ",sceneId:"demo-room-3"},{id:"hs-2",pitch:0,yaw:-130,type:"scene",text:"ไปห้องนอน",sce
1neId:"demo-room-2"}],initialView:{pitch:0,yaw:-130,hfov:150}},{id:"demo-room-2",name:"ห้องนอน",panoramaUrl:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/bedroom.png",status:l.a.CONFIRMED,jobId:"demo-job-2",firstImageUrl:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/normal-bedroom.png",secondImageUrl:"https://images.unsplash.com/photo-1522771739844-6a9f6d5f14af?w=400&h=300&fit=crop",hotSpots:[{id:"hs-1",pitch:0,yaw:-100,type:"scene",text:"ไปห้องนั่งเล่น",sceneId:"demo-room-1"}],initialView:{pitch:0,yaw:-90,hfov:150}},{id:"demo-room-3",name:"ห้องน้ำ",panoramaUrl:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/bathroom.png",status:l.a.CONFIRMED,jobId:"demo-job-3",firstImageUrl:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/normal-bathroom.png",secondImageUrl:"https://images.unsplash.com/photo-1522771739844-6a9f6d5f14af?w=400&h=300&fit=crop",hotSpots:[{id:"hs-1",pitch:0,yaw:-60.20196063603372,type:"scene",text:"ไปห้องนั่งเล่น",sceneId:"demo-room-1"}],initialView:{pitch:0,yaw:0,hfov:150}}],c=e=>{let{buttonText:t="ชมบ้าน 3D",sx:o,disabled:l=!1,rooms:c=d}=e,[u,p]=(0,n.useState)(!1),h=()=>{l||p(!0)},x=()=>{p(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Z,{variant:"contained",onClick:h,disabled:l,startIcon:(0,r.jsx)(a.Z,{sx:{color:"#0EA5E9"}}),sx:{bgcolor:"rgba(0, 0, 0, 0.8)",color:"white",borderRadius:2,px:3,py:1.5,fontSize:"0.875rem",fontWeight:500,boxShadow:"0 4px 12px rgba(139, 92, 246, 0.4)","&:hover":{bgcolor:"rgba(0, 0, 0, 0.9)",boxShadow:"0 6px 16px rgba(139, 92, 246, 0.5)"},"&:disabled":{bgcolor:"rgba(128, 128, 128, 0.5)",color:"rgba(255, 255, 255, 0.5)"},...o},children:t}),(0,r.jsx)(s.t,{rooms:c,open:u,onClose:x})]})};t.Z=c},28238:function(e,t,o){o.d(t,{Z:function(){return ea}});var r=o(85893),n=o(51233),i=o(90629),a=o(93946),s=o(15861),l=o(19692),d=o(20984),c=o(68383),u=o(27527),p=o(67294),h=o(11163),x=o(49051);let g=e=>{if(30001==e.productId)return"สำหรับสมาชิก";let t=(0,x.x6)(e.durations);return t+" วัน "},m=(e,t)=>30001==e.productId&&!t,v=e=>{var t;if(!e)return"";let o=null==e?void 0:e.items[0].product.productId;return 30001==o?"ตามวันหมดอายุสมาชิก":"".concat(null==e?void 0:null===(t=e.duration)||void 0===t?void 0:t.totalDuration," วัน")};var f=o(83321),y=o(99226),b=o(57922),j=o(186);o(76268),o(84940),o(99304),o(2261);let Z={border:"2px solid #EEE",borderRadius:"8px"};function w(e){let{postProduct:t,handlePackageChange:o,productId:n}=e;return(0,r.jsx)(y.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:1,my:2,p:2,backgroundColor:"white",...Z},children:(0,r.jsx)(k,{sx:{p:2,cursor:"pointer",border:"2px solid #38bb34",background:"#34b25654","&:hover":{background:"#34b25636"}},onClick:()=>{},children:(0,r.jsx)(D,{variant:"subtitle1",children:"โปรโมชั่นลงประกาศราคาพิเศษ"})})})}({...Z});var I=o(68357),S=o(51556),C=o(93659);let k=(0,j.ZP)(f.Z)(e=>{let{theme:t}=e;return{"&:active":{border:"2px solid #38bb34",boxShadow:"0px 1px 1px 0px"},flex:1}}),D=(0,j.ZP)(s.Z)(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",textAlign:"center",flex:"1"}}),E=(0,j.ZP)(f.Z)(e=>{let{selected:t,isMemberPack:o}=e;return{padding:"8px 16px",cursor:"pointer",backgroundColor:t?"#FFF1F2":"white",borderRadius:"8px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.5,position:"relative",transition:"all 0.2s ease-in-out",boxShadow:t?"0px 0px 0px 1px #E3215D":"0px 0px 0px 1px #00000014","&:hover":{background:t?"#ffb6bbff":"#fff2f2ff",transform:"translateY(-2px)",boxShadow:"0px 0px 0px 1px #E3215D"},minHeight:"60px"}}),P=e=>{let{postProduct:t,handlePackageChange:o,productId:n,isPremiumMember:i}=e;return(0,r.jsxs)(y.Z,{sx:{display:"flex",flexDirection:"column",gap:2,p:2,backgroundColor:"white",borderRadius:2},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",gutterBottom:!0,fontWeight:500,textAlign:"start",children:"เลือกแพ็คเก็จ"}),(0,r.jsx)(y.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, 1fr)"},gap:2},children:t.map((e,t)=>(0,r.jsx)(E,{selected:e.productId==n,isMemberPack:!1,onClick:()=>{o(e.productId)},children:(0,r.jsx)(s.Z,{variant:"body2",sx:{fontWeight:500,color:"#18181B"},children:g(e)})},t))})]})},F=e=>{var t;let{postProduct:o,handlePackageChange:i,productId:a,isPremiumMember:l}=e,d=C.v.eligiblePackage;return(0,r.jsxs)(y.Z,{sx:{display:"flex",flexDirection:"column",gap:2,p:2,backgroundColor:"white",borderRadius:2},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",gutterBottom:!0,fontWeight:500,textAlign:"start",children:"เลือกแพ็คเก็จสุดคุ้ม"}),(0,r.jsx)(y.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:1.25},children:o.map((e,o)=>(0,r.jsxs)(E,{variant:"contained",isMemberPack:30001==e.productId,selected:e.productId===a,onClick:()=>{i(e.productId)},disabled:m(e,null!=l&&l),children:[0!=e.bonusDays&&(0,r.jsx)(y.Z,{sx:{position:"absolute",top:0,right:0,backgroundColor:"#9F1239",color:"white",px:"6px",borderRadius:"0px 8px 0px 8px",fontSize:"11px",fontWeight:600},children:"ฟรี"}),(0,r.jsxs)(n.Z,{direction:"row",sx:{alignItems:"center"},gap:1,children:[d.includes(e.productId)&&(0,r.jsx)(S.Z,{fontSize:"small",sx:{color:"#18181B"}}),(0,r.jsx)(s.Z,{variant:"body2",sx:{fontWeight:500,color:"#18181B",alignItems:"center"},children:30001!=e.productId?"".concat(e.publishedDays-(null!==(t=e.bonusDays)&&void 0!==t?t:0)," วัน"):"สำหรับสมาชิก"})]}),e.bonusDays&&e.bonusDays>0?(0,r.jsxs)(s.Z,{variant:"body2",sx:{color:"#BE123C",border:"1px solid #FECDD3",padding:"4px 6px",bgcolor:"#FFE4E6",borderRadius:"6px",fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,r.jsx)(I.Z,{sx:{fontSize:"11px"}}),"รับเพิ่มทันที! +",e.bonusDays," วัน"]}):(0,r.jsx)(r.Fragment,{})]},o))}),(0,r.jsx)(b.Z,{in:d.includes(a),timeout:300,unmountOnExit:!0,children:(0,r.jsxs)(n.Z,{direction:"row",sx:{alignItems:"center",backgroundColor:"#F7F7F7",p:1,borderRadius:1},gap:1,children:[(0,r.jsx)(S.Z,{fontSize:"small",sx:{color:"#18181B"}}),(0,r.jsx)(s.Z,{variant:"body2",children:"พิเศษฟีดเจอร์ AI วิดีโอโดรน-ชมบ้าน 3D ฟรี!"})]})})]})},R=e=>{let{productId:t,postProducts:o,pinProducts:n,isPremium:i,isForPinPayment:a,handlePackageChange:s}=e;return(0,r.jsx)(r.Fragment,{children:a?(0,r.jsx)(P,{postProduct:n,handlePackageChange:s,productId:t,isPremiumMember:i}):[50001,50002].includes(t)?(0,r.jsx)(w,{postProduct:o,handlePackageChange:s,productId:t}):(0,r.jsx)(F,{postProduct:o,handlePackageChange:s,productId:t,isPremiumMember:i})})};var A=o(85663),M=o(82657),W=o(79493),L=o(69111),U=o(62678),O=o(83988),z=o(20724),N=o(85945),T=o(26139),B=o(88078),V=o(95648),_=o(86235),K=o(78797),$=o(69368);let J={accent:"#E11D48",accentLight:"#FFF1F2",background:"#FAFAFA",border:"#E4E4E7",textSecondary:"#7171
17A"},Q=e=>{let{type:t,title:o,description:a,icon:l,price:d,selected:c,onToggle:u,disabled:p=!1}=e;return(0,r.jsx)(i.Z,{elevation:0,sx:{border:"1px solid ".concat(J.border),borderRadius:2,bgcolor:"background.paper",opacity:p?.6:1,pointerEvents:p?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":p?{}:{borderColor:J.accent,boxShadow:"0 2px 8px rgba(225, 29, 72, 0.1)"}},children:(0,r.jsx)(y.Z,{sx:{p:2,cursor:p?"not-allowed":"pointer"},onClick:u,children:(0,r.jsxs)(n.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:2,children:[(0,r.jsxs)(n.Z,{direction:"row",gap:1.5,alignItems:"center",children:[(0,r.jsx)($.Z,{checked:c,onChange:e=>{e.stopPropagation(),u()},disabled:p,sx:{color:J.accent,p:0,"&.Mui-checked":{color:J.accent}}}),(0,r.jsx)(y.Z,{sx:{fontSize:48,display:"flex",alignItems:"center",justifyContent:"center",color:J.accent},children:l}),(0,r.jsxs)(n.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",fontWeight:500,children:o}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:a})]})]}),(0,r.jsx)(n.Z,{direction:"row",alignItems:"center",spacing:1,children:null!==d&&(0,r.jsx)(s.Z,{variant:"h6",fontWeight:500,color:J.accent,sx:{minWidth:"50px"},children:0===d?"ฟรี":"".concat(d," ฿")})})]})})})};var H=o(11165);let Y=e=>{let{videoUrl:t,poster:o,title:n,height:i=200}=e,a=(0,p.useRef)(null),[l,d]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>d(!0),o=()=>d(!1);return e.addEventListener("play",t),e.addEventListener("pause",o),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",o)}},[]),(0,p.useEffect)(()=>{let e=a.current;e&&t&&e.play().catch(e=>{console.log("Auto-play prevented:",e)})},[t]),(0,r.jsx)(y.Z,{sx:{position:"relative",width:"100%",height:i,bgcolor:"grey.100",borderRadius:2,overflow:"hidden"},children:t?(0,r.jsx)("video",{ref:a,src:t,poster:o,muted:!0,loop:!0,playsInline:!0,style:{width:"100%",height:"100%",objectFit:"cover"},onClick:()=>{a.current&&(a.current.paused?a.current.play():a.current.pause())}}):(0,r.jsx)(y.Z,{sx:{width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",bgcolor:"grey.100"},children:(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"วิดีโอตัวอย่าง"})})})},q=e=>{let{type:t,height:o=200}=e;return"DRONE"===t?(0,r.jsx)(Y,{title:"Drone Video Preview",height:o,videoUrl:"https://storage.googleapis.com/sup-d-videos/69648ced388638106545411f/ecf696/video.mp4"}):"3D"===t?(0,r.jsxs)(y.Z,{sx:{width:"100%",margin:"20px 0",textAlign:"center",position:"relative"},children:[(0,r.jsx)(y.Z,{component:"img",src:"https://storage.googleapis.com/sup-d-three-d-view/demo-room/normal-bedroom.png",alt:"3D TOUR Interactive Preview - ภาพรวมการใช้งานระบบทัวร์เสมือนจริง 3 มิติ",loading:"lazy",decoding:"async",sx:{width:"100%",maxWidth:"600px",height:"200px",borderRadius:"10px",transition:"transform 0.2s ease-in-out",filter:"blur(8px)",objectFit:"cover"}}),(0,r.jsx)(y.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,r.jsx)(H.Z,{buttonText:"ลองชมตัวอย่าง 3D TOUR"})})]}):(0,r.jsxs)(y.Z,{sx:{width:"100%",height:o,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",bgcolor:"#FEF3C7",borderRadius:2,border:"2px dashed #F59E0B"},children:[(0,r.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#F59E0B",strokeWidth:"2",children:(0,r.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})}),(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"ปักหมุดประกาศ"}),(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",align:"center",sx:{px:2,mt:.5},children:"ประกาศของคุณจะแสดงที่ด้านบน"})]})},G={accent:"#E11D48"},X=e=>{let{assetPostId:t,assetType:o,onSelectedAddonsChange:i,isLoading:a}=e,[l,d]=(0,p.useState)([]),{data:c,isLoading:u}=(0,T.v)(t,!0),h="land"===o,x=(0,p.useMemo)(()=>(console.log("available product"),c)?h?c.filter(e=>V.vc.includes(e.productId)):c.filter(e=>V.T3.includes(e.productId)):[],[c,h]),g=(0,p.useMemo)(()=>{var e,t;let o=[];if(x.some(e=>(0,V.ty)(e.productId))){let t=x.find(e=>(0,V.ty)(e.productId));o.push({type:"DRONE",title:"AI Drone View",description:"เห็นทำเลรอบทิศ",icon:(0,r.jsx)(_.Z,{}),price:null!==(e=null==t?void 0:t.price)&&void 0!==e?e:null})}if(x.some(e=>(0,V.W7)(e.productId))){let e=x.find(e=>(0,V.W7)(e.productId));o.push({type:"3D",title:"ห้อง 360\xb0",description:"เดินชมห้องเสมือนจริง",icon:(0,r.jsx)(K.Z,{}),price:null!==(t=null==e?void 0:e.price)&&void 0!==t?t:null})}return o},[x]),m=(0,p.useMemo)(()=>{let e=[];return l.forEach(t=>{if("DRONE"===t){let t=x.find(e=>(0,V.ty)(e.productId));t&&e.push({productId:t.productId,price:t.price,type:"DRONE",description:t.description,usages:t.usages})}else if("3D"===t){let t=x.find(e=>(0,V.W7)(e.productId));t&&e.push({productId:t.productId,price:t.price,type:"3D",description:t.description,usages:t.usages})}}),e},[l,x]);(0,p.useEffect)(()=>{null==i||i(m)},[m,i]);let v=e=>l.includes(e),f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])};return u||0!==g.length?(0,r.jsxs)(y.Z,{sx:{display:"flex",flexDirection:"column",gap:2,bgcolor:"white",borderRadius:2,p:2},children:[(0,r.jsxs)(n.Z,{direction:"row",sx:{gap:1},children:[(0,r.jsx)(S.Z,{sx:{color:"#b8b80f"}}),(0,r.jsx)(s.Z,{variant:"subtitle1",fontWeight:500,children:"เพิ่มโอกาสขายด้วย AI "}),(0,r.jsx)(s.Z,{variant:"subtitle1",fontWeight:500,color:G.accent,children:"(แนะนำ)"})]}),u?(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",textAlign:"center",py:4,children:"กำลังโหลด..."}):(0,r.jsxs)(n.Z,{gap:1.5,children:[g.map(e=>
1(0,r.jsx)(Q,{type:e.type,title:e.title,description:e.description,icon:e.icon,price:e.price,selected:v(e.type),onToggle:()=>f(e.type)},e.type)),a?(0,r.jsx)(y.Z,{sx:{py:.5},children:(0,r.jsx)(B.Z,{variant:"rectangular",width:"100%",height:200,sx:{borderRadius:2}})}):(0,r.jsx)(y.Z,{sx:{py:.5},children:(0,r.jsx)(q,{type:h?"DRONE":"3D",height:200})})]})]}):null};var ee=o(67720);let et={accent:"#E11D48"},eo=e=>{let{duration:t,totalBeforeDiscount:o,discount:a,addonCharges:l,finalAmount:d,summaryData:c}=e;return(0,r.jsxs)(i.Z,{elevation:0,sx:{display:"flex",flexDirection:"column",gap:"10px"},children:[(0,r.jsx)(s.Z,{variant:"subtitle1",gutterBottom:!0,fontWeight:500,children:"ค่าบริการ"}),(0,r.jsxs)(n.Z,{gap:1,children:[(0,r.jsxs)(n.Z,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"ระยะเวลา"}),(0,r.jsx)(s.Z,{variant:"body2",fontWeight:500,children:v(c)||t})]}),(0,r.jsxs)(n.Z,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"ค่าบริการก่อนส่วนลด"}),(0,r.jsxs)(s.Z,{variant:"body2",fontWeight:500,children:[o.toLocaleString()," ฿"]})]}),(0,r.jsxs)(n.Z,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"ส่วนลด"}),(0,r.jsxs)(s.Z,{variant:"body2",fontWeight:500,children:["-",a.toLocaleString()," ฿"]})]}),(0,r.jsx)(b.Z,{in:l>0,timeout:300,unmountOnExit:!0,children:(0,r.jsxs)(n.Z,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"ค่าบริการเสริม"}),(0,r.jsxs)(s.Z,{variant:"body2",fontWeight:500,color:et.accent,children:["+",l.toLocaleString()," ฿"]})]})}),(0,r.jsx)(ee.Z,{}),(0,r.jsxs)(n.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsx)(s.Z,{variant:"body2",fontWeight:400,children:"ค่าบริการรวม"}),(0,r.jsxs)(s.Z,{variant:"body1",fontWeight:500,children:[(d+l).toLocaleString()," ฿"]})]})]})]})};var er=o(45473),en=o(95231),ei=o(34281);function ea(e){var t,o,x,g,m,v,f,y,b,j,Z,w,I;let{assetPostIds:S,postProducts:C,pinProducts:k,productId:D,upsellTrxId:E,isPremiumMember:P,packageDuration:F="90 วัน",referralCode:B,onBack:V,isVerified:_,paymentService:K,partyMembership:$,agentSubscription:J}=e,Q=(0,N.NL)(),H=(0,h.useRouter)(),Y="pin"==K,q="publish"===K,[G,ee]=(0,p.useState)("personal"),et="party-slot"===G||"party-credit"===G,ea="agent-slot"===G||"agent-credit"===G,es="party-slot"===G||"agent-slot"===G,el=et&&q?"party-publish":ea&&q?"agent-publish":K,[ed,ec]=(0,p.useState)("promptpay"),[eu,ep]=(0,p.useState)(!1),[eh,ex]=(0,p.useState)(!1),[eg,em]=(0,p.useState)([]),[ev,ef]=(0,p.useState)(""),[ey,eb]=(0,p.useState)(""),[ej,eZ]=(0,p.useState)(D?Number(D):Y?10001:u.b),ew={assetPostIds:S,productId:ej,voucherCode:ey,referralCode:B,upsellTrxId:E},{data:eI,isLoading:eS}=(0,W.sN)(ew,!Y),{data:eC,isLoading:ek}=(0,W.VJ)(ew,Y),eD=Y?eC:eI,eE=null==eD?void 0:eD.items.map(e=>e.assetPost),eP=Y?ek:eS,eF=(0,p.useMemo)(()=>!!eE&&eE.some(e=>{var t;let o=e.publishments;if(!o||0===o.length)return!1;let r=o[o.length-1];return(null===(t=e.assetPostState)||void 0===t?void 0:t.type)==="published"&&((null==r?void 0:r.partyResourceType)==="slot"||(null==r?void 0:r.agentResourceType)==="slot")}),[eE]),{data:eR}=(0,T.v)(S[0],!Y);(0,p.useEffect)(()=>{if(!(null==eD?void 0:eD.voucherSummary))return;let{state:e,message:t}=eD.voucherSummary.voucherState||{};"Valid"!==e?((0,L.x2)(t||"รหัสส่วนลดไม่ถูกต้อง"),ef(""),eb("")):ey&&(0,L.s$)(t||"ใช้รหัสส่วนลดสำเร็จ")},[null==eD?void 0:null===(t=eD.voucherSummary)||void 0===t?void 0:null===(o=t.voucherState)||void 0===o?void 0:o.state]);let eA=(null==eD?void 0:null===(x=eD.total)||void 0===x?void 0:x.totalDiscount)||(null==eD?void 0:null===(g=eD.voucherSummary)||void 0===g?void 0:g.totalDiscount)||0,eM=(null==eD?void 0:null===(m=eD.total)||void 0===m?void 0:m.total)||0,eW=(null==eD?void 0:null===(v=eD.voucherSummary)||void 0===v?void 0:null===(f=v.voucherState)||void 0===f?void 0:f.state)==="Valid",eL=(null==eD?void 0:null===(y=eD.duration)||void 0===y?void 0:y.totalDuration)||F,eU=Y?"เติมเงินสำหรับปักหมุด ".concat((null==eE?void 0:eE.length)||0," รายการ"):"เติมเงินสำหรับลงประกาศทรัพย์ ".concat((null==eE?void 0:eE.length)||0," รายการ"),eO=e=>{ec(e),ep(!1)},ez=()=>
1{if(!ev.trim()){(0,L.K2)("กรุณากรอกโค้ดส่วนลด");return}eb(ev.trim())},eN=()=>{ef(""),eb("")},eT=(0,c.K0)(q?eE:null),[eB,eV]=(0,p.useState)(""),e_=q?{publishKind:eT,publishAttemptId:eB,publishPostCount:String(S.length),publishProductId:es?"":String(ej)}:{},eK=()=>{eV("undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2))),ex(!0)},e$=e=>{ex(!1),(0,L.s$)("ชำระเงินสำเร็จ"),Q.invalidateQueries({queryKey:["me"]});let t=eg.reduce((e,t)=>e+t.price,0),o=new URLSearchParams({...e_,trxId:e,amount:String(eM+t),duration:String(eL),paymentService:String(el),productId:null!=D?D:"",assetPostId:S[0],paymentSource:G});eg.length>0&&(o.append("addonProductIds",eg.map(e=>e.productId).join(",")),o.append("addonTypes",eg.map(e=>e.type).join(","))),H.push("/asset-listing/payment-success?".concat(o.toString()))},eJ=()=>{ex(!1)},eQ=e=>{eZ(e),ee("personal"),30001==e&&ec("coin")},eH=()=>{ee(e=>"party-slot"===e?"personal":"party-slot")},eY=()=>{ee(e=>"party-credit"===e?"personal":"party-credit")},eq=()=>{ee(e=>"agent-slot"===e?"personal":"agent-slot")},eG=()=>{ee(e=>"agent-credit"===e?"personal":"agent-credit")};(0,p.useEffect)(()=>{Y&&eZ(10001)},[Y]);let eX=q&&"personal"===G&&!eP&&!!(null==eD?void 0:eD.total)&&eM+eg.reduce((e,t)=>e+t.price,0)===0;return(0,p.useEffect)(()=>{q&&(0,l.sendGAEvent)("event",d.gB.ListingCheckoutView)},[q]),(0,p.useEffect)(()=>{let e=eM+eg.reduce((e,t)=>e+t.price,0);0===e&&ec("coin")},[eM,eg]),(0,r.jsxs)(n.Z,{sx:{position:"relative",mx:"auto",pb:12,gap:1,"& > *":{p:1.5,borderRadius:1.5}},children:[(0,r.jsxs)(i.Z,{elevation:0,sx:{flexDirection:"row",alignItems:"center",display:{xs:"flex",sm:"none"}},children:[(0,r.jsx)(a.Z,{onClick:V,children:(0,r.jsx)(z.Z,{})}),(0,r.jsx)(s.Z,{fontWeight:500,children:eX?"ยืนยันและเผยแพร่ประกาศ":"สรุปค่าบริการ"})]}),(0,r.jsx)(O.o,{open:!_,onClose:()=>{}}),(0,r.jsx)(i.Z,{elevation:0,children:(0,r.jsx)(U.cU,{assets:eE||[]})}),(0,r.jsx)(R,{productId:"party-slot"===G||"agent-slot"===G?-1:ej,postProducts:C,pinProducts:k,isPremium:P,isForPinPayment:Y,handlePackageChange:eQ}),$&&(0,r.jsx)(er.Z,{partyMembership:$,paymentSource:G,onSelectSlot:q?eH:void 0,onSelectCredit:eY,creditOnly:!q}),J&&(0,r.jsx)(en.Z,{agentSubscription:J,paymentSource:G,onSelectSlot:q?eq:void 0,onSelectCredit:eG,creditOnly:!q}),!Y&&!et&&!ea&&(0,r.jsx)(X,{assetPostId:S[0],assetType:(null==eE?void 0:null===(b=eE[0])||void 0===b?void 0:b.assetType)||"land",onSelectedAddonsChange:em,isLoading:eP}),!et&&!ea&&(0,r.jsx)(i.Z,{elevation:0,sx:{background:"linear-gradient(270deg, rgba(9, 174, 239, 1) 100%, rgba(0, 210, 255, 0.3) 30%)",color:"white"},children:(0,r.jsx)(s.Z,{fontWeight:500,textAlign:"center",children:"ขายออกก่อน รับเครดิตส่วนที่เหลือคืนทันที"})}),et&&(0,r.jsx)(i.Z,{elevation:0,sx:{background:"linear-gradient(270deg, rgba(9, 174, 239, 1) 100%, rgba(0, 210, 255, 0.3) 30%)",color:"white"},children:(0,r.jsx)(s.Z,{fontWeight:500,textAlign:"center",children:"party-slot"===G?"ใช้สล็อตทีมลงประกาศฟรี (หมดอายุตามแพ็คเกจ)":"ชำระด้วยเครดิตทีม (ไม่สามารถคืนเงินค่าบริการเสริมได้)"})}),ea&&(0,r.jsx)(i.Z,{elevation:0,sx:{background:"linear-gradient(270deg, rgba(9, 174, 239, 1) 100%, rgba(0, 210, 255, 0.3) 30%)",color:"white"},children:(0,r.jsx)(s.Z,{fontWeight:500,textAlign:"center",children:"agent-slot"===G?"ใช้สล็อตนายหน้าลงประกาศฟรี (หมดอายุตามแพ็คเกจ)":"ชำระด้วยเครดิตนายหน้า (ไม่สามารถคืนเงินค่าบริการเสริมได้)"})}),!et&&!ea&&(0,r.jsx)(i.Z,{elevation:0,children:(0,r.jsx)(U.wy,{selectedMethod:ed,onOpenModal:()=>ep(!0)})}),!et&&!ea&&(0,r.jsx)(U.vx,{voucherCode:ev,isValid:eW,isLoading:eP,appliedCode:null==eD?void 0:null===(j=eD.voucherSummary)||void 0===j?void 0:j.voucherCode,onCodeChange:ef,onApply:ez,onRemove:eN}),(0,r.jsx)(eo,{duration:es?"agent-slot"===G&&(null==J?void 0:J.currentProductId)===ei.N5?"ไม่มีวันหมดอายุ (สล็อตฟรี)":"1 ปี (ตาม ระยะเวลา pacakge)":eL,totalBeforeDiscount:es?0:(null==eD?void 0:null===(Z=eD.total)||void 0===Z?void 0:Z.totalBeforeDiscount)||0,discount:es?0:eA,addonCharges:eg.reduce((e,t)=>
1e+t.price,0),finalAmount:es?0:eM,summaryData:es?void 0:eD}),(0,r.jsx)(U.oY,{isLoading:!1,isDisabled:eF&&q||!et&&!ea&&!ed,onBack:V,onCheckout:eK,total:es?eg.reduce((e,t)=>e+t.price,0):eM+eg.reduce((e,t)=>e+t.price,0),isFree:es,isFreePublish:eX}),(0,r.jsx)(A.Z,{open:eu,onClose:()=>ep(!1),onConfirm:eO,selectedMethod:ed,disableOtherOptions:eM+eg.reduce((e,t)=>e+t.price,0)===0}),(0,r.jsx)(M.K,{duration:eL,open:eh,onClose:eJ,paymentMethod:et?"party-credit":ea?"agent-credit":ed,amount:"party-slot"===G||"agent-slot"===G?0:eM+eg.reduce((e,t)=>e+t.price,0),description:eU,assetPostParam:{...ew,voucherCode:null!==(I=null==eD?void 0:null===(w=eD.voucherSummary)||void 0===w?void 0:w.voucherCode)&&void 0!==I?I:""},onPaymentSuccess:e$,productId:ej,paymentService:el,addons:eg,partyMembership:$,partyPaymentType:"party-slot"===G?"slot":"party-credit"===G?"credit":void 0,agentPaymentType:"agent-slot"===G?"slot":"agent-credit"===G?"credit":void 0,extraReturnParams:e_})]})}},27527:function(e,t,o){o.d(t,{b:function(){return r}});let r=70001},34281:function(e,t,o){o.d(t,{N5:function(){return l},g$:function(){return u},lh:function(){return c},wZ:function(){return p},zZ:function(){return h}});var r=o(36492),n=o(85945),i=o(24574),a=o(34969),s=o(69111);let l=50010,d={all:["admin","agent-free-program"],config:()=>[...d.all,"config"],applications:()=>[...d.all,"applications"],grants:()=>[...d.all,"grants"]},c=()=>(0,r.a)(d.config(),async()=>{let e=await a.Z.get("/api/admin/agent-free-program/config");return e.data},{retry:!1,staleTime:6e4}),u=e=>(0,r.a)(d.applications(),async()=>{let e=await a.Z.get("/api/admin/agent-free-program/applications");return e.data.data},{enabled:e,retry:!1}),p=e=>(0,r.a)(d.grants(),async()=>{let e=await a.Z.get("/api/admin/agent-free-program/grants",{params:{limit:50}});return e.data.data},{enabled:e,retry:!1}),h=()=>{let e=(0,n.NL)();return(0,i.D)({mutationFn:async e=>{let t=await a.Z.post("/api/admin/agent-free-program/grant",e);return t.data},onSuccess:t=>{(0,s.s$)(0===t.totalSlots?"ยกเลิกสล็อตฟรีแล้ว":"ตั้งสล็อตฟรีเป็น ".concat(t.totalSlots," แล้ว (ใช้อยู่ ").concat(t.slotsInUse," \xb7 เหลือ ").concat(t.remainingSlots,")")),e.invalidateQueries(d.applications()),e.invalidateQueries(d.grants())},onError:e=>{var t,o;(0,s.x2)((null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(o=t.data)||void 0===o?void 0:o.error)||"ให้สล็อตฟรีไม่สำเร็จ")}})}},68383:function(e,t,o){o.d(t,{K0:function(){return i},jE:function(){return u},k:function(){return a},xM:function(){return r},zD:function(){return l}});let r=e=>e.hasAssetPostId?"server_draft":e.canUseLocalDraft?"resumed"===e.localDraftChoice?"local_draft_resumed":"discarded"===e.localDraftChoice?"local_draft_discarded":"fresh":"prefill",n=["new","renewal","mixed","unknown"],i=e=>{if(!e||0===e.length)return"unknown";let t=e.map(e=>{var t,o;let r=null===(t=e.assetPostState)||void 0===t?void 0:null===(o=t.type)||void 0===o?void 0:o.toLowerCase();return r&&Array.isArray(e.publishments)?"published"===r||"expired"===r||e.publishments.length>0?"renewal":"unpublished"===r?"new":"unknown":"unknown"});return t.includes("unknown")?"unknown":t.every(e=>"new"===e)?"new":t.every(e=>"renewal"===e)?"renewal":"mixed"},a=e=>n.includes(e)?e:"unknown",s=new Set(["pay-by-coin","party-credit","agent-credit"]),l=e=>{let{transactionId:t,assetPostId:o,attemptId:r}=e,n="".concat(t,":").concat(o||"-");return s.has(t)?r?{key:"".concat(n,":").concat(r),strength:"attempt"}:{key:n,strength:"weak"}:{key:n,strength:"transaction"}},d="supd:listing-published-sent:v1",c=e=>{let t=e.getItem(d);if(!t)return[];let o=JSON.parse(t);return Array.isArray(o)?o.filter(e=>!!e&&"string"==typeof e.key&&"number"==typeof e.sentAt):[]},u=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();if(!e)return"unverifiable";try{let r=c(e).filter(e=>"weak"!==e.strength||o-e.sentAt<=18e5);if(r.some(e=>e.key===t.key))return"duplicate";return r.push({key:t.key,strength:t.strength,sentAt:o}),e.setItem(d,JSON.stringify(r.slice(-50))),"send"}catch(e){return"unverifiable"}}}}]);

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.