PageSourceSearch

https://www.abrahamicfamilyhouse.ae/assets/Cart-B3TtbtlP.js

js abrahamicfamilyhouse.ae collected 2026-10-02 04:05:01 UTC 16,484 bytes, 1 lines download raw bytes

1import{h as U,a as S,O as ae,b as oe,q as w,C as B,B as ne,u as W,e as M,w as F,au as re,l as ce,j as le,d as de,av as R,c as P,f as q,g as z,G as ue,y as G,n as H}from"./index-UeNYquEB.js";import{H as x,L as t,I as u,r as V,Q as K,S as y,u as e,O as k,P as j,V as o,c as g,U as h,X as _,W as J,f as me,d as pe,C as fe,B as he,ae as _e,ak as be}from"./vue-Fh2vjS8O.js";import{a as ye,u as Q}from"./vendor-BLTXJk8c.js";/* empty css                      */import{K as X,J as A,d as T,j as xe}from"./element-DRPm0a8Z.js";/* empty css                   */import{_ as ve}from"./TermsAndConditions-CXyVFg1w.js";import{_ as N}from"./SelectInput-BWNt9nCo.js";import{f as ke}from"./formHelper-EjT6Q6sv.js";import"./CheckboxInput-BmN-vQXr.js";const we={xmlns:"http://www.w3.org/2000/svg",width:"84",height:"84",fill:"none"};function ge(s,a){return u(),x("svg",we,a[0]||(a[0]=[t("path",{fill:"#13100D",d:"M83.999 0H72.48v83.981h11.518zM69.503 0H57.984v83.981h11.519zM29.004 83.999c0-3.167 2.574-83.981 5.76-83.981 3.184 0 5.758 80.833 5.758 83.98zM43.477 83.999c0-3.167 2.574-83.981 5.759-83.981s5.759 80.833 5.759 83.98zM0 84 5.76 0l5.759 84zM14.496 84l5.76-84 5.759 84z"},null,-1)]))}const $e={render:ge},Ee={class:"flex items-center text-white"},L={__name:"RemoveItemFromCart",props:{ticket:{type:Object,required:!0},index:{type:Number,required:!0},isEditable:{type:Boolean,default:!0}},setup(s){const a=s,c=U(),p=V(!1),i=async()=>{c.removeTicket&&(p.value=!0,await c.removeTicket(a.ticket,a.index),p.value=!1)},{t:m}=S();return(v,$)=>{const f=A,b=X;return s.isEditable?K((u(),k(f,{key:0,title:e(m)("Remove item from Cart"),width:"250px",onConfirm:i},{reference:j(()=>[t("button",Ee,o(e(m)("remove")),1)]),_:1},8,["title"])),[[b,e(p)]]):y("",!0)}}},Te={class:"mb-4 py-4 ps-5 pe-3 bg-primary rounded border relative space-y-4"},Ce={class:"flex justify-between items-start gap-x-2 pb-3 border-b border-b-white/30"},qe={class:"text-white text-lg font-bold"},je={class:"text-white text-lg font-bold"},Se={class:"flex justify-between items-center flex-wrap"},Ve={class:"flex gap-2 items-center"},Be={class:"mx-2 text-white"},Ie={class:"text-white/50"},Oe={class:"flex items-center gap-4"},Le={class:"flex justify-between items-center flex-wrap pt-3 border-t border-t-white/30"},Ne={class:"flex gap-2 items-center"},Ae={class:"mx-2 text-white"},De={class:"text-white/50"},Me={class:"flex items-center gap-4"},Fe={class:"flex items-center text-white"},Re={class:"flex justify-between items-center flex-wrap pt-3 border-t border-t-white/30"},Pe={class:"flex gap-2 items-center"},ze={class:"mx-2 text-white"},Ge={class:"text-white/50"},He={__name:"FacilityCartItem",props:{ticket:{type:Object},isEditable:{type:Boolean,default:!0},index:{type:Number,required:!0}},setup(s){const{isB2bUser:a,user:c}=ae(),p=oe(),{t:i}=S(),m=g(()=>s.ticket.customers.filter(f=>f.validation_status===!1)),v=async()=>{s.ticket.customers=s.ticket.customers.filter(f=>f.validation_status===!0),s.ticket.quantity=s.ticket.customers.length},$=async()=>{const f=c.value.token,b=await ye.post("dcd/b2b/download-invalid-visitors",{tickets:m.value.map(l=>({ticket_name:s.ticket.name,id_proof_type_id:l.id_proof_type_id,id_proof_number:l.id_proof_number,dob:l.dob,nationality:l.nationality}))},{responseType:"blob",headers:{"V-TOKEN":p.vToken,Authorization:`Bearer ${f}`},baseURL:"https://afhb2capi.qportal.io/api/v2/"});if(b.status===200)return ne(b,"Partner-Details-Mismatch.xlsx"),!0};return(f,b)=>{const l=A;return u(),x("div",Te,[t("div",Ce,[t("p",qe,o(e(w)(s.ticket,"name")),1),t("p",je,o(e(T)(s.ticket.selectedFacilityDate).format(e(B)))+" - "+o(s.ticket.selectedFacilityTiming),1)]),t("div",Se,[t("div",Ve,[t("p",Be,[t("span",Ie,o(e(i)("quantity")),1),h(" "+o(s.ticket.quantity),1)])]),t("div",Oe,[_(L,{index:s.index,isEditable:s.isEditable,ticket:s.ticket},null,8,["index","isEditable","ticket"])])]),e(a)&&e(m).length>0?(u(),x(J,{key:0},[t("div",Le,[t("div",Ne,[t("p",Ae,[t("span",De,o(e(i)("Details Mismatch")),1),h(" "+o(e(m).length),1)])]),t("div",Me,[s.isEditable?(u(),k(l,{key:0,title:e(i)("Remove Details Mismatch"),width:"250px",onConfirm:v},{reference:j(()=>[t("button",Fe,o(e(i)("remove")),1)]),_:1},8,["title"])):y("",!0),t("button",{class:"flex items-center text-white",onClick:$},o(e(i)("download")),1)])]),t("div",Re,[t("div",Pe,[t("p",ze,[t("span",Ge,o(e(i)("Validated Bookings")),1),h(" "+o(s.ticket.customers.length-e(m).length),1)])])])],64)):y("",!0)])}}},Ue={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"};function We(s,a){return u(),x("svg",Ue,a[0]||(a[0]=[t("path",{stroke:"#fff","stroke-linejoin":"round",d:"m10.949 3.07.66-.66a1.4 1.4 0 0 1 1.98 1.98l-.66.66m-1.98-1.98-4.44 4.44a2.64 2.64 0 0 0-.694 1.226l-.483 1.93 1.93-.482A2.64 2.64 0 0 0 8.49 9.49l4.44-4.44m-1.98-1.98 1.98 1.98"},null,-1),t("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M12.667 9c0 2.192 0 3.288-.606 4.026q-.166.202-.37.37C10.955 14 9.859 14 7.668 14h-.334c-2.514 0-3.77 0-4.552-.781S2 11.18 2 8.667v-.333c0-2.192 0-3.287.605-4.025q.167-.203.37-.37c.738-.605 1.833-.605 4.025-.605"},null,-1)]))}const Ke={render:We},Je={class:"flex items-center text-white gap-2 bg-white/30 py-1 px-2"},Qe={__name:"EditTicket",props:{ticket:{type:Object,required:!0},index:{type:Number,required:!0},isEditable:{type:Boolean,default:!0}},setup(s){const a=Q(),c=V(!1),p=W(),i=async()=>{s.ticket.productType==="facility"?await a.push({name:p.isB2bUser?"bookAPartnerVisit":"bookAVisit",query:{listingId:s.ticket.listingId}}):s.ticket.productType==="event"?await a.push({name:"event-tickets",params:{id:M(s.ticket.event_id)},query:{listingId:s.ticket.listingId}}):s.ticket.productType==="workshop"&&await a.push({name:"academy-tickets",params:{id:M(s.ticket.workshop_id)},query:{listingId:s.ticket.listingId}})},{t:m}=S();return(v,$)=>{const f=A,b=X;return s.isEditable?K((u(),k(f,{key:0,title:e(m)("Are you sure you want to modify this ticket?"),width:"250px",onConfirm:i},{reference:j(()=>[t("button",Je,[_(e(Ke)),h(" "+o(e(m)("edit")),1)])]),_:1},8,["title"])),[[b,e(c)]]):y("",!0)}}},Xe={class:"mb-4 py-4 ps-5 pe-3 bg-primary rounded border relative"},Ye={class:"flex justify-between items-start gap-x-2 pb-3 border-b border-b-white/30"},Ze={class:"text-white text-lg font-bold"},et={class:"text-white text-lg font-bold"},tt={class:"flex justify-between items-center flex-wrap mt-4 border-b border-b-white/30 pb-3"},st={class:"flex max-md:flex-col gap-2 md:items-center"},it={class:"mx-2 text-white"},at={class:"text-white/50"},ot={class:"mx-2 text-white"},nt={class:"text-white/50"},rt={class:"flex items-center gap-4"},ct={class:"mx-2 text-white mt-6"},lt={class:"text-white/50"},dt={__name:"EventCartItem",props:{ticket:{type:Object},isEditable:{type:Boolean,default:!0},index:{type:Number,required:!0}},setup(s){const{t:a}=S(),c=g(()=>{if(s.ticket.event){const i=s.ticket.event.event_schedules[0];return{date:T(i?.start_date).format(B),start_time:T(i?.start_time,"HH:mm:ss").format(F),end_time:T(i?.end_time,"HH:mm:ss").format(F)}}return{date:"",start_time:"",end_time:""}}),p=g(()=>{if(!s.ticket.event)return"";const i=s.ticket.event.event_schedules[0];return i.facility_id?w(i.facility,"name"):i.location});return(i,m)=>(u(),x("div",Xe,[t("div",Ye,[t("p",Ze,o(e(w)(s.ticket.event,"name","ara")),1),t("p",et,o(e(c).date)+" - "+o(e(c).start_time),1)]),t("div",tt,[t("div",st,[t("p",it,[t("span",at,o(e(a)("ticketType"))+":",1),h(" "+o(e(w)(e(re)[s.ticket.ticket_type],"name")),1)]),t("p",ot,[t("span",nt,o(e(a)("quantity")),1),h(" "+o(s.ticket.quantity),1)])]),t("div",rt,[_(L,{index:s.index,isEditable:s.isEditable,ticket:s.ticket}
1,null,8,["index","isEditable","ticket"])])]),t("p",ct,[t("span",lt,o(e(a)("location"))+":",1),h(" "+o(e(p)),1)])]))}},ut={class:"mb-4 py-4 ps-5 pe-3 bg-primary rounded border relative"},mt={class:"flex justify-between items-start gap-x-2 pb-3 border-b border-b-white/30"},pt={class:"text-white text-lg font-bold"},ft={class:"text-white text-lg font-bold"},ht={class:"flex justify-between items-center flex-wrap mt-4 pb-3"},_t={class:"mx-2 text-white"},bt={class:"text-white/50 text-sm mr-2"},yt={class:"mx-2 text-white"},xt={class:"text-white/50 text-sm mr-2"},vt={class:"flex items-center gap-4"},kt={__name:"AcademyCartItem",props:{ticket:{type:Object},isEditable:{type:Boolean,default:!0},index:{type:Number,required:!0}},setup(s){const{t:a}=S(),c=g(()=>s.ticket.workshop_start_date?{workshop_start_date:T(s.ticket?.start_date).format(B),workshop_end_date:T(s.ticket?.workshop_end_date).format(B)}:{workshop_start_date:"",workshop_end_date:""});g(()=>{if(!s.ticket.event)return"";const i=s.ticket.event.event_schedules[0];return i.facility_id?w(i.facility,"name"):i.location});const p=g(()=>{const i=s.ticket.pricing;return i.package_type===1?(i.frequency>1?`${i.frequency} ${a("sessions")}`:`${i.frequency} ${a("session")}`)+" / "+(i.occurrence==="W"?a("weekly"):i.occurrence):i.package_type===2?`${i.sessions} ${a("sessions")}`:i.package_type===3?a("program"):""});return(i,m)=>(u(),x("div",ut,[t("div",mt,[t("p",pt,o(e(w)(s.ticket,"workshop_name")),1),t("p",ft,o(e(c).workshop_start_date)+" - "+o(e(c).workshop_end_date),1)]),t("div",ht,[t("p",_t,[t("span",bt,o(e(a)("productName")),1),h(" "+o(e(w)(s.ticket.pricing,"name")),1)]),t("p",yt,[t("span",xt,o(e(a)("productType")),1),h(" "+o(e(p)),1)]),t("div",vt,[_(Qe,{index:s.index,isEditable:s.isEditable,ticket:s.ticket},null,8,["index","isEditable","ticket"]),_(L,{index:s.index,isEditable:s.isEditable,ticket:s.ticket},null,8,["index","isEditable","ticket"])])])]))}},wt={class:"mb-4 py-4 ps-5 pe-3 bg-primary rounded border relative space-y-4"},gt={class:"pb-3 border-b border-b-white/30"},$t={class:"text-white text-lg font-bold"},Et={class:"flex justify-between items-center flex-wrap pb-3 border-b border-b-white/30"},Tt={class:"flex gap-2 items-center"},Ct={class:"mx-2 text-white"},qt={class:"text-white/50"},jt={class:"flex items-center gap-4"},St={class:"flex justify-between items-center flex-wrap"},Vt={class:"flex gap-2 items-center"},Bt={class:"mx-2 text-white"},It={class:"text-white/50"},Ot={class:"flex items-center"},Lt={class:"mx-2 text-white"},Nt={class:"text-white/50"},At={dir:"ltr"},Dt={class:"mx-2 text-white"},Mt={class:"text-white/50"},Ft={dir:"ltr"},Rt={__name:"MembershipCartItem",props:{ticket:{type:Object},isEditable:{type:Boolean,default:!0},index:{type:Number,required:!0}},setup(s){const{t:a}=S(),c=g(()=>T(s.ticket.start_date).format(B)),p=g(()=>{const i=s.ticket.package;return console.log(i,s.ticket.start_date),T(s.ticket.start_date).add(i.year,"years").add(i.month,"months").add(i.day,"days").format(B)});return(i,m)=>(u(),x("div",wt,[t("div",gt,[t("p",$t,o(e(w)(s.ticket,"name")),1)]),t("div",Et,[t("div",Tt,[t("p",Ct,[t("span",qt,o(e(a)("membershipType")),1),h(" "+o(e(w)(s.ticket.pricing,"name")),1)])]),t("div",jt,[_(L,{index:s.index,isEditable:s.isEditable,ticket:s.ticket},null,8,["index","isEditable","ticket"])])]),t("div",St,[t("div",Vt,[t("p",Bt,[t("span",It,o(e(a)("package")),1),h(" "+o(e(w)(s.ticket.package,"validity")),1)])]),t("div",Ot,[t("p",Lt,[t("span",Nt,o(e(a)("startDate")),1),t("span",At,o(e(c)),1)]),m[1]||(m[1]=t("p",{class:"mx-2 text-white"},"-",-1)),t("p",Dt,[t("span",Mt,o(e(a)("endDate")),1),m[0]||(m[0]=h()),t("span",Ft,o(e(p)),1)])])])]))}},Pt={key:0,class:"layout-spacing mt-10 max-w-screen-2xl"},zt={class:"text-2xl font-light"},Gt={class:"md:ltr:pl-[150px] md:rtl:pr-[150px] mt-6"},Ht={class:"mt-5 mb-6"},Ut={class:"flex justify-end"},Wt={key:1,class:"empty-cart"},Kt={class:"text-2xl font-light mt-6"},Jt={class:"text-sm font-light mt-4 text-center max-md:px-4"},Qt={__name:"Cart",setup(s){const{t:a}=S(),c=U(),p=Q(),{tickets:i,tnc_accepted:m}=me(c),v=W(),$=V([]),f=V([]),b=V(),l=pe({visit_purpose:null,visitor_type:null,place_of_worship:null}),D=g(()=>{let r=i.value.map(n=>n.productType)?.[0]||"facility";return r==="workshop"&&(r="academy"),r}),{placeOrder:Y,placeB2bOrder:Z}=c,E=V(!1),ee=async()=>{E.value=!0;const{response:r,error:n}=await Z();if(E.value=!1,!n.value){if(c.$reset(),!r.value.data.invoice_id){H(a("Success"),a("Order Created successfully but invoice is not found")),await p.push({name:"home"});return}await p.push({name:"OrderSuccess",params:{invoiceId:r.value.data.invoice_id}});return}const C=G(n.value);q(C.message)},te=async()=>
1{if(c.tickets?.filter(n=>n.productType==="facility").forEach(n=>{n.visitor_type=l.visitor_type,l.visit_purpose&&l.visit_purpose.name?.toLowerCase()==="worship"&&(n.place_of_worship=l.place_of_worship),n.customers.forEach(C=>{C.customer_tag=l.visit_purpose.id})}),v.isB2bUser){await ee();return}if(b.value&&!await ke(b)){window.scrollTo(0,0),q(a("Error"),a("Please fill all required fields"));return}if(E.value=!0,v.continueAsGuest){let n=c.tickets[0].customers.find(d=>d.is_primary);if(!n){q("Primary customer not found"),E.value=!1;return}n={...n,mobile:ue(n.mobile_number,n.country_code),name:z(n)};const{data:C,error:I}=await v.anonymousLogin(n);if(I.value){const d=G(I.value);q(d.message),E.value=!1;return}else{const{data:d}=C.value;v.user={...d,name:z(d)}}}const r=await Y();if(!r.status)Array.isArray(r.error)?r.error.forEach(n=>{q(n.message),n.is_error}):r.error?q(r.error):r.response&&q(r.response.message);else if(r.status){if(v.continueAsGuest&&v.$reset(),c.$reset(),!r.data?.invoice_id){H(a("Success"),a("Order Created successfully but invoice is not found")),E.value=!1,await p.push({name:"home"});return}await p.push({name:"OrderSuccess",params:{invoiceId:r.data.invoice_id}})}E.value=!1};fe(async()=>{window.scrollTo(0,0),m.value=!1,le({seo_meta:JSON.stringify({title:"Cart",description:""})}),await se()});const se=async()=>{const{data:r}=await de("/customers/all-tags",{cache:!0});r.value.status&&($.value=r.value.data,f.value=$.value)},ie=g(()=>i.value.some(r=>r.productType==="facility"));return he(()=>{i.value?.[0]?.name.toLowerCase().includes("worship")?f.value=$.value.filter(n=>n.name.toLowerCase().includes("worship")):f.value=$.value.filter(n=>!n.name.toLowerCase().includes("worship"))}),(r,n)=>{const C=xe,I=be("RouterLink");return e(i).length>0?(u(),x("div",Pt,[t("h1",zt,o(e(R)()[e(D)]?.title),1),t("div",Gt,[(u(!0),x(J,null,_e(e(i),(d,O)=>(u(),x("div",{key:d.id},[d.productType==="facility"?(u(),k(He,{key:0,index:O,ticket:d},null,8,["index","ticket"])):y("",!0),d.productType==="event"?(u(),k(dt,{key:1,index:O,ticket:d},null,8,["index","ticket"])):y("",!0),d.productType==="workshop"?(u(),k(kt,{key:2,index:O,ticket:d},null,8,["index","ticket"])):y("",!0),d.productType==="membership"?(u(),k(Rt,{key:3,index:O,ticket:d},null,8,["index","ticket"])):y("",!0)]))),128)),e(ie)?(u(),k(C,{key:0,ref_key:"formEl",ref:b,"label-position":"top","require-asterisk-position":"right",class:"grid md:grid-cols-2 grid-cols-1 gap-2",model:e(l)},{default:j(()=>[_(N,{modelValue:e(l).visit_purpose,"onUpdate:modelValue":n[0]||(n[0]=d=>e(l).visit_purpose=d),label:e(a)("purposeOfVisit"),options:e(f),required:!0,itemKey:"id",itemLabel:"name",name:"visit_purpose","return-object":!0},null,8,["modelValue","label","options"]),e(l).visit_purpose&&e(l).visit_purpose.name.toLowerCase()==="worship"?(u(),k(N,{key:0,modelValue:e(l).place_of_worship,"onUpdate:modelValue":n[1]||(n[1]=d=>e(l).place_of_worship=d),label:e(a)("placeOfWorship"),options:[{id:"Mosque",label:"Mosque"},{id:"Church",label:"Church"},{id:"Synagogue",label:"Synagogue"}],required:!0,itemLabel:"label",name:"place_of_worship"},null,8,["modelValue","label"])):y("",!0),e(c).tickets[0].quantity>1?(u(),k(N,{key:1,modelValue:e(l).visitor_type,"onUpdate:modelValue":n[2]||(n[2]=d=>e(l).visitor_type=d),label:e(a)("visitorType"),options:[{id:"Group",label:"Group"},{id:"Tour Guide",label:"Tour Guide"},{id:"Family",label:"Family"}],required:!0,itemKey:"id",itemLabel:"label",name:"visitor_type"},null,8,["modelValue","label"])):y("",!0)]),_:1},8,["model"])):y("",!0),t("div",Ht,[_(ve),n[3]||(n[3]=t("br",null,null,-1))]),t("div",Ut,[_(P,{disabled:!e(c).tnc_accepted,loading:e(E),outline:!0,"external-class":"!border !border-primary",onClick:te},{default:j(()=>[h(o(e(R)()[e(D)]?.buttonText),1)]),_:1},8,["disabled","loading"])])])])):(u(),x("div",Wt,[_(e($e),{class:"dark:fill-white dark:stroke-white"}),t("p",Kt,o(e(a)("emptyCart")),1),t("p",Jt,o(e(a)("emptyCartDesc")),1),_(I,{class:"mt-16",to:"/"},{default:j(()=>[_(P,{class:"!h-12 dark:!bg-primary"},{default:j(()=>[h(o(e(a)("Go back to home page")),1)]),_:1})]),_:1})]))}}},rs=ce(Qt,[["__scopeId","data-v-a2d60cb9"]]);export{rs as default};

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.