1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8383],{86577:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/publish-ride",function(){return s(28340)}])},43110:function(e,t){"use strict";t.Z={src:"/_next/static/media/bankCard.8f01ed78.png",height:84,width:84,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEVMaXHTAAD/lwDVAAD9nQD6jgD/lgDWSgDNAAD9kwDXAADpFQDVBAD/SAD4MgD/cwDVAQDUAQD/pAD/owDgAABQ3F74AAAAE3RSTlMAGpdVLRpVAi7ul/f3/v725OUwiKCcmQAAAAlwSFlzAAALEwAACxMBAJqcGAAAADdJREFUeJxjYGdnYGBgAJGMzBxCbKwMDByCItz8wpwsDFwiPHy8nMJMCAaHAFQKpJgFpBiqnQEATA0CCQRnlSIAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},13322:function(e,t){"use strict";t.Z={src:"/_next/static/media/offer.6f60e418.png",height:468,width:699,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAASFBMVEWzspZsrZfbpSOfvn/FqD2S2Mg/f2o6hHQmiX2J0cYmkYa1tFfTuU2L18j/vC7WoR+Ctpmm5dqRyKGEy8JmuLL/vy+z9+qu0qVW7lCzAAAAFnRSTlMBzK3SNEAwXyDnkPk7gmNS2Ytw/iiN5X+p/wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC5JREFUeJwFwQkCgBAAALAVQpfS9f+ftkGeh1xgXUKZpC0++4jz/XpsSLVex80PFpIBNqqP2E0AAAAASUVORK5CYII=",blurWidth:8,blurHeight:5}},40089:function(e,t,s){"use strict";var a=s(85893),i=s(37871),l=s(68485),n=s(25675),r=s.n(n),c=s(8193);let d=e=>{let{title:t,dec:s,btn:n,onClick:d,onlyButton:x,values:o}=e,{isSmall:m,isMedium:u,isLarge:h,isXLarge:p,is2XLarge:g}=(0,l.F)(),b=m||u||h||p||g,{t:j}=(0,i.$G)();return x?(0,a.jsx)("div",{className:"text-center flex flex-col items-center justify-center w-full",children:(0,a.jsxs)("button",{onClick:()=>d(),className:"flex items-center gap-3 border-2 border-gray-300 rounded-full font-bold text-base text-primaryColor px-6 mt-3 py-2 sm:py-3 hover:bg-primaryColor hover:text-white duration-100",children:[(0,a.jsx)(c.Lh8,{})," ",j("pessanger.createAlert")]})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"text-center flex flex-col items-center sm:my-0 my-12 justify-center",children:[(0,a.jsx)(r(),{src:"/static/images/noRequest.svg",width:b?65:40,height:b?65:40,alt:"Empty",loading:"lazy"}),(0,a.jsx)("p",{className:"font-semibold sm:font-bold sm:text-xl text-sm sm:mb-2",children:j(t,o)}),(0,a.jsx)("p",{className:"sm:text-gray-600 text-gray-400 text-xs sm:text-base sm:mb-5",children:j(s)}),n&&(0,a.jsxs)("button",{onClick:()=>d(),className:"flex items-center gap-3 border-2 border-gray-300 rounded-full font-bold text-base text-primaryColor px-6 mt-3 py-2 sm:py-3 hover:bg-primaryColor hover:text-white duration-100",children:[(0,a.jsx)(c.Lh8,{})," ",j("pessanger.createAlert")]})]})})};t.Z=d},93480:function(e,t,s){"use strict";var a=s(85893),i=s(11163),l=s(94735),n=s(37871),r=s(53854);let c=()=>{let{t:e}=(0,n.$G)(),t=(0,i.useRouter)(),s=async()=>{t.back()},{locale:c}=t;return(0,a.jsxs)("div",{className:"w-max flex items-center gap-3 cursor-pointer mb-5 ml-2 mt-4",onClick:s,children:["ar"===c?(0,a.jsx)(r.WY3,{className:"md:text-2xl base:text-xl text-xl cursor-pointer animate-[gotoBack_1s_ease_infinite]"}):(0,a.jsx)(r.jTe,{className:"md:text-2xl base:text-xl text-xl cursor-pointer animate-[gotoBack_1s_ease_infinite]"})," ",(0,a.jsx)(l.Z,{text:e("common.back"),containerTag:"span",className:"md:text-lg base:text-base text-sm font-bold text-zinc-950"})]})};t.Z=c},68485:function(e,t,s){"use strict";s.d(t,{F:function(){return l}});var a=s(67294);let i={xxxs:325,xxs:380,xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},l=()=>{let[e,t]=(0,a.useState)(!1),[s,l]=(0,a.useState)(!1),[n,r]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),[x,o]=(0,a.useState)(!1),[m,u]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),[g,b]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=()=>{let{innerWidth:e}=window;t(e<i.xxxs),l(e<i.xxs),r(e<i.sm),d(e>=i.sm&&e<i.md),o(e>=i.md&&e<i.lg),u(e>=i.lg&&e<i.xl),p(e>=i.xl&&e<i["2xl"]),b(e>=i["2xl"])};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),{isXXXSmall:e,isXXSmall:s,isXSmall:n,isSmall:c,isMedium:x,isLarge:m,isXLarge:h,is2XLarge:g}}},8728:function(e,t,s){"use strict";s.d(t,{J:function(){return n},cn:function(){return l}});var a=s(90512),i=s(98388);function l(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,i.m6)((0,a.W)(t))}let n=e=>`https://pippipyalahcom.s3.eu-west-3.amazonaws.com/${e}`},28340:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return ec},default:function(){return ed}});var a=s(85893),i=s(11163),l=s(67294);
1s(41664);var n=s(52501),r=s(94735),c=s(40089),d=s(58881),x=s(93480),o=s(36503),m=s(23279),u=s.n(m),h=s(60155),p=s(5434),g=s(13034),b=s(37871);function j(){let{t:e}=(0,b.$G)(),t=(0,l.useRef)(""),[s,m]=(0,l.useState)(!1),[j,f]=(0,l.useState)(),[y,v]=(0,l.useState)(),N=(0,i.useRouter)(),w=N.locale,C=N.query,A=async()=>{m(!0);let e={keyword:t.current},s=await o.Z.getInstance().getCities(0,e);s&&(m(!1),v(null==s?void 0:s.data.cities))},Z=u()(A,800),_=e=>{t.current=e.target.value,Z()},I=e=>{N.push({query:{...C,acn:e.city_name,aId:e.city_id,step:5}})};return(0,l.useEffect)(()=>{let e=async()=>{m(!0);let e=await o.Z.getInstance().getCities(0),t=e.data.cities;f(t),t&&m(!1)};e()},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full py-[80px] overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsxs)("div",{className:"flex items-center flex-col gap-5 justify-center my-3 pb-4 border-b-2 border-slate-200 ",children:[(0,a.jsx)(r.Z,{text:"publishRide.cityOfArrival",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor "}),(0,a.jsx)("input",{type:"text",onChange:_,placeholder:e("publishRide.cityOfArrival"),className:"publish-input",dir:"ltr"})]}),(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"pessanger.suggestedCities",containerTag:"h3",className:"text-start md:text-lg base:text-base text-sm font-bold text-zinc-700 mb-2"}),s?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):t.current.length>0?y&&y.length>0?null==y?void 0:y.map((e,t)=>(0,a.jsx)("div",{onClick:()=>I(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==w?"sm:pl-10":"sm:pr-10"} ${C.acn==e.city_name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:" md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.city_name,containerTag:"h3",className:"text-zinc-900 md:text-lg text-base "})]}),(0,a.jsx)("div",{className:`${"ar"===w&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})}):j&&j.length>0?null==j?void 0:j.map((e,t)=>(0,a.jsx)("div",{onClick:()=>I(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==w?"sm:pl-10":"sm:pr-10"} ${C.acn==e.city_name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.city_name,containerTag:"h4",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===w&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:" md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"No Data Found"})})]})})]})}function f(){let[e,t]=(0,l.useState)(!1),[s,m]=(0,l.useState)(),[j,f]=(0,l.useState)(),{t:y}=(0,b.$G)(),v=(0,l.useRef)(""),N=(0,i.useRouter)(),w=N.locale,C=N.query;C.dcn;let A=C.dId,Z=C.acn,_=C.aId,I=async()=>{t(!0);let e={keyword:v.current},s=await o.Z.getInstance().getDistricts(_,0,e);s&&(t(!1),f(null==s?void 0:s.data.districts))},R=u()(I,800),$=e=>{v.current=e.target.value,R()},S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;N.push({query:{...C,adcn:e?e.name:"Other",adId:e?e.id:1,step:N.query.publishPage?15:A===_?9:6}})};return(0,l.useEffect)(()=>{let e=async()=>
1{if(t(!0),_){let e=await o.Z.getInstance().getDistricts(_,0),s=e.data.districts;m(s),s&&t(!1)}};e()},[_]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full py-[80px] overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsx)(r.Z,{text:y("publishRide.whichCityToDrop",{name:Z}),containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor "}),(0,a.jsx)("div",{className:"flex items-center flex-col gap-5 justify-center my-3 pb-4 border-b-2 border-slate-200 ",children:(0,a.jsx)("input",{type:"text",onChange:$,placeholder:y("publishRide.arrivalDistrict"),className:"publish-input",dir:"ltr"})}),(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.suggestedDistrict",containerTag:"h3",className:"text-start md:text-lg base:text-base text-sm font-bold text-zinc-700 mb-3"}),e?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):v.current.length>0?j&&j.length>0?null==j?void 0:j.map((e,t)=>(0,a.jsx)("div",{onClick:()=>S(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==w?"sm:pl-10":"sm:pr-10"} ${C.adcn==e.name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex gap-x-2 items-center",children:[(0,a.jsx)("div",{className:"bg-zinc-100 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===w&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})}):s&&s.length>0&&(0,a.jsx)(a.Fragment,{children:null==s?void 0:s.map((e,t)=>(0,a.jsx)("div",{onClick:()=>S(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==w?"sm:pl-10":"sm:pr-10"} ${C.adcn==e.name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-100 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===w&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:" md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t))}),(0,a.jsx)("div",{onClick:()=>S(),children:(0,a.jsxs)("div",{className:`relative ${"ar"==w?"sm:pl-10":"sm:pr-10"} flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-100 rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-100 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:"pessanger.other",containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===w&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})})]})})]})}var y=s(24351),v=s(89583);function N(){let[e,t]=(0,l.useState)(!1),[s,n]=(0,l.useState)(),m=(0,i.useRouter)(),u=m.locale;(0,l.useEffect)(()=>{localStorage.removeItem("retrun_ride");let e=async()=>{t(!0);let e=await o.Z.getInstance().getVehicles(0);e&&t(!1);let s=e.data.vehicles;n(s)};e()},[]);let j=()=>{m.push("/add-car/car-brands")},{t:f}=(0,b.$G)(),N=e=>{m.push({query:{...m.query,vn:`${e.brand_name}${e.model_name}`,vid:e.vehicle_id,step:m.query.publishPage?15:2}})};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(g.E.section,{className:"w-full py-[80px] overflow-hidden",initial:{y:100,opacity:0}
1,animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3",children:[(0,a.jsxs)("div",{className:"flex sm:items-center gap-5 justify-center my-5 pb-5 border-b-2 border-slate-200 md:flex-row flex-col md:justify-between",children:[(0,a.jsx)(r.Z,{text:"car.whichCarYouTaking",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl w-full font-bold sm:text-textColor "}),(0,a.jsx)("div",{className:"flex justify-center w-full",children:(0,a.jsx)(y.Z,{text:f("car.addAnotherCar"),className:"sm:!py-4 !py-2 font-normal bg-slate-200 text-zinc-900 hover:bg-slate-200 md:!w-full",leftIcon:(0,a.jsx)(h.xcL,{className:"mr-3"}),onClick:j})})]}),(0,a.jsx)(x.Z,{}),e?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):s&&s.length>0?null==s?void 0:s.map((e,t)=>(0,a.jsx)("div",{onClick:()=>N(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==u?"sm:pl-10":"sm:pr-10"} flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-100 rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex gap-x-2 items-center",children:[(0,a.jsx)("div",{className:"bg-slate-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(v.fSn,{className:" md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsx)(r.Z,{text:`${e.brand_name} ${e.model_name}`,containerTag:"h1",className:"text-zinc-700 md:text-lg base:text-base text-sm font-semibold"})}),(0,a.jsx)(r.Z,{text:`${e.plate_id} | ${e.plate_letter} | ${e.plate_region_number}`,containerTag:"h3",className:"md:text-base base:text-sm text-xs text-gray-500 font-medium flex items-center gap-1"})]})]}),(0,a.jsx)("div",{className:`${"ar"===m.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-700"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})})]})})})}var w=s(95284),C=s(52490),A=s(25968),Z=s(6226),_=s(30381),I=s.n(_),R=s(27484),$=s.n(R);let S={lang:{locale:"ar",weekStartsOn:0,weekdays:["Ø§ÙØ£ØØ¯","Ø§ÙØ§Ø«ÙÙÙ","Ø§ÙØ«Ùاثاء","Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡","Ø§ÙØ®Ù
ÙØ³","Ø§ÙØ¬Ù
عة","Ø§ÙØ³Ø¨Øª"],shortWeekDays:["Ø§ÙØ£ØØ¯","Ø§ÙØ§Ø«ÙÙÙ","Ø§ÙØ«Ùاثاء","Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡","Ø§ÙØ®Ù
ÙØ³","Ø§ÙØ¬Ù
عة","Ø§ÙØ³Ø¨Øª"],months:["ÙÙØ§Ùر","ÙØ¨Ø±Ø§Ùر","Ù
ارس","أبرÙÙ","Ù
اÙÙ","ÙÙÙÙÙ","ÙÙÙÙÙ","أغسطس","سبتÙ
بر","Ø£ÙØªÙبر","ÙÙÙÙ
بر","Ø¯ÙØ³Ù
بر"],shortMonths:["ÙÙØ§Ùر","ÙØ¨Ø±Ø§Ùر","Ù
ارس","أبرÙÙ","Ù
اÙÙ","ÙÙÙÙÙ","ÙÙÙÙÙ","أغسطس","سبتÙ
بر","Ø£ÙØªÙبر","ÙÙÙÙ
بر","Ø¯ÙØ³Ù
بر"],today:"اÙÙÙÙ
",now:"Ø§ÙØ¢Ù",backToToday:"Ø§ÙØ¹Ùدة Ø¥Ù٠اÙÙÙÙ
",ok:"Ù
ÙØ§ÙÙ",clear:"Ù
سØ",month:"Ø§ÙØ´Ùر",year:"Ø§ÙØ³ÙØ©",timeSelect:"Ø§Ø®ØªÙØ§Ø± اÙÙÙØª",dateSelect:"Ø§Ø®ØªÙØ§Ø± Ø§ÙØªØ§Ø±ÙØ®",monthSelect:"Ø§Ø®ØªÙØ§Ø± Ø§ÙØ´Ùر",yearSelect:"Ø§Ø®ØªÙØ§Ø± Ø§ÙØ³ÙØ©",decadeSelect:"Ø§Ø®ØªÙØ§Ø± Ø§ÙØ¹Ùد",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthFormat:"MMMM",monthBeforeYear:!0,previousMonth:"Ø§ÙØ´Ùر Ø§ÙØ³Ø§Ø¨Ù (PageUp)",nextMonth:"Ø§ÙØ´Ùر اÙÙØ§Ø¯Ù
(PageDown)",previousYear:"Ø§ÙØ³ÙØ© Ø§ÙØ³Ø§Ø¨ÙØ© (Control + left)",nextYear:"Ø§ÙØ³ÙØ© اÙÙØ§Ø¯Ù
Ø© (Control + right)",previousDecade:"Ø§ÙØ¹Ùد Ø§ÙØ³Ø§Ø¨Ù",nextDecade:"Ø§ÙØ¹Ùد اÙÙØ§Ø¯Ù
",previousCentury:"اÙÙØ±Ù Ø§ÙØ³Ø§Ø¨Ù",nextCentury:"اÙÙØ±Ù اÙÙØ§Ø¯Ù
"},timePickerLocale:{placeholder:"Ø§Ø®ØªÙØ§Ø± اÙÙÙØª"}},k={lang:{locale:"fr",weekStartsOn:1,weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],shortWeekDays:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Janvier","F\xe9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xfbt","Septembre","Octobre","Novembre","D\xe9cembre"],shortMonths:["Jan","F\xe9v","Mar","Avr","Mai","Juin","Juil","Ao\xfbt","Sept","Oct","Nov","D\xe9c"],today:"Aujourd'hui",now:"Maintenant",backToToday:"Retour \xe0 aujourd'hui",ok:"OK",clear:"Effacer",month:"Mois",year:"Ann\xe9e",timeSelect:"S\xe9lectionner l'heure",dateSelect:"S\xe9lectionner la date",monthSelect:"Choisir un mois",yearSelect:"Choisir une ann\xe9e",decadeSelect:"Choisir une d\xe9cennie",yearFormat:"YYYY",dateFormat:"DD/MM/YYYY",dayFormat:"D",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",monthFormat:"MMMM",monthBeforeYear:!1,previousMonth:"Mois pr\xe9c\xe9dent (Page pr\xe9c\xe9dente)",
1nextMonth:"Mois suivant (Page suivante)",previousYear:"Ann\xe9e pr\xe9c\xe9dente (Ctrl + gauche)",nextYear:"Ann\xe9e suivante (Ctrl + droite)",previousDecade:"D\xe9cennie pr\xe9c\xe9dente",nextDecade:"D\xe9cennie suivante",previousCentury:"Si\xe8cle pr\xe9c\xe9dent",nextCentury:"Si\xe8cle suivant"},timePickerLocale:{placeholder:"S\xe9lectionner l'heure"}};function z(){let e=(0,i.useRouter)(),t=(0,i.useRouter)().locale,s=e.query,{t:c}=(0,b.$G)(),[d,o]=(0,l.useState)(),m=null==d?void 0:d.format("YYYY-MM-DD"),[u,h]=(0,l.useState)(!1),p=e=>{o(e)},j=e=>{let t=e.isBefore(I()(),"day");return h(e.isBefore(I()(),"day")),t};(0,l.useEffect)(()=>{s.date?o(I()(s.date)):o(I()())},[s.date]);let f=()=>{e.push({query:{...s,date:m,step:10}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 pb-20 ",children:[(0,a.jsx)(r.Z,{text:"pessanger.whenAreYouGoing",containerTag:"h3",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mb-5"}),(0,a.jsx)(x.Z,{}),(0,a.jsx)("div",{dir:"ltr",children:(0,a.jsx)(w.Z,{headerRender:e=>{let{value:s,type:i,onChange:l,onTypeChange:n}=e,r=[],c=s.clone(),d=s.localeData(),x=[];for(let e=0;e<12;e++)c=c.month(e),x.push("fr"==t?k.lang.shortMonths[e]:"ar"==t?S.lang.shortMonths[e]:d.monthsShort(c));for(let e=0;e<12;e++)r.push((0,a.jsx)(C.Z.Option,{value:e,className:"month-item",children:x[e]},e));let o=s.year(),m=s.month(),u=[];for(let e=o-10;e<o+10;e+=1)u.push((0,a.jsx)(C.Z.Option,{value:e,className:"year-item",children:e},e));return(0,a.jsx)("div",{style:{padding:8,textAlign:"right"},children:(0,a.jsxs)(A.Z,{gutter:8,justify:"end",children:[" ",(0,a.jsx)(Z.Z,{children:(0,a.jsx)(C.Z,{size:"middle",dropdownMatchSelectWidth:!1,className:"my-year-select",value:o,onChange:e=>{let t=s.clone().year(e);l(t)},children:u})}),(0,a.jsx)(Z.Z,{children:(0,a.jsx)(C.Z,{size:"middle",dropdownMatchSelectWidth:!1,value:m,onChange:e=>{let t=s.clone().month(e);l(t)},children:r})})]})})},onSelect:p,disabledDate:j,value:$()(d),locale:"ar"===t?S:"fr"===t?k:void 0})}),u?(0,a.jsx)(y.Z,{text:c("common.continue"),className:"mt-3 mb-3 m-auto ",disabled:!0}):(0,a.jsx)("div",{onClick:f,children:(0,a.jsx)(y.Z,{text:c("common.continue"),className:"mt-3 mb-3 m-auto"})})]})})]})}function D(){let[e,t]=(0,l.useState)(!1),[s,n]=(0,l.useState)(),[m,j]=(0,l.useState)(),{t:f}=(0,b.$G)(),y=(0,l.useRef)(""),v=(0,i.useRouter)(),N=v.locale,w=v.query,C=async()=>{t(!0);let e={keyword:y.current},s=await o.Z.getInstance().getCities(0,e);s&&(t(!1),j(null==s?void 0:s.data.cities))},A=u()(C,800),Z=e=>{y.current=e.target.value,A()},_=e=>{v.push({query:{...w,dcn:e.city_name,dId:e.city_id,step:3}})};return(0,l.useEffect)(()=>{let e=async()=>{t(!0);let e=await o.Z.getInstance().getCities(0),s=e.data.cities;n(s),s&&t(!1)};e()},[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(g.E.section,{className:"w-full py-[80px] overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsxs)("div",{className:"flex items-center flex-col gap-5 justify-center my-3 pb-4 border-b-2 border-slate-200 ",children:[(0,a.jsx)(r.Z,{text:"publishRide.departureCity",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor "}),(0,a.jsx)("input",{type:"text",onChange:Z,placeholder:f("publishRide.departureCity"),className:"publish-input",dir:"ltr"})]}),(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"pessanger.suggestedCities",containerTag:"h3",className:"text-left md:text-lg base:text-base text-sm font-bold text-zinc-700 mb-2"}),e?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):y.current.length>0?m&&m.length>0?null==m?void 0:m.map((e,t)=>(0,a.jsx)("div",{onClick:()=>_(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==N?"sm:pl-10":"sm:pr-10"} ${w.dcn==e.city_name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.city_name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm"})]}),(0,a.jsx)("div",{className:`${"ar"===v.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"No Data Found"})}):s&&s.length>0?null==s?void 0:s.map((e,t)=>(0,a.jsx)("div",{onClick:()=>_(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==N?"sm:pl-10":"sm:pr-10"} ${w.dcn==e.city_name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.city_name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm"})]}),(0,a.jsx)("div",{className:`${"ar"===v.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoD
1ata"})})]})})})}function q(){var e;let[t,s]=(0,l.useState)(!1),[n,m]=(0,l.useState)(),[j,f]=(0,l.useState)(),[y,v]=(0,l.useState)(),{t:N}=(0,b.$G)(),w=(0,l.useRef)(""),C=(0,i.useRouter)(),A=C.locale,Z=C.query.dcn;C.query.dId;let _=async()=>{s(!0);let e={keyword:w.current},t=await o.Z.getInstance().getDistricts(C.query.dId,0,e);t&&(s(!1),f(null==t?void 0:t.data.districts))},I=u()(_,800),R=e=>{w.current=e.target.value,I()};(0,l.useEffect)(()=>{let e=localStorage.getItem("retrun_ride"),t=JSON.parse(e);v(t);let a=async()=>{if(s(!0),C.query.dId){let e=await o.Z.getInstance().getDistricts(C.query.dId,0),t=e.data.districts;m(t),t&&s(!1)}};a()},[C.query.dId]),null==y||null===(e=y.departure)||void 0===e||e.split("&&");let $=C.query.dcn,S=C.query.dId,k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(null==y?void 0:y.departure)?C.push({query:{...C.query,ddcn:e?e.name:"Other",ddId:e?e.id:1,acn:$,aId:S,step:C.query.publishPage?15:4}}):C.push({query:{...C.query,ddcn:e?e.name:"Other",ddId:e?e.id:1,step:C.query.publishPage?15:4}})};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(g.E.section,{className:"w-full py-[80px] overflow-hidden",initial:{y:160,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsxs)("div",{className:"flex items-center flex-col gap-5 justify-center my-3 pb-4 border-b-2 border-slate-200 ",children:[(0,a.jsx)(r.Z,{text:N("publishRide.whichDistrictToPick",{name:Z}),containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor "}),(0,a.jsx)("input",{type:"text",onChange:R,placeholder:N("publishRide.departureDistrict"),className:"publish-input",dir:"ltr"})]}),(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.suggestedDistrict",containerTag:"h3",className:"text-start md:text-lg base:text-base text-sm font-bold text-zinc-700 mb-2"}),t?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):w.current.length>0?j&&j.length>0?null==j?void 0:j.map((e,t)=>(0,a.jsx)("div",{onClick:()=>k(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==A?"sm:pl-10":"sm:pr-10"} ${C.query.ddcn==e.name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===C.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})}):n&&n.length>0&&(null==n?void 0:n.map((e,t)=>(0,a.jsx)("div",{onClick:()=>k(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==A?"sm:pl-10":"sm:pr-10"} ${C.query.ddcn==e.name?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm"})]}),(0,a.jsx)("div",{className:`${"ar"===C.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:" md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})},t))),(0,a.jsx)("div",{onClick:()=>k(),children:(0,a.jsxs)("div",{className:`relative ${"ar"==A?"sm:pl-10":"sm:pr-10"} flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-100 rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:"pessanger.other",containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm"})]}),(0,a.jsx)("div",{className:`${"ar"===C.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:" md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]})})]})})})}function T(){var e;let[t,s]=(0,l.useState)(!1),[m,p]=(0,l.useState)(),[j,f]=(0,l.useState)(),{t:v}=(0,b.$G)(),N=(0,l.useRef)(""),w=(0,i.useRouter)(),C=w.query,A=null===(e=C.intermediate)||void 0===e?void 0:e.split("&"),Z=null==A?void 0:A.map(e=>{let t=decodeURIComponent(e),s=t.split(","),a="",i="",l="",n="";
1return(s.forEach(e=>{let[t,s]=e.split("=");"cn"===t?a=s:"cId"===t?i=s:"cdn"===t?l=s:"cdid"===t&&(n=s)}),l&&n)?{city_name:a,city_id:i,city_address:l,city_districtId:n}:{city_name:a,city_id:i}}),[_,I]=(0,l.useState)(Z||[]),R=async()=>{s(!0);let e={keyword:N.current},t=await o.Z.getInstance().getCities(0,e);t&&(s(!1),f(null==t?void 0:t.data.cities))},$=u()(R,800),S=e=>{N.current=e.target.value,$()},k=e=>{_.some(t=>t.city_id==e.city_id)?I(_.filter(t=>t.city_id!=e.city_id)):_.length<2&&I([..._,e])},z=e=>{_.some(t=>t.city_id==e.city_id)?I(_.filter(t=>t.city_id!=e.city_id)):_.length<2&&I([..._,e])},D=()=>{let e=_.map(e=>{let t=`${encodeURIComponent("cn")}=${encodeURIComponent(e.city_name)},${encodeURIComponent("cId")}=${encodeURIComponent(e.city_id)},`;return e.city_address&&(t+=`${encodeURIComponent("cdn")}=${encodeURIComponent(e.city_address)},`,e.city_districtId&&(t+=`${encodeURIComponent("cdid")}=${encodeURIComponent(e.city_districtId)},`)),t}).join("&");_.length>0?w.push({query:{...C,intermediate:e,step:7}}):w.push({query:{...C,intermediate:[],step:w.query.publishPage?15:9}})};return(0,l.useEffect)(()=>{let e=async()=>{s(!0);let e=await o.Z.getInstance().getCities(0),t=e.data.cities;p(t),t&&s(!1)};e()},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 pb-20",children:[(0,a.jsx)(r.Z,{text:"publishRide.areYouPassingAnyCity",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor "}),(0,a.jsx)("div",{className:"flex items-center flex-col gap-5 justify-center my-3 pb-4 border-b-2 border-slate-200 ",children:(0,a.jsx)("input",{type:"text",onChange:S,placeholder:v("pessanger.departureCity"),className:"publish-input",dir:"ltr"})}),(0,a.jsx)(x.Z,{}),(0,a.jsxs)("div",{children:[t?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):N.current.length>0?j&&j.length>0?null==j?void 0:j.map((e,t)=>(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-50 rounded-2xl p-2 ",onClick:()=>z(e),children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,a.jsx)("div",{className:"bg-zinc-100 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.city_name,containerTag:"h3",className:"text-zinc-700 md:text-lg base:text-base text-sm"})]}),(0,a.jsx)("input",{type:"checkbox",checked:_.some(t=>t.city_id==e.city_id),onChange:()=>k(e),disabled:2==_.length&&!_.some(t=>t.city_id==e.city_id),className:"publish-ride-checkbox"})]},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})}):m&&m.length>0?null==m?void 0:m.map((e,t)=>(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-50 rounded-2xl p-2 ",onClick:()=>z(e),children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,a.jsx)("div",{className:"bg-zinc-100 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.city_name,containerTag:"h3",className:"text-zinc-700 md:text-lg base:text-base text-sm"})]}),(0,a.jsx)("input",{type:"checkbox",checked:_.some(t=>t.city_id==e.city_id),onChange:()=>k(e),disabled:2===_.length&&!_.some(t=>t.city_id==e.city_id),className:"publish-ride-checkbox"})]},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})}),(0,a.jsx)("div",{onClick:()=>D(),children:(0,a.jsx)(y.Z,{text:v("common.continue"),className:"mt-10 m-auto"})})]})]})})]})}var F=s(47516);function E(){var e;let t=(0,i.useRouter)(),s=t.query,{t:l}=(0,b.$G)(),c=t.query.acn,d=t.query.dcn,o=null===(e=s.intermediate)||void 0===e?void 0:e.split("&"),m=null==o?void 0:o.map(e=>{let t=decodeURIComponent(e),s=t.split(","),a="",i="",l="",n="";
1return(s.forEach(e=>{let[t,s]=e.split("=");"cn"===t?a=s:"cId"===t?i=s:"cdn"===t?l=s:"cdid"===t&&(n=s)}),l&&n)?{city_name:a,city_id:i,city_address:l,city_districtId:n}:{city_name:a,city_id:i}}),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;arguments.length>1&&void 0!==arguments[1]&&arguments[1],e?t.push({query:{...s,idn:e.city_name,idId:e.city_id,step:8}}):t.push({query:{...s,step:t.query.publishPage?15:9}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3",children:[(0,a.jsx)(r.Z,{text:"publishRide.addIntermediateDistrict",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mb-8"}),(0,a.jsx)(x.Z,{}),(0,a.jsxs)("div",{className:"px-3",children:[(0,a.jsxs)("div",{className:"flex gap-3 h-20 mb-5",children:[(0,a.jsxs)("div",{className:" flex items-center flex-col mt-2",children:[(0,a.jsx)("div",{className:"w-4 h-5 rounded-full border-[3px] border-gray-600 mb-2"}),(0,a.jsx)("div",{className:"border-l-2 border-gray-400 h-full border-dashed"})]}),(0,a.jsx)("div",{className:"flex items-start gap-3 text-gray-400",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 md:text-xl base:text-lg text-base",children:[(0,a.jsx)(h.UXH,{})," ",c&&c]})})]}),null==m?void 0:m.map((e,s)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b-2 border-slate-200 pb-3 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded-full border-[3px] border-primaryColor"}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 md:text-xl base:text-lg text-base",children:[(0,a.jsx)(h.UXH,{className:"text-gray-800"}),e.city_name]})]}),(0,a.jsx)("div",{className:`md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900 ${"ar"===t.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{})})]}),e.city_address?(0,a.jsxs)("div",{className:"md:text-lg base:text-base text-sm text-zinc-800 flex items-center justify-between gap-3 ",children:[(0,a.jsx)(r.Z,{text:`${e.city_address}`,containerTag:"h3"}),(0,a.jsx)("div",{onClick:()=>u(e,!0),children:(0,a.jsx)(r.Z,{text:"publishRide.edit",containerTag:"h3",className:"text-primaryColor cursor-pointer font-bold"})})]}):(0,a.jsx)("div",{onClick:()=>u(e,!0),children:(0,a.jsxs)("div",{className:"md:text-lg base:text-base text-sm font-bold text-primaryColor flex items-center gap-3 cursor-pointer ",children:[(0,a.jsx)(F.poH,{}),(0,a.jsx)(r.Z,{text:"publishRide.addDistrict",containerTag:"h3",className:" "})]})})]}),m.length>1&&0==s&&(0,a.jsx)("div",{className:"border-l-2 border-primaryColor h-6 border-dashed my-5 ml-[7px]"})]},s)),(0,a.jsxs)("div",{className:"flex gap-3 h-20 mb-5",children:[(0,a.jsxs)("div",{className:"flex items-center flex-col mb-1",children:[(0,a.jsx)("div",{className:"border-l-2 border-gray-400 h-full border-dashed mb-2"}),(0,a.jsx)("div",{className:"w-4 h-5 rounded-full border-[3px] border-gray-600"})]}),(0,a.jsx)("div",{className:"flex items-end gap-3 text-gray-400",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 md:text-xl base:text-lg text-base",children:[(0,a.jsx)(h.UXH,{})," ",d&&d]})})]}),(0,a.jsx)("div",{onClick:()=>u(),children:(0,a.jsx)(y.Z,{text:l("common.continue"),className:"mt-12 m-auto"})})]})]})})]})}function M(){var e;let[t,s]=(0,l.useState)(!1),[m,j]=(0,l.useState)(),[f,y]=(0,l.useState)(),{t:v}=(0,b.$G)(),N=(0,l.useRef)(""),w=(0,i.useRouter)(),C=w.locale,A=w.query,Z=w.query.idn,_=w.query.idId,I=null===(e=A.intermediate)||void 0===e?void 0:e.split("&"),R=null==I?void 0:I.map(e=>{let t=decodeURIComponent(e),s=t.split(","),a="",i="",l="",n="";return(s.forEach(e=>{let[t,s]=e.split("=");"cn"===t?a=s:"cId"===t?i=s:"cdn"===t?l=s:"cdid"===t&&(n=s)}),l&&n)?{city_name:a,city_id:i,city_address:l,city_districtId:n}:{city_name:a,city_id:i}}),$=R&&R.find(e=>e.city_id===_),S=e=>{$&&($.city_districtId=e.id,$.city_address=e.name);let t=R.map(e=>{let t=`${encodeURIComponent("cn")}=${encodeURIComponent(e.city_name)},${encodeURIComponent("cId")}=${encodeURIComponent(e.city_id)},`;return e.city_address&&(t+=`${encodeURIComponent("cdn")}=${encodeURIComponent(e.city_address)},`,e.city_districtId&&(t+=`${encodeURIComponent("cdid")}=${encodeURIComponent(e.city_districtId)},`)),t}).join("&");w.push({query:{...A,intermediate:t,step:7}})},k=async()=>{s(!0);let e={keyword:N.current},t=await o.Z.getInstance().getDistricts(_,0,e);t&&(s(!1),y(null==t?void 0:t.data.districts))},z=u()(k,800),D=e=>{N.current=e.target.value,z()};return(0,l.useEffect)(()=>{let e=async()=>
1{if(s(!0),_){let e=await o.Z.getInstance().getDistricts(_,0),t=e.data.districts;j(t),t&&s(!1)}};e()},[_]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:160,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsxs)("div",{className:"flex items-center flex-col gap-5 justify-center my-3 pb-4 border-b-2 border-slate-200 ",children:[(0,a.jsx)(r.Z,{text:v("publishRide.whichdistrict",{name:Z}),containerTag:"h1",className:"text-center md:text-3xl base:text-2xl text-xl font-bold text-textColor "}),(0,a.jsx)("input",{type:"text",onChange:D,placeholder:v("publishRide.cities"),className:"publish-input",dir:"ltr"})]}),(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.suggestedDistrict",containerTag:"h3",className:"text-start md:text-lg base:text-base text-sm font-bold text-zinc-700 mb-2"}),t?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):N.current.length>0?f&&f.length>0?null==f?void 0:f.map((e,t)=>(0,a.jsxs)("div",{className:`relative ${"ar"==C?"pl-10":"pr-10"} flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-100 rounded-2xl p-2 `,onClick:()=>S(e),children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===w.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:" md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})}):m&&m.length>0?null==m?void 0:m.map((e,t)=>(0,a.jsxs)("div",{className:`relative ${"ar"==C?"pl-10":"pr-10"} flex items-center justify-between gap-4 cursor-pointer hover:bg-gray-100 rounded-2xl p-2 `,onClick:()=>S(e),children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-zinc-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.UXH,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsx)(r.Z,{text:e.name,containerTag:"h3",className:"text-zinc-900 md:text-lg base:text-base text-sm "})]}),(0,a.jsx)("div",{className:`${"ar"===w.locale&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"absolute right-4 md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-900"})})]},t)):(0,a.jsx)("div",{className:"w-full flex items-center justify-center h-80",children:(0,a.jsx)(c.Z,{title:"common.NoData"})})]})})]})}var U=s(79352);function Y(){let e=(0,i.useRouter)(),t=e.query,s=e.locale,{t:l}=(0,b.$G)(),c=[{id:1,icon:(0,a.jsx)(p.vWI,{}),title:l("publishRide.small")},{id:2,icon:(0,a.jsx)(v.FZC,{}),title:l("publishRide.medium")},{id:3,icon:(0,a.jsx)(U.Wwf,{}),title:l("publishRide.large")}],d=t=>{e.push({query:{...e.query,luggage:t.id,step:e.query.publishPage?15:14}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3",children:[(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.luggageSize",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mt-2 mb-8"}),null==c?void 0:c.map((e,i)=>(0,a.jsx)("div",{onClick:()=>d(e),children:(0,a.jsxs)("div",{className:`relative ${"ar"==s?"sm:pl-10":"sm:pr-10"} ${t.luggage==e.id?"bg-gray-100":"hover:bg-gray-100"} flex items-center justify-between gap-4 cursor-pointer rounded-2xl p-2 `,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsxs)("div",{className:"bg-gray-200 rounded-lg flex items-center justify-center p-1.5 sm:p-3 base:text-xl text-lg sm:text-gray-600",children:[" ",e.icon]}),(0,a.jsx)(r.Z,{text:e.title,containerTag:"h1",className:"text-gray-700 md:text-lg base:text-base text-sm font-medium"})]}),(0,a.jsx)("div",{className:`${"ar"===s&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"text-2xl font-medium cursor-pointer text-zinc-700"})})]})},i))]})})]})}function P(){let e=(0,i.useRouter)(),t=e.query,{t:s}=(0,b.$G)(),[c,d]=(0,l.useState)(t.seat?Number(t.seat):1),o=()=>{4!=c&&d(c+1)},m=()=>{1!=c&&d(c-1)},u=()=>{e.push({query:{...t,seat:c,step:e.query.publishPage?15:12}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] overflow-hidden",initial:{y:100,opacity:0}
1,animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsx)("div",{className:"max-w-[470px] mx-auto",children:(0,a.jsx)(x.Z,{})}),(0,a.jsx)(r.Z,{text:"pessanger.numberOfSeats",containerTag:"h3",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mb-28"}),(0,a.jsxs)("div",{className:"max-w-md m-auto flex items-center justify-center gap-10 sm:justify-between h-full text-2xl md:text-3xl base:text-2xl text-xl5xl mb-40",children:[(0,a.jsx)("button",{className:"bg-white rounded-full w-10 h-10 flex items-center justify-center border-2 border-primaryColor text-primaryColor cursor-pointer select-none",onClick:m,disabled:1===c,children:"-"}),(0,a.jsx)("div",{className:"select-none md:text-5xl text-3xl",children:c}),(0,a.jsx)("button",{className:"bg-white rounded-full w-10 h-10 flex items-center justify-center border-2 border-primaryColor text-primaryColor cursor-pointer select-none",onClick:o,disabled:4===c,children:"+"})]}),(0,a.jsx)("div",{onClick:u,children:(0,a.jsx)(y.Z,{text:s("common.continue"),className:"mt-3 mb-3 m-auto "})})]})})]})}var G=s(51649),H=s(25675),X=s.n(H),L=s(43110),O=s(68485);function J(){let{isSmall:e,isMedium:t,isLarge:s,isXLarge:l,is2XLarge:c}=(0,O.F)(),d=e||t||s||l||c,o=(0,i.useRouter)(),m=o.query,{t:u}=(0,b.$G)(),h=()=>{o.push({query:{...m,step:15}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 mt-6",children:[(0,a.jsx)(x.Z,{}),(0,a.jsx)(G.ZtL,{className:"md:text-7xl base:text-6xl text-5xl text-darkRedColor mb-4 sm:mb-8"}),(0,a.jsx)(r.Z,{text:"publishRide.paymentDesc2",containerTag:"h1",className:"md:text-xl text-lg mb-4 sm:mb-8 font-semibold"}),(0,a.jsxs)("div",{className:"border-t border-gray-200 sm:p-3 py-3",children:[(0,a.jsx)(r.Z,{text:"publishRide.paymentAvailableWithIn",containerTag:"h1",className:"md:text-lg base:text-base mb-4 sm:mb-8 font-semibold"}),(0,a.jsxs)("div",{className:"flex items-center flex-wrap gap-3 justify-between px-3 sm:px-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-5",children:[(0,a.jsx)("div",{className:"bg-gray-100 rounded-lg flex items-center justify-center p-1 sm:p-3 md:text-2xl base:text-xl text-lg text-primaryColor",children:(0,a.jsx)(G.VmY,{size:d?26:20})}),(0,a.jsx)(r.Z,{text:"publishRide.wallet",containerTag:"h1",className:"md:text-lg base:text-base font-semibold"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-5",children:[(0,a.jsx)("div",{className:"bg-gray-100 rounded-lg flex items-center justify-center p-1 sm:p-3 md:text-2xl base:text-xl text-lg text-primaryColor",children:(0,a.jsx)(X(),{src:L.Z,width:d?26:20,height:d?26:20,alt:"MasterCard",loading:"lazy"})}),(0,a.jsx)(r.Z,{text:"publishRide.bankCard",containerTag:"h1",className:"md:text-lg base:text-base font-semibold"})]})]}),(0,a.jsx)("div",{onClick:h,children:(0,a.jsx)(y.Z,{text:u("common.continue"),className:"sm:mt-12 mt-6 mb-3 m-auto "})})]})]})})]})}var V=s(30568);function B(){let[e,t]=(0,l.useState)(!1),[s,c]=(0,l.useState)(),[m,u]=(0,l.useState)(),h=(0,i.useRouter)(),p=h.query,{t:j}=(0,b.$G)(),f=p.aId,v=p.dId,N=e=>{u(e)},w={from_city:v,to_city:f};(0,l.useEffect)(()=>{let e=async()=>{if(t(!0),f&&v){let e=await o.Z.getInstance().priceFairs(w),s=e.data.prices;c(s),u(s.recommendedPrice),s&&t(!1)}};e()},[p]);let C=()=>{h.push({query:{...p,price:m||(null==s?void 0:s.minPrice),step:h.query.publishPage?15:13}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md w-full mx-auto px-3 mb-12",children:[(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.whatIsSeatPrice",containerTag:"h3",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mb-12"}),e?(0,a.jsx)("div",{className:"w-full h-80",children:(0,a.jsx)(d.Z,{})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"w-full flex items-center justify-center flex-col gap-5 mb-12",children:[(0,a.jsxs)("h1",{className:"text-center md:text-6xl base:text-4xl text-3xl font-bold ",children:[m," ",(0,a.jsxs)("span",{className:" md:text-xl base:text-lg text-base uppercase",children:[" ",j("common.dhs")]})]}),(0,a.jsxs)("div",{className:"max-w-screen-md w-full",children:[(0,a.jsx)(V.Z,{min:null==s?void 0:s.minPrice,max:null==s?void 0:s.maxPrice,defaultValue:null==s?void 0:s.recommendedPrice,onChange:N,className:"antd-slider-track mb-20"}),(0,a.jsx)(r.Z,{text:`${j(m>(null==s?void 0:s.recommendedPrice)?"publishRide.notAttractive":"publishRide.attractive")}`,containerTag:"h6",className:`text-white rounded-3xl md:text-xl base:text-lg text-sm inline-block px-4 py-1 font-light mb-6 ${m>
1(null==s?void 0:s.recommendedPrice)?"bg-darkRedColor":"bg-primaryColor"}`}),(0,a.jsx)(r.Z,{text:"publishRide.suggested",containerTag:"h6",className:"mb-1 md:text-sm base:text-xs font-semibold"}),(0,a.jsx)(r.Z,{text:`${null==s?void 0:s.recommendedPrice} DHS ${j("publishRide.isPriceRecomended")}`,containerTag:"h5",className:"md:text-lg base:text-base text-sm mb-20"}),(0,a.jsxs)("div",{className:"w-full bg-gray-100 flex flex-col justify-center p-5",children:[(0,a.jsxs)("div",{className:" md:text-lg base:text-base text-sm mb-3 text-redColor flex items-center justify-between",children:[(0,a.jsx)(r.Z,{text:"publishRide.servicefees",containerTag:"h3"}),(0,a.jsx)(r.Z,{text:` - ${m/10} ${j("common.dhs")}`,containerTag:"h3"})]}),(0,a.jsxs)("div",{className:"md:text-lg base:text-base text-sm mb-3 text-redColor flex items-center justify-between",children:[(0,a.jsx)(r.Z,{text:"publishRide.vat",containerTag:"h3"}),(0,a.jsx)(r.Z,{text:`- ${parseFloat(m/10*.2).toFixed(2)} ${j("common.dhs")}`,containerTag:"h3"})]}),(0,a.jsxs)("div",{className:" md:text-lg base:text-base text-sm flex items-center justify-between",children:[(0,a.jsx)(r.Z,{text:"publishRide.whatyouget",containerTag:"h5"}),(0,a.jsx)(r.Z,{text:`${parseFloat(m-(m/10+m/10*.2)).toFixed(2)} ${j("common.dhs")}`,containerTag:"h5"})]})]})]})]}),(0,a.jsx)("div",{onClick:C,children:(0,a.jsx)(y.Z,{text:j("common.continue"),className:"mt-3 mb-3 m-auto "})})]})]})})]})}var W=s(11774),Q=s(454);function K(e){let{setSteps:t}=e,s=(0,i.useRouter)(),{t:n}=(0,b.$G)(),[c,x]=(0,l.useState)(!1),[m,u]=(0,l.useState)(!0),[p,j]=(0,l.useState)(!1),f=Q.Z.getItem(Q.Z.DEFINE_KEY.user),v=f&&(null==JSON?void 0:JSON.parse(f)),[N,w]=(0,l.useState)({is_verified:!1,allow_publish_ride:!1,status:"",refusedMessage:""});(0,l.useEffect)(()=>{C()},[]);let C=async()=>{try{await o.Z.getInstance().loadQR(),x("activeRide")}catch(t){let e=await o.Z.getInstance().getWallets();e.data.wallet_amount+e.data.gift_wallet<0?x("negativeAmount"):x(!1)}finally{u(!1)}},A=async()=>{if(c){j(!0);return}try{let e=await o.Z.getInstance().getDocumentsStatus();w(e.data),u(!1),!1===e.data.allow_publish_ride?s.push({pathname:"/verification",query:{pending:"pending"===e.data.status&&!1===e.data.allow_publish_ride}}):t(1)}catch(e){u(!1)}};return(0,a.jsx)(a.Fragment,{children:m?(0,a.jsx)("div",{className:"flex items-center h-screen justify-center",children:(0,a.jsx)(d.Z,{})}):(0,a.jsxs)(g.E.section,{className:"w-full pt-[100px] overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:[(0,a.jsx)(ee,{isVisible:p,setIsVisible:j,activeRide:"activeRide"==c}),(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 flex items-center justify-center flex-col min-h-44 mt-12 sm:mt-0",children:[(0,a.jsx)(r.Z,{text:`${null==v?void 0:v.first_name}, ${n("publishRide.areYouDriving")}`,containerTag:"h1",className:"sm:text-center md:text-4xl base:text-2xl text-xl font-bold mb-4 sm:mb-12 text-textClass"}),(0,a.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,a.jsx)(y.Z,{loading:m,text:n("publishRide.publishRide"),textClass:"sm:!font-bold !font-normal",onClick:()=>A(),className:c&&"sm:!py-4 font-medium bg-slate-200 text-zinc-900 hover:bg-slate-200 lg:!w-[40%] md:!w-[50%] !w-full !py-2",leftIcon:(0,a.jsx)(h.xcL,{className:`sm:mx-3 mx-2 ${c?"text-zinc-950 ":"text-white"} `})})})]})]})})}let ee=e=>{let{isVisible:t,setIsVisible:s,activeRide:i}=e;return(0,a.jsxs)(W.Z,{modalOpen:t,modalClose:s,children:[(0,a.jsx)(r.Z,{className:"font-bold text-xl",containerTag:"h1",text:"publishRide.cannotPost"}),(0,a.jsx)("div",{className:"mt-5 mb-16",children:(0,a.jsx)(r.Z,{className:"text-base font-medium",containerTag:"p",text:i?"publishRide.qrInProgress":"publishRide.negativeAmountDetected"})}),(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 ",children:(0,a.jsx)(y.Z,{onClick:()=>s(!1),text:"common.gotIt"})})]})};var et=s(2585),es=s(17474);function ea(){var e,t,s,c,d;let[m,u]=(0,l.useState)(!1),j=(0,i.useRouter)(),f=j.locale,N=j.query,{t:w}=(0,b.$G)(),C=N.dcn,A=N.dId,Z=(null===(e=N.ddcn)||void 0===e?void 0:e.toLowerCase())==="other"?w("pessanger.other"):N.ddcn,_=N.ddId,I=N.acn,R=N.aId,$=(null===(t=N.adcn)||void 0===t?void 0:t.toLowerCase())=="other"?w("pessanger.other"):N.adcn,S=N.adId,k=null===(s=N.intermediate)||void 0===s?void 0:s.split("&"),z=null==k?void 0:k.map(e=>{let t=decodeURIComponent(e),s=t.split(","),a="",i="",l="",n="";
1return(s.forEach(e=>{let[t,s]=e.split("=");"cn"===t?a=s:"cId"===t?i=s:"cdn"===t?l=s:"cdid"===t&&(n=s)}),l&&n)?{city_name:a,city_id:i,city_address:l,city_districtId:n}:{city_name:a,city_id:i}});N.vn;let D=N.vid,q=parseInt(null==N?void 0:N.price),T=parseInt(null==N?void 0:N.seat),F=null==N?void 0:N.time,E=null==N?void 0:N.date,M=parseInt(null==N?void 0:N.luggage),U=(null==N?void 0:N.update)=="true",Y=(null==N?void 0:N.reserved)=="true",P=[{icon:(0,a.jsx)(h.UXH,{}),title:w("publishRide.departureCity"),heading:C,cityDistrick:Z,disabled:Y,handleClick:function(){j.push({query:{...N,step:2,publishPage:!0}})}},{icon:(0,a.jsx)(h.UXH,{}),title:w("pessanger.arrivalCity"),heading:I,disabled:Y,cityDistrick:$,handleClick:function(){j.push({query:{...N,step:4,publishPage:!0}})}},{icon:(0,a.jsx)(h.UXH,{}),title:w("publishRide.intermediateCities"),disabled:Y,heading:`${(null==z?void 0:z.length)>0?`${null==z?void 0:null===(c=z[0])||void 0===c?void 0:c.city_name} ${(null==z?void 0:z[1])?", "+(null==z?void 0:null===(d=z[1])||void 0===d?void 0:d.city_name):""}`:w("publishRide.none")}`,handleClick:function(){j.push({query:{...N,step:6,publishPage:!0}})}},{icon:(0,a.jsx)(p.uk6,{}),title:w("publishRide.dateTime"),disabled:Y,heading:`${N.date} , ${N.time}`,handleClick:function(){j.push({query:{...N,step:9,publishPage:!0}})}},{icon:(0,a.jsx)(et.hCV,{}),title:w("common.seats"),heading:N.seat,handleClick:function(){j.push({query:{...N,step:11,publishPage:!0}})}},{icon:(0,a.jsx)(G.VmY,{}),title:w("common.price"),disabled:Y,heading:N.price,handleClick:function(){j.push({query:{...N,step:12,publishPage:!0}})}},{icon:(0,a.jsx)(v.FZC,{}),title:w("publishRide.luggage"),heading:w(1==N.luggage?"publishRide.small":2==N.luggage?"publishRide.medium":"publishRide.large"),handleClick:function(){j.push({query:{...N,step:13,publishPage:!0}})}}],H=[];(null==z?void 0:z.length)&&z.map(e=>{H=[...H,{district_id:parseInt(null==e?void 0:e.city_districtId),city_id:parseInt(e.city_id),address:" "}]});let X=async()=>{if(!m)try{var e,t;u(!0);let s={vehicle_id:parseInt(D),price:q,seats:T,luggage:M,leaving_date_time:`${E} ${F}`,from_city:parseInt(A),to_city:parseInt(R),from_district_id:parseInt(_),to_district_id:parseInt(S),from_city_address:["from_city_address"],to_city_address:["to_city_address"],intermediate_cities:(null==z?void 0:z.length)>0?H:[]},a=await o.Z.getInstance().publishRide(s);if(null===(e=a.data)||void 0===e?void 0:e.rideId){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"covoiturage_ride_published"});try{let e=`${C} ${Z}`,s=`${I} ${$}`;window.dataLayer.push({event:"covoiturageTotalPrice",ride_id:a.data.rideId,from:e,to:s,driver_id:null===(t=a.data)||void 0===t?void 0:t.userId,passengers:T,totalPrice:q})}catch(e){}}u(!1),(0,es.kG)({type:"success",messageShow:"Ride Publish"}),j.push({query:{...N,step:16}})}catch(e){u(!1),(0,es.kG)({type:es.C7.warning,messageShow:e.message})}},L=async()=>{if(!m){u(!0);let e={},t=parseInt(null==N?void 0:N.rideId);e={vehicle_id:parseInt(D),price:q,seats:T,luggage:M,leaving_date_time:`${E} ${F}`,from_city:parseInt(A),to_city:parseInt(R),from_district_id:parseInt(_),to_district_id:parseInt(S),from_city_address:["from_city_address"],to_city_address:["to_city_address"],intermediate_cities:(null==z?void 0:z.length)>0?H:[]};try{await o.Z.getInstance().updateRide(t,e),u(!1),(0,es.kG)({type:"success",messageShow:"Ride updated"}),j.push({query:{...N,step:16}})}catch(e){u(!1),(0,es.kG)({type:es.C7.warning,messageShow:e.message})}}};return(0,l.useEffect)(()=>{delete j.query.publishPage},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:160,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 mb-12",children:[(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.recap",containerTag:"h1",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mb-6"}),P.map((e,t)=>(0,a.jsx)("div",{"aria-disabled":e.disabled,onClick:e.disabled?null:e.handleClick,children:(0,a.jsxs)("div",{className:`relative ${"ar"==f?"sm:pl-10":"sm:pr-10"} flex items-center justify-between gap-5 cursor-pointer px-2 py-3 min-h-20 mb-2 border-b border-gray-200 ${e.disabled?"opacity-50":""}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)("div",{className:"bg-gray-100 rounded-lg flex items-center justify-center p-3 md:text-2xl base:text-xl text-lg text-zinc-700",children:e.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)(r.Z,{text:e.title,containerTag:"h1",className:" md:text-sm base:text-xs text-xs text-neutral-600"}),(0,a.jsx)(r.Z,{text:e.heading,containerTag:"h1",className:"text-neutral-800 md:text-lg base:text-base text-sm font-semibold"}),(null==e?void 0:e.cityDistrick)&&(0,a.jsx)(r.Z,{text:e.cityDistrick,containerTag:"h1",className:"text-neutral-800 md:text-base base:text-sm text-xs "})]})]}),(0,a.jsx)("div",{className:`${"ar"===f&&"rotate-180"}`,children:(0,a.jsx)(p.AeI,{className:"md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-700"})})]})}
1,t)),(0,a.jsx)(y.Z,{text:w("publishRide.publishNow"),className:"mt-12 m-auto ",onClick:U?L:X,loading:m})]})})]})}var ei=s(13322);function el(){var e,t,s;let c=(0,i.useRouter)(),d=c.query,[x,o]=(0,l.useState)(),{t:m}=(0,b.$G)(),u=null===(e=d.arrival)||void 0===e?void 0:e.split("&&");null==u||null===(t=u[0])||void 0===t||t.split("=")[1],null==u||null===(s=u[1])||void 0===s||s.split("=")[1];let h=()=>{let e=JSON.stringify(d);localStorage.setItem("retrun_ride",e),c.push({query:{...d,step:3}})},p=()=>{c.push("/rides")};return(0,l.useEffect)(()=>{let e=localStorage.getItem("retrun_ride");o(e)},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto pt-6 md:pt-12 py-3 overflow-visible flex flex-col px-5",children:[(0,a.jsx)("div",{className:"relative md:w-[400px] base:w-[300px] w-[200px] h-[200px] mb-12 select-none m-auto",children:(0,a.jsx)(X(),{src:ei.Z,fill:!0,alt:"Image",loading:"lazy"})}),(0,a.jsxs)("div",{className:"mb-20 text-center",children:[(0,a.jsx)(r.Z,{text:"publishRide.congrats",containerTag:"h1",className:" md:text-3xl base:text-2xl text-xl font-extrabold mb-3"}),(0,a.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,a.jsx)(r.Z,{text:"publishRide.keepCheckingOrer",containerTag:"h1",className:" md:text-2xl base:text-xl text-lg text-gray-500 max-w-md"})})]}),(0,a.jsxs)("div",{className:"w-full sm:w-[50%] mx-auto flex flex-col items-center justify-center gap-3",children:[(0,a.jsx)("button",{className:"bg-primaryColor border-2 border-primaryColor py-3 rounded-full w-full text-white mb-3 duration-300 hover:bg-white hover:text-primaryColor md:text-base base:text-sm text-xs ",onClick:p,children:m("publishRide.offerstatus")}),!x&&(0,a.jsx)("button",{className:"bg-white border-2 border-primaryColor py-3 rounded-full w-full text-primaryColor duration-300 hover:bg-primaryColor hover:text-white md:text-base base:text-sm text-xs ",onClick:h,children:m("publishRide.publishreturn")})]})]})})]})}var en=s(68351);function er(){let[e,t]=(0,l.useState)(!1),s=(0,i.useRouter)(),c=s.query,{t:d}=(0,b.$G)(),o="HH:mm",m=c.date,u=c.dId,h=c.time,p=c.aId,j=m==$()().format("YYYY-MM-DD"),[f,v]=(0,l.useState)(j?$()().add(1,"hour"):$()().minute(0).hour(0)),N=u===p,w=(e,s)=>{v(e),j?t(!e||N&&j&&15>e.diff($()(),"minute")||!N&&j&&0>=e.diff($()(),"hour")):t(!1)},C=e=>{let t=f.$H,s=f.$m,a=()=>j?Array.from({length:N?t:t+1},(e,t)=>t):[],i=e=>N&&j?Array.from({length:s+15},(e,t)=>t):[],l=(e,t)=>[];return{disabledHours:a,disabledMinutes:i,disabledSeconds:l}},A=()=>{s.push({query:{...c,time:null==f?void 0:f.format(o),step:s.query.publishPage?15:11}})};return(0,l.useEffect)(()=>{h&&v($()(h,o))},[h]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{}),(0,a.jsx)(g.E.section,{className:"w-full pt-[100px] pb-6 overflow-hidden",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3},children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 ",children:[(0,a.jsx)(x.Z,{}),(0,a.jsx)(r.Z,{text:"publishRide.whatTimeYouAreLeaving",containerTag:"h3",className:"sm:text-center md:text-3xl base:text-2xl text-xl font-bold sm:text-textColor mb-12"}),(0,a.jsx)("div",{className:"w-full h-40 flex items-center justify-center mb-12",children:(0,a.jsx)(en.Z,{disabledTime:j?C:null,value:f,format:o,onChange:w,className:"publishRide_timePicker"})}),e?(0,a.jsx)(y.Z,{text:d("common.continue"),className:"mt-3 mb-3 m-auto ",disabled:!0}):(0,a.jsx)("div",{onClick:A,children:(0,a.jsx)(y.Z,{text:d("common.continue"),className:"mt-3 mb-3 m-auto "})})]})})]})}var ec=!0;function ed(){let e=(0,i.useRouter)(),{step:t}=e.query,[s,n]=(0,l.useState)(0),[r,c]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{t&&n(t),c(!1)},[t]),(t||!(s>1))&&!r)return(0,a.jsxs)(a.Fragment,{children:[0==s&&(0,a.jsx)(K,{setSteps:n}),1==s&&(0,a.jsx)(N,{}),2==s&&(0,a.jsx)(D,{}),3==s&&(0,a.jsx)(q,{}),4==s&&(0,a.jsx)(j,{}),5==s&&(0,a.jsx)(f,{}),6==s&&(0,a.jsx)(T,{}),7==s&&(0,a.jsx)(E,{}),8==s&&(0,a.jsx)(M,{}),9==s&&(0,a.jsx)(z,{}),10==s&&(0,a.jsx)(er,{}),11==s&&(0,a.jsx)(P,{}),12==s&&(0,a.jsx)(B,{}),13==s&&(0,a.jsx)(Y,{}),14==s&&(0,a.jsx)(J,{}),15==s&&(0,a.jsx)(ea,{}),16==s&&(0,a.jsx)(el,{})]})}}},function(e){e.O(0,[9731,6764,7518,748,8971,4330,7958,9583,6284,5434,8193,155,232,5048,9091,6505,7673,9352,1649,6679,2596,316,6864,2585,7516,568,5284,2155,2501,4920,7066,3109,1245,9763,381,2805,3033,6909,5847,1485,4157,453,4046,2888,6816,5960,745,6209,179],function(){return e(e.s=86577)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.