PageSourceSearch

https://www.jtb.co.jp/member/_next/static/chunks/pages/member/contact/03-131bd7f771b312fe.js

js jtb.co.jp collected 2026-09-24 15:28:56 UTC 9,177 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6531],{266:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/member/contact/03",function(){return a(1501)}])},7136:function(e,n,a){"use strict";a.d(n,{Z:function(){return Cm03}});var t=a(5165),r=a(926),s=a(3004),l=a.n(s),o=a(1013);function Cm03(e){let{title:n,message:a,sendMessage:s,closeModal:c}=e,i=(0,o.z_)(1e3);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"T-un_board-reply__modalDesc",children:[(0,t.jsx)("p",{className:"".concat(l().textBold),children:r.yeB}),(0,t.jsx)("p",{children:n}),(0,t.jsx)("p",{className:"".concat(l().wordBreak," ").concat(l().info),children:a})]}),(0,t.jsxs)("div",{className:"T-un_board-reply__btns T-js_board-reply__btns",children:[(0,t.jsx)("div",{className:"JTB-el_input JTB-ly_placement -center -universal JTB-pc-hp_margin-upper-exLarge",children:(0,t.jsx)("button",{className:"T-js_btn-send T-js_accordion-close JTB-ly_placement__item JTB-el_btn -accent -navigation -decision",onClick:i(s),children:"送信する"})}),(0,t.jsx)("div",{className:"JTB-el_input JTB-ly_placement -center -universal JTB-pc-hp_margin-upper-regular JTB-sp-hp_margin-upper-minimum",onClick:c,children:(0,t.jsx)("span",{className:"JTB-ly_placement__item T-el_modal__close",children:"戻って修正する"})})]})]})}},1501:function(e,n,a){"use strict";a.r(n),a.d(n,{__N_SSP:function(){return C},default:function(){return CM02_GUEST}});var t=a(5165),r=a(7967),s=a(5743),l=a(4787),o=a(7136),c=a(7066),i=a(3263),d=a(4665),u=a(3834),_=a(9194),p=a(3374),h=a.n(p),m=a(314),T=a(4944),g=a(6802),f=a(952),x=a(4175),C=!0;function CM02_GUEST(e){var n,a;let{contactBoardMessageInfoList:p,contactBoardTitleList:C,tourApplyInfo:N,rsvd:v,incomingParameter:j,redirect:b,maxContactNoteSeq:B}=e,y=(0,r.useRef)(),E=(0,r.useRef)(),k=(0,r.useRef)(),S=(0,r.useRef)(!1),M=(0,r.useRef)(!1),w=(0,r.useRef)(),[J,O]=(0,r.useState)(),[I,A]=(0,r.useState)(!1),[D,P]=(0,r.useState)(""),[R,L]=(0,r.useState)(!1),[H,U]=(0,r.useState)(""),[Z,q]=(0,r.useState)(!1),G=(0,d.useRouter)();(0,r.useEffect)(()=>{let e=(0,f.r)("CRMC_CI0002"),beforeUnloadHandler=n=>(n.preventDefault(),e),routeChangeStart=e=>{if(e!==T.e.ce01.pagePath&&R&&!S.current&&!e.startsWith(G.pathname)){if(G.push(G.asPath),history.go(1),w.current=e,M.current){var n;null===(n=y.current)||void 0===n||n.closeModal()}setTimeout(()=>{M.current=!0,P("3"),y.current.openModal()},400)}};return R?(window.addEventListener("beforeunload",beforeUnloadHandler),G.events.on("routeChangeStart",routeChangeStart)):(window.removeEventListener("beforeunload",beforeUnloadHandler),G.events.off("routeChangeStart",routeChangeStart),sessionStorage.removeItem(u.s.CONTACT_MESSAGE_EDITING)),()=>{window.removeEventListener("beforeunload",beforeUnloadHandler),G.events.off("routeChangeStart",routeChangeStart)}},[R]),(0,r.useEffect)(()=>{if(G.isReady){let{readCls:e=""}=G.query;E.current&&(E.current.checked="0"===e)}},[G]),(0,r.useEffect)(()=>{b&&(window.location.href="".concat("https://www.jtb.co.jp/kokunai_reserve","/InquirySelect/initDisplay?si=jtb"))},[b]),(0,r.useEffect)(()=>{let handleAccordionOpenClick=e=>{if(B>=99){e.preventDefault(),e.stopPropagation(),q(!0);return}q(!1)},e=document.getElementById("newMessageCreate");return e&&e.addEventListener("click",handleAccordionOpenClick,!0),()=>{e&&e.removeEventListener("click",handleAccordionOpenClick,!0)}},[p]);let refreshData=()=>{A(!0),G.replace({pathname:G.pathname,query:{rsvd:v,readCls:E.current&&1^E.current.checked}}).finally(()=>{A(!1)})},openModal=e=>{M.current=!0,P(e),y.current.openModal()},moveToCM05=(e,n)=>{G.push({pathname:T.e.cm04_guest.pagePath,query:{contactNoteId:e,contactNoteSeq:n,rsvd:v}})},sendMessage=async e=>{e.preventDefault();let n=new FormData;n.append("formData",JSON.stringify({typeCode:null==J?void 0:J.typeCode,titleCode:null==J?void 0:J.titleCode,title:null==J?void 0:J.title,messageBody:null==J?void 0:J.message,contactNoteId:j.contactNoteId,karteNo:j.karteNo,contactType:u.s.CONTACT_TYPE_1,rsvd:v})),A(!0),(0,m.hO)(n).then(e=>{var n,a,t,r,s;"00"===e.data.code?(null===(n=k.current)||void 0===n||n.clearContent(),null===(a=k.current)||void 0===a||a.closeModal(),null===(t=y.current)||void 0===t||t.closeModal(),E.current.checked=!1,refreshData()):(0,g.x$)("CM03:EV002:".concat(null===(r=e.data.errors)||void 0===r?void 0:r[0].errorCode),null===(s=e.data.errors)||void 0===s?void 0:s[0],G)}).finally(()=>{A(!1)})},htmlEntitiesToChars=e=>{let n="";if(e){let a=document.createElement("div");a.innerHTML=e,n=a.textContent||a.innerText||""}return n};return(0,r.useEffect)(()=>{U(htmlEntitiesToChars(null==N?void 0:N.productName))},[]),(0,t.jsxs)(t.Fragment,{children:[I&&(0,t.jsx)(_.Z,{}),(0,t.jsxs)("h1",{className:"T-un_board-head JTB-hp_sp-only",children:[(0,t.jsx)("span",{children:"メッセージ一覧"}),(0,t.jsx)("a",{className:"T-un_board-head__icon -modalTrigger",onClick:()=>openModal("1"),children:(0,t.jsx)("i",{className:"JTB-el_foundation-icons","data-iconcode":"","aria-hidden":"true",title:"コンタクトボードについて"})})]}),(0,t.jsxs)("section",{className:"T-bl_wrapper__md",children:[(0,t.jsx)("div",{className:"JTB-ly_placement -center JTB-pc-hp_margin-upper-large JTB-sp-hp_margin-upper-large JTB-hp_pc-only",children:(0,t.jsx)("h1",{className:"JTB-el_heading -lv01 JTB-ly_placement__item T-el_align-center",children:"メッセージ一覧"})}),(0,t.jsx)("div",{className:"T-ly_placement JTB-pc-hp_margin-upper-small JTB-hp_pc-only ".concat(h().right),children:(0,t.jsxs)("a",{className:"JTB-el_input -incButton -modalTrigger",onClick:()=>openModal("1"),children:[(0,t.jsx)("i",{className:"JTB-el_foundation-icons","data-iconcode":"","aria-hidden":"true",title:"アラート"}),(0,t.jsx)("span",{children:"コンタクトボードについて"})]})}),(0,t.jsxs)("div",{className:"T-un_board-list__item -no-border -weight-bold JTB-pc-hp_margin-upper-large JTB-sp-hp_margin-upper-small",children:[(0,t.jsx)("p",{className:"T-un_board-list__date",children:"出発日:".concat(null==N?void 0:N.departuredate)}),(0,t.jsx)("h2",{className:"T-un_board-list__title",children:H}),(0,t.jsx)("p",{className:"T-un_board-list__shop",children:null==N?void 0:N.reservationPlace})]}
1),(0,t.jsx)(c.Z,{mode:1,contactBoardTitleList:C,openModal:openModal,handlerSendMessage:e=>{O(e)},setIsEditing:L,ref:k}),Z&&(0,t.jsx)("div",{className:"T-un_board-error-message",style:{color:"#d32f2f",backgroundColor:"#ffebee",padding:"12px 16px",borderRadius:"4px",marginTop:"16px",marginBottom:"16px",fontSize:"14px",lineHeight:"1.5",whiteSpace:"pre-wrap",wordWrap:"break-word"},id:"contactNoteSeqExceededErrorMsg",children:(0,f.r)("CRMC_BE0055")}),(0,t.jsxs)("div",{className:"T-un_board-messages",children:[(0,t.jsx)("div",{className:"JTB-el_choices",children:(0,t.jsxs)("div",{className:"JTB-el_choice -checkbox ".concat(h().spCheckbox),children:[(0,t.jsx)("input",{id:"unreadOnlyDisplay",type:"checkbox",name:"unreadOnlyDisplay",ref:E,onChange:refreshData}),(0,t.jsx)("label",{htmlFor:"unreadOnlyDisplay",children:"未読のみ表示"})]})}),(null==p?void 0:p.length)!==0?(0,t.jsx)("ul",{className:"T-un_board-messages__list",children:null==p?void 0:p.map((e,n)=>{let a=parseInt(e.unreadCount)>0;return(0,t.jsx)("li",{className:"T-un_board-messages__item ".concat(a?"is-unread":""),onClick:()=>{moveToCM05(e.contactNoteId,e.contactNoteSeq)},children:(0,t.jsxs)("a",{href:"#",children:[(0,t.jsx)("figure",{className:"T-un_board-messages__itemImg",children:(0,t.jsx)(i.Z,{src:"お客様"===e.target?u.s.CONTACT_USER_ICON_PATH:u.s.CONTACT_JTB_ICON_PATH,alt:"".concat(e.target),width:"60",height:"60"})}),(0,t.jsxs)("div",{className:"T-un_board-messages__itemTxt",children:[(0,t.jsx)("p",{className:"T-un_board-messages__person",children:"".concat(e.target).concat(a&&+e.unreadCount>1?"("+e.unreadCount+")":"")}),(0,t.jsxs)("h2",{className:"T-un_board-messages__title",children:[e.jtbCorresponding&&(0,t.jsx)("span",{className:"T-un_board-messages__status",children:"JTB対応中"}),e.title]}),(0,t.jsx)("p",{className:"T-un_board-messages__date",children:e.postTimestamp})]})]})},e.contactNoteId+e.contactNoteSeq+e.karteNo)})}):(0,t.jsx)("div",{className:"T-un_board_tab__empty",children:(0,t.jsx)("p",{children:"メッセージはありません。"})})]})]}),(0,t.jsxs)(s.Z,{ref:y,id:"modal",onClose:()=>{M.current=!1},isConfirm:"3"===D,children:[D===u.s.CONTACT_MODAL_CONTENT_TYPE_1&&(0,t.jsx)(l.default,{}),D===u.s.CONTACT_MODAL_CONTENT_TYPE_2&&(0,t.jsx)(o.Z,{title:null!==(n=null==J?void 0:J.title)&&void 0!==n?n:"",message:null!==(a=null==J?void 0:J.message)&&void 0!==a?a:"",sendMessage:sendMessage,closeModal:y.current.closeModal}),"3"===D&&(0,t.jsx)(x.Z,{onClose:()=>{y.current.closeModal()},onOk:()=>{var e;sessionStorage.removeItem(u.s.CONTACT_MESSAGE_EDITING),S.current=!0,null===(e=y.current)||void 0===e||e.closeModal(),G.push(w.current)}})]})]})}},3374:function(e){e.exports={info:"__02_info__Sgph_",textBold:"__02_textBold__40LNB",wordBreak:"__02_wordBreak__QrbWw",right:"__02_right__KrAt2",spCheckbox:"__02_spCheckbox__ZUx6N"}}},function(e){e.O(0,[583,2594,5958,314,6802,4103,3586,9774,2888,179],function(){return e(e.s=266)}),_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.