PageSourceSearch

https://cdn.jmty.jp/_next/static/chunks/pages/article/external/inquiry/goonet-781d22ef3bd67880.js

js jmty.jp collected 2026-09-24 08:41:23 UTC 23,471 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3707],{26206:(e,n,t)=>{"use strict";t.d(n,{R:()=>h});var i=t(96427),r=t(37876);t(14232);var l=t(14736),a=t(71240),o=t(5347),s=t(84345),c=t(630);function d(){let e=(0,i._)(["\n    flex-direction: column-reverse;\n  "]);return d=function(){return e},e}let u=(0,l.Ay)(s._).withConfig({componentId:"sc-226608a6-0"})(["width:","px;max-width:calc(100vw - ","px);background-color:",";border-radius:","px;"],e=>e.theme.modalWidth,e=>e.theme.spacing[8],e=>e.theme.colors.system.surface,e=>e.theme.shape.borderRadius),p=(0,l.Ay)(o.E).withConfig({componentId:"sc-226608a6-1"})(["white-space:pre-wrap;"]),m=(0,l.Ay)(s._).withConfig({componentId:"sc-226608a6-2"})(["gap:","px;",""],e=>e.theme.spacing[2],e=>e.theme.mixins.media.sp(d())),h=e=>{var n,t;let i=null!=(n=e.confirmText)?n:"OK",l=null!=(t=e.cancelText)?t:"キャンセル";return(0,r.jsx)(a.h,{isOpen:e.isOpen,onClose:e.onCancel,shouldCloseOnOverlayClick:!1,children:(0,r.jsxs)(u,{p:4,children:[e.title&&(0,r.jsx)(s._,{mb:5,children:(0,r.jsx)(o.E,{variant:"title5",bold:!0,children:e.title})}),(0,r.jsx)(s._,{mb:4,children:(0,r.jsx)(p,{variant:"body1",children:e.message})}),(0,r.jsxs)(m,{display:"flex",justifyContent:"flex-end",children:[(0,r.jsx)(c.f,{variant:"neutral",onClick:e.onCancel,children:l}),(0,r.jsx)(c.f,{onClick:e.onConfirm,children:i})]})]})})}},56337:(e,n,t)=>{"use strict";let i;t.r(n),t.d(n,{__N_SSG:()=>e8,default:()=>e5});var r=t(96427),l=t(37876),a=t(14232),o=t(89099),s=t(14736),c=t(5347),d=t(69831),u=t(51854);function p(){let e=(0,r._)(["\n          width: ",";\n        "]);return p=function(){return e},e}function m(){let e=(0,r._)(["\n          min-height: ",";\n          height: ",";\n        "]);return m=function(){return e},e}let h=s.Ay.div.withConfig({componentId:"sc-186e5647-0"})(["display:flex;justify-content:center;align-items:center;"," ",""],e=>{let n=e.$width;if(Array.isArray(n)){let[t,i]=n;return"\n        width: ".concat("number"==typeof t?"".concat(t,"px"):t,";\n        ").concat(e.theme.mixins.media.pc(p(),"number"==typeof i?"".concat(i,"px"):i),"\n      ")}let t="number"==typeof n?"".concat(n,"px"):n;return"width: ".concat(t,";")},e=>{let n=e.$height;if(Array.isArray(n)){let[t,i]=n,r="number"==typeof t?"".concat(t,"px"):t,l="number"==typeof i?"".concat(i,"px"):i;return"\n        min-height: ".concat(r,";\n        height: ").concat(r,";\n        ").concat(e.theme.mixins.media.pc(m(),l,l),"\n      ")}let t="number"==typeof n?"".concat(n,"px"):n;return"\n        min-height: ".concat(t,";\n        height: ").concat(t,";\n      ")}),f=e=>(0,l.jsx)(h,{className:e.className,$height:e.height,$width:e.width||"100%",children:!1===e.showIndicator?null:e.children||(0,l.jsx)(u.k,{size:e.size,color:e.color})});var g=t(19961),y=t(7430),x=t(88992),_=t(84022),v=t(38291),w=t(67279),j=t(630),b=t(90457),C=t(53204),k=t(94265),A=t(71240);function I(){let e=(0,r._)(["\n    text-align: center;\n  "]);return I=function(){return e},e}function q(){let e=(0,r._)(["\n    justify-content: center;\n  "]);return q=function(){return e},e}function S(){let e=(0,r._)(["\n    width: 100%;\n  "]);return S=function(){return e},e}let E=s.Ay.div.withConfig({componentId:"sc-786e1f59-0"})(["width:","px;max-width:calc(100vw - ","px);padding:","px;background:",";border-radius:","px;"],e=>{let{theme:n}=e;return n.modalWidth},e=>{let{theme:n}=e;return n.spacing[8]},e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.colors.system.surface},e=>{let{theme:n}=e;return n.shape.borderRadius}),P=(0,s.Ay)(c.E).withConfig({componentId:"sc-786e1f59-1"})(["",""],e=>{let{theme:n}=e;return n.mixins.media.sp(I())}),K=(0,s.Ay)(c.E).withConfig({componentId:"sc-786e1f59-2"})(["white-space:pre-wrap;"]),O=s.Ay.div.withConfig({componentId:"sc-786e1f59-3"})(["display:flex;justify-content:flex-end;margin-top:","px;",""],e=>{let{theme:n}=e;return n.spacing[5]},e=>{let{theme:n}=e;return n.mixins.media.sp(q())}),R=(0,s.Ay)(j.f).withConfig({componentId:"sc-786e1f59-4"})(["",""],e=>{let{theme:n}=e;return n.mixins.media.sp(S())}),L=e=>{var n;return(0,l.jsx)(A.h,{isOpen:e.isOpen,shouldCloseOnOverlayClick:!1,children:(0,l.jsxs)(E,{children:[(0,l.jsx)(P,{forwardedAs:"h2",variant:"body1",bold:!0,mb:3,children:e.title}),e.message&&(0,l.jsx)(K,{variant:"body1",forwardedAs:"p",children:e.message}),(0,l.jsx)(O,{children:(0,l.jsx)(R,{variant:"neutral",size:"large",onClick:e.onClose,children:null!=(n=e.buttonLabel)?n:"戻る"})})]})})};var z=t(26206),N=t(34979),T=t(56610),Y=t(16751),D=t(80514),B=t(30410),F=t(88890);let M=s.Ay.div.withConfig({componentId:"sc-1a3d3cca-0"})(["display:flex;flex-wrap:wrap;gap:","px ","px;label{font-weight:normal;}"],e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.spacing[6]}),$=e=>{var n;let t=n=>{e.onChange(e.value.includes(n)?e.value.filter(e=>e!==n):[...e.value,n])};return(0,l.jsx)(N.RU,{label:e.label,required:e.required,asGroup:!0,hint:e.hint,error:null!=(n=e.error)?n:void 0,children:(0,l.jsx)(M,{children:e.options.map(n=>(0,l.jsx)(b.m,{checked:e.value.includes(n.value),onChange:()=>t(n.value),label:n.text},n.value))})})};var G=t(82882),U=t(95049),V=t(99795),W=t(45789),X=t(70499),H=t(85893),J=t(94159),Q=t(38554);let Z=(e,n)=>{let[t,i]=(0,a.useState)(!1),r=(0,a.useRef)(n);r.current=n;let l=(0,a.useRef)(!1),o=(0,a.useRef)(!1);return(0,a.useEffect)(()=>
1{if(!e)return;let n=e=>{if(!l.current)return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[e]),(0,a.useEffect)(()=>{if(!e||window.history.length<=1)return;o.current||(window.history.pushState(null,"",window.location.href),o.current=!0);let n=()=>{window.history.pushState(null,"",window.location.href),i(!0)};return window.addEventListener("popstate",n),()=>window.removeEventListener("popstate",n)},[e]),{isLeaveDialogOpen:t,confirmLeave:(0,a.useCallback)(()=>{l.current=!0,i(!1),r.current()},[]),cancelLeave:(0,a.useCallback)(()=>{i(!1)},[])}};var ee=t(13810),en=t(32754),et=t(3112),ei=t(92348);let er=["condition","other"],el=e=>e.some(e=>er.includes(e)),ea=et.Ikc({inquiry_types:et.YOg(et.YjP()).min(1,"未選択です"),name:et.YjP().min(1,"未入力です"),email:et.YjP().min(1,"未入力です").regex(ei.z6,"正しいメールアドレスの形式で入力してください"),phone_number:et.YjP().regex(/^(\d{10,11})?$/,"ハイフンなしの10~11桁で入力してください"),postal_code:(i=ei.vG,et.YjP().superRefine((e,n)=>{let t=i(e);!0!==t&&n.addIssue({code:"custom",message:t})})),prefecture_id:et.YjP().min(1,"未選択です"),city_id:et.YjP().min(1,"未選択です"),remarks:et.YjP().optional(),similar_article_notification_opt_in:et.zMY(),goonet_mail_magazine_opt_in:et.zMY()}).superRefine((e,n)=>{var t;!el(e.inquiry_types)||(null==(t=e.remarks)?void 0:t.trim())||n.addIssue({code:"custom",path:["remarks"],message:"未入力です"})});var eo=t(62096),es=t(17987),ec=t(64579),ed=t(21011);let eu=(e,n)=>{var t;let i=n?ed.$2[n]:void 0;return{inquiry_types:i?[...i.inquiry_types]:["estimate"],name:"",email:null!=e?e:"",phone_number:"",postal_code:"",prefecture_id:"",city_id:"",remarks:null!=(t=null==i?void 0:i.remarks)?t:"",similar_article_notification_opt_in:!0,goonet_mail_magazine_opt_in:!0}},ep={duplicated:"問合せ済みの投稿です",closed:"この投稿は終了しました"},em={full_name:"name",email:"email",tel:"phone_number",prefecture_id:"prefecture_id",city_id:"city_id",inquiry_body:"remarks",inquiry_types:"inquiry_types"},eh=(e,n)=>{var t;return{key:n.articleKey,article_keys:n.selectedArticleKeys.length>0?n.selectedArticleKeys:void 0,form_session_id:n.formSessionId,full_name:e.name,email:e.email,tel:e.phone_number||void 0,prefecture_id:Number(e.prefecture_id),city_id:Number(e.city_id),inquiry_body:el(e.inquiry_types)&&(null==(t=e.remarks)?void 0:t.trim())||void 0,inquiry_types:e.inquiry_types,similar_article_notification_opt_in:!!n.hasNotification&&e.similar_article_notification_opt_in,goonet_mail_magazine_opt_in:e.goonet_mail_magazine_opt_in,device:n.deviceType}},ef=e=>{let n=(0,o.useRouter)(),{submit:t}=(0,en.A)(),[i,r]=(0,a.useState)(null),{control:l,handleSubmit:s,formState:{errors:c,isSubmitting:d,isDirty:u},watch:p,setValue:m,setError:h,setFocus:f}=(0,x.mN)({resolver:(0,ee.u)(ea),defaultValues:eu(e.email,e.intent),mode:"onTouched"}),y=el(p("inquiry_types")),_=e=>{if(!e)return;let n=null;Object.keys(em).forEach(t=>{let i=e[t];if(i){let e=em[t];h(e,{type:"server",message:i}),n||(n=e)}}),n&&f(n)};return{control:l,errors:c,isSubmitting:d,isDirty:u,setValue:m,handleSubmit:s(async i=>{let l=eh(i,e),a=await t(l);if(!a.ok){if("duplicated"===a.reason||"closed"===a.reason){var o;r({title:null!=(o=a.title)?o:ep[a.reason],message:"closed"===a.reason?null:a.message})}else"invalid_parameter"===a.reason&&_(a.validationError),(0,g.a)(a.message,{variant:"danger"});return}(0,es.q)(e.articleKey,a.result),(0,ec.ni)(e.articleKey,l,{searchPrefectureId:e.searchPrefectureId}),await n.push((0,eo.A)(n.asPath))},()=>{(0,g.a)("入力内容をご確認ください",{variant:"danger"})}),showInquiryDetail:y,resultDialog:i,handleResultDialogBack:()=>{window.location.href=e.articleDetailPath}}},eg=(e,n)=>{let[t,i]=(0,a.useState)({}),r=(0,a.useCallback)((e,n)=>{i(t=>({...t,[e]:n}))},[]),l=(0,a.useCallback)(n=>{i(t=>{let i={...t};return e.forEach(e=>{i[e.key]=n}),i})},[e]),o=(0,a.useCallback)(()=>l(!0),[l]),s=(0,a.useCallback)(()=>l(!1),[l]),c=(0,a.useMemo)(()=>new Set(e.filter(e=>{var i;return null!=(i=t[e.key])?i:n}).map(e=>e.key)),[e,t,n]);return{articles:e,selectedKeys:c,isAllSelected:e.length>0&&c.size===e.length,toggleSelect:r,selectAll:o,deselectAll:s}},ey=e=>
1{let{articleKey:n,incompleteArticles:t,simultaneousArticles:i}=e,r=(0,a.useMemo)(()=>t.filter(e=>e.key!==n),[t,n]),l=(0,a.useMemo)(()=>{let e=new Set(r.map(e=>e.key));return i.filter(t=>t.key!==n&&!e.has(t.key))},[i,r,n]),o=eg(r,!0),s=eg(l,!1),[c,d]=(0,a.useState)(null),u=(0,a.useCallback)(e=>d(e),[]),p=()=>d(null),m=(0,a.useMemo)(()=>{var e;return null!=(e=[...r,...l].find(e=>e.key===c))?e:null},[r,l,c]),h=(0,a.useMemo)(()=>Array.from(new Set([...r.filter(e=>o.selectedKeys.has(e.key)).map(e=>e.key),...l.filter(e=>s.selectedKeys.has(e.key)).map(e=>e.key)])),[r,l,o.selectedKeys,s.selectedKeys]);return{incomplete:o,simultaneous:s,selectedArticleKeys:h,openArticle:m,openDetail:u,closeDetail:p,addOpenArticleToInquiry:()=>{if(m){let e=r.some(e=>e.key===m.key)?o:s;e.selectedKeys.has(m.key)||(e.toggleSelect(m.key,!0),(0,g.a)("一緒に問い合わせに追加しました",{variant:"success"}))}p()}}};var ex=t(11012);function e_(){let e=(0,r._)(["\n    padding: ","px ","px ","px;\n  "]);return e_=function(){return e},e}function ev(){let e=(0,r._)(["\n    width: ","px;\n    max-width: 100%;\n    margin: 0 auto;\n  "]);return ev=function(){return e},e}function ew(){let e=(0,r._)(["\n    display: flex;\n    margin-bottom: ","px;\n    /* 右余白はセクション側 (FormCandidateSectionBleed の SP padding-right 8px) で持つ */\n    padding-right: 0;\n\n    label {\n      color: ",";\n    }\n  "]);return ew=function(){return e},e}function ej(){let e=(0,r._)(["\n    padding-right: ","px;\n  "]);return ej=function(){return e},e}function eb(){let e=(0,r._)(["\n      color: ",";\n    "]);return eb=function(){return e},e}let eC=s.Ay.div.withConfig({componentId:"sc-f9024ad1-0"})(["box-sizing:content-box;max-width:480px;margin:0 auto;padding:","px ","px ","px;",""],e=>{let{theme:n}=e;return n.spacing[5]},e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.spacing[8]},e=>{let{theme:n}=e;return n.mixins.media.sp(e_(),n.spacing[5],n.spacing[2],n.spacing[6])}),ek=(0,s.Ay)(d.o).withConfig({componentId:"sc-f9024ad1-1"})(["margin:","px 0;"],e=>{let{theme:n}=e;return n.spacing[4]}),eA=s.Ay.div.withConfig({componentId:"sc-f9024ad1-2"})(["input{max-width:100%;}"]),eI=s.Ay.div.withConfig({componentId:"sc-f9024ad1-3"})(["input{width:max(150px,calc(11ch + 16px));max-width:100%;}"]),eq=s.Ay.div.withConfig({componentId:"sc-f9024ad1-4"})(["&& input{flex:0 0 auto;width:max(120px,calc(8ch + 16px));max-width:100%;}"]),eS=s.Ay.div.withConfig({componentId:"sc-f9024ad1-5"})(["display:flex;flex-direction:column;gap:","px;margin-bottom:","px;"],e=>{let{theme:n}=e;return n.spacing[6]},e=>{let{theme:n}=e;return n.spacing[7]}),eE=s.Ay.div.withConfig({componentId:"sc-f9024ad1-6"})(["display:flex;gap:","px;> *{flex:1 1 0;min-width:0;}"],e=>{let{theme:n}=e;return n.spacing[3]}),eP=s.Ay.div.withConfig({componentId:"sc-f9024ad1-7"})(["display:flex;flex-direction:column;gap:","px;"],e=>{let{theme:n}=e;return n.spacing[4]}),eK=s.Ay.div.withConfig({componentId:"sc-f9024ad1-8"})([""]),eO=s.Ay.div.withConfig({componentId:"sc-f9024ad1-9"})(["margin-top:","px;padding:0 ","px ","px;"],e=>{let{theme:n}=e;return n.spacing[6]},e=>{let{theme:n}=e;return n.spacing[1]},e=>{let{theme:n}=e;return n.spacing[1]}),eR=(0,s.Ay)(J.w).withConfig({componentId:"sc-f9024ad1-10"})(["margin-left:-","px;margin-right:-","px;"],e=>{let{theme:n}=e;return n.spacing[1]},e=>{let{theme:n}=e;return n.spacing[1]}),eL=s.Ay.div.withConfig({componentId:"sc-f9024ad1-11"})([""," margin-bottom:","px;color:",";"],e=>{let{theme:n}=e;return n.mixins.typography("caption1")},e=>{let{theme:n}=e;return n.spacing[1]},e=>{let{theme:n}=e;return n.colors.system.text.secondary}),ez=(0,s.Ay)(W.q).withConfig({componentId:"sc-f9024ad1-12"})(["margin-bottom:","px;"],e=>{let{theme:n}=e;return n.spacing[7]}),eN=s.Ay.div.withConfig({componentId:"sc-f9024ad1-13"})(["display:flex;flex-direction:column;gap:","px;margin-bottom:","px;label{font-weight:normal;}"],e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.spacing[7]}),eT=s.Ay.div.withConfig({componentId:"sc-f9024ad1-14"})(["display:flex;flex-direction:column;"]),eY=s.Ay.div.withConfig({componentId:"sc-f9024ad1-15"})(["",""],e=>{let{theme:n}=e;
1return n.mixins.media.pc(ev(),n.buttonWidth.large)}),eD="goonet-inquiry-detail",eB="".concat(eD,"-charlimit"),eF=s.Ay.div.withConfig({componentId:"sc-f9024ad1-16"})(["margin-bottom:","px;padding-right:","px;label{font-weight:",";}",""],e=>{let{theme:n}=e;return n.spacing[3]},e=>{let{theme:n}=e;return n.spacing[4]},ex.K.typography.body2.fontWeight,e=>{let{theme:n}=e;return n.mixins.media.sp(ew(),ex.K.spacing[4],ex.K.colors.pallet.gray[800])}),eM=(0,s.Ay)(U.h).withConfig({componentId:"sc-f9024ad1-17"})([""," ","{","}"],e=>{let{theme:n}=e;return n.mixins.media.sp(ej(),ex.K.spacing[2])},V.N4,e=>{let{theme:n}=e;return n.mixins.media.pc(eb(),ex.K.colors.pallet.gray[800])}),e$=e=>(0,l.jsxs)(eM,{icon:(0,l.jsx)(w.aY,{}),title:e.title,titleId:e.titleId,children:[(0,l.jsx)(eF,{children:(0,l.jsx)(b.m,{checked:e.section.isAllSelected,onChange:n=>n.target.checked?e.section.selectAll():e.section.deselectAll(),label:"すべて選択","aria-label":"".concat(e.candidateLabel,"をすべて選択")})}),(0,l.jsx)(v.i,{slideWidth:200,counterUnit:"台",reserveRightEdge:!0,children:e.section.articles.map(n=>(0,l.jsx)(_.Nn,{children:(0,l.jsx)(G.ob,{article:n,selected:e.section.selectedKeys.has(n.key),onSelectChange:e.section.toggleSelect,onCardClick:e.onCardClick})},n.key))})]}),eG=e=>{var n,t,i;let r=ey({articleKey:e.articleKey,incompleteArticles:e.incompleteArticles,simultaneousArticles:e.simultaneousArticles}),{control:a,errors:o,isSubmitting:s,isDirty:c,setValue:d,handleSubmit:u,showInquiryDetail:p,resultDialog:m,handleResultDialogBack:h}
1=ef({articleKey:e.articleKey,formSessionId:e.formSessionId,deviceType:e.deviceType,articleDetailPath:e.articleDetailPath,hasNotification:null!=e.notification,email:e.email,selectedArticleKeys:r.selectedArticleKeys,intent:e.intent,searchPrefectureId:e.searchPrefectureId}),f=(0,Q.O)(d),g=Z(c&&!s&&!m,h);return(0,l.jsxs)(eC,{children:[(0,l.jsx)(k.F,{article:e.article}),(0,l.jsx)(ek,{}),(0,l.jsxs)("form",{onSubmit:u,noValidate:!0,children:[(0,l.jsxs)(eS,{children:[(0,l.jsxs)(eK,{children:[(0,l.jsx)(x.xI,{name:"inquiry_types",control:a,render:e=>{var n;let{field:t}=e;return(0,l.jsx)($,{label:"お問い合わせ内容",required:!0,options:ed.y5,value:t.value,onChange:t.onChange,error:null==(n=o.inquiry_types)?void 0:n.message})}}),(0,l.jsx)(eR,{isOpen:p,id:"".concat(eD,"-collapse"),children:(0,l.jsx)(eO,{children:(0,l.jsxs)(N.RU,{label:"具体的なお問い合わせ内容",required:!0,htmlFor:eD,hint:ed.gF,error:null==(n=o.remarks)?void 0:n.message,children:[(0,l.jsx)(eL,{id:eB,children:"500文字以内"}),(0,l.jsx)(x.xI,{name:"remarks",control:a,render:e=>{var n;let{field:t}=e;return(0,l.jsx)(C.n,{id:eD,ref:t.ref,value:t.value,onChange:t.onChange,onBlur:t.onBlur,isError:!!o.remarks,placeholder:"例)車体の傷の状態を詳しく知りたい 等",maxLength:500,rows:5,"aria-required":!0,"aria-invalid":!!o.remarks,"aria-describedby":[eB,(0,N.Vp)(eD,ed.gF,null==(n=o.remarks)?void 0:n.message)].filter(Boolean).join(" ")||void 0})}})]})})})]}),(0,l.jsx)(eA,{children:(0,l.jsx)(F.S,{field:ed.te.name,control:a,error:o.name})}),(0,l.jsx)(eA,{children:(0,l.jsx)(F.S,{field:ed.te.email,control:a,error:o.email})}),(0,l.jsx)(eI,{children:(0,l.jsx)(T.w,{field:ed.te.phone_number,control:a,error:o.phone_number})}),(0,l.jsx)(N.RU,{label:"お住まいのエリア",required:!0,asGroup:!0,children:(0,l.jsxs)(eP,{children:[(0,l.jsx)(eq,{children:(0,l.jsx)(Y.f,{field:ed.te.postal_code,control:a,error:o.postal_code,onSearch:f.handlePostalCodeSearch,isSearching:f.isSearching,searchError:f.searchError,hideRequiredBadge:!0})}),(0,l.jsxs)(eE,{children:[(0,l.jsx)(D.S,{field:ed.te.prefecture_id,control:a,error:o.prefecture_id,options:f.prefectureOptions,onPrefectureChange:f.handlePrefectureChange,hideRequiredBadge:!0}),(0,l.jsx)(B.U,{field:ed.te.city_id,control:a,error:o.city_id,options:f.cityOptions,disabled:!f.selectedPrefectureId,hideRequiredBadge:!0})]})]})})]}),r.incomplete.articles.length>0&&(0,l.jsx)(e$,{title:"あなたが過去に閲覧したクルマ",titleId:"goonet-incomplete-candidates-title",candidateLabel:"あなたが過去に閲覧したクルマ",section:r.incomplete,onCardClick:r.openDetail}),r.simultaneous.articles.length>0&&(0,l.jsx)(e$,{title:"似ている条件のクルマ",titleId:"goonet-simultaneous-candidates-title",candidateLabel:"似ている条件のクルマ",section:r.simultaneous,onCardClick:r.openDetail}),(0,l.jsxs)(eN,{children:[e.notification&&(0,l.jsx)(x.xI,{name:"similar_article_notification_opt_in",control:a,render:n=>{var t,i;let{field:r}=n;return(0,l.jsx)(b.m,{checked:r.value,onChange:e=>r.onChange(e.target.checked),label:null!=(i=null==(t=e.notification)?void 0:t.label)?i:""})}}),(0,l.jsx)(x.xI,{name:"goonet_mail_magazine_opt_in",control:a,render:e=>{let{field:n}=e;return(0,l.jsx)(b.m,{checked:n.value,onChange:e=>n.onChange(e.target.checked),label:"グーネットからのメルマガを受け取る"})}})]}),(0,l.jsx)(ez,{}),(0,l.jsx)(eT,{children:(0,l.jsx)(eY,{children:(0,l.jsx)(j.f,{type:"submit",variant:"primary",size:"large",block:!0,disabled:s,isLoading:s,children:"送信"})})})]}),(0,l.jsx)(X.y,{isOpen:!!r.openArticle,onClose:r.closeDetail,onAddToInquiry:r.addOpenArticleToInquiry,children:r.openArticle&&(0,l.jsx)(H.j,{article:r.openArticle})}),(0,l.jsx)(L,{isOpen:!!m,title:null!=(t=null==m?void 0:m.title)?t:"",message:null!=(i=null==m?void 0:m.message)?i:null,onClose:h}),(0,l.jsx)(z.R,{isOpen:g.isLeaveDialogOpen,title:"編集内容の破棄",message:"編集内容が破棄されますが、よろしいですか?",confirmText:"OK",cancelText:"キャンセル",onConfirm:g.confirmLeave,onCancel:g.cancelLeave})]})};var eU=t(19547),eV=t(81256),eW=t(56304),eX=t(81018);
1class eH extends Error{constructor(e){super("goonet_estimate_form fetch failed: ".concat(e)),this.name="GoonetEstimateFormViewError",this.status=e}}let eJ=async(e,n)=>{let{prefectureId:t}=n,i={};null!=t&&(i["prefecture_ids[]"]=[t]);let r=await (0,eW.zc)("/web_api/v1/goonet_estimate_forms/{article_key}",{params:{path:{article_key:e},...Object.keys(i).length>0?{query:i}:{}}});if(r.error||!r.data)throw new eH(r.response.status);return r.data},eQ=e=>{window.dataLayer&&window.dataLayer.push({event:e.event_id,...e})},eZ=e=>{window.dataLayer&&window.dataLayer.push({event:e.event_id,...e})},e0=function(e){var n,t,i,r,l,o,s,c;let{entrySource:d,deviceType:u="pc",intent:p}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{session:m}=(0,eX.w)(),h="unchecked"!==m.loginStatus,f=null!=(r=null==(n=m.loginSession)?void 0:n.prefecture_id)?r:void 0,{data:g,error:y,isLoading:x}=(0,eV.A)(e&&h?["goonet_estimate_form",e,f]:null,e=>{let[,n,t]=e;return eJ(n,{prefectureId:t})}),_=(0,a.useRef)(!1);(0,a.useEffect)(()=>{var e;if(!g||_.current)return;_.current=!0,eQ({...g.analytics.params,device_type:u,entry_source:d,intent_type:p});let n=null==(e=g.incomplete_inquiry)?void 0:e.analytics;n&&eZ(n.params)},[g,u,d,p]);let v=null!=(l=null==g||null==(t=g.simultaneous_inquiry)?void 0:t.articles)?l:[],w=null!=(o=null==g||null==(i=g.incomplete_inquiry)?void 0:i.articles)?o:[];return{formSessionId:null==g?void 0:g.form_session_id,article:null==g?void 0:g.article,analytics:null==g?void 0:g.analytics,notification:null!=(s=null==g?void 0:g.notification)?s:null,email:null!=(c=null==g?void 0:g.email)?c:null,simultaneousArticles:v,incompleteArticles:w,searchPrefectureId:f,isLoading:x,error:y}};var e1=t(30848);function e4(){let e=(0,r._)(["\n    display: none;\n  "]);return e4=function(){return e},e}let e2=s.Ay.div.withConfig({componentId:"sc-e6031528-0"})(["width:100%;max-width:1000px;margin:0 auto;"]),e9=s.Ay.div.withConfig({componentId:"sc-e6031528-1"})(["",""],e=>{let{theme:n}=e;return n.mixins.media.sp(e4())}),e6=(0,s.Ay)(d.o).withConfig({componentId:"sc-e6031528-2"})(["margin-top:","px;margin-left:","px;margin-right:","px;"],e=>{let{theme:n}=e;return n.spacing[2]},e=>{let{theme:n}=e;return n.spacing[4]},e=>{let{theme:n}=e;return n.spacing[4]});var e8=!0;let e5=()=>{var e,n,t;let i=(0,o.useRouter)(),r="string"==typeof i.query.id?i.query.id:"",s=i.isReady?(0,eo.C9)(i.asPath):"",d=(0,eo.lw)(i.query.entry_source),u=(0,ed.jL)(i.query.intent)?i.query.intent:void 0,p=(0,eU.Fr)()?"sp":"pc",{article:m,formSessionId:h,notification:x,email:_,simultaneousArticles:v,incompleteArticles:w,searchPrefectureId:j,error:b}=e0(r||void 0,{entrySource:d,deviceType:p,intent:u}),C=a.useRef(!1);a.useEffect(()=>{if(b&&!C.current){if(404===b.status){if(!s)return;C.current=!0,window.location.href=s;return}C.current=!0,(0,g.a)("エラーが発生しました。時間をおいて再度お試しください。",{variant:"danger"})}},[b,s]);let k=m?{title:m.title,thumbnail_url:null!=(e=m.image_url)?e:"",important_field:null!=(n=m.important_field)?n:null,description:null!=(t=m.text)?t:""}:null,A=(0,e1.o_)(!k);return b?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.v,{title:"在庫確認・見積依頼"}),(0,l.jsxs)(e2,{children:[(0,l.jsxs)(e9,{children:[(0,l.jsx)(c.E,{as:"h1",variant:"title4",bold:!0,mt:5,px:4,children:"在庫確認・見積依頼"}),(0,l.jsx)(e6,{})]}),k?(0,l.jsx)(eG,{article:k,articleKey:r,formSessionId:h,notification:x,email:_,simultaneousArticles:v,incompleteArticles:w,searchPrefectureId:j,deviceType:p,articleDetailPath:s,intent:u}):(0,l.jsx)(f,{height:"80vh",size:"large",showIndicator:A})]})]})}},57992:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/article/external/inquiry/goonet",function(){return t(56337)}])}},e=>{var n=n=>e(e.s=n);e.O(0,[3327,9148,5647,5342,636,6593,8792],()=>n(57992)),_N_E=e.O()}]);
2//# sourceMappingURL=goonet-781d22ef3bd67880.js.map

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.