1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2275,5216],{8885:(t,e,a)=>{"use strict";a.d(e,{A:()=>_});var n=a(58069);n.A.DP=2,n.A.RM=n.A.roundHalfUp;let _=n.A},39335:(t,e,a)=>{"use strict";let n,_;a.d(e,{hF:()=>D,eW:()=>E,qC:()=>I});let r=(t,e)=>e.some(e=>t instanceof e),s=new WeakMap,o=new WeakMap,i=new WeakMap,u={get(t,e,a){if(t instanceof IDBTransaction){if("done"===e)return s.get(t);if("store"===e)return a.objectStoreNames[1]?void 0:a.objectStore(a.objectStoreNames[0])}return c(t[e])},set:(t,e,a)=>(t[e]=a,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function c(t){if(t instanceof IDBRequest){let e=new Promise((e,a)=>{let n=()=>{t.removeEventListener("success",_),t.removeEventListener("error",r)},_=()=>{e(c(t.result)),n()},r=()=>{a(t.error),n()};t.addEventListener("success",_),t.addEventListener("error",r)});return i.set(e,t),e}if(o.has(t))return o.get(t);let e=function(t){if("function"==typeof t)return(_||(_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(l(this),e),c(this.request)}:function(...e){return c(t.apply(l(this),e))};return(t instanceof IDBTransaction&&function(t){if(s.has(t))return;let e=new Promise((e,a)=>{let n=()=>{t.removeEventListener("complete",_),t.removeEventListener("error",r),t.removeEventListener("abort",r)},_=()=>{e(),n()},r=()=>{a(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",_),t.addEventListener("error",r),t.addEventListener("abort",r)});s.set(t,e)}(t),r(t,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,u):t}(t);return e!==t&&(o.set(t,e),i.set(e,t)),e}let l=t=>i.get(t),m=["get","getKey","getAll","getAllKeys","count"],y=["put","add","delete","clear"],d=new Map;function S(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&"string"==typeof e))return;if(d.get(e))return d.get(e);let a=e.replace(/FromIndex$/,""),n=e!==a,_=y.includes(a);if(!(a in(n?IDBIndex:IDBObjectStore).prototype)||!(_||m.includes(a)))return;let r=async function(t,...e){let r=this.transaction(t,_?"readwrite":"readonly"),s=r.store;return n&&(s=s.index(e.shift())),(await Promise.all([s[a](...e),_&&r.done]))[0]};return d.set(e,r),r}u=(t=>({...t,get:(e,a,n)=>S(e,a)||t.get(e,a,n),has:(e,a)=>!!S(e,a)||t.has(e,a)}))(u);let P=["continue","continuePrimaryKey","advance"],f={},p=new WeakMap,b=new WeakMap,h={get(t,e){if(!P.includes(e))return t[e];let a=f[e];return a||(a=f[e]=function(...t){p.set(this,b.get(this)[e](...t))}),a}};async function*g(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;let a=new Proxy(e,h);for(b.set(a,e),i.set(a,l(e));e;)yield a,e=await (p.get(a)||e.continue()),p.delete(a)}function w(t,e){return e===Symbol.asyncIterator&&r(t,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===e&&r(t,[IDBIndex,IDBObjectStore])}u=(t=>({...t,get:(e,a,n)=>w(e,a)?g:t.get(e,a,n),has:(e,a)=>w(e,a)||t.has(e,a)}))(u);let v="QeeperStore";async function x(){return await function(t,e,{blocked:a,upgrade:n,blocking:_,terminated:r}={}){let s=indexedDB.open(t,1),o=c(s);return n&&s.addEventListener("upgradeneeded",t=>{n(c(s.result),t.oldVersion,t.newVersion,c(s.transaction),t)}),a&&s.addEventListener("blocked",t=>a(t.oldVersion,t.newVersion,t)),o.then(t=>{r&&t.addEventListener("close",()=>r()),_&&t.addEventListener("versionchange",t=>_(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("QeeperDB",0,{upgrade(t){t.objectStoreNames.contains(v)||t.createObjectStore(v)}})}async function I(t,e){let a=await x();await a.put(v,e,t)}async function E(t){let e=await x();return await e.get(v,t)}async function D(t){let e=await x();await e.delete(v,t)}},48785:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>w});var n=a(37876),_=a(89099),r=a(14232),s=a(73617),o=a(79094),i=a(76089),u=a(85604),c=a(81581),l=a(72824),m=a(31371),y=a(87461),d=a(8885),S=a(39335),P=a(94478),f=a(53249),p=a.n(f);let b=t=>{let{mutate:e}=(0,c.yi)(),a=(0,c.aO)(),_=(0,c.Pe)(),f=t.paymentIntent,[b,h]=(0,r.useState)("Confirming your payment. Wait a moment...");(0,r.useEffect)(()=>{(0,S.eW)("flowData").then(t=>{if(t){let e=JSON.parse(t);switch(null==f?void 0:f.status){case"succeeded":g(e,f.id,()=>{h("Success! Payment received. \nCheck your email for the Order Confirmation.")});break;case"processing":h("Payment processing. We'll update you when payment is received.");break;case"requires_payment_method":h("Payment failed. Please try another payment method.");break;default:h("Something went wrong.")}}})},[]);let g=(t,n,r)=>{let c=t[i.bd.CITY].id,l=t[i.bd.ADDRESS];e({input:{errorPath:"",isB2B:0,fullName:t[i.bd.FULL_NAME],phoneNumber:t[i.bd.PHONE_NUMBER],email:t[i.bd.EMAIL],address:l,cityId:c,roles:[o.oc.CLIENT.name],password:(0,s.generate)({length:10,numbers:!0,excludeSimilarCharacters:!0}),stripePaymentIntentId:n}},{onSuccess:async e=>{let n=e.createB2CClientProfile.profile;if(n){var s,f,p,b,h,g,w;let e=(0,m._)(t[i.bd.DATE_AND_TIME]),v=null!=(s=t[i.bd.IMAGES])?s:[],x=null!=(f=t[i.bd.VIDEOS])?f:[],I=JSON.parse(t[u.ru.PROBLEM_CATEGORY_ID]),E=JSON.parse(t[u.ru.PROBLEM_SUB_CATEGORY_ID]),D=await (0,P.y)(v),k=await (0,P.y)(x),C=t[u.ru.LOCATION],O=t[u.ru.POST_CODE],L=t[u.ru.SKILL_LIST],N=null!=(p=null==L?void 0:L.map(t=>+t.id))?p:[];a.mutate({input:{errorPath:"",publishedToApp:!1,address:l,postCode:null!=O?O:"",lat:null!=(b=null==C?void 0:C.lat)?b:1,lng:null!=(h=null==C?void 0:C.lng)?h:1,cityId:c,clientId:n.id,title:E.name,details:t[i.bd.DESCRIPTION],problemCategoryId:null!=(g=null==I?void 0:I.id)?g:void 0,problemSubcategoryId:null!=(w=null==E?void 0:E.id)?w:void 0,images:D,videos:k,startTimeSlots:e,slotDuration:8,jobStatusId:o.rQ.PARTIAL_JOB.id,...(0,y.E)(t),propertyAccess:t[u.ru.PROPERTY_ACCESS],referenceId:"ext",emailConfirmationLink:"b2c",skillList:N}},{onSuccess:e=>{var a;e&&(null==(a=e.createJob)?void 0:a.job)&&_.mutate({input:{errorPath:"",labourRevenue:new d.A(t[i.bd.CLIENT_COST]).toNumber(),reportJobId:e.createJob.job.id,isJobReport:!0,inputRevenuesManually:!0}}),(0,S.hF)("flowData"),r()},onError:t=>{console.log(t)}})}},onError:t=>{console.log(t)}})};return(0,n.jsx)("div",{className:p().body,children:(0,n.jsx)("div",{className:(0,l.cx)(p().root,p().root_form),children:(0,n.jsx)("section",{className:(0,l.cx)(p().sec,p().form_wrpr,p().f_center),children:(0,n.jsx)("div",{className:(0,l.cx)(p().container,p().inner),children:(0,n.jsx)("div",{className:p().row,children:(0,n.jsx)("div",{className:(0,l.cx)(p().heading_blk,p().f_40,p().text_center),children:(0,n.jsx)("h4",{className:p().h4,children:b})})})})})})})};async function h(t,e){try{let a=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e||{})});return await a.json()}catch(t){if(t instanceof Error)throw Error(t.message);throw t}}let g=()=>{let t=(0,_.useRouter)(),[e,a]=(0,r.useState)(),{payment_intent:s}=t.query;return((0,r.useEffect)(()=>{s&&!e&&h("/api/stripe/confirm-payment-intent",{payment_intent:s}).then(t=>{a(t)})},[s]),t.isFallback||!e)?(0,n.jsx)("div",{children:"Loading..."}):(0,n.jsx)(b,{paymentIntent:e})};g.getLayout=t=>(0,n.jsx)(n.Fragment,{children:t});let w=g},53249:t=>{t.exports={primaryColor:"#f84069",root1:"PaymentStatus_root1__iRh6I",text_white:"PaymentStatus_text_white__vW0yY",text_black:"PaymentStatus_text_black__4fe_H","text_grey-1":"PaymentStatus_text_grey-1__OLPKz","text_grey-2":"PaymentStatus_text_grey-2__XudWT","text_grey-3":"PaymentStatus_text_grey-3__RZSmt","text_grey-4":"PaymentStatus_text_grey-4__rh83x","text_grey-5":"PaymentStatus_text_grey-5__0fiEP","text_grey-6":"PaymentStatus_text_grey-6__GPpl_","text_grey-7":"PaymentStatus_text_grey-7__nNEd_","text_grey-8":"PaymentStatus_text_grey-8__oZ5tm",text_accent:"PaymentStatus_text_accent__xm5Az",text_accentl:"PaymentStatus_text_accentl__ez2o1",icon_fb:"PaymentStatus_icon_fb__0bOMv",icon_twitter:"PaymentStatus_icon_twitter__b9TCZ",icon_insta:"PaymentStatus_icon_insta__clXQT",icon_linked:"PaymentStatus_icon_linked__GUTLM",body:"PaymentStatus_body__svYgK",root:"PaymentStatus_root__LzsJq",date:"PaymentStatus_date__nwljw",h1:"PaymentStatus_h1__DiczL",h2:"PaymentStatus_h2__f7WmI",h3:"PaymentStatus_h3__1RcxS",h4:"PaymentStatus_h4__D3ZJy",h5:"PaymentStatus_h
15__AVGSU",h6:"PaymentStatus_h6__AAFfB",p:"PaymentStatus_p__EZ0US",img:"PaymentStatus_img__KxF3b",social_links:"PaymentStatus_social_links__S_Z6Y",container:"PaymentStatus_container__qy708",inner:"PaymentStatus_inner__BI2ky",row:"PaymentStatus_row__VzGCD",center:"PaymentStatus_center__b60av",spaceb:"PaymentStatus_spaceb__WqQLJ",align_end:"PaymentStatus_align_end__9h342",w100:"PaymentStatus_w100__LWHtM",text_center:"PaymentStatus_text_center__fzuRn",btn:"PaymentStatus_btn__2wK_g",btn_accent:"PaymentStatus_btn_accent__v24v4",header:"PaymentStatus_header__NFKOU",backdrop_blur:"PaymentStatus_backdrop_blur__P5sZY",fixed:"PaymentStatus_fixed__P0ggP",logo_wrpr:"PaymentStatus_logo_wrpr__NP5hu",logo_blk:"PaymentStatus_logo_blk__JyJOE",links_wrpr:"PaymentStatus_links_wrpr__6CHPD",phone_link:"PaymentStatus_phone_link__ii_O7",ham_btn:"PaymentStatus_ham_btn__InhKi",active:"PaymentStatus_active__x7T_B",social_link:"PaymentStatus_social_link__OW92p",rating_sec:"PaymentStatus_rating_sec__x8F9s",rb_g:"PaymentStatus_rb_g__mAQUm",title:"PaymentStatus_title__ESA0j",link:"PaymentStatus_link__YIQHv",link_arrow:"PaymentStatus_link_arrow__dSxrW",heading_tag:"PaymentStatus_heading_tag__s7vkh",heading_blk:"PaymentStatus_heading_blk__aNqIt",form_control:"PaymentStatus_form_control___b2iR",mb_18:"PaymentStatus_mb_18__bagym",root_form:"PaymentStatus_root_form__jjyc8",form_wrpr:"PaymentStatus_form_wrpr__PrRVy",pb_20:"PaymentStatus_pb_20__GCBi4",f_center:"PaymentStatus_f_center__WkyCR",f_40:"PaymentStatus_f_40__usExD",form_inner:"PaymentStatus_form_inner__IX9e8",f_wrpr:"PaymentStatus_f_wrpr__I4A2D",form_btn:"PaymentStatus_form_btn__WyifR",prev:"PaymentStatus_prev__9OUk_",done:"PaymentStatus_done__iVHMJ",f_in:"PaymentStatus_f_in__hl24O",err_msg:"PaymentStatus_err_msg__gOcEq",overlay_active:"PaymentStatus_overlay_active__Cz0gs",overlay:"PaymentStatus_overlay__48xZL",f_btn:"PaymentStatus_f_btn__CTOM_",f_label:"PaymentStatus_f_label__jpKs0",label:"PaymentStatus_label__QkDO5",f_select:"PaymentStatus_f_select__1SNTN",f_date:"PaymentStatus_f_date__cMa6Y",radio_wrpr:"PaymentStatus_radio_wrpr__QGCXk",r_label:"PaymentStatus_r_label__W_EFG",pricing_blk:"PaymentStatus_pricing_blk__Put5z",pricing_icon_wrpr:"PaymentStatus_pricing_icon_wrpr__4U603",pricing_head:"PaymentStatus_pricing_head__55hOv",price:"PaymentStatus_price__15_jf",pricing_desc:"PaymentStatus_pricing_desc__zd2ng",mb_0:"PaymentStatus_mb_0__b9lzI",error:"PaymentStatus_error___PZ_D",f_row:"PaymentStatus_f_row__44vjr",child:"PaymentStatus_child__PSPfG",f_col:"PaymentStatus_f_col__nCVlY",char_count:"PaymentStatus_char_count__wJkvf",textarea:"PaymentStatus_textarea__5VNfJ",c_count:"PaymentStatus_c_count__FAz_o",payment_form:"PaymentStatus_payment_form__zWBDn",margin_bottom:"PaymentStatus_margin_bottom__VZ2FQ"}},67824:(t,e,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/payment/complete",function(){return a(48785)}])},94478:(t,e,a)=>{"use strict";a.d(e,{$:()=>_,y:()=>r});let n=async t=>new Promise(e=>{let a=new FileReader;a.onloadend=()=>e({base64data:a.result,name:t.name,type:t.type}),a.readAsDataURL(t)}),_=async t=>Promise.all(null==t?void 0:t.map(t=>n(t))),r=async t=>Promise.all(t.map(async t=>new File([await fetch(t.base64data).then(t=>t.blob())],t.name,{type:t.type,lastModified:Date.now()})))}},t=>{t.O(0,[8531,8513,2909,4683,4972,7424,7224,4888,8069,9910,1581,9978,636,6593,8792],()=>t(t.s=67824)),_N_E=t.O()}]); 2//# sourceMappingURL=complete-450a13a0c09e2ed4.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.