PageSourceSearch

https://cura.sa/_next/static/chunks/9251-863f8dce17b7038c.js

js cura.sa collected 2026-10-09 04:41:34 UTC 18,640 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9251],{4101:function(e,t,n){n.d(t,{Z:function(){return m}});var a=n(85893);n(67294);let i=e=>e?"var(--".concat(e,"-color)"):"var(--dark-color)";var r=n(39394),o=n(85444);let l=(0,o.F4)(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),d=(0,o.F4)(["0%{-webkit-clip-path:polygon( 0% 0%,0% 0%,0% 0%,50% 50%,0% 0%,0% 0%,0% 0% );clip-path:polygon(0% 0%,0% 0%,0% 0%,50% 50%,0% 0%,0% 0%,0% 0%);}50%{-webkit-clip-path:polygon( 0% 0%,0% 100%,0% 100%,50% 50%,100% 0%,100% 0%,0% 0% );clip-path:polygon( 0% 0%,0% 100%,0% 100%,50% 50%,100% 0%,100% 0%,0% 0% );}100%{-webkit-clip-path:polygon( 0% 0%,0% 100%,100% 100%,50% 50%,100% 100%,100% 0%,0% 0% );clip-path:polygon( 0% 0%,0% 100%,100% 100%,50% 50%,100% 100%,100% 0%,0% 0% );}"]),s=o.ZP.div.withConfig({componentId:"sc-ae8a457c-0"})(["width:80px;height:80px;border-radius:50%;border:10px solid #333;box-sizing:border-box;animation:"," 1s linear alternate infinite,"," 0.8s linear infinite;"],d,l);var m=e=>{let{visible:t=!0,color:n="primary",stroke:o=30/(30/3.5),size:l=30,className:d,style:m,...u}=e;return t?(0,a.jsx)(r.Z,{...u,as:s,className:["react-spinner-material",d].join(" "),style:{width:l,height:l,display:"inline-block",borderColor:i(n),borderWidth:o,...m}}):null}},52530:function(e,t,n){n.d(t,{Z:function(){return M}});var a=n(85893),i=n(23807),r=n(17369),o=n(50657),l=n(85444),d=n(99370),s=n(13614),m=n(24601),u=n(44940),c=n(33379),h=n(88162),p=n(11163),g=n(67294),f=n(95565),v=n(74231);let x={FirstName:"",LastName:"",Gender:"",Birthdate:""},b={...x,Submit:{Message:"",Localized:!0}};var w=e=>{let{completeProfile:t,updateSession:n,isInitialized:a,meta:i}=(0,c.Z)(),{currentLocale:r}=(0,o.x0)(),[l,d]=(0,g.useState)(!1),[s,m]=(0,g.useState)(function(e){let{profileData:t}=e;return t?{FirstName:(null==t?void 0:t.FirstName)||"",LastName:(null==t?void 0:t.LastName)||"",Gender:(null==t?void 0:t.Gender)||"",Birthdate:"Invalid Date"!==new Date((null==t?void 0:t.Birthdate)||"").toString()?new Date((null==t?void 0:t.Birthdate)||"").toString():""}:x}({profileData:e})),[u,w]=(0,g.useState)(b),[N,y]=(0,g.useState)(!1),[j,M]=(0,g.useState)(!1),T=(0,p.useRouter)(),{closeOffCanvas:C}=(0,h.Z)(),{formatDate:P}=(0,o.B7)();(0,g.useEffect)(()=>{m(e=>{if(!e||!a)return e;let t=e||{},n=t.Birthdate;[null,void 0,"0"].includes(null==i?void 0:i.DOB)||isNaN(parseInt((null==i?void 0:i.DOB)||""))||(n="Invalid Date"!==new Date(1e3*parseInt((null==i?void 0:i.DOB)||"")).toString()?new Date(1e3*parseInt((null==i?void 0:i.DOB)||"")).toISOString():"");let r={Gender:(null==i?void 0:i.Gender)||(null==t?void 0:t.Gender),Birthdate:n||"",CountryName_ar:(null==i?void 0:i.Country_ar)||(null==t?void 0:t.CountryName_ar),CountryName_en:(null==i?void 0:i.Country)||(null==t?void 0:t.CountryName_en),PhoneNumber:(null==i?void 0:i.Phone)||(null==t?void 0:t.PhoneNumber),FirstName:(null==i?void 0:i.FirstName)||(null==t?void 0:t.FirstName),LastName:(null==i?void 0:i.LastName)||(null==t?void 0:t.LastName)};return{...e,...r}})},[a,i]),(0,g.useEffect)(()=>{w(b)},[T.locale]);let S=async e=>{e.preventDefault(),d(!1),M(!0);let i=F();f.Gh.validate(i,{abortEarly:!1}).then(async e=>{if(w(b),!a)return M(!1),console.error("Tried to Complete profile while context is not initialized");let o=await t({...i,locale:r});if(!o||"string"==typeof o)throw Error("");if(null==o?void 0:o.hasError)(null==o?void 0:o.errorMsg)?w({...b,Submit:{Message:null==o?void 0:o.errorMsg,Localized:!0}}):w({...b,Submit:{Message:"global.error.generic",Localized:!1}}),M(!1);else{d(!0),y(!0),M(!1),C();let e=null==o?void 0:o.Result;(null==e?void 0:e.FirstName)&&(null==e?void 0:e.LastName)&&(null==e?void 0:e.Birthdate)&&await n({FullName:"".concat(e.FirstName," ").concat(e.LastName),DOB:new Date(e.Birthdate).getTime()/1e3+"",Gender:e.Gender,FirstName:null==e?void 0:e.FirstName,LastName:null==e?void 0:e.LastName})}}).catch(e=>{let t={};if(e instanceof v.p8&&(null==e?void 0:e.inner))e.inner.map(e=>{e.path&&(t[e.path]=e.message)}),w({...t,Submit:{Message:"",Localized:!0}}),k();else{let n="Could not update your profile now - Please try again later.";e instanceof Error&&e.message&&(n=null==e?void 0:e.message),w({...t,Submit:{Message:n,Localized:!0}})}M(!1)})}
1,k=()=>{let e=document.getElementById("register_form_holder");e&&e.scrollIntoView({behavior:"smooth"})},F=()=>{let e=s.Birthdate?P(s.Birthdate):"";return{FirstName:s.FirstName.trim(),LastName:s.LastName.trim(),Gender:s.Gender.trim(),Birthdate:e}};return{user:s,loading:j,submitted:N,errors:u,successUpdate:l,mobile:(null==i?void 0:i.Phone)||"",handleInputChange:e=>{m(t=>({...t,[e.target.name]:e.target.value})),w(t=>({...t,[e.target.name]:""}))},handleDateChange:(e,t)=>{m(n=>({...n,[e]:t})),w(t=>({...t,[e]:""}))},handleSelectChange:e=>{m(t=>({...t,[e.name]:e.value})),w(t=>({...t,[e.name]:""}))},handleSubmit:S,handleCountryCodeChange:e=>{var t;let n=null===(t=(null==e?void 0:e.value)||"")||void 0===t?void 0:t.replace("+","");n&&m(e=>({...e,CountryCode:n}))}}},N=e=>{let{profileData:t}=e,{getLocalizedString:n}=(0,o.x0)(),[i,l]=(0,g.useState)(!1),{user:d,loading:c,errors:h,successUpdate:p,mobile:f,handleSubmit:v,handleInputChange:x,handleDateChange:b,handleSelectChange:N}=w(t),[y,j]=(0,g.useState)(d);return(0,g.useEffect)(()=>{d.FirstName!==y.FirstName||d.LastName!==y.LastName||Date.parse(d.Birthdate)!==Date.parse(y.Birthdate)||d.Gender!==y.Gender?l(!0):l(!1)},[y,d]),(0,a.jsxs)("section",{className:"form-container",children:[(0,a.jsx)(m.Z,{className:"cura-icon",width:42,he
1ight:56}),(0,a.jsx)(r.xv,{as:"h3",className:"title",children:n("CompleteProfileTitle")}),(0,a.jsx)(r.xv,{className:"description",children:n("CompleteProfileDescriptionForConsultation")}),(0,a.jsx)("div",{className:"form-body",children:(0,a.jsxs)("form",{className:"form complete-profile-form",onSubmit:v,children:[(0,a.jsxs)(r.X2,{className:"row",children:[(0,a.jsxs)(r.JX,{xs:12,md:6,className:"input-group",children:[(0,a.jsx)(r.II,{type:"text",placeholder:n("FirstName"),name:"FirstName",expand:"block",value:d.FirstName,onChange:x}),(0,a.jsx)(r.xv,{color:"danger",className:"inline-error",style:{visibility:h.FirstName?"visible":"hidden"},children:h.FirstName?n(h.FirstName):""})]}),(0,a.jsxs)(r.JX,{xs:12,md:6,className:"input-group",children:[(0,a.jsx)(r.II,{type:"text",placeholder:n("LastName"),name:"LastName",expand:"block",value:d.LastName,onChange:x}),(0,a.jsx)(r.xv,{color:"danger",className:"inline-error",style:{visibility:h.LastName?"visible":"hidden"},children:h.LastName?n(h.LastName):""})]}),(0,a.jsx)(r.JX,{xs:12,className:"input-group mobile-input-holder",children:(0,a.jsx)(r.II,{type:"text",placeholder:n("MobileNumberPlaceholderLbl"),name:"Mobile Number",expand:"block",style:{unicodeBidi:"plaintext"},value:f,disabled:!0})}),(0,a.jsxs)(r.JX,{xs:12,md:6,className:"input-group",style:{position:"relative",zIndex:2},children:[(0,a.jsx)(u.Z,{className:"input-element",value:d.Birthdate,name:"Birthdate",handleChange:b}),(0,a.jsx)(r.xv,{color:"danger",className:"inline-error",style:{visibility:h.Birthdate?"visible":"hidden",zIndex:0},children:h.Birthdate?n(h.Birthdate):""})]}),(0,a.jsxs)(r.JX,{xs:12,md:6,className:"input-group",style:{position:"relative",zIndex:1},children:[(0,a.jsx)(r.Ph,{name:"Gender",id:"gender",instanceId:"gender",classNamePrefix:"select",onChange:N,placeholder:n("Gender"),isSearchable:!1,components:{IndicatorSeparator:()=>null},styles:{singleValue:e=>({...e,color:"#000"})},value:{name:"Gender",label:n("Male"===d.Gender?"GenderItemMale":"Female"===d.Gender?"GenderItemFemale":"Gender"),value:d.Gender},options:[{name:"Gender",label:n("GenderItemMale"),value:"Male"},{name:"Gender",label:n("GenderItemFemale"),value:"Female"}]}),(0,a.jsx)(r.xv,{color:"danger",className:"inline-error",style:{visibility:h.Gender?"visible":"hidden"},children:h.Gender?n(h.Gender):""})]}),(0,a.jsx)(r.JX,{children:h.Submit.Message&&(0,a.jsx)(r.xv,{color:"danger",className:"inline-error",children:h.Submit.Localized?h.Submit.Message:n(h.Submit.Message)})})]}),(0,a.jsx)(s.Z,{isLoading:c,disabled:!i,className:"submit--btn",type:"submit",style:{zIndex:0},expand:"full",children:n("Proceed")})]})}),p&&(0,a.jsx)("p",{className:"inline-success",children:n("EditProfileSuccess")})]})},y=n(60114);let j=(0,l.ZP)(d.Z).withConfig({componentId:"sc-7fc14ad4-0"})([".edit-back-button{padding:1.5rem 6rem;}.profile-edit_content .form-container{height:auto;padding:0.5rem 6rem;margin-block:auto;}.profile-image-container{min-width:min(50%,400px);margin-inline:auto;margin-block:80px;display:flex;align-items:center;justify-content:center;flex-direction:column;align-self:flex-start;.profile-image-wrapper{width:300px;max-width:100%;height:auto;aspect-ratio:1;border-radius:20px;margin-bottom:20px;}button{padding-block:10px;height:auto;border-radius:10px;width:min(400px,90%);}form{width:100%;}}@media screen and (max-width:1096px){&.wide{.form-container{padding-inline:1rem;}}.edit-back-button{padding:1rem 1rem 0 0;}.profile-edit_content{min-height:auto;flex-wrap:wrap;flex-direction:column-reverse;.cura-icon{display:none;}.form--holder{width:100%;}.form-container{height:auto;padding:2rem 1rem 4rem;}}.profile-image-container{margin-top:20px;margin-block:0;.profile-image-wrapper{max-width:100px;border-radius:50%;}}}"]);var M=e=>{let{wide:t=!0,profileData:n=null,uploaderOpen:l,onBack:d,onUploaderVisibilityChange:s}=e,{currentLocale:m,getLocalizedString:u}=(0,o.x0)();return(0,a.jsx)(j,{locale:m,className:t?"wide":"",children:(0,a.jsxs)(r.rj,{fluid:!0,children:[d?(0,a.jsx)(r.JX,{className:"edit-back-button",children:(0,a.jsx)(r.zx,{fill:"clear",onClick:d,children:(0,a.jsx)(r.JO,{children:"ar"===m?(0,a.jsx)(i.Z,{style:{transform:"rotate(180deg)"}}):(0,a.jsx)(i.Z,{})})})}):null,(0,a.jsxs)(r.X2,{verticalAlign:!0,wrap:"false",className:"profile-edit_content",children:[(0,a.jsx)(r.JX,{lg:6,xs:12,className:"form--holder",children:(0,a.jsx)("div",{className:"holder",children:(0,a.jsx)(N,{profileData:n})})}),(0,a.jsxs)("div",{className:"profile-image-container",children:[(0,a.jsx)(y.Z,{profileData:n,uploaderOpen:l,onVisibilityChange:s}),(0,a.jsx)(r.zx,{type:"button",className:"profile-button",fill:"outline",expand:"full",onClick:()=>s(!0),children:u("Profile.ChooseImage")})]})]})]})})}},74706:function(e,t,n){n.d(t,{Z:function(){return u}});var a={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من ثانيتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانيتان",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتان",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريبا",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتان",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومان",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريبا",two:"أسبوعين تقريبا",threeToTen:"{{count}} أسابيع تقريبا",other:"{{count}} أسبوعا تقريبا"},xWeeks:{one:"أسبوع واحد",two:"أسبوعان",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوعا"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريبا",threeToTen:"{{count}} أشهر تقريبا",other:"{{count}} شهرا تقريباً"},xMonths:{one:"شهر واحد",two:"شهران",threeToTen:"{{count}} أشهر",other:"{{count}} شهرا"},aboutXYears:{one:"سنة واحدة تقريباً",two:"سنتين تقريبا",threeToTen:"{{count}} سنوات تقريباً",other:"{{count}} سنة تقريباً"},xYears:{one:"سنة واحد",two:"سنتان",threeToTen:"{{count}} سنوات",other:"{{count}} سنة"},overXYears:{one:"أكثر من سنة",two:"أكثر من سنتين",threeToTen:"أكثر من {{count}} سنوات",other:"أكثر من {{count}} سنة"},almostXYears:{one:"ما يقارب سنة واحدة",two:"ما يقارب سنتين",threeToTen:"ما يقارب {{count}} سنوات",other:"ما يقارب {{count}} سنة"}},i=n(20047),r={date:(0,i.Z)({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:(0,i.Z)({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:(0,i.Z)({formats:{full:"{{date}} 'عند الساعة' {{time}}",long:"{{date}} 'عند الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},o={lastWeek:"eeee 'الماضي عند الساعة' p",yesterday:"'الأمس عند الساعة' p",today:"'اليوم عند الساعة' p",tomorrow:"'غدا عند الساعة' p",nextWeek:"eeee 'القادم عند الساعة' p",other:"P"},l=n(72834),d={ordinalNumber:function(e){return String(e)},era:(0,l.Z)({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:(0,l.Z)({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,l.Z)({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:(0,l.Z)({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:(0,l.Z)({values:{narrow:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"},abbreviated:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"},wide:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"},abbreviated:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"},wide:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"}},defaultFormattingWidth:"wide"})},s=n(36669),m=n(37632),u={code:"ar",formatDistance:function(e,t,n){var i,r=a[e];return(i="string"==typeof r?r:1===t?r.one:2===t?r.two:t<=10?r.threeToTen.replace("{{count}}",String(t)):r.other.replace("{{count}}",String(t)),null!=n&&n.addSuffix)?n.comparison&&n.comparison>0?"خلال "+i:"منذ "+i:i},formatLong:r,formatRelative:function(e){return o[e]},localize:d,match:{ordinalNumber:(0,s.Z)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,m.Z)({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:(0,m.Z)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/ر[1234]/,wide:/الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,m.Z)({matchPatterns:{narrow:/^[أيفمسند]/,abbreviated:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,wide:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^يناير/i,/^فبراير/i,/^مارس/i,/^أبريل/i,/^مايو/i,/^يونيو/i,/^يوليو/i,/^أغسطس/i,/^سبتمبر/i,/^أكتوبر/i,/^نوفمبر/i,/^ديسمبر/i]},defaultParseWidth:"any"}),day:(0,m.Z)({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:(0,m.Z)({matchPatterns:{narrow:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,any:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/منتصف الليل/,noon:/الظهر/,afternoon:/بعد الظهر/,morning:/في الصباح/,evening:/في المساء/,night:/في الليل/}},defaultParseWidth:"any"})},options:{weekStartsOn:6,firstWeekContainsDate:1}}}}]);

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.