PageSourceSearch

https://amani.ae/_next/static/chunks/app/%5Blocale%5D/layout-ad8c1f9e6c2d1bf7.js

js amani.ae collected 2026-10-10 01:02:52 UTC 62,422 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{483:(e,t,l)=>{"use strict";l.d(t,{default:()=>z});var n=l(4624),a=l(9356);let r="amani_chat_session_id",o="amani_chat_history";function s(e){try{sessionStorage.setItem(o,JSON.stringify(e.slice(-50)))}catch(e){sessionStorage.removeItem(o)}}let c=()=>(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,n.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]}),i=()=>(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),(0,n.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,n.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),(0,n.jsx)("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}),d=()=>(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,n.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,n.jsx)("polyline",{points:"21 15 16 10 5 21"})]}),u=()=>(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),x=()=>(0,n.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,n.jsx)("path",{d:"M19 6l-1 14H6L5 6"}),(0,n.jsx)("path",{d:"M10 11v6"}),(0,n.jsx)("path",{d:"M14 11v6"}),(0,n.jsx)("path",{d:"M9 6V4h6v2"})]}),p=()=>(0,n.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),(0,n.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),m=()=>(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),h=()=>(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,n.jsx)("polyline",{points:"1 20 1 14 7 14"}),(0,n.jsx)("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]}),g=()=>(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M17.8 19.2L16 11l3.5-3.5C21 6 21 4 19 2c-2-2-4-2-5.5-.5L10 5 1.8 6.2l-1 1L7 9l-2 3 3 2 1.5-3 4.5 4.5z"})}),b=()=>(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),(0,n.jsx)("polyline",{points:"9 22 9 12 15 12 15 22"})]}),y=()=>(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),(0,n.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,n.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,n.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),f=e=>{let{filled:t}=e;return(0,n.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})},v=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("polyline",{points:"16 16 12 12 8 16"}),(0,n.jsx)("line",{x1:"12",y1:"12",x2:"12",y2:"21"}),(0,n.jsx)("path",{d:"M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"})]}),j=()=>(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}),k=()=>(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,n.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,n.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]});function w(e){var t,l,a,r,o;let{data:s,colors:c}=e,i=null!=(t=null==s?void 0:s.booking_ref)?t:"",d=null!=(l=null==s?void 0:s.label)?l:"Voucher",u=null!=(a=null==s?void 0:s.file_url)?a:"",x=null!=(o=({package_voucher:"\uD83D\uDCE6",flight_itinerary:"✈️",transfer_voucher:"\uD83D\uDE8C",hotel_voucher:"\uD83C\uDFE8"})[null!=(r=null==s?void 0:s.document_type)?r:""])?o:"\uD83D\uDCC4";return(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(c.accent,"40")},children:[(0,n.jsxs)("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"linear-gradient(135deg, ".concat(c.headerGradientStart,", ").concat(c.headerGradientEnd,")")},children:[(0,n.jsx)("span",{className:"text-base",children:x}),(0,n.jsx)("p",{className:"text-xs font-bold text-white",children:d})]}),(0,n.jsxs)("div",{className:"p-3 space-y-2",style:{background:c.bubbleBot},children:[i&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(c.text,"70")},children:"Booking Ref"}),(0,n.jsx)("span",{style:{color:c.text},children:i})]}),u&&(0,n.jsxs)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full text-center py-2 rounded-lg text-xs font-bold mt-1 transition-opacity hover:opacity-80",style:{background:c.accent,color:c.primary},children:[(0,n.jsx)(k,{}),"Download ",d]})]})]})}function N(e){var t,l,a;let{data:r,colors:o,onAction:s}
1=e,c=null!=(t=null==r?void 0:r.extras)?t:[],i=new Set((null!=(l=null==r?void 0:r.booked_extra_ids)?l:[]).map(String)),d=null!=(a=null==r?void 0:r.booking_ref)?a:"";return c.length?(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(o.accent,"40")},children:[(0,n.jsxs)("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"linear-gradient(135deg, ".concat(o.headerGradientStart,", ").concat(o.headerGradientEnd,")")},children:[(0,n.jsx)("span",{className:"text-base",children:"\uD83C\uDF81"}),(0,n.jsx)("p",{className:"text-xs font-bold text-white",children:"Available Extras"})]}),(0,n.jsx)("div",{className:"divide-y",style:{background:o.bubbleBot,borderColor:"".concat(o.accent,"20")},children:c.map(e=>{let t=i.has(String(e.id));return(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("p",{className:"text-xs font-semibold truncate",style:{color:o.text},children:e.name}),e.description&&(0,n.jsx)("p",{className:"text-xs opacity-60 truncate",style:{color:o.text},children:e.description}),null!=e.price&&(0,n.jsxs)("p",{className:"text-xs font-bold mt-0.5",style:{color:o.accent},children:["AED ",e.price.toLocaleString()]})]}),(0,n.jsx)("button",{onClick:()=>s(t?"remove_extra":"add_extra",{booking_ref:d,extra_id:e.id,extra_name:e.name}),className:"shrink-0 text-xs px-2.5 py-1 rounded-full font-semibold transition-all active:scale-95",style:{background:t?"".concat(o.accent,"20"):o.accent,color:t?o.accent:o.primary,border:"1px solid ".concat(o.accent)},children:t?"Remove":"Add"})]},String(e.id))})})]}):null}let C=()=>(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),(0,n.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]});function _(e){var t,l,a,r,o;let{data:s,colors:c}=e,i=null!=(t=null==s?void 0:s.currency)?t:"AED",d="number"==typeof(null==s?void 0:s.amount)?s.amount:parseFloat(String(null!=(l=null==s?void 0:s.amount)?l:"0")),u=null!=(a=null==s?void 0:s.booking_ref)?a:"",x=null!=(r=null==s?void 0:s.package_name)?r:"",p=null!=(o=null==s?void 0:s.payment_url)?o:"";return(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(c.accent,"40")},children:[(0,n.jsxs)("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"linear-gradient(135deg, ".concat(c.headerGradientStart,", ").concat(c.headerGradientEnd,")")},children:[(0,n.jsx)("span",{style:{color:"white"},children:(0,n.jsx)(C,{})}),(0,n.jsx)("p",{className:"text-xs font-bold text-white",children:"\uD83D\uDCB3 Secure Payment"})]}),(0,n.jsxs)("div",{className:"p-3 space-y-2",style:{background:c.bubbleBot},children:[x&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(c.text,"70")},children:"Package"}),(0,n.jsx)("span",{style:{color:c.text,fontWeight:600},children:x})]}),u&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(c.text,"70")},children:"Booking Ref"}),(0,n.jsx)("span",{style:{color:c.text},children:u})]}),(0,n.jsxs)("div",{className:"flex justify-between text-xs font-bold pt-1.5 border-t",style:{borderColor:"".concat(c.accent,"30")},children:[(0,n.jsx)("span",{style:{color:c.text},children:"Amount Due"}),(0,n.jsxs)("span",{style:{color:c.accent},children:[i," ",d.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),p&&(0,n.jsx)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"block w-full text-center py-2 rounded-lg text-xs font-bold mt-1 transition-opacity hover:opacity-80",style:{background:c.accent,color:c.primary},children:"Pay Now \uD83D\uDCB3"})]})]})}function S(e){var t,l,a;let{data:r,colors:o,onSelect:s}=e,c=null!=(l=null!=(t=null==r?void 0:r.items)?t:null==r?void 0:r.packages)?l:[];return c.length?(0,n.jsxs)("div",{className:"mt-2 space-y-3",children:[((null==r?void 0:r.title)||(null==r?void 0:r.label))&&(0,n.jsx)("p",{className:"text-xs font-semibold opacity-80 px-1",style:{color:o.text},children:null!=(a=r.title)?a:r.label}),c.map((e,t)=>{var l,a,r,c,i,d;return(0,n.jsxs)("div",{className:"rounded-xl overflow-hidden border",style:{borderColor:"".concat(o.accent,"50"),background:o.bubbleBot},children:[e.image&&(0,n.jsx)("img",{src:e.image,alt:e.name,className:"w-full h-32 object-cover"}),(0,n.jsxs)("div",{className:"p-3",children:[(0,n.jsxs)("p",{className:"text-[11px] font-bold uppercase tracking-wide opacity-50 mb-0.5",style:{color:o.accent},children:["OPTION ",null!=(l=e.index)?l:t+1]}),(0,n.jsx)("p",{className:"text-sm font-semibold leading-snug",style:{color:o.text},children:e.name}),(void 0!==e.rating||void 0!==e.stars)&&(0,n.jsx)("div",{className:"flex gap-0.5 mt-1",style:{color:o.accent},children:[1,2,3,4,5].map(t=>{var l;return(0,n.jsx)(f,{filled:t<=(Number(null!=(l=e.stars)?l:e.rating)||0)},t)})}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[(null!=(a=e.departure_date)?a:e.date)&&(0,n.jsxs)("span",{className:"flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full",style:{background:"".concat(o.accent,"18"),color:o.text},children:[(0,n.jsx)(y,{})," ",null!=(r=e.departure_date)?r:e.date]}),e.airline&&(0,n.jsxs)("span",{className:"flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full",style:{background:"".concat(o.accent,"18"),color:o.text},children:[(0,n.jsx)(g,{})," ",e.airline]}),e.hotel&&(0,n.jsxs)("span",{className:"flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full",style:{background:"".concat(o.accent,"18"),color:o.text},children:[(0,n.jsx)(b,{})," ",e.hotel]})]}),void 0!==e.price&&(0,n.jsx)("p",{className:"text-sm font-bold mt-2",style:{color:o.accent},children:e.price?"".concat(null!=(c=e.currency)?c:"AED"," ").concat(e.price.toLocaleStr
1ing()):"— AED"}),(0,n.jsx)("button",{onClick:()=>s(e,"select_package"),className:"w-full mt-2 py-2 rounded-lg text-xs font-semibold border transition-opacity hover:opacity-80",style:{borderColor:o.accent,color:o.accent,background:"transparent"},children:"Select This Package"})]})]},(null!=(d=null!=(i=e.id)?i:e.index)?d:t).toString())})]}):null}function D(e){var t;let{data:l,colors:a,onSelect:r}=e,o=null!=(t=null==l?void 0:l.options)?t:[];return(0,n.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:o.map((e,t)=>(0,n.jsx)("button",{onClick:()=>r(e),className:"text-xs px-3 py-1.5 rounded-full border transition-colors hover:opacity-80",style:{borderColor:a.accent,color:a.accent,background:"transparent"},children:e},t))})}function T(e){let{data:t,colors:l,onSelect:r}=e,[o,s]=(0,a.useState)("");return(0,n.jsxs)("div",{className:"mt-2 space-y-2",children:[(null==t?void 0:t.label)&&(0,n.jsx)("p",{className:"text-xs opacity-80",style:{color:l.text},children:t.label}),(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("input",{type:"date",value:o,min:null==t?void 0:t.min,max:null==t?void 0:t.max,onChange:e=>s(e.target.value),className:"flex-1 rounded-lg px-3 py-1.5 text-sm border outline-none",style:{background:l.background,color:l.text,borderColor:"".concat(l.accent,"60")}}),(0,n.jsx)("button",{onClick:()=>o&&r(o),disabled:!o,className:"px-3 py-1.5 rounded-lg text-xs font-semibold disabled:opacity-40",style:{background:l.accent,color:l.primary},children:"Confirm"})]})]})}function E(e){let{data:t,colors:l,onConfirm:r}=e,[o,s]=(0,a.useState)(2),[c,i]=(0,a.useState)(0),d=e=>{let{label:t,value:a,onChange:r}=e;return(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("span",{className:"text-sm font-medium",style:{color:l.text},children:t}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{onClick:()=>r(Math.max(0,a-1)),className:"w-7 h-7 rounded-full flex items-center justify-center text-base font-bold border",style:{borderColor:l.accent,color:l.accent,background:"transparent"},children:"−"}),(0,n.jsx)("span",{className:"text-sm font-semibold w-4 text-center",style:{color:l.text},children:a}),(0,n.jsx)("button",{onClick:()=>r(a+1),className:"w-7 h-7 rounded-full flex items-center justify-center text-base font-bold border",style:{borderColor:l.accent,color:l.accent,background:"transparent"},children:"+"})]})]})};return(0,n.jsxs)("div",{className:"mt-2 rounded-xl p-4 space-y-4",style:{background:l.bubbleBot,border:"1px solid ".concat(l.accent,"30")},children:[(null==t?void 0:t.label)&&(0,n.jsx)("p",{className:"text-sm font-semibold",style:{color:l.text},children:t.label}),(0,n.jsx)(d,{label:"بالغين",value:o,onChange:s}),(0,n.jsx)(d,{label:"أطفال",value:c,onChange:i}),(0,n.jsx)("button",{onClick:()=>r({adults:o,children:c}),className:"w-full py-2 rounded-lg text-sm font-semibold mt-1",style:{background:l.accent,color:l.primary},children:"Confirm"})]})}function B(e){var t,l;let{data:a,colors:r}=e;return(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(r.accent,"40")},children:[(0,n.jsxs)("div",{className:"px-3 py-2",style:{background:"linear-gradient(135deg, ".concat(r.headerGradientStart,", ").concat(r.headerGradientEnd,")")},children:[(0,n.jsx)("p",{className:"text-xs font-bold text-white",children:null!=(t=null==a?void 0:a.package_name)?t:"Package Summary"}),(null==a?void 0:a.destination)&&(0,n.jsx)("p",{className:"text-xs text-white/70",children:a.destination})]}),(0,n.jsxs)("div",{className:"p-3 space-y-1.5",style:{background:r.bubbleBot},children:[(null==a?void 0:a.departure)&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(r.text,"80")},children:"Departure"}),(0,n.jsx)("span",{style:{color:r.text},children:a.departure})]}),(null==a?void 0:a.return)&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(r.text,"80")},children:"Return"}),(0,n.jsx)("span",{style:{color:r.text},children:a.return})]}),((null==a?void 0:a.adults)!==void 0||(null==a?void 0:a.children)!==void 0)&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(r.text,"80")},children:"Travelers"}),(0,n.jsx)("span",{style:{color:r.text},children:[a.adults&&"".concat(a.adults," adult").concat(a.adults>1?"s":""),a.children&&"".concat(a.children," child").concat(a.children>
11?"ren":""),a.infants&&"".concat(a.infants," infant").concat(a.infants>1?"s":"")].filter(Boolean).join(", ")})]}),(null==a?void 0:a.total)!==void 0&&(0,n.jsxs)("div",{className:"flex justify-between text-xs font-bold pt-1 border-t",style:{borderColor:"".concat(r.accent,"30")},children:[(0,n.jsx)("span",{style:{color:r.text},children:"Total"}),(0,n.jsxs)("span",{style:{color:r.accent},children:[null!=(l=a.currency)?l:"AED"," ",a.total.toLocaleString()]})]}),(null==a?void 0:a.booking_url)&&(0,n.jsx)("a",{href:a.booking_url,className:"block w-full text-center py-1.5 rounded-lg text-xs font-semibold mt-2",style:{background:r.accent,color:r.primary},children:"Book Now"})]})]})}function L(e){var t,l,a;let{data:r,colors:o,onSelect:s}=e,c=null!=(l=null!=(t=null==r?void 0:r.flights)?t:null==r?void 0:r.options)?l:[],i=null!=(a=null==r?void 0:r.title)?a:null==r?void 0:r.label;return(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(o.accent,"40")},children:[(0,n.jsxs)("div",{className:"px-3 py-2",style:{background:"linear-gradient(135deg, ".concat(o.headerGradientStart,", ").concat(o.headerGradientEnd,")")},children:[(0,n.jsxs)("p",{className:"text-xs font-bold text-white flex items-center gap-1",children:[(0,n.jsx)(g,{})," ",null!=i?i:"Select Your Flight"]}),(null==r?void 0:r.date)&&(0,n.jsxs)("p",{className:"text-[10px] text-white/70 mt-0.5",children:["Date: ",r.date]})]}),(0,n.jsxs)("div",{className:"divide-y",style:{background:o.bubbleBot,borderColor:"".concat(o.accent,"20")},children:[c.map((e,t)=>{var l,a,r,c;let i=null!=(l=e.min_price)?l:e.price,d="string"==typeof i?parseFloat(i):i;return(0,n.jsxs)("button",{onClick:()=>s(e),className:"w-full text-left px-3 py-2.5 transition-opacity hover:opacity-80 flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,n.jsxs)("span",{className:"text-xs font-bold flex items-center gap-1",style:{color:o.text},children:["✈️ ",null!=(a=e.airline)?a:"Airline"]}),e.departure_city&&(0,n.jsx)("span",{className:"text-[10px] opacity-60",style:{color:o.text},children:e.departure_city}),e.departure_time&&(0,n.jsxs)("span",{className:"text-[10px] opacity-60",style:{color:o.text},children:[e.departure_time,e.arrival_time?" → ".concat(e.arrival_time):"",e.duration?" \xb7 ".concat(e.duration):""]})]}),void 0!==d&&(0,n.jsxs)("span",{className:"text-xs font-bold ml-2 flex-shrink-0",style:{color:o.accent},children:[isNaN(d)?i:d.toLocaleString()," AED"]})]},null!=(c=null!=(r=e.package_id)?r:e.id)?c:t)}),0===c.length&&(0,n.jsx)("p",{className:"text-xs text-center py-3 opacity-50",style:{color:o.text},children:"No flights available"})]})]})}let M={name:{name:"name",label:"Full Name",type:"text",placeholder:"Enter your full name"},email:{name:"email",label:"Email Address",type:"email",placeholder:"Enter your email"},phone:{name:"phone",label:"Phone Number",type:"tel",placeholder:"Enter your phone number"}};function R(e){var t,l,r;let{data:o,colors:s,onSubmit:c}=e,i=null==o?void 0:o.fields,d=null==o?void 0:o.required_fields,u=i&&i.length>0?i:d&&d.length>0?d.map(e=>{var t;return null!=(t=M[e])?t:{name:e,label:e,type:"text"}}):Object.values(M),[x,p]=(0,a.useState)({});return(0,n.jsxs)("div",{className:"mt-2 rounded-xl p-4 space-y-3",style:{background:s.bubbleBot,border:"1px solid ".concat(s.accent,"30")},children:[(null!=(t=null==o?void 0:o.title)?t:null==o?void 0:o.label)&&(0,n.jsx)("p",{className:"text-sm font-semibold",style:{color:s.text},children:null!=(l=o.title)?l:o.label}),u.map(e=>{var t,l,a,r;return(0,n.jsxs)("div",{className:"space-y-1",children:[e.label&&(0,n.jsx)("label",{className:"text-xs opacity-70",style:{color:s.text},children:e.label}),"select"===e.type&&e.options?(0,n.jsxs)("select",{value:null!=(t=x[e.name])?t:"",onChange:t=>p(l=>({...l,[e.name]:t.target.value})),className:"w-full rounded-lg px-3 py-2 text-sm border outline-none",style:{background:s.background,color:s.text,borderColor:"".concat(s.accent,"50")},children:[(0,n.jsx)("option",{value:"",children:"Select…"}),e.options.map(e=>(0,n.jsx)("option",{value:e,children:e},e))]}):"textarea"===e.type?(0,n.jsx)("textarea",{value:null!=(l=x[e.name])?l:"",onChange:t=>p(l=>({...l,[e.name]:t.target.value})),placeholder:e.placeholder,rows:3,className:"w-full rounded-lg px-3 py-2 text-sm border outline-none resize-none",style:{background:s.background,color:s.text,borderColor:"".concat(s.accent,"50")}}):(0,n.jsx)("input",{type:null!=(a=e.type)?a:"text",value:null!=(r=x[e.name])?r:"",onChange:t=>p(l=>({...l,[e.name]:t.target.value})),placeholder:e.placeholder,className:"w-full rounded-lg px-3 py-2 text-sm border outline-none",style:{background:s.background,color:s.text,borderColor:"".concat(s.accent,"50")}})]},e.name)}),(0,n.jsx)("button",{onClick:()=>c(x),className:"w-full py-2 rounded-lg text-sm font-semibold mt-1",style:{background:s.accent,color:s.primary},children:null!=(r=null==o?void 0:o.submit_label)?r:"Submit"})]})}function A(e){let{data:t,colors:l,onSubmit:a}=e;return(0,n.jsx)(R,{data:t,colors:l,onSubmit:a})}function I(e){var t,l,a,r,o;let{data:s,colors:c,onAction:i}
1=e,d=null!=(t=null==s?void 0:s.rows)?t:[(null==s?void 0:s.package_name)?{label:"Package",value:s.package_name}:null,(null==s?void 0:s.hotel)?{label:"Hotel",value:s.hotel}:null,(null==s?void 0:s.date)?{label:"Date",value:s.date}:null,(null==s?void 0:s.room)?{label:"Room",value:s.room}:null].filter(Boolean),u=null!=(l=null==s?void 0:s.title)?l:(null==s?void 0:s.package_name)?"Selected Package Details":void 0;return(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(c.accent,"40")},children:[(0,n.jsxs)("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"linear-gradient(135deg, ".concat(c.headerGradientStart,", ").concat(c.headerGradientEnd,")")},children:[(0,n.jsx)("span",{children:"\uD83C\uDFE8"}),(0,n.jsx)("p",{className:"text-xs font-bold text-white",children:null!=u?u:"Package Details"})]}),(null==s?void 0:s.image)&&(0,n.jsx)("img",{src:s.image,alt:null!=u?u:"",className:"w-full h-28 object-cover"}),(0,n.jsxs)("div",{className:"p-3 space-y-2",style:{background:c.bubbleBot},children:[(null==s?void 0:s.subtitle)&&(0,n.jsx)("p",{className:"text-xs opacity-70",style:{color:c.text},children:s.subtitle}),d.map((e,t)=>(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(c.text,"70")},children:e.label}),(0,n.jsx)("span",{style:{color:c.text},children:e.value})]},t)),(null==s?void 0:s.total)!==void 0&&(0,n.jsxs)("div",{className:"flex justify-between text-xs font-bold pt-1.5 border-t",style:{borderColor:"".concat(c.accent,"30")},children:[(0,n.jsx)("span",{style:{color:c.text},children:"Total"}),(0,n.jsxs)("span",{style:{color:c.accent},children:[null!=(a=s.currency)?a:"AED"," ","number"==typeof s.total?s.total.toLocaleString():s.total]})]}),(null!=(r=null==s?void 0:s.actions)?r:[]).length>0&&(0,n.jsx)("div",{className:"flex flex-wrap gap-2 pt-1",children:(null!=(o=s.actions)?o:[]).map((e,t)=>(0,n.jsx)("button",{onClick:()=>i(e.action,e.label),className:"flex-1 min-w-0 py-1.5 rounded-lg text-xs font-semibold border transition-opacity hover:opacity-80",style:"primary"===e.style?{background:c.accent,color:c.primary,borderColor:c.accent}:{background:"transparent",color:c.accent,borderColor:c.accent},children:e.label},t))})]})]})}function P(e){var t,l,a,r,o,s,c,i,d,u,x,p,m,h,g,b,y,f;let{data:v,colors:k,onAction:w}=e,N=(null==v?void 0:v.type)==="custom_trip",C=null!=(t=null==v?void 0:v.title)?t:N?"Your Custom Trip Summary":"Final Booking Summary",_=(null==v?void 0:v.items)&&v.items.length>0?v.items:N?[{label:"Name",value:null!=(l=v.name)?l:""},{label:"Destination",value:null!=(a=v.destination)?a:""},{label:"Travel Date",value:null!=(r=v.dates)?r:""},{label:"Duration",value:null!=(o=v.duration)?o:""},{label:"Travelers",value:void 0!==v.travelers?String(v.travelers):""},{label:"Interests",value:null!=(s=v.interests)?s:""},{label:"Email",value:null!=(c=v.email)?c:""},{label:"Phone",value:null!=(i=v.phone)?i:""}].filter(e=>e.value):[{label:"Name",value:null!=(d=v.name)?d:""},{label:"Package",value:null!=(u=v.package_name)?u:""},{label:"Hotel",value:null!=(x=v.hotel)?x:""},{label:"Date",value:null!=(p=v.date)?p:""},{label:"Room",value:null!=(m=v.room)?m:""},{label:"Email",value:null!=(h=v.email)?h:""},{label:"Phone",value:null!=(g=v.phone)?g:""}].filter(e=>e.value);return(0,n.jsxs)("div",{className:"mt-2 rounded-xl overflow-hidden border",style:{borderColor:"".concat(k.accent,"40")},children:[(0,n.jsx)("div",{className:"px-3 py-2",style:{background:"linear-gradient(135deg, ".concat(k.headerGradientStart,", ").concat(k.headerGradientEnd,")")},children:(0,n.jsxs)("p",{className:"text-xs font-bold text-white",children:[N?"✈️":"\uD83D\uDCCB"," ",C]})}),(0,n.jsxs)("div",{className:"p-3 space-y-1.5",style:{background:k.bubbleBot},children:[_.map((e,t)=>(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{style:{color:"".concat(k.text,"70")},children:e.label}),(0,n.jsx)("span",{style:{color:k.text},children:e.value})]},t)),(null==v?void 0:v.total)!==void 0&&(0,n.jsxs)("div",{className:"flex justify-between text-xs font-bold pt-1.5 border-t",style:{borderColor:"".concat(k.accent,"30")},children:[(0,n.jsx)("span",{style:{color:k.text},children:"Total"}),(0,n.jsxs)("span",{style:{color:k.accent},children:[null!=(b=v.currency)?b:"AED"," ","number"==typeof v.total?v.total.toLocaleStr
1ing():v.total]})]}),(null!=(y=null==v?void 0:v.actions)?y:[]).length>0&&(0,n.jsx)("div",{className:"flex flex-wrap gap-2 pt-2",children:(null!=(f=v.actions)?f:[]).map((e,t)=>(0,n.jsxs)("button",{onClick:()=>w(e.action,e.label),className:"flex-1 min-w-0 py-1.5 rounded-lg text-xs font-semibold border transition-opacity hover:opacity-80 flex items-center justify-center gap-1",style:"primary"===e.style?{background:k.accent,color:k.primary,borderColor:k.accent}:{background:"transparent",color:k.accent,borderColor:k.accent},children:["check"===e.icon&&(0,n.jsx)(j,{}),e.label]},t))})]})]})}function F(e){var t,l;let{data:a,colors:r,onSubmit:o}=e,s=null!=(t=null==a?void 0:a.fields)?t:[{name:"full_name",label:"Full Name",type:"text",placeholder:"As on passport"},{name:"passport_number",label:"Passport Number",type:"text"},{name:"nationality",label:"Nationality",type:"text"},{name:"dob",label:"Date of Birth",type:"date"},{name:"expiry",label:"Passport Expiry",type:"date"}],c=null!=(l=null==a?void 0:a.title)?l:(null==a?void 0:a.traveler_index)!==void 0?"Traveler ".concat(a.traveler_index+1," Details"):"Passport Details";return(0,n.jsx)(R,{data:{...a,title:c,fields:s},colors:r,onSubmit:o})}function O(e){var t;let{data:l,colors:r,onUpload:o}=e,[s,c]=(0,a.useState)(null),i=(0,a.useRef)(null),d=null!=(t=null==l?void 0:l.title)?t:(null==l?void 0:l.traveler_index)!==void 0?"Upload Passport — Traveler ".concat(l.traveler_index+1):"Upload Passport",u=e=>{c(URL.createObjectURL(e)),o(e)};return(0,n.jsxs)("div",{className:"mt-2 rounded-xl p-4 space-y-3",style:{background:r.bubbleBot,border:"1px solid ".concat(r.accent,"30")},children:[(0,n.jsx)("p",{className:"text-sm font-semibold",style:{color:r.text},children:d}),(null==l?void 0:l.label)&&(0,n.jsx)("p",{className:"text-xs opacity-70",style:{color:r.text},children:l.label}),(0,n.jsx)("div",{className:"border-2 border-dashed rounded-xl flex flex-col items-center justify-center py-6 cursor-pointer transition-opacity hover:opacity-80",style:{borderColor:"".concat(r.accent,"60")},onClick:()=>{var e;return null==(e=i.current)?void 0:e.click()},onDragOver:e=>e.preventDefault(),onDrop:e=>{var t;e.preventDefault();let l=null==(t=e.dataTransfer.files)?void 0:t[0];l&&u(l)},children:s?(0,n.jsx)("img",{src:s,alt:"Passport preview",className:"max-h-32 rounded-lg object-contain"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{style:{color:"".concat(r.accent,"80")},children:(0,n.jsx)(v,{})}),(0,n.jsx)("p",{className:"text-xs mt-2 opacity-60",style:{color:r.text},children:"Click or drag to upload"}),(0,n.jsx)("p",{className:"text-[10px] opacity-40 mt-0.5",style:{color:r.text},children:"JPG, PNG, PDF \xb7 Max 10MB"})]})}),(0,n.jsx)("input",{ref:i,type:"file",accept:"image/*,application/pdf",className:"hidden",onChange:e=>{var t;let l=null==(t=e.target.files)?void 0:t[0];l&&u(l),e.target.value=""}})]})}function U(e){let{colors:t}=e;return(0,n.jsx)("div",{className:"flex justify-start px-3 py-1",children:(0,n.jsx)("div",{className:"flex items-center gap-1 px-3 py-2 rounded-2xl",style:{background:t.bubbleBot},children:[0,1,2].map(e=>(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full animate-bounce",style:{background:"".concat(t.text,"60"),animationDelay:"".concat(.15*e,"s")}},e))})})}function G(e){var t,l;let{msg:a,colors:r,isRtl:o,onWidgetAction:s}=e,c="bot"===a.role,i="user"===a.role;if("widget"===a.type&&a.widgetType){let e=a.widgetData;return(0,n.jsxs)("div",{className:"px-3 py-1",children:["package_grid"===a.widgetType&&(0,n.jsx)(S,{data:e,colors:r,onSelect:(e,t)=>s(t,e)}),"quick_replies"===a.widgetType&&(0,n.jsx)(D,{data:e,colors:r,onSelect:e=>s("quick_reply",e)}),"date_picker"===a.widgetType&&(0,n.jsx)(T,{data:e,colors:r,onSelect:e=>s("date_selected",e)}),"traveler_count"===a.widgetType&&(0,n.jsx)(E,{data:e,colors:r,onConfirm:e=>s("travelers_confirmed",e)}),"booking_card"===a.widgetType&&(0,n.jsx)(B,{data:e,colors:r}),"flight_selector"===a.widgetType&&(0,n.jsx)(L,{data:e,colors:r,onSelect:e=>s("flight_selected",e)}),"onboarding_form"===a.widgetType&&(0,n.jsx)(R,{data:e,colors:r,onSubmit:e=>s("form_submitted",e)}),"custom_service_form"===a.widgetType&&(0,n.jsx)(A,{data:e,colors:r,onSubmit:e=>s("form_submitted",e)}),"pre_selection_card"===a.widgetType&&(0,n.jsx)(I,{data:e,colors:r,onAction:(e,t)=>s(e,{label:t})}),"booking_summary"===a.widgetType&&(0,n.jsx)(P,{data:e,colors:r,onAction:(e,t)=>s(e,{label:t})}),"passport_form"===a.widgetType&&(0,n.jsx)(F,{data:e,colors:r,onSubmit:e=>s("passport_submitted",e)}),"passport_upload"===a.widgetType&&(0,n.jsx)(O,{data:e,colors:r,onUpload:e=>s("passport_uploaded",e)}),"payment_card"===a.widgetType&&(0,n.jsx)(_,{data:e,colors:r}),"voucher_link"===a.widgetType&&(0,n.jsx)(w,{data:e,colors:r}),"extras_selector"===a.widgetType&&(0,n.jsx)(N,{data:e,colors:r,onAction:(e,t)=>s(e,t)})]})}return"image"===a.type&&a.imageUrl?(0,n.jsx)("div",{className:"flex ".concat(i?"justify-end":"justify-start"," px-3 py-1"),children:(0,n.jsx)("img",{src:a.imageUrl,alt:"Uploaded image",className:"max-w-[200px] rounded-xl border",style:{borderColor:"".concat(r.accent,"40")}})}):(0,n.jsx)("div",{className:"flex ".concat(i?"justify-end":"justify-start"," px-3 py-1"),children:(0,n.jsxs)("div",{className:"max-w-[80%] rounded-2xl px-3 py-2 text-sm leading-relaxed",style:{background:c?r.bubbleBot:r.bubbleUser,color:c?null!=(t=r.textBot)?t:r.text:null!=(l=r.textUser)?l:r.text,borderRadius:c?"4px 16px 16px 16px":"16px 4px 16px 16px"},dir:o?"rtl":"ltr",children:["system"===a.role?(0,n.jsx)("span",{className:"opacity-60 text-xs",children:a.content}):(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:a.content.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:inherit;text-decoration:underline">$1</a>').replace(/\n/g,"<br/>")}}),a.isStreaming&&(0,n.jsx)("span",{className:"inline-block w-1.5 h-3.5 ml-0.5 rounded-sm animate-pulse",style:{background:r.accent}})]})})}function W(e){let{chips:t,colors:l,onSelect:r}=e,[o,s]=(0,a.useState)(null);return t.length?(0,n.jsx)("div",{className:"flex flex-wrap gap-2 px-3 pb-2",children:t.map((e,t)=>(0,n.jsx)("button",{onClick:()=>r(e),onMouseEnter:()=>s(t),onMouseLeave:()=>s(null),className:"text-xs px-3 py-1.5 rounded-full border transition-all active:scale-95",style:{borderColor:l.chipBorder||l.accent,color:o===t?l.chipHoverText||l.primary:l.chipText||l.accent,background:o===t?l.chipHoverBg||l.accent:l.chipBg||"transparent"},children:e},t))}):null}function z(e){var t,l,g,b;let{settings:y,locale:f,adminApiBase:v,companyLogoUrl:j,companyName:k="Amani"}=e,[w,N]=(0,a.useState)(!1),[C,_]=(0,a.useState)(""),[S,D]=(0,a.useState)(!1),[T,E]=(0,a.useState)("disconnected"),[B,L]=(0,a.useState)(!1),[M,R]=(0,a.useState)([]),[A,I]=(0,a.useState)(!1),[P,F]=(0,a.useState)(!1),O
1=(0,a.useRef)(null),z=(0,a.useRef)(null),H=(0,a.useRef)(null),V=(0,a.useRef)(null),J="ar"===f,q=y.colors,{messages:$,ticket:K,ticketLoading:Y,ticketError:Z,fetchTicket:Q,addMessage:X,updateMessage:ee,clearHistory:et}=function(e){let[t,l]=(0,a.useState)(null),[n,c]=(0,a.useState)(null),[i,d]=(0,a.useState)([]),[u,x]=(0,a.useState)(!1),[p,m]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=sessionStorage.getItem(r);e&&l(e),d(function(){try{let e=sessionStorage.getItem(o);return e?JSON.parse(e):[]}catch(e){return[]}}())},[]);let h=(0,a.useCallback)(async(n,a,o)=>{x(!0),m(null);try{var s,i,d,u,p,h;let x={locale:n};t&&(x.session_id=t),a&&(x.message=a),(null==o?void 0:o.lat)&&(x.user_lat=o.lat),(null==o?void 0:o.lng)&&(x.user_lng=o.lng),(null==o?void 0:o.city)&&(x.user_city=o.city),(null==o?void 0:o.country)&&(x.user_country=o.country),(null==o?void 0:o.code)&&(x.user_code=o.code);let m=await fetch("".concat(e,"/api/public/chatbot/ticket"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)});if(!m.ok){let e=await m.json().catch(()=>({}));throw Error(null!=(d=null==e?void 0:e.error)?d:"Ticket request failed (".concat(m.status,")"))}let g=await m.json(),b=null!=(u=null==g?void 0:g.ticket)?u:null==g||null==(s=g.data)?void 0:s.ticket,y=null!=(h=null!=(p=null==g?void 0:g.session_id)?p:null==g||null==(i=g.data)?void 0:i.session_id)?h:t;return b&&c(b),y&&y!==t&&(l(y),sessionStorage.setItem(r,y)),null!=b?b:null}catch(e){return m(e instanceof Error?e.message:"Failed to connect to AI"),null}finally{x(!1)}},[e,t]),g=(0,a.useCallback)(e=>{let t={...e,id:"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,9)),timestamp:Date.now()};return d(e=>{let l=[...e,t];return s(l),l}),t.id},[]);return{sessionId:t,ticket:n,messages:i,ticketLoading:u,ticketError:p,fetchTicket:h,addMessage:g,updateMessage:(0,a.useCallback)((e,t)=>{d(l=>{let n=l.map(l=>l.id===e?{...l,...t}:l);return s(n),n})},[]),clearHistory:(0,a.useCallback)(()=>{d([]),c(null),sessionStorage.removeItem(o),sessionStorage.removeItem(r),l(null)},[])}}(v),el=(0,a.useCallback)(()=>(D(!1),X({role:"bot",content:"",type:"text",isStreaming:!0})),[X]),en=(0,a.useCallback)((e,t)=>{var l,n;ee(t,{content:(null!=(n=null==(l=$.find(e=>e.id===t))?void 0:l.content)?n:"")+e,isStreaming:!0})},[$,ee]),ea=(0,a.useCallback)(e=>{ee(e,{isStreaming:!1}),D(!1)},[ee]),er=(0,a.useCallback)((e,t)=>{ee(t,{type:"widget",widgetType:e.widget_type,widgetData:e.data,content:"",isStreaming:!1})},[ee]),eo=(0,a.useCallback)(e=>{R(e)},[]),es=(0,a.useCallback)(()=>{I(!0),D(!1),R([])},[]),ec=(0,a.useCallback)(()=>{F(!0)},[]),ei=(0,a.useCallback)(e=>{e.text&&_(e.text)},[]),ed=(0,a.useCallback)(e=>{},[]),eu=(0,a.useCallback)(e=>{D(!1),X({role:"system",content:"⚠️ ".concat(e),type:"text"})},[X]),ex=(0,a.useCallback)(e=>{D(e)},[]),{sendText:ep,sendMessage:em,sendEvent:eh}=function(e){let{wsBaseUrl:t,ticket:l,geo:n,onTokenChunk:r,onMessageComplete:o,onWidget:s,onChips:c,onEndSession:i,onLiveChat:d,onTranscription:u,onSessionId:x,onError:p,onStatusChange:m,onBotMessageStart:h,onTypingChange:g}=e,b=(0,a.useRef)(null),y=(0,a.useRef)(null),f=(0,a.useRef)(0),v=(0,a.useRef)(null),j=(0,a.useRef)(!1),k=(0,a.useRef)(!0);(0,a.useEffect)(()=>(k.current=!0,()=>{k.current=!1}),[]);let w=(0,a.useCallback)(()=>{y.current&&(clearInterval(y.current),y.current=null)},[]),N=(0,a.useCallback)(()=>{w(),b.current&&(b.current.onclose=null,b.current.close(),b.current=null),k.current&&m("disconnected")},[w,m]),C=(0,a.useCallback)(e=>{var t,l,n,a,m,b,y;if("typing_indicator"===e.type)return void g(!0);if("connection_established"===e.type){e.session_id&&"string"==typeof e.session_id&&x(e.session_id);return}if("pong"!==e.type){if("end"===e.type||"done"===e.type||!0===e.done){v.current&&(o(v.current),v.current=null,j.current=!1),g(!1);return}if("transcription"===e.type){g(!1),u({text:e.text,audio_b64:e.audio_b64,mime_type:e.mime_type}),g(!0);return}if("error"===e.type){g(!1),p(null!=(t=e.message)?t:"An error occurred");let l=e.web_payload;(null==l?void 0:l.suggested_chips)&&Array.isArray(l.suggested_chips)&&c(l.suggested_chips);return}if("bot_response"===e.type){g(!1);let t=e.message;if(t&&t.trim()){let e=h();r(t,e),o(e)}let n=e.web_payload;if(!n)return;let a=n.ui_element;if((null==a?void 0:a.component_type)&&"string"==typeof a.component_type){let e=h();s({type:"widget",widget_type:a.component_type,data:null!=(l=a.component_data)?l:{}},e),o(e)}n.suggested_chips&&Array.isArray(n.suggested_chips)&&c(n.suggested_chips);let u=n.context_flags;(null==u?void 0:u.end_session)&&i(),(null==u?void 0:u.is_live_chat)&&d();return}if("widget"===e.type&&e.widget_type){g(!1);let t=h();s({type:"widget",widget_type:e.widget_type,data:null!=(n=e.data)?n:{}},t),o(t);return}if("token"===e.type||void 0!==e.token){let t=null!=(m=null!=(a=e.token)?a:e.text)?m:"";j.current||(v.current=h(),j.current=!0),v.current&&r(t,v.current);return}if("message"===e.type||void 0!==e.message){g(!1);let t=null!=(y=null!=(b=e.message)?b:e.text)?y:"",l=h();r(t,l),o(l);return}}},[g,x,u,p,c,h,r,o,s,i,d]),_=(0,a.useCallback)(e=>{if(!t||!e)return;b.current&&(b.current.onclose=null,b.current.close()),k.current&&m("connecting");let l="".concat(t.replace(/\/+$/,""),"/ws/webchat?ticket=").concat(encodeURIComponent(e));(null==n?void 0:n.lat)&&(l+="&lat=".concat(encodeURIComponent(n.lat))),(null==n?void 0:n.lng)&&(l+="&lng=".concat(encodeURIComponent(n.lng))),(null==n?void 0:n.city)&&(l+="&city=".concat(encodeURIComponent(n.city))),(null==n?void 0:n.country)&&(l+="&country=".concat(encodeURIComponent(n.country))),(null==n?void 0:n.code)&&(l+="&code=".concat(encodeURIComponent(n.code)));let a=new WebSocket(l);b.current=a,a.onopen=()=>{k.current&&(f.current=0,m("connected"),w(),y.current=setInterval(()=>{a.readyState===WebSocket.OPEN&&a.send(JSON.stringify({type:"ping"}))},25e3))},a.onmessage=e=>{if(!k.current)return;let t=e.data;if("pong"!==t&&'{"type":"pong"}'!==t)try{let e=JSON.parse(t);C(e)}catch(e){j.current||(v.current=h(),j.current=!0),v.current&&r(t,v.current)}},a.onerror=()=>{k.current&&(m("error"),p("Connection error. Please try again."))}
1,a.onclose=t=>{k.current&&(w(),v.current&&j.current&&(o(v.current),v.current=null,j.current=!1),1e3!==t.code&&1001!==t.code&&f.current<3?(f.current++,m("connecting"),setTimeout(()=>{k.current&&_(e)},2e3*f.current)):m("disconnected"))}},[t,n,m,w,C,h,r,o,p]),S=(0,a.useCallback)(e=>{var t;return(null==(t=b.current)?void 0:t.readyState)===WebSocket.OPEN&&(b.current.send(JSON.stringify(e)),!0)},[]),D=(0,a.useCallback)((e,t)=>S({message:e,language:t}),[S]),T=(0,a.useCallback)((e,t)=>S({event:{action:e,value:t}}),[S]),E=(0,a.useCallback)((e,t)=>S({type:"audio",data:e,mime_type:t}),[S]),B=(0,a.useCallback)((e,t)=>S({type:"image",data:e,mime_type:t,caption:""}),[S]);return(0,a.useEffect)(()=>(l&&_(l),()=>{N()}),[l]),{connect:_,disconnect:N,sendMessage:S,sendText:D,sendEvent:T,sendAudio:E,sendImage:B}}({wsBaseUrl:null!=(t=y.wsBaseUrl)?t:"",ticket:K,geo:V.current,onTokenChunk:en,onMessageComplete:ea,onWidget:er,onChips:eo,onEndSession:es,onLiveChat:ec,onTranscription:ei,onSessionId:ed,onError:eu,onStatusChange:E,onBotMessageStart:el,onTypingChange:ex}),{state:eg,durationMs:eb,startRecording:ey,stopRecording:ef,cancelRecording:ev}=function(e){let{maxDurationMs:t=6e4,onComplete:l,onError:n}=e,[r,o]=(0,a.useState)("idle"),[s,c]=(0,a.useState)(0),i=(0,a.useRef)(null),d=(0,a.useRef)([]),u=(0,a.useRef)(null),x=(0,a.useRef)(0),p=(0,a.useRef)(null),m=(0,a.useCallback)(()=>{u.current&&(clearInterval(u.current),u.current=null),p.current&&(clearTimeout(p.current),p.current=null)},[]),h=(0,a.useCallback)(async()=>{if("idle"===r)try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),n=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/ogg;codecs=opus")?"audio/ogg;codecs=opus":"audio/mp4",a=new MediaRecorder(e,{mimeType:n});i.current=a,d.current=[],a.ondataavailable=e=>{e.data.size>0&&d.current.push(e.data)},a.onstop=()=>{e.getTracks().forEach(e=>e.stop()),m(),o("processing");let t=new Blob(d.current,{type:n});l(t,n),o("idle"),c(0)},a.start(250),x.current=Date.now(),o("recording"),u.current=setInterval(()=>{c(Date.now()-x.current)},100),p.current=setTimeout(()=>{var e;(null==(e=i.current)?void 0:e.state)==="recording"&&i.current.stop()},t)}catch(e){n(e instanceof Error?"NotAllowedError"===e.name?"Microphone access denied. Please allow microphone access.":e.message:"Could not start recording"),o("idle")}},[r,t,l,n,m]);return{state:r,durationMs:s,startRecording:h,stopRecording:(0,a.useCallback)(()=>{var e;(null==(e=i.current)?void 0:e.state)==="recording"&&i.current.stop(),m()},[m]),cancelRecording:(0,a.useCallback)(()=>{var e;(null==(e=i.current)?void 0:e.state)==="recording"&&(i.current.ondataavailable=null,i.current.onstop=null,i.current.stop()),m(),o("idle"),c(0),d.current=[]},[m])}}({onComplete:(0,a.useCallback)(async(e,t)=>{try{let a=new FormData,r=t.includes("webm")?"webm":t.includes("ogg")?"ogg":"mp4";a.append("audio",e,"voice.".concat(r)),a.append("locale",f);let o=await fetch("".concat(v,"/api/public/chatbot/transcribe"),{method:"POST",body:a});if(o.ok){var l,n;let e=await o.json(),t=null!=(n=null==e?void 0:e.text)?n:null==e||null==(l=e.data)?void 0:l.text;t&&_(t)}}catch(e){X({role:"user",content:"\uD83C\uDFA4 Voice message",type:"voice"}),ep("\uD83C\uDFA4 Voice message",f)}},[v,f,X,ep]),onError:e=>X({role:"system",content:"⚠️ ".concat(e),type:"text"})});(0,a.useEffect)(()=>{var e;null==(e=O.current)||e.scrollIntoView({behavior:"smooth"})},[$,S,M]);let ej=(0,a.useCallback)(async()=>{if(!B&&(L(!0),0===$.length&&X({role:"bot",content:"ar"===f?y.welcomeMessageAr:y.welcomeMessageEn,type:"text"}),!K)){var e;await Q(f,void 0,null!=(e=V.current)?e:void 0)}},[B,$.length,f,y,X,K,Q]),ek=(0,a.useCallback)(()=>{N(!0),ej()},[ej]),ew=(0,a.useCallback)(async e=>{let t=(null!=e?e:C).trim();if(t){if(_(""),R([]),X({role:"user",content:t,type:"text"}),D(!0),"connected"!==T||!K){await Q(f,t)||(D(!1),X({role:"system",content:"⚠️ Could not connect to AI. Please try again.",type:"text"}));return}ep(t,f)||(D(!1),X({role:"system",content:"⚠️ Connection lost. Please refresh.",type:"text"}))}},[C,X,T,K,Q,f,ep]),eN=(0,a.useCallback)(async()=>{et(),I(!1),R([]),F(!1),L(!1),setTimeout(()=>{ej()},100)},[et,ej]),eC=(0,a.useCallback)((e,t)=>{var l,n,a,r,o,s,c;let i="";if(R([]),"select_package"===e)i="I'm interested in: ".concat(t.name),eh("select_package",null!=(n=t.id)?n:String(null!=(l=t.index)?l:0));else if("quick_reply"===e)em({message:i=t});else if("date_selected"===e)i="Travel date: ".concat(t),eh("select_date",t);else if("travelers_confirmed"===e){let e=t.adults+(1===t.adults?" adult":" adults")+(t.children>0?" and "+t.children+(1===t.children?" child":" children"):"");i=e,em({message:e})}else if("flight_selected"===e){let e=null!=(a=t.package_id)?a:t.id;i="Selected flight: ".concat(null!=(r=t.airline)?r:""," ").concat(null!=(s=null!=(o=t.departure_city)?o:t.flight_number)?s:"").trim(),eh("select_package",e)}else if("form_submitted"===e)i="Form submitted",eh("submit_form",t);else if("passport_submitted"===e)i="Passport details submitted",eh("passport_confirmed",t);else if("passport_uploaded"===e){i="\uD83D\uDCCE Passport uploaded";let e=new FileReader;e.onloadend=()=>{em({type:"image",data:e.result.split(",")[1],mime_type:t.type||"image/jpeg",caption:""})}
1,e.readAsDataURL(t)}else i=null!=(c=null==t?void 0:t.label)?c:e,eh(e,t);i&&(X({role:"user",content:i,type:"text"}),D(!0))},[X,eh,em]),e_=(0,a.useCallback)(async e=>{if(e.size>0x1000000)return void X({role:"system",content:"⚠️ Image too large (max 16MB)",type:"text"});let t=URL.createObjectURL(e),l=X({role:"user",content:"",type:"image",imageUrl:t});try{let o=new FormData;o.append("image",e);let s=await fetch("".concat(v,"/api/public/chatbot/upload-image"),{method:"POST",body:o});if(s.ok){var n,a,r;let e=await s.json(),o=null!=(r=null!=(a=null==e?void 0:e.url)?a:null==e||null==(n=e.data)?void 0:n.url)?r:t;ee(l,{imageUrl:o}),D(!0),em({type:"image",image_url:o,language:f})}}catch(e){D(!0),em({type:"image",image_url:t,language:f})}},[v,X,ee,em,f]),eS=(0,a.useCallback)(()=>{if(!navigator.geolocation)return void X({role:"system",content:"⚠️ Geolocation not supported",type:"text"});navigator.geolocation.getCurrentPosition(e=>{let{latitude:t,longitude:l}=e.coords;X({role:"user",content:"\uD83D\uDCCD My location: ".concat(t.toFixed(4),", ").concat(l.toFixed(4)),type:"text"}),D(!0),em({type:"location",latitude:t,longitude:l,language:f})},()=>{X({role:"system",content:"⚠️ Location access denied",type:"text"})})},[X,em,f]),eD=(0,a.useCallback)(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),ew())},[ew]),eT=(0,a.useMemo)(()=>{var e;let t=(null!=(e=y.backgroundOpacity)?e:100)/100,l=q.background;if(l.startsWith("rgba")||l.startsWith("rgb"))return l;let n=l.replace("#",""),a=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),o=parseInt(n.substring(4,6),16);return"rgba(".concat(a,", ").concat(r,", ").concat(o,", ").concat(t,")")},[q.background,y.backgroundOpacity]),eE=(0,a.useMemo)(()=>{var e,t;return{"--chat-primary":q.primary,"--chat-accent":q.accent,"--chat-bg":eT,"--chat-bubble-bot":q.bubbleBot,"--chat-bubble-user":q.bubbleUser,"--chat-text":q.text,"--chat-text-bot":null!=(e=q.textBot)?e:q.text,"--chat-text-user":null!=(t=q.textUser)?t:q.text,"--chat-header-start":q.headerGradientStart,"--chat-header-end":q.headerGradientEnd}},[q,eT]);if(!y.enabled)return null;let eB=y.hidden?{display:"none"}:{},eL="bottom-left"===y.position?"left-6 bottom-6":"right-6 bottom-6";if(y.maintenanceMode){let e="ar"===f?y.maintenanceMessageAr:y.maintenanceMessageEn;return(0,n.jsx)("div",{className:"fixed ".concat(eL," z-[9999]"),style:eE,children:w?(0,n.jsxs)("div",{className:"w-80 rounded-2xl overflow-hidden shadow-2xl",style:{background:q.background},children:[(0,n.jsxs)("div",{className:"px-4 py-3 flex items-center justify-between",style:{background:"linear-gradient(135deg, ".concat(q.headerGradientStart,", ").concat(q.headerGradientEnd,")")},children:[(0,n.jsx)("span",{className:"text-white font-semibold text-sm",children:"Amani"}),(0,n.jsx)("button",{onClick:()=>N(!1),className:"text-white/70 hover:text-white",children:(0,n.jsx)(u,{})})]}),(0,n.jsxs)("div",{className:"p-4 text-sm",style:{color:q.text},dir:J?"rtl":"ltr",children:["\uD83D\uDD27 ",e]})]}):(0,n.jsx)("button",{onClick:()=>N(!0),className:"w-14 h-14 rounded-full shadow-xl flex items-center justify-center text-xl font-bold transition-transform hover:scale-110 overflow-hidden",style:j?void 0:{background:"linear-gradient(135deg, ".concat(q.headerGradientStart,", ").concat(q.headerGradientEnd,")")},"aria-label":"Open chat",children:j?(0,n.jsx)("img",{src:j,alt:k,className:"w-full h-full object-cover"}):(0,n.jsx)("span",{style:{color:q.accent},children:k.charAt(0).toUpperCase()})})})}let eM=null!=(l=y.windowSize)?l:"medium",eR="fullscreen"===eM;return(0,n.jsxs)("div",{style:{...eE,...eB},dir:J?"rtl":"ltr",children:[w&&(0,n.jsxs)("div",{style:{position:"fixed",bottom:eR?0:"5rem",..."bottom-left"===y.position?{left:eR?0:"1.5rem"}:{right:eR?0:"1.5rem"},width:"small"===eM?"340px":"large"===eM?"560px":"fullscreen"===eM?"100vw":"420px",height:eR?"100vh":"580px",maxHeight:eR?"100vh":"85vh",zIndex:9999,display:"flex",flexDirection:"column",borderRadius:eR?0:"1rem",overflow:"hidden",boxShadow:"0 25px 50px -12px rgba(0,0,0,0.5)",background:eT,backdropFilter:(null!=(g=y.backgroundOpacity)?g:100)<100?"blur(16px)":void 0,WebkitBackdropFilter:(null!=(b=y.backgroundOpacity)?b:100)<100?"blur(16px)":void 0},children:[(0,n.jsxs)("div",{className:"px-4 py-3 flex items-center gap-3 flex-shrink-0",style:{background:"linear-gradient(135deg, ".concat(q.headerGradientStart,", ").concat(q.headerGradientEnd,")")},children:[(0,n.jsx)("div",{className:"w-9 h-9 rounded-full flex items-center justify-center font-bold text-sm flex-shrink-0 overflow-hidden",style:j?void 0:{background:q.accent,color:q.primary},children:j?(0,n.jsx)("div",{className:"w-full h-full bg-white rounded-full flex items-center justify-center p-1",children:(0,n.jsx)("img",{src:j,alt:k,className:"w-full h-full object-contain"})}):k.charAt(0).toUpperCase()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("p",{className:"text-white font-semibold text-sm",children:k}),(0,n.jsxs)("p",{className:"text-white/60 text-xs flex items-center gap-1",children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:P?"#22c55e":"connected"===T?"#4ade80":"connecting"===T?"#facc15":"#f87171"}}),P?"Agent connected":"connected"===T?"Online":"connecting"===T?"Connecting...":"Offline"]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("button",{onClick:()=>{et(),I(!1),R([]),F(!1),L(!1)},className:"text-white/50 hover:text-white p-1 rounded transition-colors",title:"Clear chat",children:(0,n.jsx)(x,{})}),(0,n.jsx)("button",{onClick:()=>N(!1),className:"text-white/50 hover:text-white p-1 rounded transition-colors",title:"Close",children:(0,n.jsx)(u,{})})]})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto py-2 space-y-0.5 scrollbar-thin",children:[$.map(e=>(0,n.jsx)(G,{msg:e,colors:q,isRtl:J,onWidgetAction:eC},e.id)),S&&(0,n.jsx)(U,{colors:q}),Z&&(0,n.jsx)("div",{className:"px-3 py-1",children:(0,n.jsx)("p",{className:"text-xs text-red-400 text-center",children:Z})}),(0,n.jsx)("div",{ref:O})]}),M.length>0&&!A&&(0,n.jsx)(W,{chips:M,colors:q,onSelect:e=>ew(e)}),A&&(0,n.jsxs)("div",{className:"flex-shrink-0 px-3 py-3 border-t text-center",style:{borderColor:"".concat(q.accent,"20"),background:"".concat(q.primary,"cc")},children:[(0,n.jsx)("p",{className:"text-xs opacity-60 mb-2",style:{color:q.text},children:"ar"===f?"انتهت المحادثة":"Conversation ended"}),(0,n.jsxs)("button",{onClick:eN,className:"flex items-center gap-1.5 mx-auto px-4 py-2 rounded-lg text-xs font-semibold transition-opacity hover:opacity-80",style:{background:q.accent,color:q.primary},children:[(0,n.jsx)(h,{}),"ar"===f?"بدء محادثة جديدة":"Start New Session"]})]}),!A&&(0,n.jsxs)("div",{className:"flex-shrink-0 px-3 py-2 border-t",style:{background:"".concat(q.primary,"cc"),borderColor:"".concat(q.accent,"20")},children:["recording"===eg&&(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2 px-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),(0,n.jsxs)("span",{className:"text-xs",style:{color:q.text},children:["Recording ",Math.floor(eb/1e3),"s"]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("button",{onClick:ev,className:"text-xs px-2 py-1 rounded",style:{color:"".concat(q.text,"80")},children:"Cancel"}),(0,n.jsx)("button",{onClick:ef,className:"text-xs px-2 py-1 rounded font-semibold",style:{background:q.accent,color:q.primary},children:"Send"})]})]}),(0,n.jsxs)("div",{className:"flex items-end gap-2",children:[(0,n.jsx)("textarea",{ref:z,value:C,onChange:e=>_(e.target.value),onKeyDown:eD,placeholder:"ar"===f?"اكتب رسالتك...":"Type a message...",rows:1,className:"flex-1 resize-none rounded-xl px-3 py-2 text-sm outline-none leading-relaxed max-h-24",style:{background:"".concat(q.background,"cc"),color:q.text,border:"1px solid ".concat(q.accent,"30"),scrollbarWidth:"none"},dir:J?"rtl":"ltr"}),(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,n.jsx)("button",{onClick:eS,className:"p-2 rounded-lg transition-colors hover:opacity-80",style:{color:"".concat(q.text,"60")},title:"Share location",children:(0,n.jsx)(p,{})}),(0,n.jsx)("button",{onClick:()=>{var e;return null==(e=H.current)?void 0:e.click()},className:"p-2 rounded-lg transition-colors hover:opacity-80",style:{color:"".concat(q.text,"60")},title:"Upload image",children:(0,n.jsx)(d,{})}),(0,n.jsx)("input",{ref:H,type:"file",accept:"image/*",className:"hidden",onChange:e=>{var t;let l=null==(t=e.target.files)?void 0:t[0];l&&e_(l),e.target.value=""}}),"recording"===eg?(0,n.jsx)("button",{onClick:ef,className:"p-2 rounded-lg",style:{color:"#ef4444"},children:(0,n.jsx)(m,{})}):C.trim()?(0,n.jsx)("button",{onClick:()=>ew(),disabled:Y,className:"p-2 rounded-xl transition-all hover:opacity-80 disabled:opacity-40",style:{background:q.accent,color:q.primary},children:(0,n.jsx)(c,{})}):(0,n.jsx)("button",{onClick:ey,className:"p-2 rounded-lg transition-colors hover:opacity-80",style:{color:"".concat(q.text,"60")},title:"Voice message",children:(0,n.jsx)(i,{})})]})]})]})]}),!w&&(0,n.jsxs)("div",{style:{position:"fixed",bottom:"1.5rem",..."bottom-left"===y.position?{left:"1.5rem"}:{right:"1.5rem"},zIndex:9998,display:"flex",flexDirection:"column",alignItems:"bottom-left"===y.position?"flex-start":"flex-end",gap:"0.5rem"},children:[(0,n.jsxs)("div",{style:{position:"relative",background:"#ffffff",color:"#0F2A4A",fontSize:"0.75rem",fontWeight:600,padding:"0.35rem 0.75rem",borderRadius:"0.75rem",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",whiteSpace:"nowrap",letterSpacing:"0.01em",marginBottom:"0.125rem"},children:["Need help? Ask Amani",(0,n.jsx)("span",{style:{position:"absolute",bottom:"-6px",..."bottom-left"===y.position?{left:"1.25rem"}:{right:"1.25rem"},width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"6px solid #ffffff"}})]}),(0,n.jsxs)("button",{onClick:ek,style:{...j?{}:{background:"linear-gradient(135deg, ".concat(q.headerGradientStart,", ").concat(q.headerGradientEnd,")")}}
1,className:"w-14 h-14 rounded-full shadow-xl flex items-center justify-center transition-all duration-300 hover:scale-110 active:scale-95 relative overflow-hidden flex-shrink-0","aria-label":"Open chat",children:["disconnected"===T&&(0,n.jsx)("span",{className:"absolute inset-0 rounded-full animate-ping opacity-20",style:{background:q.accent}}),j?(0,n.jsx)("div",{className:"w-full h-full bg-white rounded-full flex items-center justify-center p-1.5",children:(0,n.jsx)("img",{src:j,alt:k,className:"w-full h-full object-contain"})}):(0,n.jsx)("span",{className:"text-xl font-bold",style:{color:q.accent},children:k.charAt(0).toUpperCase()})]})]})]})}},2072:(e,t,l)=>{Promise.resolve().then(l.bind(l,3850)),Promise.resolve().then(l.bind(l,483)),Promise.resolve().then(l.bind(l,5773))},3429:(e,t,l)=>{"use strict";var n=l(9736);function a(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.filter(Boolean).join(".")}function r(e){return a(e.namespace,e.key)}function o(e){console.error(e)}function s(e,t){return n.memoize(e,{cache:{create:()=>({get:e=>t[e],set(e,l){t[e]=l}})},strategy:n.strategies.variadic})}function c(e,t){return s(function(){for(var t=arguments.length,l=Array(t),n=0;n<t;n++)l[n]=arguments[n];return new e(...l)},t)}t.createCache=function(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},t.createIntlFormatters=function(e){return{getDateTimeFormat:c(Intl.DateTimeFormat,e.dateTime),getNumberFormat:c(Intl.NumberFormat,e.number),getPluralRules:c(Intl.PluralRules,e.pluralRules),getRelativeTimeFormat:c(Intl.RelativeTimeFormat,e.relativeTime),getListFormat:c(Intl.ListFormat,e.list),getDisplayNames:c(Intl.DisplayNames,e.displayNames)}},t.defaultGetMessageFallback=r,t.defaultOnError=o,t.initializeConfig=function(e){let{getMessageFallback:t,messages:l,onError:n,...a}=e;return{...a,messages:l,onError:n||o,getMessageFallback:t||r}},t.joinPath=a,t.memoFn=s},3850:(e,t,l)=>{"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(null,arguments)}l.d(t,{default:()=>o});var a=l(9356),r=l(8261);function o(e){let{locale:t,...l}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl.dev/docs/configuration#locale");return a.createElement(r.IntlProvider,n({locale:t},l))}},5170:(e,t,l)=>{"use strict";t.IntlContext=l(9356).createContext(void 0)},5773:(e,t,l)=>{"use strict";l.d(t,{default:()=>r});var n=l(4624),a=l(9356);function r(e){let{number:t,message:l,position:r="bottom-left"}=e,[o,s]=(0,a.useState)(!1);if(!t)return null;let c=t.replace(/\D/g,""),i="https://wa.me/".concat(c,"?text=").concat(encodeURIComponent(null!=l?l:"Hello! I'd like to enquire about your travel packages."));return(0,n.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer","aria-label":"Chat with us on WhatsApp",className:"fixed ".concat("bottom-left"===r?"bottom-6 left-6":"bottom-6 right-6"," z-50 flex items-center gap-3 group ").concat("bottom-left"===r?"flex-row-reverse":""),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,n.jsx)("span",{className:"\n          hidden sm:block\n          bg-[#1a1a1a] text-[#d4af37] text-sm font-medium\n          px-4 py-2 rounded-full shadow-lg border border-[#d4af37]/30\n          whitespace-nowrap\n          transition-all duration-300 ease-out\n          ".concat(o?"opacity-100 translate-x-0":"bottom-left"===r?"opacity-0 -translate-x-2 pointer-events-none":"opacity-0 translate-x-2 pointer-events-none","\n        "),children:"Chat with us"}),(0,n.jsxs)("div",{className:"\n          relative w-14 h-14 rounded-full\n          bg-[#25D366] hover:bg-[#20ba5a]\n          shadow-[0_4px_20px_rgba(37,211,102,0.45)]\n          hover:shadow-[0_6px_28px_rgba(37,211,102,0.65)]\n          flex items-center justify-center\n          transition-all duration-300 ease-out\n          ".concat(o?"scale-110":"scale-100","\n        "),children:[(0,n.jsx)("span",{className:"absolute inset-0 rounded-full bg-[#25D366] animate-ping opacity-30"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"white",className:"w-7 h-7 relative z-10","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
1198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})]})]})}},8261:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(9356),a=l(3429),r=l(5170);l(9736);var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.IntlProvider=function(e){let{children:t,defaultTranslationValues:l,formats:s,getMessageFallback:c,locale:i,messages:d,now:u,onError:x,timeZone:p}=e,m=n.useMemo(()=>a.createCache(),[i]),h=n.useMemo(()=>a.createIntlFormatters(m),[m]),g=n.useMemo(()=>({...a.initializeConfig({locale:i,defaultTranslationValues:l,formats:s,getMessageFallback:c,messages:d,now:u,onError:x,timeZone:p}),formatters:h,cache:m}),[m,l,s,h,c,i,d,u,x,p]);return o.default.createElement(r.IntlContext.Provider,{value:g},t)}},9736:(e,t,l)=>{"use strict";function n(e,t){var l=t&&t.cache?t.cache:c,n=t&&t.serializer?t.serializer:o;return(t&&t.strategy?t.strategy:function(e,t){var l,n,o=1===e.length?a:r;return l=t.cache.create(),n=t.serializer,o.bind(this,e,l,n)})(e,{cache:l,serializer:n})}function a(e,t,l,n){var a=null==n||"number"==typeof n||"boolean"==typeof n?n:l(n),r=t.get(a);return void 0===r&&(r=e.call(this,n),t.set(a,r)),r}function r(e,t,l){var n=Array.prototype.slice.call(arguments,3),a=l(n),r=t.get(a);return void 0===r&&(r=e.apply(this,n),t.set(a,r)),r}l.r(t),l.d(t,{memoize:()=>n,strategies:()=>i});var o=function(){return JSON.stringify(arguments)},s=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e}(),c={create:function(){return new s}},i={variadic:function(e,t){var l,n;return l=t.cache.create(),n=t.serializer,r.bind(this,e,l,n)},monadic:function(e,t){var l,n;return l=t.cache.create(),n=t.serializer,a.bind(this,e,l,n)}}}},e=>{e.O(0,[4933,146,7358],()=>e(e.s=2072)),_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.