PageSourceSearch

https://wegotrip.com/_next/static/chunks/2904-257be243bd03812a.js

js wegotrip.com collected 2026-10-01 15:40:18 UTC 34,058 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f6f9f16d-7b59-5ac7-b44f-10078c203907")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2904],{739:()=>{},3205:()=>{},12026:()=>{},23340:(e,t,s)=>{"use strict";s.d(t,{A:()=>x});var n=s(37876);s(14232);var a=s(37627),r=s(42037),i=s(80428),l=s(66316),o=s(43013),c=s(83270),d=s(57612);let u=l.xm.map(({code:e})=>e),p={en:"en_US",ru:"ru_RU",de:"de_DE",es:"es_ES",fr:"fr_FR",it:"it_IT",pt:"pt_PT","pt-PT":"pt_PT",nl:"nl_NL",pl:"pl_PL",uk:"uk_UA"},h=e=>p[e]||`${e}_${String(e||"").toUpperCase()}`;function x({route:e,params:t,page:s,title:l,description:p,image:m,type:g="website",noindex:j=!1,canonical:_,alternates:f,robots:v}){let b=(0,c.A)(),w=(0,o.A)(),{lang:k,...y}=t||b,S=(0,d.xd)(l),N=(0,d.vr)(l),C=(0,d.gs)(p),P=(0,d.NY)(m),A=s&&s>1?`?page=${s}`:"",D="",T=[],I="";if(_)D=s&&s>1?`${_}${_.includes("?")?"&":"?"}page=${s}`:_;else if(e&&!j){let s=(0,i.Ay)(e,t||b);D=s?`${r.Z5}${s}${A}`:""}Array.isArray(f)&&f.length?f.forEach(({lang:e,url:t})=>{"x-default"===e?I=t:T.push({code:e,url:t})}):_||!e||j||u.forEach(t=>{let s=(0,i.Ay)(e,{lang:t,...y});if(s){let e=`${r.Z5}${s}${A}`;T.push({code:t,url:e}),t===r.xN&&(I=e)}});let E=v||(j?"noindex, follow":null),M=u.filter(e=>e!==w);return(0,n.jsxs)(a.A,{children:[l?(0,n.jsx)("title",{children:S}):null,E?(0,n.jsx)("meta",{name:"robots",content:E}):null,C?(0,n.jsx)("meta",{name:"description",content:C}):null,D?(0,n.jsx)("link",{rel:"canonical",href:D}):null,T.map(({code:e,url:t})=>(0,n.jsx)("link",{rel:"alternate",hrefLang:e,href:t},e)),I?(0,n.jsx)("link",{rel:"alternate",hrefLang:"x-default",href:I}):null,N?(0,n.jsx)("meta",{property:"og:title",content:N}):null,C?(0,n.jsx)("meta",{property:"og:description",content:C}):null,P?(0,n.jsx)("meta",{property:"og:image",content:P}):null,P?(0,n.jsx)("meta",{property:"og:image:width",content:"1200"}):null,P?(0,n.jsx)("meta",{property:"og:image:height",content:"630"}):null,D?(0,n.jsx)("meta",{property:"og:url",content:D}):null,(0,n.jsx)("meta",{property:"og:site_name",content:"WeGoTrip"}),(0,n.jsx)("meta",{property:"og:type",content:g}),(0,n.jsx)("meta",{property:"og:locale",content:h(w)}),M.map(e=>(0,n.jsx)("meta",{property:"og:locale:alternate",content:h(e)},e)),N?(0,n.jsx)("meta",{name:"twitter:title",content:N}):null,C?(0,n.jsx)("meta",{name:"twitter:description",content:C}):null,P?(0,n.jsx)("meta",{name:"twitter:image",content:P}):null]})}},25888:()=>{},26103:()=>{},35945:()=>{},42661:()=>{},54524:()=>{},57612:(e,t,s)=>{"use strict";s.d(t,{NY:()=>o,gs:()=>l,nw:()=>r,vr:()=>a,xd:()=>i});var n=s(55806);function a(e){return String(e??"").replace(/(?:\\[rn]|[\r\n\t]+)+/g," ").replace(/\s+/g," ").trim()}function r(e,t){let s=a(e);if(s.length<=t)return s;let n=s.slice(0,t),r=n.lastIndexOf(" ");return(r>0?n.slice(0,r):n).replace(/[\s.,;:!?\-–—]+$/,"")}function i(e,{max:t=60,brand:s="WeGoTrip"}={}){let n=a(e);if(!n)return s;let l=` | ${s}`,o=`${n}${l}`;return o.length<=t?o:r(n,t)}function l(e,{max:t=160}
3={}){let s=a(e);return s?r(s,t):""}function o(e){return e&&"string"==typeof e?(0,n.Lc)(e,{width:1200,height:630,resizingType:"fill",gravity:"sm"}):""}},58215:()=>{},78743:()=>{},84547:(e,t,s)=>{"use strict";s.d(t,{r:()=>h});var n=s(37876),a=s(14232),r=s(54241),i=s(14858),l=s(44901),o=s(42480),c=s(42939);let d=s.p+"static/media/places.97c29ef8.svg";s(78743);var u=s(91345),p=s(94820);function h({theme:e="no-route",onClickPrev:t}){let s=!o.f&&(0,i.r)("(max-width: 767px)"),[x,m]=(0,a.useState)(!0),[g,j]=(0,a.useState)(!1),_=(0,a.useMemo)(()=>s?"bottomSheet":"appearing",[s]),f=new URL("/generate-your-tour",(0,u.$)()),{title:v,description:b}=(()=>{switch(e){case"no-route":return{title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.x6,{id:"Rl5o/f"}),(0,n.jsx)("br",{}),(0,n.jsx)(r.x6,{id:"doS5FC"})]}),description:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.x6,{id:"FfM16g"}),(0,n.jsx)("br",{}),(0,n.jsx)(r.x6,{id:"oJkOrE"})]})};case"error":return{title:(0,n.jsx)(r.x6,{id:"Vw8l6h"}),description:(0,n.jsx)(r.x6,{id:"YempL1"})};default:return{title:(0,n.jsx)(r.x6,{id:"U7nnQt"}),description:(0,n.jsx)(r.x6,{id:"PZCqeW"})}}})();return(0,n.jsx)(c.A,{hideHeader:!0,closable:!1,open:x,theme:_,className:"ErrorPopup",children:(0,n.jsxs)("div",{className:"ErrorPopup__content",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("img",{src:d,className:`ErrorPopup__image ${g?"loaded":""}`,onLoad:()=>j(!0)}),(0,n.jsx)("p",{className:"ErrorPopup__title",children:v})]}),(0,n.jsx)("div",{className:"ErrorPopup__description",children:b}),(0,n.jsx)(l.A,{theme:"black",className:"ErrorPopup__button",size:"L",onClick:()=>{"no-route"===e?(0,p.Ay)("track","not_places_back_button"):"error"===e&&(0,p.Ay)("track","popup_error_back_button"),t?t():"error"===e&&window.location.assign(f.toString())},children:(0,n.jsx)(r.x6,{id:"iH8pgl"})})]})})}},86557:()=>{},88110:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>ei});var n=s(37876),a=s(14232),r=s(54241),i=s(2189),l=s(43013),o=s(80428),c=s(91345),d=s(66198),u=s(23340),p=s(94820);let h=s.p+"static/media/logo.953515a2.svg",x=s.p+"static/media/logoRu.b5ce3fa4.svg",m={lat:0,lng:0},g=a.createContext({mode:"radius",startingPoint:null,endingPoint:null,areaRadius:1500,selectedLanguage:null,selectedPlaces:[],changeMode:()=>void 0,startingPointChange:()=>void 0,endingPointChange:()=>void 0,changeAreaRadius:()=>void 0,changeSelectedVoice:()=>void 0,changeSelectedMethod:()=>void 0,changeSelectedPlaces:()=>void 0,resetTourGeography:()=>void 0});var j=s(14858),_=s(44901);function f({value:e,maxValue:t}){let s=(0,a.useMemo)(()=>Math.min(Math.max(e/t,0),1),[e,t]);return(0,n.jsxs)("div",{className:"step-progress",children:[(0,n.jsx)("div",{className:"step-progress__bar",style:{"--ratio":s}}),(0,n.jsxs)("span",{className:"step-progress__label",children:[s*t," / ",t]})]})}s(3205),s(42661);var v=s(42480);function b({onClickPrev:e,onClickNext:t,step:s,stepsTotal:a,disableNext:i,disablePrev:l}){let o=!v.f&&(0,j.r)("(max-width: 767px)");return(0,n.jsxs)("div",{className:"desktop-controls",children:[!o&&(0,n.jsx)(f,{value:s,maxValue:a}),(0,n.jsxs)("div",{className:"desktop-controls__buttons",children:[(0,n.jsx)(_.A,{theme:"card",size:"M",disabled:l,onClick:e,children:(0,n.jsx)(r.x6,{id:"iH8pgl"})}),(0,n.jsx)(_.A,{className:"Button--card",theme:"black",size:"M",disabled:i,onClick:t,children:2===s?(0,n.jsx)(r.x6,{id:"ziAjHi"}):(0,n.jsx)(r.x6,{id:"hXzOVo"})})]})]})}let w=async()=>{let e=await fetch("https://get.geojs.io/v1/ip/geo.json"),{latitude:t,longitude:s}=await e.json();return{lat:Number(t),lng:Number(s)}},k=()=>{let[e,t]=(0,a.useState)(crypto.randomUUID());return[e,(0,a.useCallback)(()=>t(crypto.randomUUID()),[])]};var y=s(57447),S=s(42037);let N=s.p+"static/media/zoomIn.3e1e7085.svg",C=s.p+"static/media/zoomOut.266cdae5.svg";function P({onZoomIn:e,onZoomOut:t,onLocateUser:s}){return(0,n.jsx)("div",{className:"navigation-controls",children:(0,n.jsxs)("div",{className:"navigation-controls__zoom-group",children:[(0,n.jsx)(_.A,{title:"zoom-in",theme:"box",onClick:e,children:(0,n.jsx)("img",{src:N})}),(0,n.jsx)(_.A,{title:"zoom-out",theme:"box",onClick:t,children:(0,n.jsx)("img",{src:C})})]})})}let A=s.p+"static/media/endingPoint.3d0d0d53.svg",D=s.p+"static/media/startingPoint.a8aa4e62.svg";function T({onPointDragStart:e,onPointDragEnd:t}){let s=(0,y.ST)("maps"),r=(0,y.ST)("core"),i=(0,y.ST)("geometry"),l=(0,a.useContext)(y.QX)?.map,[o,c]=k(),[d,u]=k(),{startingPoint:p,endingPoint:h,changeStartingPoint:x,changeEndingPoint:m}=(0,a.useContext)(g),j=(0,a.useMemo)(()=>s&&r?new s.Polyline({strokeOpacity:1,strokeWeight:8,strokeColor:"#FFF",visible:!1,icons:[{icon:{path:"M 0,-1 0,1",strokeOpacity:1,strokeColor:"black",scale:4},offset:"0",repeat:"20px"}],zIndex:20}):null,[s,r]),_=(0,a.useMemo)(()=>s&&r?new s.Polyline({strokeColor:"rgba(0, 122, 255, .2)",visible:!1,strokeWeight:42,zIndex:10}):null,[s,r]);(0,a.useEffect)(()=>
3{if(l&&j&&_)return j.setMap(l),_.setMap(l),()=>{j.setMap(null),_.setMap(null)}},[l,j,_]),(0,a.useEffect)(()=>{if(j&&_){if(!p||!h){j.setVisible(!1),_.setVisible(!1);return}j.setPath([p,h]),j.setVisible(!0),_.setPath([p,h]),_.setVisible(!0)}},[j,_,p,h]);let f=(0,a.useMemo)(()=>s?new s.Circle({fillColor:"rgba(228, 70, 86, 0.2)",strokeColor:"rgba(228, 70, 86, 1)",fillOpacity:1,strokeWeight:1}):null,[s]),v=(0,a.useMemo)(()=>s?new s.Circle({fillColor:"rgba(228, 70, 86, 0.2)",strokeColor:"rgba(228, 70, 86, 1)",fillOpacity:1,strokeWeight:1}):null,[s]);return(0,a.useEffect)(()=>{if(l&&f&&v)return f.setMap(l),v.setMap(l),()=>{f.setMap(null),v.setMap(null)}},[f,v,l]),(0,a.useEffect)(()=>{if(f&&v&&p)return f.setOptions({center:{lat:-p.lat,lng:p.lng-180},radius:20032508.34,visible:!0}),v.setOptions({center:p,radius:1e3,visible:!0}),()=>{f.setVisible(!1),v.setVisible(!1)}},[f,v,p]),(0,a.useEffect)(()=>{f&&v&&(f.setOptions({clickable:!h}),v.setOptions({clickable:!h}))},[f,v,h]),(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)(y.J8,{draggable:!0,position:p,anchorPoint:["50%","14px"],onDragStart:e,onDragEnd:t,onDrag:e=>{i&&(h?5e3>=i.spherical.computeDistanceBetween(e.latLng,h)?x(e.latLng.toJSON()):(x(p),c()):x(e.latLng.toJSON()))},children:(0,n.jsx)("img",{width:42,src:D})},o),(0,n.jsx)(y.J8,{draggable:!0,anchorPoint:["50%","30px"],position:h,onDrag:e=>{if(!i)return;let t=i.spherical.computeDistanceBetween(e.latLng,p);t<=5e3&&t>=1e3?m(e.latLng.toJSON()):(m(h),u())},children:(0,n.jsx)("img",{width:44,src:A})},d)]})}let I=s.p+"static/media/targetMarker.b2476589.svg",E=(0,a.forwardRef)(({...e},t)=>{let s=(0,y.ST)("maps"),r=(0,a.useContext)(y.QX)?.map,{startingPoint:i,areaRadius:l}=(0,a.useContext)(g),[o,c]=(0,a.useState)(e.position),d=(0,a.useMemo)(()=>s?new s.Circle({fillColor:"rgba(0, 122, 255, 0.2)",strokeColor:"rgb(0, 122, 255)",strokeWeight:1,clickable:!1}):null,[s]);return(0,a.useEffect)(()=>{c(i)},[i]),(0,a.useEffect)(()=>{if(r&&d)return d.setMap(r),()=>{d.setMap(null)}},[d,r]),(0,a.useEffect)(()=>{d&&((0,y.me)(o,d.getCenter())||d.setCenter(o))},[o,d]),(0,a.useEffect)(()=>{d&&l!==d.getRadius()&&d.setRadius(l)},[d,l]),(0,n.jsx)(y.J8,{position:i,...e,ref:t,anchorPoint:["50%","14px"],onDrag:t=>{c({lat:t.latLng.lat(),lng:t.latLng.lng()}),e.onDrag&&e.onDrag()},children:(0,n.jsx)("img",{width:42,src:I})})});var M=s(93674),L=s.n(M),$=s(84503);function O({active:e,...t}){return(0,n.jsx)(_.A,{className:`mode-button ${e?"Button--black":"Button--card"}`,size:"S",theme:"bordered","data-active":e,iconPosition:"before",...t})}function R(){let{i18n:e}=(0,r.uB)(),t=(0,y.ST)("places"),s=(0,a.useContext)(y.QX)?.map,l=(0,a.useRef)(null),o=(0,a.useRef)(null),{resetTourGeography:c}=(0,a.useContext)(g);return(0,a.useEffect)(()=>{if(!t||!l.current||!s)return;let e=new t.Autocomplete(l.current,{strictBounds:!1,bounds:s.getBounds(),fields:["geometry"]}),n=s.addListener("bounds_changed",()=>{e.setBounds(s.getBounds())}),a=e.addListener("place_changed",()=>{let{geometry:t}=e.getPlace();(0,p.Ay)("track","search_result_click"),t?.location&&(s.setCenter(t.location),c((0,y.dp)(t.location)))});return o.current=e,()=>{n.remove(),a.remove()}},[t,s,c]),(0,a.useEffect)(()=>()=>{o.current=null},[]),(0,n.jsx)("div",{role:"combobox",className:"places-search",children:(0,n.jsx)("input",{ref:l,placeholder:e._(i.Ru._({id:"R1D7UG"})),type:"text",className:"places-search__input",onFocus:()=>{(0,p.Ay)("track","search_input_focus")}})})}function B(){let e=(0,y.ST)("geometry"),{mode:t,areaRadius:s,startingPoint:i,endingPoint:l,changeMode:o,changeAreaRadius:c}=(0,a.useContext)(g),d=s/1e3,u=(0,a.useMemo)(()=>{if(!e||!i||!l)return;let t=e.spherical.computeDistanceBetween(i,l);return L()(t/1e3,1)},[i,l,e]);return(0,n.jsxs)("div",{className:"tour-area-controls",children:[(0,n.jsx)(R,{}),{radius:(0,n.jsxs)(a.Fragment,{children:[(0,n.jsxs)("div",{className:"tour-area-controls__text",children:[(0,n.jsx)("div",{className:"tour-area-controls__text__title",children:(0,n.jsx)(r.x6,{id:"Y0OTqV",message:"Select tour zone"})}),(0,n.jsxs)("div",{className:"tour-area-controls__text__length",children:[(0,n.jsx)(r.x6,{id:"se11zT",message:"{radiusKm}
3 km",values:{radiusKm:d}})," "]})]}),(0,n.jsx)("input",{className:"tour-area-controls__range-slider",type:"range",min:1,max:5,step:.1,value:d,onChange:e=>{let{value:t}=e.currentTarget;c(1e3*t)}})]}),path:(0,n.jsxs)("div",{className:"tour-area-controls__text",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"tour-area-controls__text__title",children:i?(0,n.jsx)(r.x6,{id:"QFWZd8",message:"Choose the endpoint or edit the starting point."}):(0,n.jsx)(r.x6,{id:"0Be5Zl",message:"Select the starting point"})}),(0,n.jsx)("div",{className:"tour-area-controls__text__subtitle",children:(0,n.jsx)(r.x6,{id:"jYDNTZ",message:"Route from 1 to 5 km"})})]}),u&&(0,n.jsxs)("div",{className:"tour-area-controls__text__length",children:[(0,n.jsx)(r.x6,{id:"UXCFgE",message:"{pathDistanceKm} km",values:{pathDistanceKm:u}})," "]})]})}[t],(0,n.jsxs)("div",{className:"tour-area-controls__buttons",children:[(0,n.jsxs)(O,{active:"radius"===t,onClick:()=>{(0,p.Ay)("track","area_button_click"),o("radius")},children:[(0,n.jsx)($.I,{name:"area"}),(0,n.jsx)(r.x6,{id:"wLS/u0",message:"In the area"})]}),(0,n.jsxs)(O,{active:"path"===t,onClick:()=>{(0,p.Ay)("track","route_button_click"),o("path")},children:[(0,n.jsx)($.I,{name:"route"}),(0,n.jsx)(r.x6,{id:"DiAn4/",message:"From A to B"})]})]})]})}function z(){let e=(0,a.useRef)(crypto.randomUUID()).current,t=(0,a.useRef)(!1),[s,r]=(0,a.useState)(14),[i,l]=(0,a.useState)(m),{mode:o,startingPoint:c,endingPoint:d,changeStartingPoint:u,changeEndingPoint:p,resetTourGeography:h}=(0,a.useContext)(g),x=async()=>{let e=await w();l(e),h(e)};return(0,a.useEffect)(()=>{c?l(c):x()},[]),(0,n.jsx)(y.c4,{apiKey:S.f4,children:(0,n.jsx)("div",{className:"map-screen",children:(0,n.jsxs)(y.T5,{disableDefaultUI:!0,mapId:e,minZoom:5,style:{width:"100%",height:"100%"},zoom:s,defaultCenter:m,center:i,options:{restriction:{latLngBounds:{north:85,south:-85,west:-180,east:180},strictBounds:!0},disableDefaultUI:!0,gestureHandling:"greedy"},gestureHandling:"greedy",onZoomChanged:e=>r(e.detail.zoom),onClick:e=>{if(t.current)return;let{latLng:s}=e.detail;switch(o){case"path":if(!c)return u(s);if(!d)return p(s);u(s),p(null);break;case"radius":u(s),p(null);break;default:throw Error("Unknown map mode: ",`"${o}"`)}},onCenterChanged:()=>l(void 0),children:[(0,n.jsx)(B,{}),(0,n.jsx)(P,{onZoomIn:()=>r(e=>e+1),onZoomOut:()=>r(e=>{let t=e-1;return t<5?5:t}),onLocateUser:x}),{radius:(0,n.jsx)(E,{}),path:(0,n.jsx)(T,{onPointDragStart:()=>{t.current=!0},onPointDragEnd:()=>{setTimeout(()=>{t.current=!1})}})}[o]]})})})}s(25888),s(86557),s(35945);var U=s(31777),F=s(63976),G=s(51808);s(739);let W=({id:e,label:t,value:s,options:i,onSelect:l,activeDropdownId:o,onToggleDropdown:c,disabledOption:d,icon:u,search:h=!1,enablePlayer:x=!1,closeButton:m=!1})=>{let g=!v.f&&(0,j.r)("(max-width: 767px)"),[f,b]=(0,a.useState)(!1),[w,k]=(0,a.useState)(i),[y,S]=(0,a.useState)(""),[N,C]=(0,a.useState)(null),P=(0,a.useRef)(null),A=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(i?.length&&s){let e=i.find(e=>e.value===s);return S(e?.label||""),()=>S("")}},[i,s]),(0,a.useEffect)(()=>{o!==e&&b(!1)},[o,e]),(0,a.useEffect)(()=>{k(i)},[i]);let D=e=>{e!==d&&(l(e),g||(b(!1),c(null)),S(e.label||""))},T=()=>w.map((e,t)=>{let a=s===e.value;return(0,n.jsxs)("li",{className:`DropdownInput__listItem ${e===d?"disabled":""}`,style:{cursor:e===d?"not-allowed":"pointer",color:e===d?"gray":"black",display:"flex",alignItems:"center",justifyContent:"space-between"},onMouseDown:()=>{e!==d&&D(e)},children:[(0,n.jsxs)("div",{className:"DropdownInput__checkbox_block",children:[g&&(0,n.jsx)("input",{type:"checkbox",id:`checkbox-${t}`,className:"DropdownInput__checkbox",checked:a,onChange:()=>D(e)}),(0,n.jsx)("span",{children:e.label})]}),x&&e.sample&&(0,n.jsx)("button",{className:"DropdownInput__playerButton",onMouseDown:t=>{t.stopPropagation();var s=e.sample;if(A.current&&(A.current.pause(),A.current=null),N===s)C(null);else{let e=new Audio(s);A.current=e,C(s),e.play(),e.onended=()=>{C(null),A.current=null}}(0,p.Ay)("track","tour_params_play_sample")},children:N===e.sample?(0,n.jsx)("svg",{viewBox:"0 -3 24 24",width:"24",height:"24",children:(0,n.jsx)("path",{fill:"#000",fillOpacity:".98",d:"M14.5 18V6h3.075v12H14.5Zm-8.075 0V6H9.5v12H6.425Z"})}):(0,n.jsxs)("svg",{viewBox:"0 -5 8 18",width:"18",height:"18",children:[(0,n.jsx)("title",{children:"Play"}),(0,n.jsx)("path",{fill:"#000",fillOpacity:".98",d:"M10,6.63L0,13.25V0L10,6.63z"})]})})]},t)}),I=(0,n.jsxs)("div",{className:"DropdownInput__inputContainer",onClick:t=>{if(!d&&!t.target.closest(".DropdownInput__playerButton")){let t=!f;b(t),c(t?e:null)}},children:[(0,n.jsx)($.I,{className:"DropdownInput__icon",name:u}),(0,n.jsx)("input",{readOnly:!h,type:h?"search":"text",value:y,placeholder:"",disabled:d,className:`DropdownInput__input ${s?"DropdownInput__input_active":""}`,onChange:h?e=>{let t=e.target.value;S(t),k(i.filter(e=>e.label.toLowerCase().includes(t.toLowerCase())))}:void 0}),(0,n.jsx)("label",{className:"DropdownInput__label",children:t}),(0,n.jsx)("div",{className:"DropdownInput__chevron",children:(0,n.jsx)($.I,{name:`chevron/${f?"up":"down"}`,width:"24",height:"24"})})]}),E=(0,n.jsx)("div",{className:"DropdownInput__popup",children:0===i.length?(0,n.jsx)("div",{className:"DropdownInput__popup_spinner",children:(0,n.jsx)(G.Ay,{})}):(0,n.jsx)("ul",{style:{listStyle:"none",padding:0},children:T()})});return(0,n.jsx)("div",{ref:P,style:{position:"relative"},children:g?(0,n.jsx)(F.A,{title:t,ContentComponent:()=>(0,n.jsxs)("div",{className:"ActivitiesSort__radioMenu_items",children:[(0,n.jsx)("ul",{style:{listStyle:"none",padding:0,marginBottom:10},children:T()}),m&&(0,n.jsx)(_.A,{theme:"black",size:"L",onClick:()=>b(!1),children:(0,n.jsx)(r.x6,{id:"tfDRzk"})})]}),isMobile:g,triggerElement:I,open:f,onClose:()=>b(!1),onOpened:()=>b(!0),onClosed:()=>b(!1)}):(0,n.jsxs)(n.Fragment,{children:[I,f&&E]})})};var Z=s(48851),H=s(42939);async function V(e){try{return await Z.j.get(`/api/quests/aitours/listAllVoices?lang=${encodeURIComponent(e)}`,{lang:e})}catch(e){return[]}}var J=s(76341),K=s(84547);let X=s.p+"static/media/planet.d533d9e1.svg",Y=s.p+"static/media/Building.3cce61b4.svg";s(54524);let q=({places:e,onSelect:t,errorAlert:s,selectedImages:a,setSelectedImages:r})=>{let i=e=>{r(n=>{let a;return n.includes(e)?((0,p.Ay)("track","tour_params_place_deselected",{placeId:e}),a=n.filter(t=>t!==e)):n.length<15?((0,p.Ay)("track","tour_params_place_selected",{placeId:e}),a=[...n,e]):(s(),a=n),t(a),a})};return(0,n.jsx)("div",{className:"PlacesGrid",children:e.map(e=>(0,n.jsxs)("div",{className:`PlacesGrid__card ${a.includes(e.place_id)?"PlacesGrid__card--selected":""}`,children:[(0,n.jsx)("div",{className:`PlacesGrid__circle ${a.includes(e.place_id)?"PlacesGrid__circle--selected":""}`,onClick:()=>i(e.place_id),children:a.includes(e.place_id)&&(0,n.jsx)("span",{className:"PlacesGrid__check",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:(0,n.jsx)("path",{fill:"#fff",stroke:"#fff",d:"m9.55 17.3-4.975-4.95.725-.725 4.25 4.25 9.15-9.15.725.725L9.55 17.3Z"})})})}),(0,n.jsx)("div",{className:"PlacesGrid__image-wrapper",onClick:()=>i(e.place_id),children:(0,n.jsx)("img",{height:132,src:e.photo_url||"https://via.placeholder.com/150",alt:e.name,className:"PlacesGrid__image"})}),(0,n.jsx)("div",{className:"PlacesGrid__name",children:e.name})]},e.place_id))})};s(58215);let Q=({isMobile:e,theme:t})=>{let s=[{icon:"timer",subtitle:(0,n.jsx)(r.x6,{id:"4xW4f/"})},{icon:"not-included",subtitle:(0,n.jsx)(r.x6,{id:"Sa3BOC"})}],i={manual:[{icon:"shopping-cart-gray",subtitle:(0,n.jsx)(r.x6,{id:"iKiWvE"})}],mix:[{icon:"shopping-cart-gray",subtitle:(0,n.jsx)(r.x6,{id:"iKiWvE"})}],auto:[]},[l,o]=(0,a.useState)(!1),c=()=>{o(!1)};return(0,n.jsx)(H.A,{hideHeader:!e,open:l,theme:e?"bottomSheet":"",triggerElement:(0,n.jsx)("button",{className:"TourParametersScreen__infoButton",children:"i"}),onOpened:()=>o(!0),onClosed:c,children:(0,n.jsxs)("div",{className:"TourParametersScreen__popup",children:[(0,n.jsx)("img",{src:Y}),(0,n.jsxs)("div",{className:"TourParametersScreen__popup_text",children:[(0,n.jsx)("div",{className:"TourParametersScreen__popup_title",children:(0,n.jsx)(r.x6,{id:"Scx2Ba"})}),"manual"===t&&(0,n.jsx)("div",{className:"TourParametersScreen__popup_info",children:(0,n.jsx)(r.x6,{id:"eAKemL"})}),(0,n.jsx)("div",{className:"TourParametersScreen__popup_subtitles",children:[...i[t]||[],...s].map((e,t)=>(0,n.jsxs)("div",{className:"TourParametersScreen__popup_subtitle",children:[(0,n.jsx)($.I,{name:e.icon}),e.subtitle]},t))})]}),!e&&(0,n.jsx)(_.A,{theme:"black",size:"L",onClick:c,children:(0,n.jsx)(r.x6,{id:"aP3N/0"})})]})})};function ee({onClickPrev:e,selectedPlaces:t,setSelectedPlaces:s}){let{i18n:o}=(0,r.uB)(),c=(0,U.wA)(),d=!v.f&&(0,j.r)("(max-width: 767px)"),u=(0,l.A)(),[h,x]=(0,a.useState)(null),[m,_]=(0,a.useState)(""),[f,b]=(0,a.useState)(""),[w,k]=(0,a.useState)("manual"),[y,S]=(0,a.useState)([]),[N,C]=(0,a.useState)([]),{mode:P,startingPoint:A,endingPoint:D,areaRadius:T,changeSelectedLanguage:I,changeSelectedVoice:E,changeSelectedMethod:M,changeSelectedPlaces:L}=(0,a.useContext)(g),[$,O]=(0,a.useState)(null),[R,B]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=new URLSearchParams;e.append("startingPoint",`${A.lat},${A.lng}
3`),"radius"===P&&e.append("radius",T),"path"===P&&e.append("endingPoint",`${D.lat},${D.lng}`),e.append("lang",u),Z.j.get(`/api/quests/aitours/routeSearch?${e.toString()}`,{lang:u}).then(e=>{if("There were not enough places."===e.detail)B(!0),O([]),(0,p.Ay)("track","not_enough_places_found");else{let t=new Map(e.results.map(e=>[e.place_id,e]));B(!1),O(Array.from(t.values()))}}).catch(e=>{console.error("error",e),B(!0),(0,p.Ay)("track","not_enough_places_found")})},[P,A,D,T,u]),(0,a.useEffect)(()=>{!async function(){S(await V(u))}()},[u]);let z=e=>{x(t=>t===e?null:e)},F=(0,a.useMemo)(()=>y.find(e=>e.code===m)?.voices||[],[m,y]),H=(0,a.useMemo)(()=>y.map(e=>({label:e.name,value:e.code})),[y]),Y=(0,a.useMemo)(()=>F.map(e=>({label:e.name,value:e.id,sample:e.sample})),[F]),et=[{label:o._(i.Ru._({id:"JbzBRZ"})),value:"manual"},{label:o._(i.Ru._({id:"gR/0eJ"})),value:"auto"},{label:o._(i.Ru._({id:"hUK64A"})),value:"mix"}];return((0,a.useEffect)(()=>{_(H.some(e=>e.value===u)?u:"en")},[H,u]),(0,a.useEffect)(()=>{Y.length&&b(Y[0].value)},[Y]),(0,a.useEffect)(()=>{I(m)},[I,m]),(0,a.useEffect)(()=>{E(F.find(e=>e.id===f)||null)},[E,f,F]),(0,a.useEffect)(()=>{M(w)},[M,w]),$||R)?R?(0,n.jsx)("div",{children:(0,n.jsx)(K.r,{onClickPrev:e})}):(0,n.jsx)("div",{className:"TourParametersScreen",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"TourParametersScreen__title",children:(0,n.jsx)(r.x6,{id:"+lJvNZ"})}),(0,n.jsx)("span",{className:"TourParametersScreen__helper-text",children:(0,n.jsx)(r.x6,{id:"pFee7o"})}),(0,n.jsxs)("div",{className:"TourParametersScreen__input-block",children:[(0,n.jsx)(W,{closeButton:!0,search:!d,id:"language",label:(0,n.jsx)(r.x6,{id:"vXIe7J"}),icon:"globe-language",value:m,options:H,activeDropdownId:h,onSelect:e=>{_(e.value),(0,p.Ay)("track","tour_params_selected_language")},onToggleDropdown:z}),(0,n.jsx)(W,{closeButton:!0,enablePlayer:!0,id:"voice",label:(0,n.jsx)(r.x6,{id:"KAXSwC"}),icon:"audio-ticket",value:f,options:Y,activeDropdownId:h,disabledOption:!m,onSelect:e=>{b(e.value),(0,p.Ay)("track","tour_params_selected_voice")},onToggleDropdown:z}),(0,n.jsx)(W,{closeButton:!0,id:"planning-method",label:(0,n.jsx)(r.x6,{id:"XXNtb1"}),icon:"location/white",value:w,options:et,activeDropdownId:h,disabledOption:!m,onSelect:e=>{k(e.value),s([]),C([])},onToggleDropdown:z})]}),"auto"===w?(0,n.jsxs)("div",{className:"TourParametersScreen__auto-selected",children:[(0,n.jsx)("img",{src:X,className:"TourParametersScreen__auto-selected_image"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"TourParametersScreen__auto-selected_title",children:(0,n.jsx)(r.x6,{id:"tsnCXi"})}),(0,n.jsx)("div",{className:"TourParametersScreen__auto-selected_subtitle",children:(0,n.jsx)(r.x6,{id:"+v5FuS"})})]}),(0,n.jsx)(Q,{isMobile:d,theme:"auto"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"TourParametersScreen__helper-text_block",children:[(0,n.jsxs)("div",{className:"TourParametersScreen__helper-text",children:[(0,n.jsx)("div",{className:"TourParametersScreen__helper-text_title",children:"manual"===w?(0,n.jsx)(r.x6,{id:"Yxrm1j",values:{0:t.length}}):(0,n.jsx)(r.x6,{id:"HnpFCY",values:{0:t.length}})}),(0,n.jsx)("div",{className:"TourParametersScreen__helper-text_description",children:"manual"===w?(0,n.jsx)(r.x6,{id:"eAKemL"}):(0,n.jsx)(r.x6,{id:"UjCT26"})})]}),(0,n.jsx)(Q,{isMobile:d,theme:w})]}),(0,n.jsx)(q,{places:$,errorAlert:()=>{c({type:J.BQ,data:{message:(0,n.jsx)(r.x6,{id:"ifagFn"}),actions:[]}})},setSelectedImages:C,selectedImages:N,onSelect:L})]})]})}):(0,n.jsx)(G.m1,{})}let et=s.p+"static/media/bannerOnDemand.401aae2b.avif";function es(){let e=!v.f&&(0,j.r)("(max-width: 767px)"),[t,s]=(0,a.useState)(!0),[i,l]=(0,a.useState)(!1),o=(0,a.useMemo)(()=>e?"bottomSheet":"appearing",[e]),c=()=>{s(!1),(0,p.Ay)("track","on_demand_create_click"),(0,p.H$)("track","on_demand_create_click")};return(0,n.jsx)(H.A,{closable:!0,hideHeader:"true",open:t,theme:o,className:"welcome-popup",onClosed:c,children:(0,n.jsxs)("div",{className:"welcome-popup__content",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("img",{src:et,className:`welcome-popup__image ${i?"loaded":""}`,loading:"lazy",decoding:"async",onLoad:()=>l(!0)}),(0,n.jsxs)("p",{className:"welcome-popup__description",children:[(0,n.jsx)("h2",{className:"welcome-popup__description_title",children:(0,n.jsx)(r.x6,{id:"v8uzPD"})}),(0,n.jsx)("span",{className:"welcome-popup__description_subtitle",children:(0,n.jsx)(r.x6,{id:"OGZc/c"})})]})]}),(0,n.jsxs)("ul",{className:"welcome-popup__list",children:[(0,n.jsxs)("li",{children:[(0,n.jsx)($.I,{name:"location/pin",width:"24",height:"24"}),(0,n.jsx)(r.x6,{id:"RoJBly",components:{0:(0,n.jsx)("br",{})}})]}),(0,n.jsxs)("li",{children:[(0,n.jsx)($.I,{name:"attraction",width:"24",height:"24"}),(0,n.jsx)(r.x6,{id:"ryZ+yC",components:{0:(0,n.jsx)("br",{})}})]}),(0,n.jsxs)("li",{children:[(0,n.jsx)($.I,{name:"globe-language",width:"24",height:"24"}),(0,n.jsx)(r.x6,{id:"mUmYhE"})]}),(0,n.jsxs)("li",{children:[(0,n.jsx)($.I,{name:"friends",width:"24",height:"24"}),(0,n.jsx)(r.x6,{id:"ihSGKo"})]})]}),(0,n.jsxs)(_.A,{theme:"black",className:"welcome-popup__button",size:"L",onClick:c,children:[(0,n.jsx)($.I,{name:"magic-stars"})," ",(0,n.jsx)(r.x6,{id:"ONF6nu"})]})]})})}function en(){let{i18n:e}=(0,r.uB)(),t=e._(i.Ru._({id:"lC+o+s"})),s=e._(i.Ru._({id:"syCuWF"}));return(0,n.jsx)(u.A,{route:"generate-your-tour",title:t,description:s,image:"https://wgt-prod-storage.s3.eu-west-3.amazonaws.com/upload/image/brand/ai-on-demand-logo.png",type:"product"})}s(26103),s(12026);let ea={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"normal",border:0};function er(){let e=(0,l.A)(),t=(0,o.Ay)("destinations",{lang:e});return"ru"===e?(0,n.jsxs)("section",{style:ea,"aria-hidden":"false",children:[(0,n.jsx)("h1",{children:"Создайте свой аудиотур с ИИ — On Demand"}),(0,n.jsx)("p",{children:"On Demand от WeGoTrip генерирует персональный аудиогид для любого места на карте. Отметьте точку или постройте маршрут, выберите язык и голос озвучки — и получите готовую пешеходную экскурсию, которую можно слушать офлайн в приложении WeGoTrip."}),(0,n.jsx)("p",{children:"Экскурсию создаёт искусственный интеллект в реальном времени на основе достопримечательностей вокруг выбранной точки, поэтому она подходит для любого города мира, даже там, где нет готовых туров."}),(0,n.jsx)("h2",{children:"Как это работает"}),(0,n.jsxs)("ol",{children:[(0,n.jsx)("li",{children:"Выберите начальную точку или постройте маршрут на карте."}),(0,n.jsx)("li",{children:"Задайте радиус или конечную точку прогулки."}),(0,n.jsx)("li",{children:"Выберите язык аудиогида и голос озвучки."}),(0,n.jsx)("li",{children:"Сгенерируйте тур и слушайте его офлайн в приложении."})]}),(0,n.jsx)("h2",{children:"Частые вопросы"}),(0,n.jsx)("h3",{children:"Нужен ли интернет во время экскурсии?"}),(0,n.jsx)("p",{children:"Нет. Загрузите тур в приложении заранее — он работает офлайн."}),(0,n.jsx)("h3",{children:"На каких языках доступен аудиогид?"}),(0,n.jsx)("p",{children:"Вы выбираете язык и голос озвучки при создании тура."}),(0,n.jsx)("h3",{children:"В каких городах работает On Demand?"}),(0,n.jsx)("p",{children:"По всему миру — тур создаётся для любой точки на карте."}),(0,n.jsxs)("p",{children:["Уже готовые аудиотуры и билеты по городам мира смотрите в разделе"," ",(0,n.jsx)("a",{href:t,children:"все направления"}),"."]})]}):(0,n.jsxs)("section",{style:ea,"aria-hidden":"false",children:[(0,n.jsx)("h1",{children:"Create your own AI audio tour — On Demand"}),(0,n.jsx)("p",{children:"WeGoTrip On Demand generates a personalized audio guide for any spot on the map. Drop a starting point or draw a route, choose a language and a narration voice, and get a ready-made walking tour you can listen to offline in the WeGoTrip app."}),(0,n.jsx)("p",{children:"The tour is generated by AI in real time from the attractions around your chosen point, so it works for any city in the world — even where no pre-made tours exist yet."}),(0,n.jsx)("h2",{children:"How it works"}),(0,n.jsxs)("ol",{children:[(0,n.jsx)("li",{children:"Pick a starting point or draw a route on the map."}),(0,n.jsx)("li",{children:"Set a radius or an end point for your walk."}),(0,n.jsx)("li",{children:"Choose the audio-guide language and narration voice."}),(0,n.jsx)("li",{children:"Generate the tour and listen offline in the app."})]}),(0,n.jsx)("h2",{children:"Frequently asked questions"}),(0,n.jsx)("h3",{children:"Do I need the internet during the tour?"}),(0,n.jsx)("p",{children:"No. Download the tour in the app beforehand and it works fully offline."}),(0,n.jsx)("h3",{children:"Which languages are available?"}),(0,n.jsx)("p",{children:"You choose the audio-guide language and narration voice when you create the tour."}),(0,n.jsx)("h3",{children:"Which cities does On Demand cover?"}),(0,n.jsx)("p",{children:"Anywhere in the world — a tour is generated for any point you place on the map."}),(0,n.jsxs)("p",{children:["Browse ready-made audio tours and attraction tickets worldwide on"," ",(0,n.jsx)("a",{href:t,children:"all destinations"}),"."]})]})}let ei=function(){let[e,t]=(0,a.useState)("radius"),[s,r]=(0,a.useState)(null),[o,u]=(0,a.useState)(null),[m,j]=(0,a.useState)(1500),[_,f]=(0,a.useState)(0),[v,w]=(0,a.useState)(null),[k,y]=(0,a.useState)(null),[S,N]=(0,a.useState)([]),[C,P]=(0,a.useState)("manual"),A=(0,l.A)(),D=(e=null)=>{r(e),u(null),j(1500)},T=(0,a.useMemo)(()=>{switch(_){case 0:if("radius"===e)return!!(s&&m);
3if("path"===e)return!!(s&&o);break;case 1:return!!(v&&k);default:return!1}},[_,e,s,o,m,v,k]),I=(0,a.useMemo)(()=>0!==_,[_]),E=()=>{1===_&&(w(null),y(null),N([]),(0,p.Ay)("track","on_demand_parameters_back_click")),f(e=>e-1)};return(0,n.jsx)(d.A,{hideHeader:!0,footer:!1,title:i.Ru._({id:"I+T04Z"}),description:i.Ru._({id:"e72llj"}),children:(0,n.jsx)(g.Provider,{value:{mode:e,startingPoint:s,endingPoint:o,areaRadius:m,selectedLanguage:v,selectedVoice:k,selectedPlaces:S,selectedMethod:C,changeMode:e=>{D(s),t(e)},changeStartingPoint:r,changeEndingPoint:u,changeAreaRadius:j,changeSelectedLanguage:w,changeSelectedVoice:y,changeSelectedMethod:P,changeSelectedPlaces:N,resetTourGeography:D},children:(0,n.jsxs)("div",{className:"on-demand-widget",children:[(0,n.jsx)(en,{}),(0,n.jsx)(er,{}),(0,n.jsx)("div",{className:"on-demand-widget__header",children:(0,n.jsx)("a",{href:(0,c.$)(),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsx)("img",{width:"ru"===A?120:107,height:"ru"===A?45:40,title:"Powered by WeGoTrip",src:"ru"===A?x:h})})}),(0,n.jsx)("div",{className:"on-demand-widget__screen-container",children:[(0,n.jsx)(z,{},0),(0,n.jsx)(ee,{selectedPlaces:S,setSelectedPlaces:N,onClickPrev:E},1)][_]}),(0,n.jsx)("div",{className:"on-demand-widget__controls-container",children:(0,n.jsx)(b,{step:_+1,stepsTotal:3,disablePrev:!I,disableNext:!T,onClickNext:()=>
3{if(1===_){let t,n={language:v,voice:k.id,audioProvider:k.provider,selectedPlaces:S,selectedMethod:C,startingPoint:{latitude:s.lat,longitude:s.lng}};"path"===e?n.endingPoint={latitude:o.lat,longitude:o.lng}:"radius"===e&&(n.radius=m);let a=((t=new URL("/preparing",(0,c.$)())).hash=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),t.toString());return(0,p.Ay)("track","on_demand_tour_params_next_click"),window.open(a,"_blank","noopener,noreferrer")}0===_&&((0,p.Ay)("track","on_demand_map_next_click"),(0,p.H$)("track","on_demand_map_next_click")),f(e=>e+1)},onClickPrev:E})}),(0,n.jsx)(es,{})]})})})}}}]);
4//# sourceMappingURL=2904-257be243bd03812a.js.map
5//# debugId=f6f9f16d-7b59-5ac7-b44f-10078c203907

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.