1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1618],{66607:function(e){var t;t=function(){return function(e,t,n){t.prototype.isBetween=function(e,t,i,o){var a=n(e),r=n(t),l="("===(o=o||"()")[0],s=")"===o[1];return(l?this.isAfter(a,i):!this.isBefore(a,i))&&(s?this.isBefore(r,i):!this.isAfter(r,i))||(l?this.isBefore(a,i):!this.isAfter(a,i))&&(s?this.isAfter(r,i):!this.isBefore(r,i))}}},e.exports=t()},18029:function(e,t,n){var i=n(35393),o=n(11700),a=i(function(e,t,n){return e+(n?" ":"")+o(t)});e.exports=a},8606:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return oA},default:function(){return oG}});var i=n(85893),o=n(67294),a=n(88095),r=n(17280),l=n(81402),s=n(53097),d=n(52765),c=n(29425),p=n(68013),h=n(27484),x=n.n(h),u=n(19255),g=n(31738),f=n(55483),m=n(43485),b=n(53731),v=n(14428),w=n(20142);function _(e){let{boatRating:t=0,boatId:n}=e,o=(0,b._x)(),a=(0,s.Gc)(),r=a.xs||a.sm,{pages:l,reviewsTotal:c,fetchNextPage:p,hasNextPage:h}=(0,m.yA)(n),g=l.map(e=>{let{data:t}=e;return t}).flat();return(0,i.jsxs)(d.Ht,{gap:"40px",gapMdMax:"24px",children:[r?(0,i.jsxs)(C,{children:[(0,i.jsx)(y,{onClick:o,children:(0,i.jsx)(k,{})}),(0,i.jsx)(f.GL,{children:"Reviews"}),(0,i.jsx)(u.Z,{short:!0,countText:"review",reviewCount:c,rating:t})]}):(0,i.jsxs)("div",{children:[(0,i.jsx)(f.GL,{children:"Ratings & reviews"}),(0,i.jsx)(u.Z,{short:!0,countText:"review",reviewCount:c,rating:t})]}),(0,i.jsx)(j,{children:(0,i.jsx)(w.jh,{dataLength:l.length,next:p,height:window.innerHeight-220,loader:(0,i.jsx)(w.b2,{}),hasMore:h,children:g.map(e=>(0,i.jsx)(Z,{profilePhotoUrl:e.author.picture.url,text:e.text,reviewerName:e.author.first_name,reviewDate:x()(e.created_at).format("MMM YYYY"),rating:e.rating,clampText:!1,isInModal:!0},e.id))})})]})}let j=a.ZP.div.withConfig({componentId:"sc-ff569af3-0"})(["","{padding-top:70px;}"],v.Hl),C=(0,a.ZP)(d.yq).withConfig({componentId:"sc-ff569af3-1"})(["width:100%;background:white;left:0;padding:20px;z-index:100;position:absolute;align-items:center;box-shadow:0px 1px 7px rgba(0,0,0,0.11);top:0;"]),y=(0,a.ZP)(d.lM).withConfig({componentId:"sc-ff569af3-2"})(["background:#f5f7f9;cursor:pointer;width:32px;border-radius:50%;height:32px;"]),k=()=>(0,i.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{y:"1.41406",width:"2",height:"14",rx:"1",transform:"rotate(-45 0 1.41406)",fill:"#5E696A"}),(0,i.jsx)("rect",{x:"1.41406",y:"11.3135",width:"2",height:"14",rx:"1",transform:"rotate(-135 1.41406 11.3135)",fill:"#5E696A"})]}),Z=(0,a.ZP)(g.uy).withConfig({componentId:"sc-ff569af3-3"})(["max-width:440px;","{padding-bottom:40px;}"],v.Eh),P=(0,i.jsx)(g.cF,{});function I(e){var t;let{isLoading:n,boatRating:a,hasNoReviews:r,boatId:l}=e,d=(0,s.Gc)(),h=d.xs||d.sm||d.md,{pages:x,reviewsTotal:g}=(0,m.yA)(l),{modal:b,openModal:v}=(0,c.Z)((0,i.jsx)(_,{boatId:l,boatRating:a}),{isOnRight:!0,hideCloseButton:h,trackingName:"reviews_modal_content"});if(!n&&r)return null;let w=M(v),j=x.map(e=>{let{data:t}=e;return t}).flat(),C=!n&&g>6;return(0,i.jsxs)(E,{id:"reviews",children:[(0,i.jsxs)(B,{children:[(0,i.jsxs)(S,{children:[(0,i.jsx)(f.GL,{children:"Ratings & reviews"}),(0,i.jsx)(u.Z,{short:!0,countText:"rating",reviewCount:n?0:g,rating:a})]}),!h&&C&&(0,i.jsx)(p.Z,{outline:!0,onClick:v,text:"SEE ALL ".concat(g," REVIEWS")})]}),h?(0,i.jsx)(L,{children:null===(t=j.slice(0,10))||void 0===t?void 0:t.map(e=>(0,i.jsx)(R,{$oneReview:(null==x?void 0:x.length)===1,children:n?P:w(e)},e.id))}):(0,i.jsx)(H,{children:n?[...Array(6)].map((e,t)=>(0,i.jsx)(o.Fragment,{children:P},t)):j.slice(0,6).map(w)}),h&&C&&(0,i.jsx)(D,{outline:!0,onClick:v,text:"SEE ALL ".concat(g," REVIEWS")}),b]})}let M=e=>t=>{let{id:n,author:o,text:a,created_at:r,rating:l}=t;return(0,i.jsx)(g.uy,{profilePhotoUrl:o.picture.url,text:a,reviewerName:o.first_name,reviewDate:x()(r).format("MMM YYYY"),rating:l,onReadMoreClick:e},n)},E=(0,a.ZP)(f.VQ).withConfig({componentId:"sc-f1c4a7ee-0"})(["scroll-margin-top:70px;width:100%;max-width:100%;button{width:fit-content;padding:0 22px;}"]),D=(0,a.ZP)(p.Z).withConfig({componentId:"sc-f1c4a7ee-1"})(["width:100% !important;"]),H=a.ZP.div.withConfig({componentId:"sc-f1c4a7ee-2"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:42px 96px;"]),B=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-f1c4a7ee-3"})(["justify-content:space-between;"]),S=(0,a.ZP)(d.qs).withConfig({componentId:"sc-f1c4a7ee-4"})(["justify-content:space-between;"]),L=a.ZP.div.withConfig({componentId:"sc-f1c4a7ee-5"})(["display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:24px;margin:0 -21px;padding:0 21px;&::-webkit-scrollbar{display:none;}"]),R=a.ZP.div.withConfig({componentId:"sc-f1c4a7ee-6"})(["flex-shrink:0;scroll-snap-align:start;width:",";"],e=>{let{$oneReview:t}=e;return t?"100%":"80%"});var z=n(12199),O=n(86003),A=n(69483),G=n(11163),Y=n(99462),q=n(65716),V=n(40866);let T=e=>({event_name:"click",component_type:"button",object:"message_owner",context:"your_crew",object_properties:e}),F=e=>({event_name:"click",component_type:"text_link",object:"see_profile",context:"your_crew",object_properties:e}),N=e=>({event_name:"show",component_type:"draw",object:"message_owner_widget",context:"message_owner_widget",object_properties:e}),W=(e,t)=>({event_name:"click",component_type:"button",object:"".concat(e,"_passengers"),context:"message_owner_widget",object_properties:t}),K=()=>({event_name:"click",component_type:"text_box",object:"message_to_owner",context:"message_owner_widget"}),U=e=>({event_name:"click",component_type:"pop_up_with_buttons",object:"trip_date_picker",context:"message_owner_widget",object_properties:e}),Q=e=>({event_name:"click",component_type:"pop_up_with_buttons",object:"duration_picker",context:"message_owner_widget",object_properties:e}),J=e=>({event_name:"click",component_type:"pop_up_with_buttons",object:"start_time_picker",context:"message_owner_widget",object_properties:e}),$=e=>({event_name:"click",component_type:"button",object:e,context:"message_owner_widget"}),X=e=>({event_name:"click",component_type:"button",object:"send_message",context:"message_owner_widget",object_properties:e}),ee=e=>({event_name:"show",component_type:"draw",object:"message_sent_confirmation",context:"message_owner_widget",object_properties:e}),et=e=>({event_name:"click",component_type:"button",object:"view_conversation",context:"message_owner_widget",object_properties:e}),en=e=>({event_name:"click",component_type:"button",object:"keep_exploring",context:"message_owner_widget",object_properties:e}),ei=e=>({event_name:"show",component_type:"horizontal_display_boat_cards",object:"recommended_for_you",context:"message_owner_widget",object_properties:e}),eo=e=>({event_name:"scroll",component_type:"scroll_horizontal_display_boat_cards",object:"recommended_for_you",context:"message_owner_widget",object_properties:e}),ea=e=>({event_name:"click",component_type:"boat_card",object:"boat_card",context:"message_owner_widget",object_properties:e}),er=()=>{let e=(0,V.t)(),t=t=>function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e(t(...i))};return{trackMessageOwnerButton:t(T),trackSeeProfileLink:t(F),trackMessageOwnerWidgetShow:t(N),trackPassengerAdjustment:t(W),trackClickTextBox:t(K),trackClickDatePicker:t(U),trackClickDurationPicker:t(Q),trackClickStartTimePicker:t(J),trackClickCaptainButton:t($),trackClickSubmitSendMessageButton:t(X),trackShowConfirmation:t(ee),trackClickViewConversationButton:t(et),trackClickKeepExploringButton:t(en),trackShowRecommendedBoats:t(ei),trackScrollRecommendedBoats:t(eo),trackClickRecommendedBoatCard:t(ea),track:t=>{e(t)}}};var el=n(37359),es=n(93165),ed=n(23346),ec=n(91131),ep=n(30154),eh=n(12096),ex=n(24241),eu=n(46215);let eg=a.ZP.div.withConfig({componentId:"sc-b4e5cc6a-0"})(["display:flex;justify-content:space-between;gap:15px;"]),ef=a.ZP.div.withConfig({componentId:"sc-b4e5cc6a-1"})(["width:160px;display:flex;height:50px;font-weight:500;font-size:14px;align-items:center;justify-content:center;border:1px solid #cdd1d2;border-radius:8px;
1cursor:pointer;"," ",""],e=>{let{disabled:t}=e;return t&&(0,a.iv)(["color:#dbdfe5;cursor:not-allowed;"])},e=>{let{selected:t}=e;return t&&(0,a.iv)(["color:#0751c2;background:#eef3fb;border:none;font-weight:600;"])});var em=e=>{let{captainStatus:t,onChange:n=null}=e,o=(0,G.useRouter)(),a=(0,q.Z)(),[r,l]=(0,ec.KO)(ep.JE),s=(0,ec.Dv)(ep.lz),{boatDetails:d}=(0,m.Gb)(s),c=null==r?void 0:r.package_type,{trackClickCaptainButton:p}=er(),h=e=>()=>{p("captained"===e?"captain_button":"no_captain_button");let t=d.packages.find(t=>t.package_type===e);r&&t.id!==r.id&&(l(t),a("selection_package_type",{value:t.package_type}),n&&n(t),o.push({query:{...o.query,package_type:t.package_type}},null,{shallow:!0,scroll:!1}))},x=t===eu.fQ.no_captain_only,u=t===eu.fQ.captain_only,g="captained"===c,f="bareboat"===c;return(0,i.jsxs)(eg,{children:[(0,i.jsx)(ef,{selected:g,onClick:x||g?null:h("captained"),disabled:x,children:"Captained"}),(0,i.jsx)(ef,{selected:f,onClick:u||f?null:h("bareboat"),disabled:u,children:"No captain"})]})},eb=n(13530),ev=e=>{let{boatDetails:t}=e,n=(0,ec.Dv)(ep.ay),[o,a]=(0,ec.KO)(ep.uL),[,r]=(0,ec.KO)(ep.jD),[,l]=(0,ec.KO)(ep.F),s=(0,ec.b9)(ep.WE);return(0,i.jsx)(em,{onChange:e=>{!e[null==o?void 0:o.name]&&(a(eb.E_),r(eb.E_),n&&(l(eb.E_),s(eb.E_)))},captainStatus:t.captain_option})},ew=n(64061),e_=n.n(ew),ej=n(7769),eC=n(75377),ey=n(89353),ek=n(29153);let eZ=a.ZP.div.withConfig({componentId:"sc-d6f2dc71-0"})(["border-bottom:",";"],e=>{let{noBorder:t}=e;return t?"unset":"1px solid rgba(219, 223, 229, 0.5)"}),eP=a.ZP.div.withConfig({componentId:"sc-d6f2dc71-1"})(["font-weight:500;font-size:12px;color:#bc350a;max-width:340px;"]),eI=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-d6f2dc71-2"})(["padding-top:30px;"]),eM=a.ZP.div.withConfig({componentId:"sc-d6f2dc71-3"})(["color:#434c5c;font-size:12px;font-weight:initial;","{padding-top:5px;}"],v.Hl),eE=a.ZP.div.withConfig({componentId:"sc-d6f2dc71-4"})(["","{position:fixed;z-index:1;bottom:0;left:0;right:0;box-shadow:0px 0px 20px 0px #0000001a;padding:22px 24px;background-color:#fff;}"],v.Hl),eD=(e,t)=>{let n,i;return t&&e instanceof Date&&e_().notify("DateInput: date type mismatch on multi day - expected MultiDayDuration, got Date"),e instanceof Date?(n=x()(e).format("YYYY-MM-DD"),i=void 0):(n=x()(e.startDate).format("YYYY-MM-DD"),i=x()(e.endDate).format("YYYY-MM-DD")),{startDate:n,endDate:i}};var eH=e=>{var t;let{isModal:n,isMessageOwner:o,smallScreen:a,errors:r,register:l,boatDetails:s,primaryPackage:d,boatCalendar:c}=e,p=(0,G.useRouter)(),h=(0,ec.Dv)(ep.ay),[x,u]=(0,ec.KO)(ep.uL),[g,f]=(0,ec.KO)(ep.JE),[m,b]=(0,ec.KO)(ep.jD);return(0,i.jsxs)(eZ,{noBorder:n,children:[(0,i.jsx)(eB,{isMessageOwner:o,label:"Date",monthsToShow:!a&&o?1:2,modalVersion:n,hidePrice:!0,hideMultiDay:!(null==d?void 0:d.all_day_cents),error:null==r?void 0:null===(t=r.trip_start)||void 0===t?void 0:t.message,onMultiDayChange:(e,t)=>
1{t?u((0,ey.qn)(e,e)):(u((0,ey.gm)(ey.s1[s.cheapest_package.price_name],s.cheapest_package.price_name)),f(s.packages.find(e=>e.id===s.cheapest_package.id)))},onChange:e=>{let{startDate:t,endDate:n}=eD(e,h);p.push({query:{...p.query,start_period:t,end_period:n}},void 0,{shallow:!0,scroll:!1}),h||(0,ek.rc)(t,c,null==g?void 0:g.package_type,null==m?void 0:m.value,null==x?void 0:x.value)||(u(eb.E_),b(eb.E_))},hasRelativePositionedDate:!0}),(0,i.jsx)("input",{type:"hidden",ref:l({required:"Please enter your trip date"}),name:"trip_start"})]})};let eB=(0,a.ZP)(eC.ZP).withConfig({componentId:"sc-4e5ebc43-0"})(["","{right:0;transform:translateY(-50px);}",""],ej.j,e=>{let{monthsToShow:t}=e;return 1===t&&(0,a.iv)(["","{transform:translateY(1px) translateX(50%);right:50%;}"],ej.j)});var eS=n(41140),eL=()=>(0,i.jsxs)("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"7.5",cy:"10.5",r:"6.9",stroke:"#5E696A",strokeWidth:"1.2"}),(0,i.jsx)("line",{x1:"7.5",y1:"4",x2:"7.5",y2:"2",stroke:"#5E696A"}),(0,i.jsx)("line",{x1:"7.5",y1:"10.5",x2:"7.5",y2:"6.5",stroke:"#5E696A",strokeLinecap:"round"}),(0,i.jsx)("line",{x1:"13.8828",y1:"6.79892",x2:"14.7488",y2:"6.29892",stroke:"#5E696A"}),(0,i.jsx)("line",{x1:"6.6",y1:"1.4",x2:"8.4",y2:"1.4",stroke:"#5E696A",strokeWidth:"1.2",strokeLinecap:"round"}),(0,i.jsx)("line",{x1:"14.8196",y1:"5.21962",x2:"15.7196",y2:"6.77846",stroke:"#5E696A",strokeWidth:"1.2",strokeLinecap:"round"}),(0,i.jsx)("circle",{cx:"7.5",cy:"11",r:"1",fill:"#5E696A"})]}),eR=n(49040);let ez=e=>{if(!e)return[];let t=[];return e.two_hour_price_cents>0&&t.push((0,ey.gm)(2,"two_hour_price_cents")),e.three_hour_price_cents>0&&t.push((0,ey.gm)(3,"three_hour_price_cents")),e.half_day_cents>0&&t.push((0,ey.gm)(4,"half_day_cents")),e.six_hour_price_cents>0&&t.push((0,ey.gm)(6,"six_hour_price_cents")),e.all_day_cents>0&&t.push((0,ey.gm)(8,"all_day_cents")),t},eO=a.ZP.div.withConfig({componentId:"sc-2c038d79-0"})(["margin-bottom:0;height:100%;"]);var eA=e=>{let{onChange:t=e=>{},defaultValue:n,setter:o,error:a=null,className:r=null,modalVersion:l=!1,isMessageOwner:s=!1}=e,d=(0,ec.Dv)(ep.ay),c=ez((0,ec.Dv)(ep.JE));return(0,i.jsx)(eO,{children:(0,i.jsx)(eS.ZP,{modalVersion:l,setter:o,name:"DurationPicker",object:"duration_picker",error:a,options:c,icon:(0,i.jsx)(eL,{}),className:r,defaultValue:n,onChange:t,title:"Duration",height:"auto",isDisabled:d,isMessageOwner:s})})},eG=e=>{var t;let{isModal:n,errors:o,register:a,boatCalendar:r,isMessageOwner:l}=e,s=(0,ec.Dv)(ep.M5),[d]=(0,ec.KO)(ep.JE),[c,p]=(0,ec.KO)(ep.jD),[h,x]=(0,ec.KO)(ep.uL);return(0,i.jsxs)(eZ,{noBorder:n,children:[(0,i.jsx)(eA,{modalVersion:n,error:null==o?void 0:null===(t=o.duration)||void 0===t?void 0:t.message,onChange:e=>{(0,ek.rc)(s,r,null==d?void 0:d.package_type,null==c?void 0:c.value,e.value)||p(eb.E_)},setter:x,defaultValue:h,isMessageOwner:l}),(0,i.jsx)("input",{type:"hidden",ref:a({required:"Please select duration"}),name:"duration"})]})},eY=n(40919),eq=n(60990),eV=e=>{let{isModal:t=!1}=e,{tripCalculation:n}=(0,eq.E)();return(0,i.jsx)(eT,{isModal:t,children:(0,i.jsxs)(eF,{isModal:t,children:[(0,i.jsx)("dt",{className:"total",children:"Booking total"}),(0,i.jsx)("dd",{className:"total",children:(0,eY.Am)((null==n?void 0:n.pre_tax_and_fees_booking_total)||0)}),(0,i.jsx)(eN,{children:"Additional fees will show at checkout"}),(0,i.jsx)("hr",{}),(0,i.jsx)("dt",{children:"Boat price"}),(0,i.jsx)("dd",{children:(0,eY.Am)(null==n?void 0:n.boat_price)}),!!(null==n?void 0:n.captain_fee)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eW,{isPadded:t,children:"Captain price"}),(0,i.jsx)(eK,{isPadded:t,children:(0,eY.Am)(null==n?void 0:n.captain_fee)})]})]})})};let eT=(0,a.ZP)(eI).withConfig({componentId:"sc-8bb03904-0"})(["gap:5px;padding-top:8px;",""],e=>{let{isModal:t}=e;return t?(0,a.iv)(["margin-bottom:25px;padding-top:20px;"]):(0,a.iv)(["padding-top:8px;"])}),eF=a.ZP.dl.withConfig({componentId:"sc-8bb03904-1"})(["width:100%;display:grid;grid-template-columns:1fr 1fr;& dd{text-align:end;}& hr{grid-column:1 / -1;width:100%;height:1px;color:rgba(219,223,229,0.5);background-color:rgba(219,223,229,0.5);margin-top:12px;margin-bottom:12px;border:none;","}& .total{font-weight:600;}"],e=>{let{isModal:t}=e;return t?(0,a.iv)(["margin-top:15px;margin-bottom:10px;"]):(0,a.iv)(["margin-top:12px;margin-bottom:12px;"])}),eN=(0,a.ZP)(eM).withConfig({componentId:"sc-8bb03904-2"})(["padding-top:0;grid-column:1 / -1;"]),eW=a.ZP.dt.withConfig({componentId:"sc-8bb03904-3"})(["",""],e=>{let{isPadded:t}=e;return t&&(0,a.iv)(["padding-top:5px;"])}),eK=a.ZP.dd.withConfig({componentId:"sc-8bb03904-4"})(["",""],e=>{let{isPadded:t}=e;return t&&(0,a.iv)(["padding-top:5px;"])}),eU=()=>(0,i.jsx)("svg",{width:"22",height:"2",viewBox:"0 0 22 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M1.44219 1.11359H20.7171",stroke:"#8E9697",strokeWidth:"1.5",strokeLinecap:"square"})}),eQ=()=>(0,i.jsxs)("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M1.57823 9.63641H20.2691",stroke:"#8E9697",strokeWidth:"1.5",strokeLinecap:"square"}),(0,i.jsx)("path",{d:"M10.922 19.0024V1.37158",stroke:"#8E9697",strokeWidth:"1.5",strokeLinecap:"square"})]}),eJ=a.ZP.div.withConfig({componentId:"sc-73203b8-0"})(["display:flex;justify-content:space-between;"]),e$=a.ZP.button.withConfig({componentId:"sc-73203b8-1"})(["border:1px solid #cdd1d2;cursor:pointer;box-sizing:border-box;border-radius:8px;width:85px;height:50px;display:flex;align-items:center;justify-content:center;",""],e=>{let{disabled:t}=e;
1return t&&(0,a.iv)(["cursor:initial;border:1px solid #cdd1d2;opacity:0.4;"])}),eX=a.ZP.div.withConfig({componentId:"sc-73203b8-2"})(["font-weight:500;user-select:none;font-size:14px;text-align:center;justify-content:end;flex-flow:row;display:flex;gap:6px;align-items:center;"]);var e0=e=>{let{isMessageOwner:t}=e,n=(0,ec.Dv)(ep.lz),{boatDetails:o}=(0,m.Gb)(n),[a,r]=(0,ec.KO)(ep.dW),l=(0,G.useRouter)(),s=(0,q.Z)(),{trackPassengerAdjustment:d}=er(),c=e=>{l.push({query:{...l.query,passengers:e}},null,{shallow:!0,scroll:!1})};return(0,i.jsxs)(eJ,{children:[(0,i.jsx)(e$,{onClick:e=>{if(e.preventDefault(),1!==a){let e=a-1;t&&d("minus",{passengers:e}),r(e),c(e),s("selection_passengers",{action:"decrement",value:e})}},disabled:1===a,children:(0,i.jsx)(eU,{})}),(0,i.jsxs)(eX,{children:[(0,i.jsx)("div",{children:a}),(0,i.jsx)("div",{children:"passengers"})]}),(0,i.jsx)(e$,{onClick:e=>{if(e.preventDefault(),a!==(null==o?void 0:o.capacity)){let e=a+1;t&&d("plus",{passengers:e}),r(e),c(e),s("selection_passengers",{action:"increment",value:e})}},disabled:a===(null==o?void 0:o.capacity),children:(0,i.jsx)(eQ,{})})]})},e1=n(50043),e2=e=>{let{register:t,isMessageOwner:n}=e;return(0,i.jsxs)(e1.x,{children:[(0,i.jsx)(e0,{isMessageOwner:n}),(0,i.jsx)("input",{type:"hidden",ref:t({required:"Please enter passenger amount"}),name:"passengers"})]})},e5=()=>{let{tripCalculation:e}=(0,eq.E)();return(0,i.jsx)(eI,{gap:"5px",children:(0,i.jsxs)(e6,{children:[(0,i.jsxs)(d.Ht,{children:[(0,i.jsx)("div",{className:"total",children:"Booking total"}),(0,i.jsx)(eM,{children:"Additional fees will show at checkout"})]}),(0,i.jsx)("div",{className:"totalAmount",children:(0,eY.Am)((null==e?void 0:e.pre_tax_and_fees_booking_total)||0)})]})})};let e6=(0,a.ZP)(d.yq).withConfig({componentId:"sc-ffc61407-0"})(["padding-bottom:15px;.total{font-weight:600;}.totalAmount{font-size:18px;font-weight:700;}"]);var e4=n(21368),e3=e=>{var t;let{isModal:n,errors:o,register:a,boatCalendar:r,setExpanded:l,isMessageOwner:s}=e;return(0,i.jsxs)(eZ,{noBorder:n,children:[(0,i.jsx)(e4.Z,{isMessageOwner:s,modalVersion:n,error:null==o?void 0:null===(t=o.trip_time)||void 0===t?void 0:t.message,calendar:r,onChange:()=>{l&&l(!0)},useDuration:!0,editable:!0}),(0,i.jsx)("input",{type:"hidden",ref:a({required:"Please enter start time"}),name:"trip_time"})]})};let e9=(0,a.ZP)(p.Z).withConfig({componentId:"sc-93ae803f-0"})(["padding:0 25px !important;",""],e=>{let{ib:t}=e;return t&&(0,a.iv)(["background:#0a4195 !important;&:hover{background:#083170 !important;}"])}),e8=a.ZP.div.withConfig({componentId:"sc-93ae803f-1"})(["display:flex;align-items:center;width:100%;justify-content:center;gap:10px;"]),e7=()=>(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"9",cy:"9",r:"9",fill:"#F4C064"}),(0,i.jsx)("path",{d:"M8.85244 10.9147H4.63134C4.30722 10.9147 4.12566 10.5465 4.32591 10.2952L10.0228 3.14807C10.2782 2.82769 10.7971 3.06995 10.7074 3.46768L9.77666 7.59634H13.9535C14.2758 7.59634 14.4579 7.96088 14.2614 8.21267L9.08242 14.8493C8.84109 15.1586 8.34002 14.9555 8.38912 14.5684L8.85244 10.9147Z",fill:"#001D58"})]}),te=a.ZP.div.withConfig({componentId:"sc-93ae803f-2"})(["display:flex;button{width:100%;}"]);var tt=e=>{var t;let{loading:n,onClick:o=null,className:a="",boatId:r,disabled:l=!1}=e,{boatDetails:d}=(0,m.Gb)(r),{userId:c}=(0,z.vU)(),p=(0,s.Gc)(),h=p.xs||p.sm,x=c===(null==d?void 0:null===(t=d.primary_manager)||void 0===t?void 0:t.id),u=(0,ec.Dv)(ep.JE);return(0,i.jsx)(te,{className:a,children:(0,i.jsx)(e9,{ib:null==u?void 0:u.instant_bookable,type:"submit",disabled:!(null==d?void 0:d.activated)||x||n||l,loading:n,onClick:o,text:x?"You own this boat":(null==d?void 0:d.activated)?(null==u?void 0:u.instant_bookable)?(0,i.jsxs)(e8,{children:[(0,i.jsx)(e7,{}),"Instant book"]}):"Request to book":h?"Boat unavailable":"Boat currently unavailable"})})},tn=e=>{let{isProcessing:t,isDayAvailable:n,isInstantBookable:o=!1,trackRequestToBookStart:a,boatId:r}=e;return(0,i.jsxs)(eE,{children:[(0,i.jsx)(tt,{onClick:a,loading:t,boatId:r,disabled:!n}),o&&(0,i.jsx)(to,{children:ti})]})};let ti="You won't be charged yet",to=a.ZP.div.withConfig({componentId:"sc-27ced2d2-0"})(["text-align:center;font-size:12px;color:#434c5c;padding-top:12px;"]);var ta=e=>{var t;let{isSmallScreen:n,isProcessing:o,isViewerOwner:a}=e,{tripCalculation:r}=(0,eq.E)(),l=(0,ec.Dv)(ep.ay),[s]=(0,ec.KO)(ep.uL);return(0,i.jsx)(eE,{children:(0,i.jsxs)(d.kC,{gap:"40px",children:[n&&(0,i.jsxs)(tr,{children:[(0,i.jsx)(tl,{children:(0,eY._f)((null==r?void 0:r.pre_tax_and_fees_booking_total)||0)}),(0,i.jsxs)(ts,{children:[l?null==s?void 0:s.label:null==s?void 0:null===(t=s.label)||void 0===t?void 0:t.replace("hours","hr")," (excl. fees)"]})]}),(0,i.jsx)(p.Z,{fullWidth:!0,loading:o,disabled:a||o,text:a?"you own this boat":"send message",type:"submit"})]})})};let tr=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-a728a9b-0"})(["align-items:end;min-width:140px;","{align-items:flex-start;}"],v.Hl),tl=a.ZP.div.withConfig({componentId:"sc-a728a9b-1"})(["font-weight:700;font-size:20px;"]),ts=a.ZP.div.withConfig({componentId:"sc-a728a9b-2"})(["color:#8e9697;font-weight:500;"]);var td=n(18025),tc=e=>{var t,n;let{messageOwnerWrapperRef:o,errors:a,register:r,watch:l}=e,[,s]=(0,ec.KO)(ep.OJ),{trackClickTextBox:c}=er();return(0,i.jsxs)(d.Ht,{ref:o,children:[(0,i.jsx)(td.Z,{onClick:c,onChange:e=>{s(e.target.value)},hasError:!!(null===(t=a.message)||void 0===t?void 0:t.message),style:{minHeight:"150px",resize:"none"},inputRef:r({required:"Please enter your message"}),hasValue:!(0,eR.Bd)(l("message")),name:"message",placeholder:"Tell the owner about your trip and boating experience...",label:"Your message"}),(0,i.jsx)(eP,{children:null===(n=a.message)||void 0===n?void 0:n.message})]})},tp=n(40026),th=n(52035),tx=n(36808),tu=n.n(tx),tg=n(42283),tf=n(88767);let tm=new(n(28012)).QS(el.Z),tb=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-c6cf0c89-0"})(["padding-top:30px;"]),tv=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-c6cf0c89-1"})(["",""],e=>{let{isModal:t}=e;return t&&(0,a.iv)(["gap:15px;","{padding:0;}","{padding-top:20px;}"],eZ,tb)});var tw=e=>{var t,n,a,r;let{boatId:l,isMessageOwner:d=!1,isExpanded:p,primaryPackage:h,setExpanded:u=null,onSuccess:g=null,isModal:f=!1}=e,{enqueueSnackbar:b}=(0,ed.Z)(),v=(0,G.useRouter)(),_=(0,q.Z)(),j=(0,tp.ZP)(),C=(0,V.t)(),[y]=(0,ec.KO)(ep.F),
1k=(0,ec.Dv)(ep.WE),Z=(0,ec.Dv)(ep.M5),P=(0,ec.Dv)(ep.jH),[I]=(0,ec.KO)(ep.jD),M=(0,ec.Dv)(ep.ay),E=(0,ec.Dv)(ep.dW),[D]=(0,ec.KO)(ep.OJ),[H]=(0,ec.KO)(ep.uL),[B]=(0,ec.KO)(ep.JE),S=(0,ec.Dv)(ep.Cp),L=(0,A.v2)(),{tripCalculation:R}=(0,eq.E)(),{userId:T,isAuthenticated:F}=(0,z.vU)(),{boatDetails:N}=(0,m.Gb)(l),{handlePossibleIncompleteAccountInApp:W}=(0,O.Z)(),[K]=(0,es.Z)("galactica_session",""),{boatCalendar:U}=(0,A.eh)({startOn:null==y?void 0:null===(t=y.startOf("month"))||void 0===t?void 0:t.format("YYYY-MM-DD"),endOn:null==k?void 0:null===(n=k.add(1,"month"))||void 0===n?void 0:n.format("YYYY-MM-DD"),boatId:l,packageType:null==B?void 0:B.package_type}),Q=!(0,eR.Bd)(U)&&!!(null===(a=U[null==y?void 0:y.format("YYYY-MM-DD")])||void 0===a?void 0:a.available),{modal:J,openModal:$,closeModal:X}=(0,c.Z)((0,i.jsx)(w.ZP,{boatId:l}),{isOnRight:!0,notScrollAble:!0,trackingName:"change_captain_modal"}),{trackClickSubmitSendMessageButton:ee}=er(),{mutate:et,isLoading:en}=(0,tf.useMutation)(e=>{let{body:t}=e;return tm.domesticV2BookingsInquiryPost(t)},{onSuccess(e){var t;let{data:n}=e;_("booking_inquiry_created",{booking_id:null==n?void 0:n.id}),_("customSiteEvent",{category:"bookingMessageOwnerSent",action:"booking message owner",label:"SendMessage",renterEmail:(null==n?void 0:null===(t=n.renter)||void 0===t?void 0:t.email)&&(0,eR.iO)(n.renter.email)}),(0,eh.ou)(!1,{}),ee({booking_id:null==n?void 0:n.id,booking_total:null==n?void 0:n.pre_tax_and_fees_booking_total,filled_values:{trip_date:n.trip_start,duration:n.duration,passengers:n.passengers,captained:n.package_type}}),_("message_owner_success",{...L,booking_id:null==n?void 0:n.id}),null==g||g(n)},onError(e){let{response:{data:{error_message:t,error_code:n,data:{message:i}}}}=e;if("validation_error"===n&&Array.isArray(i)&&"contained spam"===i[0]){ef("message",{message:"To protect users, messages that contain certain words, phone numbers, email addresses or website links are not allowed."});return}b(t,{variant:"error"})}}),ei=(0,th.Z)({mode:"all",reValidateMode:"onChange",defaultValues:{trip_start:null,duration:null,trip_time:null,message:null,passengers:null}}),{handleSubmit:eo,register:ea,errors:el,setValue:eu,watch:eg,setError:ef}=ei;(0,A.QF)(l,h);let em=function(e){let t=(0,ec.Dv)(ep.pB),n=(0,ec.Dv)(ep.iY),{existingTrip:i}=function(e,t){let{myTrips:n}=(0,m.Di)(e,["pre_approved","initialized"]),i=n.filter(e=>["initialized","pre_approved"].includes(e.state)).find(e=>x()(e.trip_start).isSame(t,"day")),{bookingTrip:o}=(0,ex.d7)({enabled:!!(null==i?void 0:i.id)},null==i?void 0:i.id);return{existingTrip:o}}(e,t),o=(0,eh.C4)(null==i?void 0:i.trip_start,null==i?void 0:i.trip_finish,t,n);return i&&o?null==i?void 0:i.id:null}(l);(0,o.useEffect)(()=>{eu("trip_start",Z,{shouldValidate:!!y}),eu("trip_time",null==I?void 0:I.value,{shouldValidate:!!I}),eu("duration",null==H?void 0:H.value,{shouldValidate:!!H}),eu("message",D,{shouldValidate:!!D}),eu("passengers",E,{shouldValidate:!!E})},[y,I,H,D,E,eu,Z]);let eb=async e=>{let t=S&&N.captain_network_enabled,n={boat_public_id:l,tz:N.time_zone,package_public_id:B.id,package_type:B.package_type,passengers:E,is_multi_day:M,...e,duration:ey.JH[e.duration],trip_start:e.trip_start,trip_finish:P||Z,...t&&{captain_public_id:S}};if(d){et({body:{message:e.message,trip_time:e.trip_time,duration:ey.JH[e.duration],package_id:B.id,trip_start:e.trip_start,trip_finish:P||Z,passengers:e.passengers,...t&&{captain_id:S}}});return}!d&&"is_captain_available"in R&&!R.is_captain_available&&b("The captain assigned is not available during the time selected. Please assign another captain.",{variant:"error",autoHideDuration:4e3,onClick:$});let i=(0,eR.iS)(n),o="/a/bookings/book_now?".concat(i),a="".concat(Y.Z.signUp,"?redirect_to=").concat(encodeURIComponent(o));if(F&&_("request_to_book_success",{type:"expanded_floating",...L}),!F){v.push(a);return}if(await W(o)){if(em){v.push("/a/bookings/".concat(em,"/book_now"));return}X(),v.push(o)}},ew=(0,s.Gc)(),e_=ew.xs||ew.sm,ej=(0,o.useRef)(),eC=T===(null==N?void 0:null===(r=N.primary_manager)||void 0===r?void 0:r.id),ek=null==B?void 0:B.instant_bookable;return(0,i.jsxs)(tg.RV,{...ei,children:[(0,i.jsxs)(tv,{as:"form",onSubmit:eo(eb),isModal:f,gap:"16px",children:[(0,i.jsx)(eH,{isModal:f,isMessageOwner:d,smallScreen:e_,errors:el,register:ea,boatDetails:N,primaryPackage:h,boatCalendar:U}),(0,i.jsx)(eG,{isMessageOwner:d,isModal:f,errors:el,register:ea,boatCalendar:U}),(0,i.jsx)(e3,{isModal:f,errors:el,register:ea,boatCalendar:U,setExpanded:u,isMessageOwner:d}),p&&(0,i.jsx)(ev,{boatDetails:N}),p&&(0,i.jsx)(e2,{isMessageOwner:d,register:ea}),!d&&(0,i.jsx)(tn,{isProcessing:en,isDayAvailable:Q,isInstantBookable:ek,trackRequestToBookStart:()=>{C({event_name:"click",component_type:"button",object:"request_to_book",context:"booking_widget",object_properties:L}),_("request_to_book_start",{type:p?"expanded_floating":"initial_floating",...L}),B.instant_bookable?j("UserDidInstantBooking",{anonymousId:tu().get("uuid")||"",sessionId:K||"",appScreen:v.pathname},{boatId:l}):j("UserRequestedBooking",{anonymousId:tu().get("uuid")||"",sessionId:K||"",appScreen:v.pathname},{boatId:l})},boatId:l}),p&&!d&&(0,i.jsx)(eV,{isModal:f}),p&&d&&(0,i.jsx)(tc,{messageOwnerWrapperRef:ej,errors:el,register:ea,watch:eg}),p&&d&&!e_&&(0,i.jsx)(e5,{}),d&&(0,i.jsx)(ta,{isSmallScreen:e_,isProcessing:en,isViewerOwner:eC})]}),J]})},t_=n(41664),tj=n.n(t_);let tC=e=>{let{id:t,text:n,isInquiry:o=!1}=e;return(0,i.jsxs)("div",{children:["You already have ".concat(n," for this boat. "),o?(0,i.jsx)(tj(),{href:"/a/inbox/".concat(t),children:"View\xa0Conversation"}):(0,i.jsx)(tj(),{href:"/bookings/".concat(t),children:"See\xa0detail
1s"})]})},ty=()=>(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M17.4177 12.3869L11.2194 1.2663C10.7729 0.475614 9.94124 -0.000488281 9.01325 -0.000488281C8.07651 -0.000488281 7.25358 0.475614 6.80709 1.2663L0.582554 12.3784C0.153577 13.1436 0.171087 14.0532 0.626327 14.8014C1.08157 15.5496 1.89575 16.0002 2.79747 16.0002H15.2115C16.1045 16.0002 16.9187 15.5496 17.3739 14.8014C17.8292 14.0617 17.8467 13.1606 17.4177 12.3869ZM16.2446 14.1553C16.0257 14.5124 15.6405 14.7249 15.2115 14.7249H2.78872C2.35974 14.7249 1.97454 14.5124 1.74692 14.1553C1.5193 13.7982 1.5193 13.3646 1.72065 12.999L7.94519 1.88692C8.16406 1.50434 8.55801 1.28332 9.0045 1.28332C9.45098 1.28332 9.84494 1.51284 10.0638 1.88692L16.2621 13.0075C16.4722 13.3646 16.4634 13.7982 16.2446 14.1553ZM8.33915 8.11037V4.99016C8.33915 4.64158 8.63681 4.35252 8.99575 4.35252C9.35468 4.35252 9.65234 4.64158 9.65234 4.99016V8.11037C9.65234 8.45895 9.35468 8.74802 8.99575 8.74802C8.63681 8.74802 8.33915 8.45895 8.33915 8.11037ZM10.2389 11.7492C10.2389 12.4124 9.67861 12.9565 8.99575 12.9565C8.31289 12.9565 7.75259 12.4124 7.75259 11.7492C7.75259 11.0861 8.31289 10.542 8.99575 10.542C9.67861 10.542 10.2389 11.0776 10.2389 11.7492Z",fill:"#BC350A"})}),tk=(0,a.ZP)(d.kC).withConfig({componentId:"sc-27639d96-0"})(["padding:15px;margin-bottom:20px;font-weight:500;font-size:14px;background:#fafdff;border:1px solid rgba(189,227,253,0.768684);border-radius:9px;svg{padding-top:5px;}"]);var tZ=e=>{let{boatId:t,className:n=null}=e,{myTrips:a}=(0,m.Di)(t,["approved","pre_approved","unverified","payment_held","initialized"]),r=(0,o.useMemo)(()=>{let e=a.find(e=>["approved","unverified"].includes(e.state)),t=a.find(e=>["payment_held"].includes(e.state)),n=a.find(e=>["pre_approved"].includes(e.state)),o=a.find(e=>["initialized"].includes(e.state));return e?(0,i.jsx)(tC,{id:e.id,text:"an existing booking"}):t?(0,i.jsx)(tC,{id:t.id,text:"an existing booking request"}):n?(0,i.jsx)(tC,{id:n.conversation_id,text:"a pre-approved inquiry",isInquiry:!0}):o?(0,i.jsx)(tC,{id:o.conversation_id,text:"an existing inquiry",isInquiry:!0}):null},[a]);return r&&(0,i.jsx)(tk,{className:n,gap:"10px",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ty,{}),r]})})},tP=n(41609),tI=n.n(tP),tM=n(74873),tE=n(23453),tD=n(61582);let tH={title:"Message sent!",subtitle:"Reach out to a few more owners or send a booking request, the best boats can book up in no time.",dynamicTitle:e=>"".concat(e,", let's get you on the water!"),dynamicSubtitle:e=>"You've already taken the first step - now give yourself the best shot at getting on the water. Send more requests or message multiple owners in ".concat(e," to boost your chances of booking the perfect boat."),sectionTitle:"Recommended boats",buttons:{sendMoreRequests:"Send more requests",viewConversation:"view conversation"}};function tB(e){let{viewConversation:t,boatLocation:n}=e,a=(0,G.useRouter)(),r=(0,eR.X2)(a.query.id),l=(0,o.useRef)(null),s=(0,o.useRef)(0),[c,h]=(0,o.useState)(0),{userDetails:x}=(0,z.vU)(),{data:u,isLoading:g}=(0,m.FI)(r),{trackClickKeepExploringButton:f,trackShowRecommendedBoats:b,trackScrollRecommendedBoats:v,trackClickRecommendedBoatCard:w}=er(),_=(0,o.useMemo)(()=>"".concat(n.city,", ").concat(n.state,", ").concat(n.country),[n.city,n.state,n.country]),j=(0,o.useMemo)(()=>{var e,t;return(null==u?void 0:null===(t=u.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.filter(e=>e.boat_public_id!==r))||[]},[u,r]);(0,o.useEffect)(()=>{var e;b({boat_public_id:r,boats_display:null===(e=j||[])||void 0===e?void 0:e.map((e,t)=>({boat_public_id:e.boat_public_id,position:t+1}))})},[r]);let C=(0,o.useCallback)(()=>{let e=l.current;if(!e)return;let{scrollLeft:t}=e,n=t>s.current?"right":"left";s.current=t;let i=e.querySelectorAll("[data-rec-slide]"),o=e.getBoundingClientRect(),a=0,d=1/0;i.forEach((e,t)=>{let n=Math.abs(e.getBoundingClientRect().left-o.left);n<d&&(d=n,a=t)}),v({scroll_direction:n,boat_public_id:r,boats_display:j.map((e,t)=>({boat_public_id:e.boat_public_id,position:t-a}))})},[j,r]);(0,o.useEffect)(()=>{let e;let t=l.current;if(!t)return;let n=()=>{clearTimeout(e),e=setTimeout(C,150)};return t.addEventListener("scroll",n,{passive:!0}),()=>{t.removeEventListener("scroll",n),clearTimeout(e)}},[C]);let y=(0,o.useRef)(0),k=(0,o.useCallback)(e=>{let t=l.current;if(!t)return;let n=t.querySelector('[data-rec-slide="'.concat(e,'"]'));if(!n)return;let i=t.clientWidth/2,o=n.offsetLeft+n.offsetWidth/2;t.scrollTo({left:o-i,behavior:"smooth"})},[]),Z=(0,o.useCallback)(e=>{let t=((null==j?void 0:j.length)||1)-1,{current:n}=y,i="next"===e?Math.min(n+1,t):Math.max(n-1,0);i!==n&&(y.current=i,h(i),k(i))},[null==j?void 0:j.length,k]);(0,o.useEffect)(()=>{let e=l.current;if(!e)return;let t=()=>{let t=e.querySelectorAll("[data-rec-slide]"),n=e.scrollLeft+e.clientWidth/2,i=0,o=1/0;t.forEach((e,t)=>{let a=Math.abs(e.offsetLeft+e.offsetWidth/2-n);a<o&&(o=a,i=t)}),y.current=i,h(i)};return e.addEventListener("scrollend",t,{passive:!0}),()=>e.removeEventListener("scrollend",t)},[]);let P=c<((null==j?void 0:j.length)||0)-1;return g?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(tL,{children:[(0,i.jsx)(tR,{children:tH.dynamicTitle(x.first_name)}),(0,i.jsx)(tz,{children:tH.dynamicSubtitle(_)})]}),(0,i.jsxs)(tS,{children:[(0,i.jsxs)(tF,{children:[(0,i.jsx)(d.kC,{children:(0,i.jsx)(tO,{children:tH.sectionTitle})}),(0,i.jsxs)(tA,{children:[(0,i.jsx)(tG,{onClick:()=>Z("prev"),disabled:!(c>0),"aria-label":"Previous boats",children:(0,i.jsx)("img",{src:"/images/prev-arrow.svg",alt:"",width:8,height:14})}),(0,i.jsx)(tG,{onClick:()=>Z("next"),disabled:!P,"aria-label":"Next boats",children:(0,i.jsx)("img",{src:"/images/next-arrow.svg",alt:"",width:8,height:14})})]})]}),(0,i.jsx)(tY,{children:(0,i.jsx)(tq,{ref:l,children:null==j?void 0:j.map((e,t)=>(0,i.jsx)(tV,{"data-rec-slide":t,children:(0,i.jsx)(tE.Z,{trackClick:()=>{w({boat_public_id:e.boat_public_id,position:t})},boat:e,index:t,url:(0,tD.R)({boatId:e.boat_public_id,pos:t})})},e.boat_public_id))})})]}),(0,i.jsxs)(tT,{children:[(0,i.jsx)(p.Z,{text:tH.buttons.sendMoreRequests,onClick:()=>{f({boat_public_id:r,text:"Keep Exploring"}),a.push({pathname:Y.Z.search,query:{near:_}})},fullWidth:!0}),(0,i.jsx)(p.Z,{text:tH.buttons.viewConversation,onClick:t,fullWidth:!0,outline:!0})]})]})}let tS=a.ZP.div.withConfig({componentId:"sc-6bf77e7a-0"})(["margin:0 auto;max-width:100%;position:relative;"]),tL=a.ZP.div.withConfig({componentId:"sc-6bf77e7a-1"})(["margin-bottom:32px;text-align:left;"]),tR=a.ZP.h2.withConfig({componentId:"sc-6bf77e7a-2"})(["font-weight:600;font-size:28px;margin:0 0 8px 0;"]),tz=a.ZP.p.withConfig({componentId:"sc-6bf77e7a-3"})(["font-size:16px;color:#6b7280;margin:0;line-height:1.5;text-align:left;"]),tO=a.ZP.h3.withConfig({componentId:"sc-6bf77e7a-4"})(["font-size:16px;font-weight:600;color:#000;"]),tA=(0,a.ZP)(d.kC).withConfig({componentId:"sc-6bf77e7a-5"})(["gap:25px;","{display:none;}"],v.$m),tG=a.ZP.button.withConfig({componentId:"sc-6bf77e7a-6"})(["width:32px;height:32px;background:white;border-radius:50%;border:1px solid #eef1f5;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s;&:disabled{opacity:0.5;cursor:not-allowed;}"]),tY=a.ZP.div.withConfig({componentId:"sc-6bf77e7a-7"})(["position:relative;
1left:-75px;width:calc(100% + 150px);","{left:-1.5em;width:calc(100% + 3em);}"],v.$m),tq=a.ZP.div.withConfig({componentId:"sc-6bf77e7a-8"})(["display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:10px 10% 40px;&::-webkit-scrollbar{display:none;}"]),tV=a.ZP.div.withConfig({componentId:"sc-6bf77e7a-9"})(["flex-shrink:0;scroll-snap-align:center;background:#fff;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,0.08);width:83%;@media ","{width:71%;}"],v.Ag),tT=a.ZP.div.withConfig({componentId:"sc-6bf77e7a-10"})(["display:flex;flex-direction:column;gap:16px;width:100%;"]),tF=(0,a.ZP)(d._8).withConfig({componentId:"sc-6bf77e7a-11"})(["margin-bottom:20px;"]);function tN(e){var t,n;let{boatId:a,primaryPackage:r}=e,l=(0,b._x)(),c=(0,G.useRouter)(),{trackMessageOwnerWidgetShow:p,trackShowConfirmation:h,trackClickViewConversationButton:x}=er(),u=(0,ec.Dv)(ep.M5),g=(0,ec.Dv)(ep.dW),v=(0,ec.Dv)(ep.JE),[w]=(0,ec.KO)(ep.uL),{tripCalculation:_}=(0,eq.E)(),{boatDetails:j}=(0,m.Gb)(a),[C,y]=(0,o.useState)(!1),[k,Z]=(0,o.useState)(null),P=(0,s.Gc)(),I=P.xs||P.sm;return((0,o.useEffect)(()=>{p({date:u,duration:null==w?void 0:w.label,passengers:g,captained:(null==v?void 0:v.package_type)==="captained",booking_total:null==_?void 0:_.pre_tax_and_fees_booking_total})},[]),tI()(j))?null:(0,i.jsxs)(tQ,{children:[C&&(0,i.jsxs)(tJ,{children:[I&&(0,i.jsx)(tK,{onClick:l,children:(0,i.jsx)(tU,{})}),(0,i.jsx)(tB,{boatLocation:j.location,viewConversation:()=>{var e;c.push("/a/inbox/".concat(k.conversation_id)),l(),x({boat_public_id:null==k?void 0:null===(e=k.boat)||void 0===e?void 0:e.id,conversation_id:k.conversation_id,text:"View Conversation",boat_recommendations_shown:!0})}})]}),!C&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t1,{children:[I&&(0,i.jsx)(tW,{onClick:l,children:(0,i.jsx)(tU,{})}),(0,i.jsxs)(tX,{children:[(0,i.jsxs)(t2,{children:["Message ",!I&&(0,i.jsx)("br",{})," ",j.primary_manager.first_name]}),(0,i.jsxs)(t0,{children:["Avg. response time: ",(0,i.jsx)("span",{children:j.primary_manager.response_time})]})]}),(0,i.jsxs)(d.Zt,{gap:"12px",children:[(0,i.jsx)(t$,{src:(0,tM.NE)(j.primary_manager),onError:e=>{e.target.src=(0,eR.qs)(j.primary_manager.first_name)}}),(0,i.jsx)(f.Ct,{topOwner:null===(t=j.primary_manager)||void 0===t?void 0:t.top_owner_badge,newOwner:null===(n=j.primary_manager)||void 0===n?void 0:n.new_owner_badge})]})]}),(0,i.jsx)(tZ,{boatId:a}),(0,i.jsx)(tw,{onSuccess:e=>{Z(e),y(!0),h({boat_public_id:a,text:tH.title,prompt:tH.subtitle})},setExpanded:()=>{},primaryPackage:r,boatId:a,isExpanded:!0,isModal:!0,isMessageOwner:!0}),(0,i.jsxs)(t5,{gap:"15px",children:[!I&&(0,i.jsx)(t4,{}),(0,i.jsx)(t6,{children:(0,i.jsx)("span",{children:"To protect your payment and insurance coverage, always communicate and pay through the Boatsetter platform."})})]})]})]})}let tW=a.ZP.div.withConfig({componentId:"sc-f56fb2a9-0"})(["background:#f5f7f9;border-radius:50%;width:32px;height:32px;display:flex;justify-content:center;align-items:center;"]),tK=(0,a.ZP)(tW).withConfig({componentId:"sc-f56fb2a9-1"})(["align-self:end;margin-bottom:25px;svg{width:15px !important;height:15px !important;}"]),tU=()=>(0,i.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{y:"1.41406",width:"2",height:"14",rx:"1",transform:"rotate(-45 0 1.41406)",fill:"#5E696A"}),(0,i.jsx)("rect",{x:"1.41406",y:"11.3135",width:"2",height:"14",rx:"1",transform:"rotate(-135 1.41406 11.3135)",fill:"#5E696A"})]}),tQ=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-f56fb2a9-2"})(["min-width:340px;.REMODAL_scroll &{","{padding-bottom:124px;padding-top:0;}}","{min-width:unset;}"],v.Hl,v.Hl),tJ=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-f56fb2a9-3"})(["align-items:center;align-self:center;max-width:340px;padding-top:25px;","{.success-icon{width:36px;height:36px;}}"],v.Hl),t$=a.ZP.img.withConfig({componentId:"sc-f56fb2a9-4"})(["height:60px;width:60px;border-radius:50%;","{width:40px;height:40px;}"],v.Hl),tX=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-f56fb2a9-5"})(["max-width:300px;padding-bottom:30px;","{padding-bottom:0;text-align:center;}"],v.Hl),t0=a.ZP.div.withConfig({componentId:"sc-f56fb2a9-6"})(["font-size:12px;","{color:#9aa1a1;}span{font-weight:600;font-size:16px;","{font-size:12px;color:#5e696a;}}
1"],v.Hl,v.Hl),t1=(0,a.ZP)(d.yq).withConfig({componentId:"sc-f56fb2a9-7"})(["","{position:sticky;box-shadow:0px 4px 9px rgba(0,0,0,0.08);z-index:1;background:white;width:100vw;transform:translateX(-24px) translateY(-24px);top:0;padding:15px;align-items:center;}"],v.Hl),t2=(0,a.ZP)(f.GL).withConfig({componentId:"sc-f56fb2a9-8"})(["margin-bottom:0;","{font-size:18px;}"],v.Hl),t5=(0,a.ZP)(d.Kl).withConfig({componentId:"sc-f56fb2a9-9"})(["max-width:330px;padding-top:40px;","{padding-top:20px;}"],v.Hl),t6=a.ZP.div.withConfig({componentId:"sc-f56fb2a9-10"})(["line-height:16px;span{font-size:12px;}","{color:rgba(94,105,106,0.68);text-align:center;font-size:11px;}"],v.Hl),t4=()=>(0,i.jsxs)("svg",{width:"36",height:"36",viewBox:"0 0 36 36",style:{minWidth:36},fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"18",cy:"18",r:"18",fill:"#72D4BA"}),(0,i.jsx)("path",{d:"M22.0371 16.091V14.1217C22.0371 12.1298 20.3285 10.5 18.2225 10.5H17.7775C15.6795 10.5 13.9629 12.1222 13.9629 14.1217V16.091C12.8503 16.2495 12 17.1549 12 18.2565V23.3043C12 24.5116 13.0411 25.5 14.3126 25.5H21.6874C22.9589 25.5 24 24.5116 24 23.3043V18.2565C24 17.1549 23.1417 16.2495 22.0371 16.091ZM22.8079 23.3043C22.8079 23.8929 22.3073 24.3682 21.6874 24.3682H14.3126C13.6927 24.3682 13.1921 23.8929 13.1921 23.3043V18.2565C13.1921 17.668 13.6927 17.1927 14.3126 17.1927H21.6874C22.3073 17.1927 22.8079 17.668 22.8079 18.2565V23.3043ZM20.845 14.1217V16.0609H15.1629V14.1217C15.1629 12.7485 16.3391 11.6318 17.7854 11.6318H18.2305C19.6689 11.6318 20.845 12.7485 20.845 14.1217ZM19.1285 20.7767C19.1285 21.3652 18.6199 21.8481 18 21.8481C17.3801 21.8481 16.8715 21.3652 16.8715 20.7767C16.8715 20.1881 17.3801 19.7052 18 19.7052C18.6199 19.7052 19.1285 20.1881 19.1285 20.7767Z",fill:"#083170"})]});function t3(e){var t,n;let{owner:a,captain:r,isBoatCaptained:l,boatId:h,primaryPackage:x}=e,u=(0,G.useRouter)(),{isAuthenticated:b}=(0,z.vU)(),{boatDetails:v}=(0,m.Gb)(h),_=(0,A.v2)(),j=(0,s.Gc)(),C=j.xs||j.sm||j.md,y=(0,q.Z)(),{handlePossibleIncompleteAccountInApp:k}=(0,O.Z)(),{modal:Z,openModal:P}=(0,c.Z)((0,i.jsx)(tN,{boatId:h,primaryPackage:x}),{size:"medium",isOnRight:!0,isOverlay:!0,hideCloseButton:C,trackingName:"message_owner_modal"}),{modal:I,openModal:M}=(0,c.Z)((0,i.jsx)(w.ZP,{boatId:h}),{isOnRight:!0,notScrollAble:!0,isTray:!1,trackingName:"change_captain_modal"});(0,o.useEffect)(()=>{"true"===u.query.open_captain_modal&&b&&M()},[b,u.query.open_captain_modal]),(0,o.useEffect)(()=>{u.isReady&&"true"===u.query.open_message_modal&&b&&H(null,!0)},[b,u.query.open_message_modal,u.isReady]);let{trackMessageOwnerButton:E,trackSeeProfileLink:D}=er(),H=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=u.asPath.includes("open_message_modal=true");if(E({boat_public_id:h,isAuthenticated:b}),b){let e="".concat(u.asPath).concat(u.asPath.includes("?")?"&":"?").concat(n?"":"open_message_modal=true");if(!1===await k(e))return;P(),y("message_owner_start",{source:t?"url":"button",..._})}else u.push({pathname:Y.Z.signUp,query:{redirect_to:"".concat(u.asPath).concat(u.asPath.includes("?")?"&":"?").concat(n?"":"open_message_modal=true")}})},B=v.captain_network_enabled&&l&&r;return(0,i.jsxs)(f.VQ,{children:[(0,i.jsx)(f.GL,{children:"Your crew"}),(0,i.jsxs)(d.Ht,{gap:"52px",children:[(0,i.jsxs)(t7,{children:[(0,i.jsx)(ne,{children:"Boat owner"}),(0,i.jsx)(g.GM,{profilePhotoUrl:null==a?void 0:a.picture.url,text:null==a?void 0:a.profile_text,userId:null==a?void 0:a.id,rating:null==a?void 0:a.rating,reviewCount:null==a?void 0:a.review_count,memberName:null==a?void 0:a.first_name,isTopOwner:null===(t=v.primary_manager)||void 0===t?void 0:t.top_owner_badge,isNewOwner:null===(n=v.primary_manager)||void 0===n?void 0:n.new_owner_badge}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(nt,{children:[(0,i.jsxs)("li",{children:["Response rate: ",(0,i.jsx)(t9,{children:null==a?void 0:a.response_rate})]}),(0,i.jsxs)("li",{children:["Avg. response time: ",(0,i.jsx)(t9,{children:null==a?void 0:a.response_time})]})]}),(0,i.jsx)("div",{children:(0,i.jsx)(p.Z,{outline:!0,onClick:H,text:"MESSAGE OWNER",className:"messageOwnerButton"})})]})]}),B&&(0,i.jsx)(t8,{}),B&&(0,i.jsxs)(t7,{children:[(0,i.jsx)(ne,{children:"Your captain"}),(0,i.jsx)(g.GM,{trackSeeProfile:()=>D({boat_public_id:h}),profilePhotoUrl:r.user.picture.url,text:r.user.profile_text,userId:r.user.id,rating:r.user.reviews.rate,reviewCount:r.user.reviews.count,memberName:r.user.first_name,isNewCaptain:r.new_captain_badge}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(nt,{children:[(0,i.jsxs)("li",{children:["Trips completed: ",(0,i.jsx)(t9,{children:r.trips_completed})]}),(0,i.jsxs)("li",{children:["US Coast Guard: ",(0,i.jsx)(t9,{children:"Verified"})]})]}),(0,i.jsx)(nn,{onClick:M,children:"Change captain"})]})]})]}),Z,I]})}let t9=a.ZP.span.withConfig({componentId:"sc-bb9923ef-0"})(["font-weight:700;"]),t8=a.ZP.hr.withConfig({componentId:"sc-bb9923ef-1"})(["display:none;","{display:block;}height:1px;width:100%;background-color:#dbdfe5;border:none;"],v.Hl),t7=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-bb9923ef-2"})(["gap:12px;.messageOwnerButton{padding:0 22px;","{width:100%;}}","{display:grid;gap:16px 96px;grid-template-columns:repeat(2,2fr);}"],v.Hl,v.Eh),ne=a.ZP.div.withConfig({componentId:"sc-bb9923ef-3"})(["grid-column:span 2;font-size:18px;font-weight:600;line-height:23px;"]),nt=a.ZP.ul.withConfig({componentId:"sc-bb9923ef-4"})(["margin-bottom:16px;","{margin-bottom:25px;}li{margin-bottom:10px;}"],v.Hl),nn=(0,a.ZP)(f.kj).withConfig({componentId:"sc-bb9923ef-5"})(["padding:0;"]),ni=a.ZP.span.withConfig({componentId:"sc-d4a326e-0"})(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;"]);var no=n(87870),na=n(36580),nr=e=>{let{boatRules:t={},cancellationPolicy:n,captainNetworkEnabled:a,isBoatCommercial:r,boatId:l}=e,[c,p]=(0,o.useState)(!1),h=(0,o.useCallback)(()=>p(e=>!e),[]),x=(0,s.Gc)(),u=x.xs||x.sm||x.md?5:15,g=Object.entries(t).filter(e=>{let[,t]=e;return t}),b=(0,o.useMemo)(()=>g.slice(0,c?-1:u),[c,u,g]),{boatDetails:v}=(0,m.Gb)(l);return tI()(v)?null:(0,i.jsxs)(f.VQ,{children:[(0,i.jsx)("div",{children:(0,i.jsx)(f.GL,{children:"Things to know"})}),(0,i.jsxs)(d.Ht,{children:[(0,i.jsxs)(no.Z,{id:"ttk-allowed",headerContent:(0,i.jsx)(nd,{children:"Allowed on boat"}),openByDefault:!0,children:[(0,i.jsx)(np,{rowsCount:Math.ceil(b.length/3),children:b.map(e=>{let[t,n]=e;
1return n&&(0,i.jsxs)(ns,{gap:"15px",children:[(0,i.jsx)(na.nQ,{}),(0,i.jsx)(nh,{children:t.replace(/_/g," ")})]},t)})}),g.length>u&&(0,i.jsx)(f.kj,{onClick:h,children:c?"Show less":"Show more"})]}),(0,i.jsx)(f.Z0,{}),(0,i.jsxs)(no.Z,{id:"ttk-cancellation",headerContent:(0,i.jsxs)(nd,{children:["Cancellation policy"," ",(0,i.jsx)(nx,{moderate:"moderate"===n,strict:"strict"===n,children:n})]}),children:[(0,i.jsx)(nc,{children:null==v?void 0:v.boat_cancellation_text.map(e=>(0,i.jsx)("li",{children:e},e))}),(0,i.jsx)(nl,{target:"_blank",rel:"noopener noreferrer",href:"/legal/cancellation_policy",children:"See policy"})]}),r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.Z0,{}),(0,i.jsx)(no.Z,{id:"ttk-commercial",headerContent:(0,i.jsx)(nd,{children:"Commercial owner"}),children:(0,i.jsx)(ng,{children:"This boat belongs to a Commercial Owner, an independent boat rental company. A Commercial Owner is an independent, Boatsetter-approved boat rental company who provides their own insurance to their guests."})})]}),(0,i.jsx)(f.Z0,{}),(0,i.jsxs)(no.Z,{id:"ttk-deposit",headerContent:(0,i.jsx)(nd,{children:"Security deposit"}),children:[(0,i.jsx)(ng,{children:"A security deposit hold (not a charge) will be placed on your credit card 48 hours before your booking starts to cover any incidental damage that may occur during your rental. This hold is released 48 hours after the booking is complete, if no claims are made. The security deposit amount for the boat you are booking will be outlined during the check-out process."}),(0,i.jsxs)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://support.boatsetter.com/hc/en-us/articles/205348914-Security-deposit",children:["Learn more",(0,i.jsx)(ni,{children:" about security deposits"})]})]}),!a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.Z0,{}),(0,i.jsx)(no.Z,{id:"ttk-captain",headerContent:(0,i.jsx)(nd,{children:"Captain info"}),children:(0,i.jsx)(ng,{children:"If requested, the owner can provide a list of available captains for bareboat charter or the renter can use their own qualified captain. If the boat is being time chartered, the owner will provide the Captain."})})]})]})]})};let nl=a.ZP.a.withConfig({componentId:"sc-59199b97-0"})(["font-weight:500;"]),ns=(0,a.ZP)(d.Kl).withConfig({componentId:"sc-59199b97-1"})(["","{flex-flow:row-reverse;justify-content:space-between;}"],v.Hl),nd=a.ZP.h3.withConfig({componentId:"sc-59199b97-2"})(["display:flex;align-items:center;font-size:18px;font-weight:600;line-height:23px;margin:0;","{font-size:16px;}"],v.Hl),nc=a.ZP.ul.withConfig({componentId:"sc-59199b97-3"})(["margin:0;list-style:disc inside;li{margin-bottom:12px;}"]),np=a.ZP.div.withConfig({componentId:"sc-59199b97-4"})(["display:grid;grid-template-columns:1fr;gap:20px 120px;","{grid-auto-flow:column;grid-template:repeat(min(",",5),1fr) / repeat(3,1fr);grid-auto-rows:auto;}"],v.Eh,e=>{let{rowsCount:t}=e;return t}),nh=a.ZP.span.withConfig({componentId:"sc-59199b97-5"})(["&::first-letter{text-transform:capitalize;}"]),nx=a.ZP.span.withConfig({componentId:"sc-59199b97-6"})(["font-size:10px;font-weight:700;text-align:center;border-radius:3px;text-transform:uppercase;line-height:9px;padding:3px 8px;margin-left:10px;",";"],e=>{let{moderate:t,strict:n}=e;return(0,a.iv)(["background-color:",";color:",";"],nu(n,t),t?"#17233c":"#fff")}),nu=(e,t)=>e?"#bc350a":t?"#f4c064":"#2a8500",ng=a.ZP.p.withConfig({componentId:"sc-59199b97-7"})(["line-height:24px;"]);var nf=n(9046),nm=n(5152),nb=n.n(nm),nv=n(11752),nw=n.n(nv),n_=n(1927),nj=n(49882),nC=n(25675),ny=n.n(nC),nk=n(43265);function nZ(e){let{boatLocation:t,makeAndModel:n,className:a="",boatUrl:r}=e,l=(0,b._x)(),s=(0,th.Z)({mode:"onSubmit"}),[c]=(0,o.useState)("Check out this great boat on Boatsetter: ".concat(n," in ").concat(t,"!")),h=async()=>{window.location.href="mailto:?subject=Check out this boat I found on Boatsetter.&body=".concat(c," ").concat(encodeURIComponent(r)),l()};return(0,i.jsx)(tg.RV,{...s,children:(0,i.jsx)("form",{noValidate:!0,onSubmit:s.handleSubmit(h),className:a,children:(0,i.jsxs)(d.Ht,{children:[(0,i.jsx)(nP,{children:"Message"}),(0,i.jsx)(e1.x,{margin:"8px 0 32px",overflowWrap:"break-word",children:"".concat(c," ").concat(r)}),(0,i.jsx)(p.Z,{text:"Send message",type:"submit",id:"submitFormButton"})]})})})}let nP=(0,a.ZP)(e1.x).withConfig({componentId:"sc-dda90d64-0"})(["display:block;font-weight:600;font-size:16px;color:#0a252f;"]);function nI(e){var t,n;let{boatId:a,makeAndModel:r,boatLocation:l,boatUrl:s}=e,c=(0,q.Z)(),{boatDetails:p}=(0,m.Gb)(a),[h,x]=(0,nk.Z)(4e3),[g,b]=(0,o.useState)(!1),v="Check out this great boat on @boatsetter: ".concat(r," in ").concat(l,"! "),w=(0,o.useCallback)(()=>{x(s),c("selection_share_boat",{type:"copy"})},[s]),_=e=>()=>{c("selection_share_boat",{type:e})},j=null==p?void 0:null===(n=p.best_photo)||void 0===n?void 0:null===(t=n.thumbnail)||void 0===t?void 0:t.url;return tI()(p)?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.GL,{children:"Share this boat"}),(0,i.jsxs)(d.kC,{gap:"26px",margin:"34px 0 52px",children:[j&&(0,i.jsx)(nH,{alt:"Boat photo thumbnail",src:new URL(j).pathname.slice(1),width:122,height:82,loader:tM.y6}),(0,i.jsxs)(d.Ht,{children:[(0,i.jsx)(nE,{children:p.listing_tagline}),(0,i.jsx)(nD,{children:l}),p.review_count>0&&(0,i.jsx)(u.Z,{rating:p.rating,reviewCount:p.review_count})]})]}),g?(0,i.jsx)(nZ,{makeAndModel:r,boatLocation:l,boatUrl:s}):(0,i.jsxs)(d.kC,{gap:"20px",children:[(0,i.jsx)(d.AE,{children:(0,i.jsxs)(d.Ht,{gap:"20px",children:[(0,i.jsxs)(nM,{as:"a",onClick:_("facebook"),target:"_blank",href:"http://www.facebook.com/sharer.php?u=".concat(s),children:[(0,i.jsx)(na.Vq,{width:19,height:19})," Facebook"]}),(0,i.jsxs)(nM,{as:"a",target:"_blank",onClick:_("twitter"),href:"https://twitter.com/intent/tweet?source=tweetbutton&text=".concat(v,"&url=").concat(encodeURIComponent(s)),children:[(0,i.jsx)(na.Zm,{})," Twitter"]})]})}),(0,i.jsx)(d.AE,{children:(0,i.jsxs)(d.Ht,{gap:"20px",children:[(0,i.jsxs)(nM,{onClick:w,children:[(0,i.jsx)(na.FV,{}
1),h?(0,i.jsxs)(d.Kl,{as:"b",gap:"8px",children:["Copied! ",(0,i.jsx)(nB,{})]}):"Copy link"]}),(0,i.jsxs)(nM,{onClick:()=>{b(!0),c("selection_share_boat",{type:"email"})},children:[(0,i.jsx)(na.LQ,{})," E-mail"]})]})})]})]})}let nM=(0,a.ZP)(d.lM).withConfig({componentId:"sc-c9ca6012-0"})(["border-radius:8px;border:1px solid #cdd1d2;color:#17233c !important;height:62px;gap:8px;cursor:pointer;"]),nE=a.ZP.div.withConfig({componentId:"sc-c9ca6012-1"})(["font-size:18px;font-weight:700;line-height:23px;"]),nD=a.ZP.div.withConfig({componentId:"sc-c9ca6012-2"})(["margin:4px 0 10px;font-weight:500;line-height:22px;"]),nH=(0,a.ZP)(ny()).withConfig({componentId:"sc-c9ca6012-3"})(["border-radius:5px;"]),nB=(0,a.ZP)(na.nQ).withConfig({componentId:"sc-c9ca6012-4"})(["path{fill:#2a8500;}"]),nS=nb()(()=>n.e(9115).then(n.bind(n,99115)),{loadableGenerated:{webpack:()=>[99115]}}),nL=new URLSearchParams({utm_source:"boatsetter",utm_campaign:"sharePDP",utm_medium:"product"}),{RAILS_URL:nR}=nw()().publicRuntimeConfig;function nz(e){var t,n;let{boatId:a}=e,r=(0,q.Z)(),l=(0,G.useRouter)(),d=(0,s.Gc)(),p=d.xs||d.sm||d.md,[h,x]=(0,o.useState)(0),[u,g]=(0,o.useState)(-1),{isBoatFavorite:f,addToFavorites:b}=(0,m.rX)(a),{boatPhotos:v=[],isLoading:w}=(0,nf.BJ)(a),{boatDetails:_}=(0,m.Gb)(a),j=w?_.photos:v,C=(0,eR.v$)(_),y="".concat(null===(t=_.location)||void 0===t?void 0:t.city,", ").concat(null===(n=_.location)||void 0===n?void 0:n.state),k="".concat(nR,"/boats/").concat(a,"?").concat(nL.toString()),{modal:Z,openModal:P}=(0,c.Z)((0,i.jsx)(nI,{boatId:a,makeAndModel:C,boatLocation:y,boatUrl:k}),{size:"small",trackingName:"share_boat_modal"}),I=(0,eR.s9)(j),M=(null==j?void 0:j.length)===1,E=()=>M?"(min-width: 961px) calc(100vw - ".concat(30,"px), 100vw"):"(min-width: 2560px) calc(100vw / 2.2 - ".concat(45,"px), (min-width: 1440px) calc(100vw * 0.65 - ").concat(30,"px), (min-width: 961px) calc(100vw * 0.8 - ").concat(30,"px),100vw"),D=(0,o.useCallback)(()=>{r("open_share_boat_modal"),p&&window.navigator&&window.navigator.share?window.navigator.share({title:_.listing_tagline,text:"Check out this great boat on Boatsetter: ".concat(C," in ").concat(y),url:k}):P()},[a,p,_.listing_tagline,C,y,k,P,r]),{scrollRef:H,scrollToPrev:B,scrollToNext:S}=(0,nj.k)(),L=(0,o.useCallback)(()=>{let e=H.current;if(!e)return 0;let t=e.querySelectorAll("[data-slide-index]");if(!t.length)return 0;if(e.scrollLeft+e.clientWidth>=e.scrollWidth-2)return t.length-1;let n=e.getBoundingClientRect(),i=0,o=1/0;return t.forEach((e,t)=>{let a=Math.abs(e.getBoundingClientRect().left-n.left);a<o&&(o=a,i=t)}),i},[H]);(0,o.useEffect)(()=>{let e=H.current;if(!e)return;let t=()=>{x(L())};return e.addEventListener("scroll",t,{passive:!0}),()=>e.removeEventListener("scroll",t)},[j,L,H]);let R=(0,o.useRef)(0);(0,o.useEffect)(()=>{h!==R.current&&(R.current=h,h>0&&r("scroll_pdp_photo_gallery",{index:h,boat_id:a}))},[h]);let z=e=>{g(e),r("open_pdp_photo_gallery",{boatId:a,photoIndex:e,device:p?"mobile":"desktop"})};return(0,i.jsxs)(nO,{$onePhoto:M,children:[-1!==u&&(0,i.jsx)(nS,{boatId:a,slide:u,close:()=>g(-1),photos:j}),(0,i.jsx)(nA,{ref:H,children:(I||[]).map((e,t)=>(0,i.jsx)(nG,{"data-slide-index":t,$onePhoto:M,onClick:()=>z(t),children:(0,i.jsx)(n_.Z,{alt:0===t?"".concat(C," in ").concat(y):"".concat(C," in ").concat(y," â photo ").concat(t+1),src:(0,n_.O)(e),fill:!0,priority:0===t,sizes:E(),style:{objectFit:"cover"}})},e))}),!M&&(I||[]).length>1&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nY,{type:"button","aria-label":"Previous photo",onClick:B,disabled:0===h,$direction:"prev",children:(0,i.jsx)(na.zg,{})}),(0,i.jsx)(nY,{type:"button","aria-label":"Next photo",onClick:S,disabled:h===I.length-1,$direction:"next",children:(0,i.jsx)(na.zg,{})})]}),!M&&(I||[]).length>1&&(0,i.jsxs)(nq,{children:[h+1," / ",I.length]}),(0,i.jsx)(nF,{"aria-label":"Go back",onClick:()=>l.back(),children:(0,i.jsx)(na.zg,{})}),(0,i.jsxs)(nV,{gap:"20px",gapMdMax:"16px",children:[(0,i.jsx)(nT,{role:"button",tabIndex:0,"aria-label":f?"Remove from saved boats":"Save boat",onClick:b,children:(0,i.jsx)(nK,{isFavorite:f})}),(0,i.jsx)(nT,{role:"button",tabIndex:0,"aria-label":"Share boat",onClick:D,children:p?(0,i.jsx)(nW,{}):(0,i.jsx)(nN,{})})]}),Z]})}let nO=a.ZP.div.withConfig({componentId:"sc-c19403be-0"})(["padding-left:15px;position:relative;margin-top:5px;width:100%;","{margin-top:0;padding-left:0;padding-right:0;}",""],v.Hl,e=>{let{$onePhoto:t}=e;return t&&(0,a.iv)(["margin:0 auto;
1max-width:calc(1292px + 26px + 26px);padding-right:15px;"])}),nA=a.ZP.div.withConfig({componentId:"sc-c19403be-1"})(["display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:15px;&::-webkit-scrollbar{display:none;}","{gap:0;}"],v.Hl),nG=a.ZP.div.withConfig({componentId:"sc-c19403be-2"})(["flex-shrink:0;scroll-snap-align:start;cursor:pointer;position:relative;overflow:hidden;border-radius:16px;aspect-ratio:4 / 2.6;max-height:75vh;width:calc((100% - 15px) / 1.2);@media (min-width:1440px) and (max-width:2559px){width:calc((100% - 15px) / 1.65);}@media (min-width:2560px){width:calc((100% - 30px) / 2.2);}","{width:100%;height:calc((100vw / 16) * 9);aspect-ratio:auto;border-radius:0;scroll-snap-stop:always;}",""],v.Hl,e=>{let{$onePhoto:t}=e;return t&&(0,a.iv)(["width:100%;aspect-ratio:4 / 3;max-height:67vh;"])}),nY=a.ZP.button.withConfig({componentId:"sc-c19403be-3"})(["position:absolute;z-index:1;top:50%;transform:translateY(-50%) ",";cursor:pointer;transition:opacity 0.3s ease-in-out;width:47px;height:47px;padding:0;border:none;background:none;"," &:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}","{display:none;}svg{width:100%;height:100%;}"],e=>{let{$direction:t}=e;return"prev"===t&&"rotate(180deg)"},e=>{let{$direction:t}=e;return"next"===t?"right: 8px;":"left: 23px;"},v.Hl),nq=a.ZP.div.withConfig({componentId:"sc-c19403be-4"})(["position:absolute;z-index:1;left:35px;bottom:20px;background:#17233ca1;border-radius:34px;color:#fff;font-size:12px;font-weight:600;padding:4px 14px;","{left:20px;}"],v.Hl),nV=(0,a.ZP)(d.kC).withConfig({componentId:"sc-c19403be-5"})(["position:absolute;z-index:20;right:20px;top:20px;"]),nT=(0,a.ZP)(d.lM).withConfig({componentId:"sc-c19403be-6"})(["background:white;cursor:pointer;border-radius:50%;height:50px;width:50px;transition:transform 0.3s cubic-bezier(0.165,0.84,0.44,1);&:hover{transform:scale(1.1);}","{height:32px;width:32px;}"],v.Hl),nF=a.ZP.button.withConfig({componentId:"sc-c19403be-7"})(["display:block;position:absolute;z-index:20;left:20px;top:20px;transform:rotate(180deg);cursor:pointer;border:none;background:none;padding:0;height:32px;width:32px;path{fill:#5e696a;}","{display:none;}"],v.Eh),nN=()=>(0,i.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2365 5.33405V13.0151C13.2365 13.3686 12.9497 13.6552 12.596 13.6552H1.49402C1.1403 13.6552 0.853516 13.3686 0.853516 13.0151V5.33405C0.853516 4.98051 1.1403 4.69397 1.49402 4.69397H3.62902C3.98273 4.69397 4.26952 4.98051 4.26952 5.33405C4.26952 5.68754 3.98273 5.97414 3.62902 5.97414H2.13452V12.375H11.9555V5.97414H10.888C10.5343 5.97414 10.2475 5.68754 10.2475 5.33405C10.2475 4.98051 10.5343 4.69397 10.888 4.69397H12.596C12.9497 4.69397 13.2365 4.98051 13.2365 5.33405ZM5.31012 2.8428L6.40452 1.96784V9.17058C6.40452 9.52407 6.6913 9.81067 7.04501 9.81067C7.39873 9.81067 7.68551 9.52407 7.68551 9.17058V1.96784L8.77991 2.8428C9.05612 3.06367 9.45919 3.01887 9.68014 2.74284C9.90115 2.46682 9.85638 2.064 9.58012 1.84314L7.44512 0.136242C7.41186 0.109676 7.37329 0.0954555 7.33665 0.0764426C7.31705 0.0662329 7.30016 0.0531582 7.27947 0.0449279C7.1281 -0.014976 6.96193 -0.014976 6.81056 0.0449279C6.78987 0.0531582 6.77298 0.0662329 6.75338 0.0764426C6.71674 0.0954555 6.67817 0.109676 6.64491 0.136242L4.50991 1.84314C4.23365 2.064 4.18888 2.46682 4.40989 2.74284C4.63084 3.01887 5.03391 3.06367 5.31012 2.8428Z",fill:"#5E696A"})}),nW=()=>(0,i.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.17881 6.77429L7.19104 2.76206V11.5955C7.19104 12.0423 7.55324 12.4045 8.00003 12.4045C8.44682 12.4045 8.80902 12.0423 8.80902 11.5955V2.76206L12.8212 6.77429C13.1372 7.09022 13.6494 7.09022 13.9653 6.77429C14.2813 6.45836 14.2813 5.94614 13.9653 5.63021L8.57207 0.236947C8.25614 -0.0789825 7.74392 -0.0789825 7.42799 0.236947L2.03473 5.63021C1.7188 5.94614 1.7188 6.45836 2.03473 6.7
17429C2.35066 7.09022 2.86288 7.09022 3.17881 6.77429ZM0 16.0901C0 16.5369 0.362197 16.8991 0.808989 16.8991H15.191C15.6378 16.8991 16 16.5369 16 16.0901C16 15.6433 15.6378 15.2812 15.191 15.2812H0.808989C0.362197 15.2812 0 15.6433 0 16.0901Z",fill:"#5E696A"})}),nK=e=>{let{isFavorite:t}=e;return(0,i.jsx)("svg",{width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.0784 14.9047C10.0081 14.2874 16.6091 9.76291 16.6091 5.73371C16.6091 2.05481 13.6103 1.65465 13.1468 1.66279C13.005 1.65465 12.8599 1.66318 12.7155 1.67958C12.1636 1.74321 11.6064 1.93083 11.0585 2.23719C10.3991 2.60586 9.75887 3.13198 9.05136 3.8877C9.0085 3.93362 8.93267 3.93362 8.88981 3.8877C8.1823 3.13198 7.54139 2.60586 6.88201 2.23719C6.33407 1.93083 5.77689 1.74321 5.22499 1.67958C5.08059 1.66318 4.93619 1.65465 4.79376 1.66279C4.33088 1.65465 1.33203 2.05481 1.33203 5.73371C1.33203 9.76291 7.9324 14.2874 8.86212 14.9047C8.93004 14.95 9.01114 14.95 9.0784 14.9047Z",stroke:t?"#72d4ba":"#5E696A",fill:t?"#72d4ba":void 0,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})};function nU(e){let{packages:t,primaryPackage:n,boatId:a}=e,[r,l]=(0,o.useState)(n),s=(0,ec.Dv)(ep.M5),{boatDetails:d}=(0,m.Gb)(a),{boatDatePricing:c,isIdle:p}=(0,m.WX)(a,s),h=e=>()=>{l(t.filter(t=>t.package_type===e)[0])};if(!n||p)return null;let x=(null==r?void 0:r.package_type)==="bareboat"?null==c?void 0:c.bareboat:null==c?void 0:c.captained;return(0,i.jsxs)(nQ,{id:"bookingOptions",children:[(0,i.jsx)(f.GL,{children:"Booking options"}),(0,i.jsxs)(nX,{children:[(0,i.jsxs)(n0,{children:[[eu.fQ.no_captain_only,eu.fQ.captain_optional].includes(d.captain_option)?(0,i.jsx)(n1,{onClick:h("bareboat"),active:(null==r?void 0:r.package_type)==="bareboat",children:"No captain"}):null,[eu.fQ.captain_only,eu.fQ.captain_optional].includes(d.captain_option)&&(0,i.jsx)(n1,{onClick:h("captained"),active:(null==r?void 0:r.package_type)==="captained",children:"Captained"})]}),(0,i.jsxs)(n2,{children:[!!(null==x?void 0:x.two_hours)&&(0,i.jsxs)(n4,{children:[(0,i.jsx)(n5,{children:"2 hours"}),(0,i.jsx)(n6,{children:(0,eY._f)(x.two_hours)})]}),!!(null==x?void 0:x.three_hours)&&(0,i.jsxs)(n4,{children:[(0,i.jsx)(n5,{children:"3 hours"}),(0,i.jsx)(n6,{children:(0,eY._f)(x.three_hours)})]}),!!(null==x?void 0:x.half_day)&&(0,i.jsxs)(n4,{children:[(0,i.jsx)(n5,{children:"4 hours"}),(0,i.jsx)(n6,{children:(0,eY._f)(x.half_day)})]}),!!(null==x?void 0:x.six_hours)&&(0,i.jsxs)(n4,{children:[(0,i.jsx)(n5,{children:"6 hours"}),(0,i.jsx)(n6,{children:(0,eY._f)(x.six_hours)})]}),!!(null==x?void 0:x.all_day)&&(0,i.jsxs)(n4,{children:[(0,i.jsx)(n5,{children:"8 hours"}),(0,i.jsx)(n6,{children:(0,eY._f)(x.all_day)})]})]}),(0,i.jsxs)(n$,{children:[(0,i.jsx)(na.Yi,{}),(0,i.jsxs)(nJ,{children:["Fuel ","renter_pays"===r.fuel_policy?"is not":"is"," included."]}),(0,i.jsxs)("a",{href:"https://support.boatsetter.com/hc/en-us/articles/360034663992-Paying-for-fuel",target:"_blank",rel:"noreferrer",children:["Learn more",(0,i.jsx)(ni,{children:" about fuel policy"})]})]})]})]})}let nQ=a.ZP.div.withConfig({componentId:"sc-3261604a-0"})(["padding-top:60px;scroll-margin-top:70px;","{padding-top:35px;","{margin-bottom:22px;}}"],v.Hl,f.GL),nJ=a.ZP.span.withConfig({componentId:"sc-3261604a-1"})(["font-weight:600;"]),n$=(0,a.ZP)(d.kC).withConfig({componentId:"sc-3261604a-2"})(["gap:8px;padding-top:30px;a{font-weight:500;}","{padding:24px 0 4px;font-size:14px;}"],v.Hl),nX=a.ZP.div.withConfig({componentId:"sc-3261604a-3"})(["max-width:480px;padding-top:45px;","{border:1px solid #dbdfe5;border-radius:9px;padding:16px 24px;}"],v.Hl),n0=(0,a.ZP)(d.kC).withConfig({componentId:"sc-3261604a-4"})(["gap:40px;border-bottom:1px solid #dbdfe5;"]),n1=a.ZP.div.withConfig({componentId:"sc-3261604a-5"})(["font-weight:600;cursor:pointer;color:#5e696a;"," ","{flex:1;display:flex;justify-content:center;}"],e=>{let{active:t}=e;return t&&(0,a.iv)(["color:#0751c2;padding-bottom:12px;border-bottom:3px solid #0751c2;"])},v.Hl),n2=a.ZP.div.withConfig({componentId:"sc-3261604a-6"})([""]),n5=a.ZP.div.withConfig({componentId:"sc-3261604a-7"})(["font-weight:500;
1min-width:200px;","{font-weight:400;}"],v.Hl),n6=a.ZP.div.withConfig({componentId:"sc-3261604a-8"})(["font-weight:600;"]),n4=(0,a.ZP)(d.kC).withConfig({componentId:"sc-3261604a-9"})(["padding:13px 0;border-bottom:1px solid rgba(219,223,229,0.5);","{justify-content:space-between;}"],v.Hl);var n3=n(56132),n9=e=>{var t;let{primaryPackage:n,isLoading:o,isIdle:a,tripCalculation:r,isBookingMultiDay:l,bookingDuration:s}=e;return n?(0,i.jsxs)(n8,{gap:"5px",children:[(0,i.jsx)(n7,{children:o||a?(0,i.jsx)(ie,{children:(0,i.jsx)(n3.Z,{color:"#72D4BA"})}):(0,eY._f)((null==r?void 0:r.pre_tax_and_fees_booking_total)||0)}),(0,i.jsxs)(it,{children:["/ ",l?null==s?void 0:s.label:null==s?void 0:null===(t=s.label)||void 0===t?void 0:t.replace("hours","hr")," (excl. fees)"]})]}):null};let n8=(0,a.ZP)(d.kC).withConfig({componentId:"sc-e729be98-0"})(["border-bottom:1px solid rgba(219,223,229,0.5);padding-bottom:21px;"]),n7=a.ZP.div.withConfig({componentId:"sc-e729be98-1"})(["font-weight:700;font-size:20px;"]),ie=a.ZP.div.withConfig({componentId:"sc-e729be98-2"})(["width:25px;transform:scale(0.7);padding-top:15px;padding-left:15px;"]),it=a.ZP.div.withConfig({componentId:"sc-e729be98-3"})(["font-weight:500;color:#434c5c;line-height:30px;"]);var ii=n(73866),io=n(93070),ia=n(76306);function ir(e){var t;let{securityDepositCents:n,cancellationPolicy:o,fuelPolicy:a,boatId:r}=e,{boatDetails:l}=(0,m.Gb)(r),s=(0,ec.Dv)(ep.JE),d=(0,ec.Dv)(ep.jD),c=(0,ec.Dv)(ep.uL),p=(0,ec.Dv)(ep.dW),h=(0,ec.Dv)(ep.M5),x=(0,ec.Dv)(ep.ay),u=(0,ec.Dv)(ep.GK),g=null==l?void 0:null===(t=l.primary_manager)||void 0===t?void 0:t.id;return(0,i.jsxs)(il,{children:[(0,i.jsx)(is,{children:"Terms"}),(0,i.jsx)(id,{testIdPrefix:"pdp-booking-widget-pre-checkout-additional-links-booking-spec",specsDataObj:{cancellationPolicy:o,fuelPolicy:a,securityDepositCents:n,charterTypeParams:{tz:l.time_zone,isBookingMultiDay:x,passengers:p,boatId:l.id,selectedPackage:{id:null==s?void 0:s.id,charter_agreement_type:null==s?void 0:s.charter_agreement_type,package_type:null==s?void 0:s.package_type},tripStart:h,tripTime:null==d?void 0:d.value,duration:null==c?void 0:c.name,selectedCaptain:{id:u,boatOwnerId:g}}},isBookingTerms:!0})]})}let il=(0,a.ZP)(e1.x).withConfig({componentId:"sc-6bc0ea80-0"})(["margin-top:24px;"]),is=a.ZP.div.withConfig({componentId:"sc-6bc0ea80-1"})(["font-weight:600;padding-bottom:5px;font-size:14px;"]),id=(0,a.ZP)(ia.Z).withConfig({componentId:"sc-6bc0ea80-2"})(["li{font-size:12px !important;}"]);function ic(e){let{isModal:t=!1}=e,{tripCalculation:n}=(0,eq.E)();return(0,i.jsxs)(ix,{gap:"15px",isModal:t,children:[(0,i.jsx)(iu,{}),(0,i.jsxs)(d.Ht,{children:[(0,i.jsx)(ip,{children:"Free cancellation"}),(0,i.jsxs)(ih,{children:["Full refund before ",x()(null==n?void 0:n.free_cancelation_until).format("MMM D, YYYY")]})]})]})}let ip=a.ZP.div.withConfig({componentId:"sc-7424b623-0"})(["font-weight:600;font-size:14px;"]),ih=a.ZP.div.withConfig({componentId:"sc-7424b623-1"})(["font-size:12px;color:#434c5c;"]),ix=(0,a.ZP)(d.Kl).withConfig({componentId:"sc-7424b623-2"})(["margin-top:24px;margin-bottom:24px;",""],e=>{let{isModal:t}=e;return t&&(0,a.iv)(["margin-top:0;"])}),iu=()=>(0,i.jsx)("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M18.8057 7.83405C18.1273 7.16783 17.2227 6.72369 16.3181 6.72369H11.7953V3.0595C11.7953 1.39396 10.3253 0.0615234 8.62925 0.0615234C8.29004 0.0615234 7.95082 0.283596 7.83775 0.72774L5.80245 8.16716H1.27958C0.714216 8.16716 0.375 8.50027 0.375 8.94441V17.05C0.375 17.4942 0.714216 17.9383 1.27958 17.9383H6.48089H15.6397C17.2227 17.9383 18.6927 16.828 18.9188 15.1624L19.5972 10.3879C19.7103 9.49959 19.4842 8.50027 18.8057 7.83405ZM2.07108 9.8327H5.57631V16.2728H2.07108V9.8327ZM17.9012 10.1658L17.1097 14.9404C16.9966 15.7176 16.3181 16.2728 15.5266 16.2728H7.27239V9.05545L9.30769 1.8381C9.75997 2.06017 10.0992 2.50432 10.0992 3.0595V7.50094C10.0992 7.94508 10.4384 8.38923 11.0038 8.38923H16.4312C16.8835 8.38923 17.3358 8.6113 17.675 8.94441C17.7881 9.27752 17.9012 9.72166 17.9012 10.1658Z",fill:"#0A4195"})}),ig=(0,o.forwardRef)((e,t)=>{var n;let{boatId:a,primaryPackage:r,isMessageOwner:l=!1}=e,{boatDetails:s}=(0,m.Gb)(a),{tripCalculation:d,isLoading:c,isIdle:p}=(0,eq.E)(),h=(0,ec.Dv)(ep.jD),u=(0,ec.Dv)(ep.ay),g=(0,ec.Dv)(ep.uL),f=(0,ec.Dv)(ep.JE),[b,v]=(0,o.useState)(!!h),{featureFlag:w}=(0,io.Lf)("assurance_enabled"),_=(null==d?void 0:d.free_cancelation_until)&&0!==x()(d.free_cancelation_until).diff(x()(),"day");return(0,i.jsxs)(im,{ref:t,children:[(0,i.jsx)(tZ,{boatId:a}),(0,i.jsx)(n9,{primaryPackage:r,isLoading:c,isIdle:p,tripCalculation:d,isBookingMultiDay:u,bookingDuration:g}),(0,i.jsx)(tw,{boatId:a,isMessageOwner:l,setExpanded:v,isExpanded:b,primaryPackage:r}),_&&!w&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ib,{}),(0,i.jsx)(ic,{})]}),w&&(null==d?void 0:null===(n=d.assurance_offer)||void 0===n?void 0:n.eligible)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ib,{}),(0,i.jsx)(ii.Z,{})]}),(0,i.jsx)(ib,{}),(0,i.jsx)(ir,{boatId:a,securityDepositCents:null==f?void 0:f.security_deposit_cents,cancellationPolicy:s.cancellation_policy,fuelPolicy:null==f?void 0:f.fuel_policy})]})}),im=a.ZP.div.withConfig({componentId:"sc-c9d1e012-0"})(["padding:32px;width:400px;height:fit-content;box-shadow:0 0 33px rgba(0,0,0,0.11);border-radius:15px;margin:0 auto;background:white;position:sticky;top:50px;margin-top:-60px;z-index:1;isolation:isolate;"]),ib=a.ZP.hr.withConfig({componentId:"sc-c9d1e012-1"})(["color:rgba(219,223,229,0.5);background-color:rgba(219,223,229,0.5);border-top:none;margin-top:12px;margin-bottom:12px;"]);var iv=n(6254);function iw(e){var t;let{boatId:n,primaryPackage:a}=e,{boatDetails:r}=(0,m.Gb)(n),{tripCalculation:l}=(0,eq.E)(),{featureFlag:s}=(0,io.Lf)("assurance_enabled"),d=(0,ec.Dv)(ep.JE),c=(0,o.useMemo)(()=>(null==l?void 0:l.free_cancelation_until)&&0!==x()(null==l?void 0:l.free_cancelation_until).diff(x()(),"day"),[null==l?void 0:l.free_cancelation_until]);return tI()(r)?null:(0,i.jsxs)(e1.x,{smMax:{pt:"60px"},children:[(0,i.jsx)(i_,{boatId:n}),(0,i.jsx)(ij,{children:"Request to book"}),(0,i.jsx)(iC,{children:"Enter your booking details"}),(0,i.jsx)(tw,{boatId:n,primaryPackage:a,isExpanded:!0,isModal:!0,setExpanded:()=>{}}),(0,i.jsxs)(iy,{children:[c&&!s&&(0,i.jsx)(ic,{isModal:!0}),s&&(null==l?void 0:null===(t=l.assurance_offer)||void 0===t?void 0:t.eligible)&&(0,i.jsx)(ii.Z,{isModal:!0}),c&&(0,i.jsx)(ik,{}),(0,i.jsx)(ir,{boatId:n,securityDepositCents:null==d?void 0:d.security_deposit_cents,cancellationPolicy:r.cancellation_policy,fuelPolicy:null==d?void 0:d.fuel_policy})]})]})}let i_=(0,a.ZP)(tZ).withConfig({componentId:"sc-d579118a-0"})([""]),ij=a.ZP.div.withConfig({componentId:"sc-d579118a-1"})(["font-size:18px;font-weight:600;line-height:24px;text-align:center;margin-bottom:20px;margin-top:-6px;","{line-height:1;position:fixed;z-index:10;top:0;left:0;right:0;height:64px;background-color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 9px rgba(0,0,0,0.08);}"],v.$m),iC=a.ZP.div.withConfig({componentId:"sc-d579118a-2"})(["font-weight:600;padding-bottom:20px;"]),iy=(0,a.ZP)(e1.x).withConfig({componentId:"sc-d579118a-3"})(["background:rgba(245,247,249,0.78);margin:0 -1.5em;padding:24px 24px 120px;"]),ik=(0,a.ZP)(f.Z0).withConfig({componentId:"sc-d579118a-4"})(["margin:16px 0 10px;"]);function iZ(e){var t;let{isVisible:n,hideReviews:o,boatId:a,primaryPackage:r}=e,l=(0,G.useRouter)(),p=(0,q.Z)(),h=(0,A.v2)(),u=(0,s.Gc)(),g=u.xs||u.sm||u.md,[f,m]=(0,ec.KO)(ep.uL),[b,v]=(0,ec.KO)(ep.jD),w=(0,ec.Dv)(ep.ay),_=(0,ec.Dv)(ep.JE),j=(0,ec.Dv)(ep.lz),C=(0,ec.Dv)(ep.F),y=(0,ec.Dv)(ep.M5),k=(0,ec.Dv)(ep.jH),{tripCalculation:Z,isIdle:P,isLoading:I}=(0,eq.E)(),{boatCalendar:M}=(0,A.eh)({startOn:y,endOn:k,boatId:j,packageType:null==_?void 0:_.package_type},{enabled:n}),{modal:E,openModal:D}=(0,c.Z)((0,i.jsx)(iw,{boatId:a,primaryPackage:r}),{isOverlay:!0,trackingName:"mobile_booking_modal"}),H=(0,i.jsxs)(iR,{children:[(0,i.jsx)(iz,{children:I||P?(0,i.jsx)(iP,{children:(0,i.jsx)(n3.Z,{color:"#72D4BA"})}):(0,eY._f)((null==Z?void 0:Z.pre_tax_and_fees_booking_total)||0)}),f&&(0,i.jsxs)(iO,{children:[w?null==f?void 0:f.label:null==f?void 0:null===(t=f.label)||void 0===t?void 0:t.replace("hours","hr")," (excl. fees)"]})]});return g?(0,i.jsxs)(iM,{children:[(0,i.jsx)(d.AE,{children:(0,i.jsxs)(d.o1,{children:[H,(0,i.jsx)(tt,{boatId:a,onClick:D,loading:!1})]})}),E]}):(0,i.jsx)(iv.Z,{in:n,timeout:300,unmountOnExit:!0,classNames:"BottomBarPDPv3",children:(0,i.jsx)(iM,{children:(0,i.jsx)(iE,{children:(0,i.jsxs)(d.o1,{children:[(0,i.jsxs)(d.Kl,{as:"ul",gap:"24px",children:[(0,i.jsx)("li",{children:(0,i.jsx)(iD,{href:"#boatInfo",children:"The boat"})}),(0,i.jsx)("li",{children:(0,i.jsx)(iD,{href:"#bookingOptions",children:"Booking options"})}),!o&&(0,i.jsx)("li",{children:(0,i.jsx)(iD,{href:"#reviews",children:"Reviews"})}),(0,i.jsx)("li",{children:(0,i.jsx)(iD,{href:"#boatLocation",children:"Location"})})]}),(0,i.jsxs)(iL,{gap:"20px",children:[H,(0,i.jsx)(iS,{children:(0,i.jsxs)(d.kC,{children:[(0,i.jsx)(iB,{hideMultiDay:!(null==r?void 0:r.all_day_cents),onChange:e=>{w||(0,ek.rc)(x()(e).format("YYYY-MM-DD"),M,null==_?void 0:_.package_type,null==b?void 0:b.value,null==f?void 0:f.value)||(m(eb.E_),v(null))}}),(0,i.jsx)(iI,{}),(0,i.jsx)(iH,{onChange:e=>{(0,ek.rc)(C.format("YYYY-MM-DD"),M,null==_?void 0:_.package_type,null==b?void 0:b.value,e.value)||v(null)},setter:m,defaultValue:f}),(0,i.jsx)(tt,{boatId:a,onClick:()=>{p("request_to_book_start",{type:"horizontal_sticky_bar",...h}),l.push({hash:"#bookingWidget"})},loading:!1})]})})]})]})})})})}let iP=a.ZP.div.withConfig({componentId:"sc-883e5ffa-0"})(["width:25px;height:29px;transform:scale(0.8);padding-top:15px;padding-left:10px;"]),iI=a.ZP.div.withConfig({componentId:"sc-883e5ffa-1"})(["width:1px;height:35px;background:rgba(219,223,229,0.5);align-self:center;"]),iM=(0,a.ZP)(d.Kl).withConfig({componentId:"sc-883e5ffa-2"})(["z-index:10;isolation:isolate;height:100px;background-color:#fff;position:fixed;left:0;right:0;top:0;box-shadow:0px 0px 20px 0px #0000001a;transition:transform 300ms ease-in-out;","{transform:translateY(-100%);}","{top:unset;bottom:0;}&.BottomBarPDPv3-enter{transform:translateY(-100%);}&.BottomBarPDPv3-enter-done{transform:translateY(0%);}&.BottomBarPDPv3-enter-active{transform:translateY(0%);}&.BottomBarPDPv3-exit-active{transform:translateY(-100%);}","{padding:0 24px;}"],v.Eh,v.Hl,v.Hl),iE=a.ZP.div.withConfig({componentId:"sc-883e5ffa-3"})(["",";width:100%;"],f.OM),iD=a.ZP.a.withConfig({componentId:"sc-883e5ffa-4"})(["color:#17233c !important;font-size:14px;font-weight:500;"]),iH=(0,a.ZP)(eA).withConfig({componentId:"sc-883e5ffa-5"})(["padding:0 20px;align-items:center;display:flex;","{flex-flow:row-reverse;gap:10px;}","{height:100%;display:flex;align-items:center;}","{display:none;}","{padding-bottom:0;}"],eS.t6,eS.zw,eS.Pm,eS.K7),iB=(0,a.ZP)(eC.ZP).withConfig({componentId:"sc-883e5ffa-6"})(["padding:0 20px;","{flex-flow:row-reverse;gap:10px;align-items:center;}","{transform:translate3d(0,20px,0);right:0;}","{position:initial;color:#17233c;padding-top:2px;&.active{display:none;}}","{padding-bottom:0;}","{padding-top:2px;}"],eC.II,ej.j,eC.__,eC.nR,eC.B4),iS=a.ZP.div.withConfig({componentId:"sc-883e5ffa-7"})(["border:1px solid #8e9697;border-radius:66px;padding:5px;& > div > div > button{padding:0 25px;border-radius:54px;}"]),iL=(0,a.ZP)(d.Kl).withConfig({componentId:"sc-883e5ffa-8"})(["position:relative;"]),iR=(0,a.ZP)(d.Ht).withConfig({componentId:"sc-883e5ffa-9"})(["align-items:end;","{align-items:flex-start;}"],v.Hl),iz=a.ZP.div.withConfig({componentId:"sc-883e5ffa-10"})(["font-weight:700;font-size:20px;"]),iO=a.ZP.div.withConfig({componentId:"sc-883e5ffa-11"})(["color:#8e9697;font-weight:500;"]);var iA=n(18029),iG=n.n(iA);
1let iY=a.ZP.div.withConfig({componentId:"sc-21224b6b-0"})(["padding-top:25px;max-width:480px;"]),iq=(0,a.ZP)(d.kC).withConfig({componentId:"sc-21224b6b-1"})(["&:not(:last-child){padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid rgba(219,223,229,0.5);}","{justify-content:space-between;}"],v.Hl),iV=(0,a.ZP)(d.Kl).withConfig({componentId:"sc-21224b6b-2"})(["min-width:200px;gap:10px;svg{min-width:22px;}"]),iT=a.ZP.div.withConfig({componentId:"sc-21224b6b-3"})(["font-weight:600;text-align:right;"]);var iF=e=>{let{boatId:t}=e,{boatDetails:n}=(0,m.Gb)(t),[a,r]=(0,o.useState)(!1);if(tI()(n))return null;let l=[{name:"Year",icon:na.Gu,value:n.year_manufactured},{name:"Length",icon:na.ps,value:"".concat(n.length," ft.")},{name:"Make",icon:na.Ms,value:n.make},{name:"Model",icon:na.ZA,value:n.model},{name:"Capacity",icon:na.Ah,value:n.capacity},{name:"Boat type",icon:na.rw,value:n&&iG()(n.boat_category)},{name:"Sleeps",icon:na.e1,value:n.sleeping_capacity},{name:"Staterooms",icon:na.ic,value:n.private_staterooms},{name:"Bed count",icon:na.Bz,value:n.bed_count}];return(0,i.jsxs)(f.$0,{children:[(0,i.jsx)(f.GL,{children:"Specifications"}),(0,i.jsx)(iY,{children:l.filter(e=>!!e.value).slice(0,a?100:5).map(e=>(0,i.jsxs)(iq,{children:[(0,i.jsx)("div",{children:(0,i.jsxs)(iV,{children:[e.icon(),(0,i.jsx)("span",{children:e.name})]})}),(0,i.jsx)(iT,{children:e.value})]},e.name))}),n.features.length>5&&(0,i.jsxs)(f.kj,{onClick:()=>r(!a),children:["See ",a?"less":"all"]})]})};function iN(e){var t;let{boatId:n}=e,{boatDetails:a}=(0,m.Gb)(n),r=(0,s.Gc)(),l=r.xs||r.sm,[d,c]=(0,o.useState)(!1),p=l?5:15,h=(0,o.useMemo)(()=>{var e;return iJ(null!==(e=a.features)&&void 0!==e?e:[])},[null==a?void 0:null===(t=a.features)||void 0===t?void 0:t.length]);return(0,i.jsx)("div",{children:h.length>0&&(0,i.jsxs)(f.$0,{children:[(0,i.jsx)(f.GL,{children:"Amenities"}),(0,i.jsx)(iW,{children:h.slice(0,d?100:p).map(e=>(0,i.jsxs)(iK,{children:[(0,i.jsx)(na.nQ,{}),(0,i.jsx)("span",{children:e.name})]},e.id))}),h.length>p&&(0,i.jsxs)(f.kj,{onClick:()=>c(!d),children:["See ",d?"less":"all"]})]})})}let iW=(0,a.ZP)(d.gP).withConfig({componentId:"sc-7c0528f1-0"})(["padding-top:25px;gap:20px 0;","{display:flex;flex-direction:column;}"],v.Hl),iK=(0,a.ZP)(d.kC).withConfig({componentId:"sc-7c0528f1-1"})(["gap:15px;","{width:33%;}"],v.Eh),iU=e=>e.toLowerCase().replace(/\s|\/|'/g,""),iQ=["Bathroom","Stereo","Stereo AUX input","Bluetooth Audio","Floating mat","Inflatable toys","Floating island","Cooler / Ice chest","Air conditioning","Swim ladder","Jet ski","Paddleboards","Children's life jackets","Kayaks","Snorkeling gear","Wakeboard","Waterskis","Fishing gear","Seabob","Shower","WiFi","Deck shower","Refrigerator","Anchor","Tender","Fish finder","Livewell / Baitwell","Grill","Bow thruster","Depth finder","GPS","Radar","Sonar","VHF radio"].map(iU),iJ=e=>e.sort((e,t)=>iQ.indexOf(iU(e.name))-iQ.indexOf(iU(t.name))),i$=(e,t)=>(0,i.jsx)(tE.Z,{boat:e,index:t,url:(0,tD.R)({boatId:e.boat_public_id,pos:t})},t);function iX(e){var t,n,a;let{boatId:r}=e,{data:l,isLoading:c}=(0,m.FI)(r),p=(0,s.Gc)(),h=p.xs||p.sm||p.md,x=null==l?void 0:null===(n=l.data)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.filter(e=>e.boat_public_id!==r);return(null==x?void 0:x.length)===0?null:(0,i.jsx)("div",{children:!c&&(0,i.jsxs)(i0,{children:[(0,i.jsx)(f.GL,{children:"Similar boats"}),h?(0,i.jsx)(i1,{children:(x||[]).map((e,t)=>(0,i.jsx)(i2,{children:(0,i.jsx)(d.kC,{children:i$(e,t)})},e.boat_public_id))}):(0,i.jsx)(d.kC,{gap:"25px",children:null==x?void 0:null===(a=x.slice(0,3))||void 0===a?void 0:a.map((e,t)=>(0,i.jsx)(o.Fragment,{children:i$(e,t)},t))})]})})}let i0=a.ZP.div.withConfig({componentId:"sc-a5aa9a01-0"})(["padding-top:60px;","{padding-top:35px;}","{margin-bottom:22px;}"],v.Hl,f.GL),i1=a.ZP.div.withConfig({componentId:"sc-a5aa9a01-1"})(["display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:22px;margin-left:-10px;padding-left:10px;scroll-padding-left:10px;&::-webkit-scrollbar{display:none;}"]),i2=a.ZP.div.withConfig({componentId:"sc-a5aa9a01-2"})(["flex-shrink:0;scroll-snap-align:start;width:calc((100% - 22px) / 1.25);"]);function i5(e){let{boatId:t}=e,{crossLinks:n}=(0,m.Zv)(t);if(!n)return null;let o=[...n.category_links||[],...n.location_links||[],...n.nearby_links||[]];return o.length?(0,i.jsxs)(i6,{children:[(0,i.jsx)(i4,{children:"Explore more boat rentals"}),(0,i.jsx)(i3,{children:o.map(e=>(0,i.jsx)(i9,{href:e.url,children:e.title.split(",")[0]},e.url))})]}):null}let i6=a.ZP.nav.withConfig({componentId:"sc-daee4edf-0"})(["padding-top:60px;","{padding-top:35px;}"],v.Hl),i4=a.ZP.h2.withConfig({componentId:"sc-daee4edf-1"})(["font-weight:600;font-size:28px;margin-bottom:20px;","{font-size:16px;margin-bottom:14px;}"],v.Hl),i3=a.ZP.div.withConfig({componentId:"sc-daee4edf-2"})(["display:flex;flex-wrap:wrap;gap:8px;"]),i9=a.ZP.a.withConfig({componentId:"sc-daee4edf-3"})(["display:inline-block;padding:6px 14px;border-radius:20px;border:1px solid #dbdfe5;color:#333 !important;font-size:13px;font-weight:500;text-decoration:none;transition:background-color 0.15s,border-color 0.15s;&:hover{background-color:#f5f7f9;border-color:#333;}"]),i8={[eu.fQ.captain_optional]:{title:"Captain optional",description:"This boat is rented with or without a captain"},[eu.fQ.captain_only]:{title:"Captained",description:"This boat is rented with a captain"},[eu.fQ.no_captain_only]:{title:"No captain",description:"The renter can operate the boat"}};var i7=n(95589);function oe(e){let{description:t,owner:n,showTopOwnerBadge:a,showNewOwnerBadge:r,boatId:l}=e,s=(0,q.Z)(),[c,p]=(0,o.useState)(!1),[h,x]=(0,m.X1)(t,!0),u=(0,o.useCallback)(()=>{p(e=>(s("pdp_description_toggle_read",{boatId:l,open:!e}),!e))},[l,s]),b=oo(t);return(0,i.jsxs)(ot,{id:"boatInfo",children:[(0,i.jsxs)(d.AE,{children:[(0,i.jsx)(f.GL,{children:"The boat"}
1),t&&(0,i.jsxs)(on,{onClick:u,$trim:h&&!c,ref:x,children:[b.map((e,t)=>"break"===e.type?(0,i.jsx)("br",{},t):"text"===e.type?(0,i.jsx)(i7.x,{children:e.text},t):(console.error("Unexpected line type in boat description:",e),null)),(0,i.jsx)(oi,{})]}),(0,i.jsx)("div",{children:h&&(0,i.jsxs)(f.kj,{onClick:u,children:["Read ",c?"less":"more"]})})]}),(0,i.jsx)(g.zk,{ownerName:null==n?void 0:n.first_name,rating:null==n?void 0:n.rating,reviewCount:null==n?void 0:n.review_count,profilePhotoUrl:null==n?void 0:n.picture.url,isTopOwner:a,isNewOwner:r})]})}let ot=(0,a.ZP)(d.HG).withConfig({componentId:"sc-62032c76-0"})(["",";gap:25px;scroll-margin-top:70px;","{","{padding-bottom:20px;}}"],f.t9,f.GL,v.Hl),on=a.ZP.div.withConfig({componentId:"sc-62032c76-1"})(["position:relative;color:#5e696a;line-height:24px;font-weight:400;p{margin-bottom:15px;}",""],e=>{let{$trim:t}=e;return t&&(0,a.iv)(["overflow:hidden;display:-webkit-box;-webkit-line-clamp:7;line-clamp:7;box-orient:vertical;-webkit-box-orient:vertical;background:linear-gradient(180deg,rgba(255,255,255,0) 0%,#ffffff 104.9%);","{display:block;}"],oi)}),oi=a.ZP.div.withConfig({componentId:"sc-62032c76-2"})(["position:absolute;display:none;width:100%;top:0;height:100%;background:linear-gradient(180deg,rgba(255,255,255,0) 0%,#ffffff 104.9%);"]),oo=e=>{let t=RegExp("".concat("<brs*/?>","|").concat("\r\n","|").concat("\n"),"gi");return e.split(t).map(e=>{let t=e.trim();return""===t?{type:"break"}:{type:"text",text:t}})};var oa=n(44546);function or(e){var t,n,a,r,l,d,c;let{boatId:p,isBoatCaptained:h}=e,{boatDetails:g,isLoading:f}=(0,m.Gb)(p),{location:b,is_fishing:v,boat_category:w,type:_}=g,{featureFlag:j}=(0,io.Lf)("assurance_enabled"),{tripCalculation:C}=(0,eq.E)(),[y,k]=(0,o.useState)({text:"",url:null}),Z=(0,o.useRef)(!1),[P,I]=(0,o.useState)({text:"",url:null}),M=(0,o.useRef)(!1),E=(0,s.Gc)(),D=E.xs||E.sm,H=function(e,t,n,i){if(e&&"sail"!==i&&"catamaran"!==i&&"motor_yacht"!==i&&"mega_yacht"!==i)return t?{categoryUrl:Y.Z.fishingCharters,categoryText:"Fishing charters"}:{categoryUrl:Y.Z.fishingBoatRentals,categoryText:"Fishing boat rentals"};if("sail"===n&&"catamaran"!==i)return{categoryUrl:Y.Z.sailboatRentals,categoryText:"Sailboat rentals"};switch(i){case"motor_yacht":case"mega_yacht":return{categoryUrl:Y.Z.yachtRentals,categoryText:"Yacht rentals"};case"catamaran":return{categoryUrl:Y.Z.catamaranRentals,categoryText:"Catamaran rentals"};case"center_console":return{categoryUrl:Y.Z.centerConsoleRentals,categoryText:"Center console rentals"};default:return{categoryUrl:Y.Z.boatRentals,categoryText:"Boat rentals"}}}(v,h,_,w);return((0,o.useEffect)(()=>{if((null==b?void 0:b.state)&&!M.current){var e;if(null===(e=oa.PO.find(e=>e.abbr===(null==b?void 0:b.state)))||void 0===e?void 0:e.label){let e="".concat(H.categoryUrl,"/").concat(b.state.toLowerCase(),"--united-states");I({text:null==b?void 0:b.state,url:null}),M.current=!0,fetch(e).then(t=>{200===t.status?I({text:null==b?void 0:b.state,url:e}):I({text:null==b?void 0:b.state,url:null})}).catch(()=>{I({text:null==b?void 0:b.state,url:null})})}else I({text:null==b?void 0:b.state,url:null}),M.current=!0}},[b,H]),(0,o.useEffect)(()=>{if((null==b?void 0:b.city)&&!Z.current){var e,t,n,i;let o="".concat(H.categoryUrl,"/").concat(null===(n=b.city)||void 0===n?void 0:null===(t=n.toLowerCase())||void 0===t?void 0:null===(e=t.replace(/ /g,"-"))||void 0===e?void 0:e.replace(/\./g,""),"--").concat(null===(i=b.state)||void 0===i?void 0:i.toLowerCase(),"--united-states");k({text:"".concat(b.city),url:null}),Z.current=!0,fetch(o).then(e=>{200===e.status?k({text:"".concat(b.city),url:o}):k({text:"".concat(b.city),url:null})}).catch(()=>{k({text:"".concat(b.city),url:null})})}},[b,H]),f)?null:(0,i.jsxs)(ox,{children:[D&&(0,i.jsx)(tZ,{boatId:p}),(0,i.jsx)(ou,{children:g.listing_tagline}),(0,i.jsxs)(os,{children:[(0,i.jsx)("div",{children:g.rating>0&&(0,i.jsx)(u.Z,{rating:g.rating,reviewCount:g.completed_booking_count})}),(0,i.jsxs)(oh,{hasRating:g.review_count>0&&g.rating>0,children:[(0,i.jsx)(ol,{as:y.url?"a":"span",link:!!y.url,href:y.url,children:y.text}),",\xa0",(0,i.jsx)(ol,{as:P.url?"a":"span",link:!!P.url,href:P.url,children:P.text})]})]}),(0,i.jsxs)(of,{children:[(0,i.jsxs)(og,{children:[(0,i.jsx)(od,{children:(0,i.jsx)(na.ah,{})}),(0,i.jsxs)(oc,{children:[g.length," ft"]}),(0,i.jsx)(op,{children:"Boat length"})]}),(0,i.jsxs)(og,{children:[(0,i.jsx)(od,{children:(0,i.jsx)(na.Ah,{})}),(0,i.jsxs)(oc,{children:["Up to ",g.capacity]}),(0,i.jsx)(op,{children:"Passengers"})]}),(0,i.jsxs)(og,{children:[(0,i.jsx)(od,{children:(0,i.jsx)(na.yQ,{})}),(0,i.jsx)(oc,{children:null===(t=i8[g.captain_option])||void 0===t?void 0:t.t
1itle}),(0,i.jsx)(op,{children:null===(n=i8[g.captain_option])||void 0===n?void 0:n.description})]}),(0,i.jsxs)(og,{children:[(0,i.jsx)(od,{children:(0,i.jsx)(na.$A,{})}),(0,i.jsx)(oc,{children:null===(a=g.primary_manager)||void 0===a?void 0:a.response_rate}),(0,i.jsx)(op,{children:"Ownerâs response rate"})]})]}),(null==C?void 0:C.free_cancelation_until)&&0!==x()(null==C?void 0:C.free_cancelation_until).diff(x()(),"day")&&(!(null==C?void 0:null===(r=C.assurance_offer)||void 0===r?void 0:r.eligible)||!j)&&D&&(0,i.jsx)(ic,{}),j&&(null==C?void 0:C.assurance_offer)&&(null==C?void 0:null===(l=C.assurance_offer)||void 0===l?void 0:l.eligible)&&D&&(0,i.jsx)(ii.Z,{}),(0,i.jsx)(oe,{description:g.listing_description,owner:g.primary_manager,showTopOwnerBadge:null===(d=g.primary_manager)||void 0===d?void 0:d.top_owner_badge,showNewOwnerBadge:null===(c=g.primary_manager)||void 0===c?void 0:c.new_owner_badge,boatId:p})]})}let ol=a.ZP.a.withConfig({componentId:"sc-bfd55dbb-0"})(["",""],e=>{let{link:t}=e;return t&&(0,a.iv)(["color:#17233c !important;&:hover{text-decoration:underline;}"])}),os=(0,a.ZP)(d.HG).withConfig({componentId:"sc-bfd55dbb-1"})(["","{gap:5px;}"],v.Hl),od=a.ZP.div.withConfig({componentId:"sc-bfd55dbb-2"})(["padding-bottom:5px;"]),oc=a.ZP.div.withConfig({componentId:"sc-bfd55dbb-3"})(["font-weight:600;font-size:14px;"]),op=a.ZP.div.withConfig({componentId:"sc-bfd55dbb-4"})(["font-weight:500;font-size:12px;color:#5e696a;"]),oh=a.ZP.div.withConfig({componentId:"sc-bfd55dbb-5"})(["font-weight:500;","{font-size:14px;}",""],v.Hl,e=>{let{hasRating:t}=e;return t&&(0,a.iv)(["","{order:-1;}","{padding-left:20px;margin-left:20px;border-left:1px solid #dbdfe5;}"],v.Hl,v.Eh)}),ox=a.ZP.div.withConfig({componentId:"sc-bfd55dbb-6"})(["padding-top:25px;","{padding-top:20px;}"],v.Hl),ou=a.ZP.h1.withConfig({componentId:"sc-bfd55dbb-7"})(["font-size:23px;font-weight:700;line-height:1;margin-bottom:0;padding-bottom:20px;","{font-size:38px;}","{line-height:1.2;}"],v.Eh,v.Hl),og=a.ZP.div.withConfig({componentId:"sc-bfd55dbb-8"})(["padding-left:30px;padding-right:30px;border-left:1px solid #dbdfe5;&:first-child{padding-left:0;border-left:0;}&:last-child{padding-right:0;}"]),of=(0,a.ZP)(d.kC).withConfig({componentId:"sc-bfd55dbb-9"})(["padding-top:40px;","{border:1px solid #dbdfe5;border-radius:8px;padding:20px;flex-wrap:wrap;margin-top:30px;","{width:50%;border-left:none;padding:0;&:nth-child(-n + 2){border-bottom:1px solid #dbdfe5;padding-bottom:18px;}&:nth-last-child(-n + 2){padding-top:18px;}&:nth-child(even){border-left:1px solid #dbdfe5;padding-left:24px;}&:nth-child(odd){padding-right:24px;}}}"],v.Hl,og);var om=n(92766),ob=n(51738);let ov=nb()(()=>Promise.all([n.e(8499),n.e(6271)]).then(n.bind(n,66271)).then(e=>e),{loadableGenerated:{webpack:()=>[66271]}});function ow(e){var t,n;let{boatId:a}=e,{boatDetails:r}=(0,m.Gb)(a),[l,s]=(0,ob.Z)({rootMargin:"-150px 100px 0px 0px",threshold:.3}),[d,c]=(0,o.useState)(!0);(0,o.useEffect)(()=>{(null==l?void 0:l.isIntersecting)&&c(!1)},[l]);let p={lat:Number(null===(t=r.location)||void 0===t?void 0:t.lat)||om.rC,lng:Number(null===(n=r.location)||void 0===n?void 0:n.lng)||om.mC};return(0,i.jsxs)(o_,{id:"boatLocation",children:[(0,i.jsx)(f.GL,{children:"Boat location"}),(0,i.jsx)(oj,{children:"Exact location information is provided after a booking is confirmed."}),(0,i.jsx)(oC,{ref:s,children:!d&&(0,i.jsx)("div",{children:(0,i.jsx)(oy,{defaultCenter:p,center:p,defaultZoom:11,PinImage:"/images/location-pin-blue.svg"})})})]})}let o_=a.ZP.div.withConfig({componentId:"sc-44ae0110-0"})(["padding-top:60px;padding-bottom:60px;border-bottom:1px solid #dbdfe5;scroll-margin-top:70px;","{padding-top:35px;padding-bottom:35px;}"],v.Hl),oj=a.ZP.div.withConfig({componentId:"sc-44ae0110-1"})(["padding-bottom:20px;padding-top:10px;font-size:14px;color:#5e696a;","{font-size:12px;padding-bottom:32px;}"],v.Hl),oC=a.ZP.div.withConfig({componentId:"sc-44ae0110-2"})(["min-height:500px;","{margin:0 -21px;min-height:375px;}"],v.Hl),oy=(0,a.ZP)(ov).withConfig({componentId:"sc-44ae0110-3"})(["height:500px !important;margin:0 !important;","{border-radius:0 !important;height:375px !important;}"],v.Hl);var ok=n(11874),oZ=n(21070),oP=n(22144),oI=n(83402),oM=n(80550);function oE(e){var t,n,a;let{boatId:r}=e,{boatDetails:l}=(0,m.Gb)(r),[s,d]=(0,o.useState)(!1);return(null===(t=l.boat_add_ons)||void 0===t?void 0:t.length)===0?null:(0,i.jsxs)(oB,{id:"bookingOptions",children:[(0,i.jsx)(f.GL,{children:"Add-ons"}),(0,i.jsx)(i7.x,{children:"Explore optional add-ons to tailor your booking at checkout."}),(0,i.jsx)(oS,{children:(0,i.jsx)(oL,{children:null===(n=l.boat_add_ons)||void 0===n?void 0:n.slice(0,s?100:5).map(e=>{let{add_on:t,...n}=e;return(0,i.jsxs)(oO,{children:[(0,i.jsx)(oR,{children:t.name}),(0,i.jsxs)(oz,{gap:"5px",children:[(0,i.jsx)(i7.x,{children:(0,eY._f)(n.price_cents)}),(0,i.jsxs)(oD,{fWeight:400,fSize:"12px",children:[" ",(0,i.jsx)(oH,{children:"/"})," ",n.display_short_price_type]})]})]},t.id)})})}),(null===(a=l.boat_add_ons)||void 0===a?void 0:a.length)>5&&(0,i.jsxs)(f.kj,{onClick:()=>d(!s),children:["See ",s?"less":"all"]})]})}let oD=(0,a.ZP)(i7.x).withConfig({componentId:"sc-4b8f6fb1-0"})(["align-self:center;"]),oH=a.ZP.span.withConfig({componentId:"sc-4b8f6fb1-1"})(["","{display:none;}"],v.Hl),oB=a.ZP.div.withConfig({componentId:"sc-4b8f6fb1-2"})(["padding-top:60px;scroll-margin-top:70px;","{padding-top:35px;","{margin-bottom:22px;}}"],v.Hl,f.GL),oS=a.ZP.div.withConfig({componentId:"sc-4b8f6fb1-3"})(["max-width:480px;padding-top:25px;","{border-radius:9px;}"],v.Hl),oL=a.ZP.div.withConfig({componentId:"sc-4b8f6fb1-4"})([""]),oR=a.ZP.div.withConfig({componentId:"sc-4b8f6fb1-5"})(["font-weight:400;min-width:250px;"]),oz=(0,a.ZP)(d.kC).withConfig({componentId:"sc-4b8f6fb1-6"})(["font-weight:600;","{gap:0;align-items:flex-end;flex-flow:column;}"],v.Hl),oO=(0,a.ZP)(d.kC).withConfig({componentId:"sc-4b8f6fb1-7"})(["padding:13px 0;:not(:last-child){border-bottom:1px solid rgba(219,223,229,0.5);}","{align-items:center;justify-content:space-between;}"],v.Hl);var oA=!0;function oG(e){var t;let{id:n,headProps:a}=e,c=(0,s.Gc)(),p=(0,G.useRouter)(),h=(0,eR.X2)(p.query.id),u=n||h,g=c.xs||c.sm||c.md,{bookingWidgetRef:b,bottomBarVisible:v}=(0,m.Ie)(g),[w,_]=(0,ec.KO)(ep.Cp),j=(0,ec.b9)(ep.GK),C=(0,ec.Dv)(ep.JE),y=(0,ec.b9)(oP.y1),k=(0,ec.b9)(oP.nB),Z=(0,ec.b9)(ep.F),P=(0,ec.b9)(ep.WE),{boatDetails:M={},isLoading:E}=(0,m.Gb)(u),{time_zone:D}=M,{pages:H}=(0,m.PU)(u,(null==C?void 0:C.package_type)==="captained",M.captain_network_enabled);(0,oI.Vk)();let{isLoading:B,reviewsTotal:S}=(0,m.yA)(u),L=(0,m.f_)();(0,o.useEffect)(()=>{u&&(y(u),L.mutateAsync(u))},[u]),(0,o.useEffect)(()=>
1{if(0===Object.keys(M).length)return;k("");let e=x()().startOf("day").isAfter(x()((0,eR.X2)(p.query.start_period)).startOf("day")),t=p.query.start_period&&!e?(0,eR.X2)(p.query.start_period):(0,oM.Z)({timeZone:D}).toISOString().split("T")[0];if(Z(x()(t)),p.query.end_period&&e){let e=x()((0,eR.X2)(p.query.end_period)).diff(x()((0,eR.X2)(p.query.start_period)),"days");P(x()(t).add(e,"days"))}else p.query.end_period&&P(x()((0,eR.X2)(p.query.end_period)))},[M]),(0,ok.Z)({boat_id:u,abandon_type:"pdp",trip_start:null,trip_finish:null,conversation_url:null,last_searched_plp_url:null,last_searched_pdp_url:!0,abandoned_checkout_url:null,last_searched_location:null,last_searched_trip_time:null});let R=(0,o.useMemo)(()=>H.reduce((e,t)=>[...e,...t.data],[]),[H]);(0,o.useEffect)(()=>{var e,t,n;w||(_(null===(e=R[0])||void 0===e?void 0:e.id),j(null===(n=R[0])||void 0===n?void 0:null===(t=n.user)||void 0===t?void 0:t.id))},[R]);let z=null==M?void 0:null===(t=M.packages)||void 0===t?void 0:t.find(e=>e.id===M.cheapest_package.id);(0,A.QF)(u,z);let O=0===S,Y=(null==C?void 0:C.package_type)==="captained";return E?(0,i.jsx)(d.lM,{height:"100vh",children:(0,i.jsx)(n3.Z,{size:"medium",color:"#72D4BA"})}):(null==M?void 0:M.state)==="deleted"?(0,i.jsx)(r.Z,{searchBar:!0,noFollow:!1,isPdp:!0,path:"pdpv3",children:(0,i.jsxs)(oN,{children:[(0,i.jsxs)(oq,{children:[(0,i.jsx)(f.GL,{as:"h4",children:"That ship has sailed"}),(0,i.jsx)("div",{children:"Looks like the boat you are looking for is no longer active. Explore some similar boats in your area"})]}),(0,i.jsx)(iX,{boatId:u})]})}):(0,i.jsxs)(r.Z,{customFooter:(0,i.jsx)(oY,{}),searchBar:!0,noFollow:!1,isPdp:!0,path:"pdpv3",children:[a&&(0,i.jsx)(l.Z,{title:a.title,description:a.description,ogDescription:a.description,ogImage:a.ogImage,noIndex:a.noIndex}),(0,i.jsx)(nz,{boatId:u}),(0,i.jsxs)(oN,{children:[(0,i.jsxs)(oF,{gap:"24px",children:[(0,i.jsxs)(oT,{children:[(0,i.jsx)(or,{boatId:u,isBoatCaptained:Y}),(0,i.jsx)(iN,{boatId:u}),(0,i.jsx)(iF,{boatId:u}),(0,i.jsx)(nU,{boatId:u,packages:M.packages,primaryPackage:z}),(0,i.jsx)(oE,{boatId:u})]}),!g&&(0,i.jsx)(oV,{id:"bookingWidget",children:(0,i.jsx)(ig,{boatId:u,primaryPackage:z,ref:b})})]}),(0,i.jsx)(I,{boatId:u,boatRating:M.rating,isLoading:B,hasNoReviews:O}),(0,i.jsx)(ow,{boatId:u}),(0,i.jsx)(t3,{primaryPackage:z,owner:M.primary_manager,captain:R.find(e=>e.id===w),isBoatCaptained:Y,boatId:u}),(0,i.jsx)(nr,{boatId:u,boatRules:M.boat_rules,cancellationPolicy:M.cancellation_policy,captainNetworkEnabled:M.captain_network_enabled,isBoatCommercial:(null==z?void 0:z.insurance_type)==="commercial"}),(0,i.jsx)(iX,{boatId:u}),(0,i.jsx)(i5,{boatId:u})]}),(0,i.jsx)(iZ,{boatId:u,primaryPackage:z,hideReviews:O,isVisible:v})]})}let oY=(0,a.ZP)(oZ.Z).withConfig({componentId:"sc-a0f1b683-0"})(["","{padding-bottom:100px;}"],v.$m),oq=a.ZP.div.withConfig({componentId:"sc-a0f1b683-1"})(["padding-top:150px;h4{font-size:35px;}"]),oV=(0,a.ZP)(d.kC).withConfig({componentId:"sc-a0f1b683-2"})([""]),oT=a.ZP.div.withConfig({componentId:"sc-a0f1b683-3"})(["","{width:clamp(400px,100%,800px);}"],v.Eh),oF=(0,a.ZP)(d.HG).withConfig({componentId:"sc-a0f1b683-4"})(["justify-content:space-between;border-bottom:1px solid #dbdfe5;padding-bottom:60px;","{padding-bottom:35px;}"],v.$m),oN=a.ZP.div.withConfig({componentId:"sc-a0f1b683-5"})(["",";padding:26px;"],f.OM)},87870:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(85893),o=n(88095),a=n(97893),r=n.n(a),l=n(52765),s=n(67294),d=n(36580),c=n(65716),p=n(14428);function h(e){let{id:t,headerContent:n,children:o,arrowColor:a="#0751C2",openByDefault:l=!1}=e,d=(0,c.Z)(),p=(0,s.useRef)(null),h=e=>()=>{var t;d("page_collapsible_click",{action:e,heading:null==p?void 0:null===(t=p.current)||void 0===t?void 0:t.innerText})};return(0,i.jsx)(r(),{open:l,onTriggerOpening:h("open"),onTriggerClosing:h("close"),...t&&{triggerElementProps:{id:t,"aria-controls":"".concat(t,"-content")},contentElementId:"".concat(t,"-content")},trigger:(0,i.jsxs)(u,{ref:p,className:"CollapsibleHeader-header",children:[n,(0,i.jsx)(g,{$arrowColor:a})]}),children:(0,i.jsx)(x,{children:o})})}let x=o.ZP.div.withConfig({componentId:"sc-4e2da6ae-0"})(["padding-top:15px;","{padding-top:25px;}"],p.Hl),u=(0,o.ZP)(l.o1).withConfig({componentId:"sc-4e2da6ae-1"})(["cursor:pointer;"]),g=(0,o.ZP)(d.QP).withConfig({componentId:"sc-4e2da6ae-2"})(["path{fill:",";}.Collapsible__trigger &{transition:transform 0.5s cubic-bezier(0.165,0.84,0.44,1);}.Collapsible__trigger.is-open &{transform:rotate(180deg);}"],e=>{let{$arrowColor:t}=e;return t})},95589:function(e,t,n){"use strict";n.d(t,{x:function(){return l}});var i=n(88095),o=n(14428),a=n(50043);let r=e=>
1{let{fWeight:t,fSize:n,lHeight:o,color:a,tTransform:r,cursor:l,tAlign:s,textDecoration:d,opacity:c}=e;return(0,i.iv)(["font-weight:",";font-size:",";line-height:",";color:",";text-transform:",";cursor:",";text-align:",";opacity:",";text-decoration:",";"],t,n,o,a,r,l,s,c,d)},l=(0,i.ZP)(a.x).withConfig({componentId:"sc-fbbb656e-0"})(["",";","{",";}","{",";}"],e=>r(e),o.Ag,e=>{let{mdMin:t={}}=e;return r(t)},o.$m,e=>{let{smMax:t={}}=e;return r(t)})},43265:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(20640),o=n.n(i),a=n(67294);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,[t,n]=(0,a.useState)(!1),i=(0,a.useCallback)(e=>{"string"==typeof e||"number"==typeof e?(o()(e.toString()),n(!0)):(n(!1),console.error("Cannot copy typeof ".concat(typeof e," to clipboard, must be a string or number.")))},[]);return(0,a.useEffect)(()=>{let i;return t&&e&&(i=setTimeout(()=>n(!1),e)),()=>{clearTimeout(i)}},[t,e]),[t,i]}},92766:function(e,t,n){"use strict";n.d(t,{QD:function(){return a},mC:function(){return o},rC:function(){return i}});let i=25.8805255,o=-80.2533466,a="(510) 426-5961"}}]); 2//# sourceMappingURL=1618-f881ae99e481c38f.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.