1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[75,4280,9223],{64345:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r=t(22101),a=function(e){return(0,r.Xn)({method:"post",url:"user/change-password",data:{password:e.password,passwordReview:e.passwordAgain,token:e.token,languageShortName:e.language}})},i=t(68091),s=function(e){var n;return(0,r.Xn)({method:"get",url:"user/get-by-id",headers:{Authorization:"Bearer ".concat(null===(n=i.pR.get("identity"))||void 0===n?void 0:n.access)},params:{Id:e.id,LanguageShortName:e.language,cacheDisable:(0,r.WP)(),_t:Date.now()}})},o=function(e){return(0,r.Xn)({method:"post",url:"user/reset-password",data:{email:e.email,languageShortName:e.language}})},c=function(e){return(0,r.Xn)({method:"post",url:"user/send-authorize-code",data:{languageShortName:e.language,email:e.email}})},l=t(15813),d=function(e){return{access:e.accessToken,expires:e.expiresIn,type:e.tokenType,refresh:e.refreshToken,scope:e.scope}},u=function(e){var n,t,r,a,i,s,o,c,l=new FormData;(e.profilePictureFile&&Object.values(e.profilePictureFile).forEach((function(e){l.append("profilePictureFile",e)})),l.append("Id",null===(n=e.id)||void 0===n?void 0:n.toString()),e.gender&&l.append("GenderId",null===(t=e.gender)||void 0===t?void 0:t.toString()),l.append("NativeLanguageId",null===(r=e.nativeLanguage)||void 0===r?void 0:r.toString()),l.append("CountryId",null===(a=e.country)||void 0===a?void 0:a.toString()),l.append("CityId",null===(i=e.city)||void 0===i?void 0:i.toString()),l.append("Name",e.name),l.append("Surname",e.surname),e.identityNumber&&l.append("IdentityNumber",e.identityNumber),e.passportNumber&&l.append("PassportNumber",e.passportNumber),l.append("PhoneNumber",null===(s=e.phoneNumber)||void 0===s?void 0:s.replaceAll(/[- )(]/g,"")),e.address&&l.append("Address",e.address),e.zipCode&&l.append("ZipCode",e.zipCode),e.userCommunicationChannel&&l.append("userCommunicationChannel",null===(o=e.userCommunicationChannel)||void 0===o?void 0:o.toString()),e.birthDate&&l.append("BirthDate",e.birthDate),e.languageShortName&&l.append("LanguageShort
1Name",e.languageShortName),e.passportInssungCountryId)&&l.append("PassportInssungCountryId",null===(c=e.passportInssungCountryId)||void 0===c?void 0:c.toString());return e.milesAndSmilesCode&&l.append("MilesAndSmilesCode",e.milesAndSmilesCode),l},f={changePassword:a,get:s,resetPassword:o,sendCode:c,signin:function(e){return(0,l.X)({method:"post",url:(0,r.FP)("user/login"),data:{languageShortName:e.language,email:e.email,password:e.password}},d)},signup:function(e){var n;return(0,r.Xn)({method:"post",url:"user",data:{languageShortName:e.language,email:e.email,emailReview:e.emailAgain,password:e.password,passwordReview:e.passwordAgain,phoneNumber:null===(n=e.phoneNumber)||void 0===n?void 0:n.replaceAll(/[- )(]/g,""),name:e.name,surname:e.surname,genderId:e.gender,countryId:e.country,birthDate:e.birthDate,cityId:e.city,nativeLanguageId:e.nativeLanguage,privacyAggrement:e.privacyAgreementIRead,userCommunicationChannel:e.userCommunicationChannel}})},update:function(e){var n;return(0,r.Xn)({method:"put",url:"user",data:u(e),headers:{"Content-Type":"multipart/form-data",Authorization:"Bearer ".concat(null===(n=i.pR.get("identity"))||void 0===n?void 0:n.access)}})},validatePasswordChangeCode:function(e){return(0,r.Xn)({method:"post",url:"user/validate-reset-password-token",data:{token:e}})},verifyAccount:function(e){return(0,r.Xn)({method:"post",url:"user/approve-user-authorize-code",data:{languageShortName:e.language,email:e.email,authorizeCode:e.code}})}}},53222:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(20129),a=t(68091),i=t(22101),s=function(e){switch(e){case r.UF.Accreditation:return"accreditation";case r.UF.AvailableLanguage:return"available-language";case r.UF.Branch:return"branch/option";case r.UF.City:return"city";case r.UF.Country:return"country";case r.UF.Currency:return"currency";case r.UF.Doctor:return"doctor/option";case r.UF.FacilityResource:return"facility-resource";case r.UF.FacilityType:return"facility-type";case r.UF.Gender:return"gender";case r.UF.OfferRejectReason:return"offer-reject-reason";case r.UF.HealthService:return"health-service/option";case r.UF.HospitalType:return"establishment-type";case r.UF.Insurance:return"insurance";case r.UF.Job:return"job";case r.UF.Language:return"language";case r.UF.NativeLanguage:return"native-language";case r.UF.SupportService:return"support-service";case r.UF.Treatment:return"treatment/option";case r.UF.Diagnosis:return"diagnosis/option";case r.UF.Symptom:return"symptom/option";case r.UF.Hospital:return"establishment/option"}},o=function(e,n){return{count:e.dataCount||e.data.length,data:e.data.map((function(e){return{id:e.id,name:e.name,title:e.title,children:e.treatments||[]}})),pages:e.pageCount||1,name:n}},c=function(e){switch(e){case r.UF.Accreditation:return"accreditation/get-by-id";case r.UF.AvailableLanguage:return"available-language/get-by-id";case r.UF.Branch:return"branch/get-by-id";case r.UF.City:return"city/get-by-id";case r.UF.Doctor:return"doctor/get-by-id";case r.UF.FacilityResource:return"facility-resource/get-by-id";case r.UF.HealthService:return"health-service/get-by-id";case r.UF.Hospital:return"hospital/get-by-id";case r.UF.HospitalType:return"establishment-type/get-by-id";case r.UF.Insurance:return"insurance/get-by-id";case r.UF.Job:return"job/get-by-id";case r.UF.Language:return"language/get-by-id";case r.UF.SupportService:return"support-service/get-by-id";case r.UF.Agency:return"agency/get-by-id"}},l=function(e){return{data:{id:e.data.id,name:e.data.name}}},d={get:function(e){var n,t,r,c,l,d,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Xn)({method:"get",url:s(e),headers:{Authorization:"Bearer ".concat(null===(n=a.pR.get("identity"))||void 0===n?void 0:n.access)},params:{BranchIds:u.branchIds,TreatmentIds:u.treatmentIds,Ids:u.ids,LanguageShort
1Name:u.language,CountryId:u.country,Name:u.name,cityIds:null===u||void 0===u||null===(t=u.dynamicFilter)||void 0===t?void 0:t.cityIds,branchIds:null===u||void 0===u||null===(r=u.dynamicFilter)||void 0===r?void 0:r.branchIds,establishmentIds:null===u||void 0===u||null===(c=u.dynamicFilter)||void 0===c?void 0:c.establishmentIds,doctorIds:null===u||void 0===u||null===(l=u.dynamicFilter)||void 0===l?void 0:l.doctorIds,jobIds:null===u||void 0===u||null===(d=u.dynamicFilter)||void 0===d?void 0:d.jobIds,PageIndex:u.pageIndex||"0",PageSize:u.pageSize||"100",SymptomIds:u.symptomIds,DiagnosisIds:u.diagnosisIds}},(function(n){return o(n,e)}))},getById:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Xn)({method:"get",url:c(e),params:{Id:n.id,LanguageShortName:n.language}},l)}}},15813:function(e,n,t){"use strict";t.d(n,{X:function(){return i}});var r=t(9669),a=t.n(r);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return new Promise((function(t,r){a()(e).then((function(e){try{t(n(e.data))}catch(a){r({code:406,type:a.name,message:a.message})}})).catch((function(e){e.response?r({code:e.response.status,message:e.response.data?e.response.data.errorMessage||e.response.data.error:e.message,type:e.response.statusText}):r({code:503,message:"Sunucuya ula\u015f\u0131lam\u0131yor, internet ba\u011flant\u0131s\u0131n\u0131 kontrol edin ve tekrar deneyin.",type:"Service Unavailable"})}))}))}},2336:function(e,n,t){"use strict";var r=t(26265),a=t(85893),i=t(38347),s=t(18235);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.alignments,t=void 0===n?{}:n,r=e.children,o=e.className,l=e.offsets,d=void 0===l?{}:l,u=e.reorders,f=void 0===u?{}:u,p=e.sizes,m=void 0===p?{}:p,h=(0,i.Z)(e,["alignments","children","className","offsets","reorders","sizes"]),g=[];return Object.keys(m).forEach((function(e){var n=m[e];n&&g.push("col-".concat(e,"-").concat(n))})),g.length||g.push("col-xs"),Object.keys(t).forEach((function(e){var n=t[e];n&&g.push("".concat(n,"-").concat(e))})),Object.keys(d).forEach((function(e){var n=d[e];n&&g.push("col-".concat(e,"-offset-").concat(n))})),Object.keys(f).forEach((function(e){var n=f[e];n&&g.push("".concat(n,"-").concat(e))})),(0,a.jsx)("div",c(c({className:(0,s.e7)(g,o)},h),{},{children:r}))}},34280:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return r.Z}});var r=t(2336)},74647:function(e,n,t){"use strict";var r=t(85893),a=t(67294),i=t(32875),s=t(74177);n.Z=function(e){var n=e.error,t=e.heading,o=e.onClose;if(!n)return null;var c=(0,a.useContext)(i.T),l=function(){return n.message?"string"===typeof n.message?(0,r.jsx)("p",{children:n.message}):(0,r.jsx)("ul",{children:n.message.map((function(e,n){return(0,r.jsx)("li",{children:e},n)}))}):(0,r.jsx)("p",{children:c.configs.locale.error})};return(0,r.jsx)(s.Z,{actions:[{children:c.configs.locale.close||"Close",onClick:o}],appearance:"danger",heading:t||c.configs.locale.errorModalTitle,onClose:o,width:"narrow",children:(0,r.jsx)(l,{})})}},33237:function(e,n,t){"use strict";t.d(n,{Z:function(){return r.Z}});var r=t(74647)},59876:function(e,n,t){"use strict";var r=t(26265),a=t(85893),i=t(38347),s=t(67294);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};
1n%2?o(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var l=function(e,n){var t=e.children,r=e.onSubmit,s=(0,i.Z)(e,["children","onSubmit"]);return(0,a.jsx)("form",c(c({className:"c-form",onSubmit:r,ref:n},s),{},{children:t}))};n.Z=s.forwardRef(l)},94630:function(e,n,t){"use strict";t.d(n,{gN:function(){return l},ZP:function(){return r.Z}});var r=t(59876),a=t(26265),i=t(85893),s=t(38347);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){(0,a.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var l=function(e){var n=e.children,t=e.label,r=(0,s.Z)(e,["children","label"]);return(0,i.jsxs)("div",c(c({className:"c-form__field"},r),{},{children:[t&&(0,i.jsx)("label",{className:"c-form__field__label",children:t}),n]}))}},29770:function(e,n,t){"use strict";t.d(n,{Z:function(){return g}});var r=t(85893),a=t(67294),i=t(18235),s=t(90813),o=function(e){var n=e.children;if(n)return(0,r.jsx)("div",{className:"c-modal-content",children:n})},c=t(26265),l=t(37259),d=t(34280),u=t(59223);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}var p=function(e){var n=e.appearance,t=e.actions,a=void 0===t?[]:t;return a.length?(0,r.jsx)("footer",{className:"c-modal-footer",children:(0,r.jsx)(u.default,{children:(0,r.jsx)(d.default,{alignments:{xs:"end"},children:(0,r.jsx)(l.ButtonGroup,{children:a.map((function(e,t){return(0,r.jsx)(l.default,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({appearance:t?"subtle":n||"primary",autoFocus:!t},e),t)}))})})})}):null},m=t(91080),h=function(e){var n=e.appearance,t=e.children;return t?(0,r.jsxs)("header",{className:"c-modal-header",children:[function(){switch(n){case"danger":return(0,r.jsx)(m.default,{className:"c-modal-icon",name:"error",fill:"var(--R400)"});case"warning":return(0,r.jsx)(m.default,{className:"c-modal-icon",name:"warning",fill:"var(--Y400)"});case"success":return(0,r.jsx)(m.default,{className:"c-modal-icon",name:"done",fill:"var(--G400)"})}}(),"string"===typeof t?(0,r.jsx)("h4",{className:"c-modal-heading",children:t}):t]}):null},g=function(e){var n=e.actions,t=e.appearance,c=e.children,l=e.className,d=e.heading,u=e.onClose,f=e.scrollBehavior,m=void 0===f?"outside":f,g=e.width,x=void 0===g?"medium":g,v=(0,a.useRef)(),j=["c-modal","c-modal--width-".concat(x),"c-modal--scroll-behavior-".concat(m)];return(0,a.useEffect)((function(){return v.current.scrollTo(0,0),document.body.style.overflow="hidden",function(){document.body.style.overflow=null}}),[]),(0,r.jsxs)("div",{className:"c-modal-portal",ref:v,children:[(0,r.jsx)("div",{className:"c-modal-backdrop",onClick:u}),(0,r.jsxs)("div",{className:(0,i.e7)(j,l),role:"dialog","aria-modal":"true",children:[(0,r.jsx)(h,{appearance:t,children:d}),"inside"===m?(0,r.jsx)(s.Z,{children:(0,r.jsx)(o,{children:c})}):(0,r.jsx)(o,{children:c}),(0,r.jsx)(p,{actions:n,appearance:t})]})]})}},74177:function(e,n,t){"use strict";t.d(n,{Z:function(){return r.Z}});var r=t(29770)},59981:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(85893),a=t(809),i=t.n(a),s=t(92447),o=t(67294),c=t(18235),l=t(37259),d=t(74177),u=function(e){var n=e.offerId,t=e.establishmentId,a=e.onSuccess,u=e.onError,f=e.className,p=e.children,m=void 0===p?"Teklifi Kabul Et":p,h=e.appearance,g=void 0===h?"success":h,x=e.confirmMessage,v=void 0===x?"Teklifi kabul etmek istedi\u011finizden emin misiniz? \xd6deme sayfas\u0131na y\xf6nlendirileceksiniz.":x,j=(0,o.useState)(!1),b=j[0],y=j[1],O=(0,o.useState)(!1),w=O[0],N=O[1],k=(0,c.EQ)({onSuccess:function(e){e?(N(!0),null===a||void 0===a||a("Teklif kabul edildi. \xd6deme sayfas\u0131na y\xf6nlendiriliyorsunuz..."),setTimeout((function(){y(!1),N(!1)}),1e3)):(N(!0),null===a||void 0===a||a("Teklif ba\u015far\u0131yla kabul edildi! \xd6deme i\u015flemi tamamland\u0131."),setTimeout((function(){y(!1),N(!1)}),2e3))},onError:function(e){null===u||void 0===u||u(e),y(!1)}}),P=k.isLoading,C=k.error,T=k.acceptOffer,S=function(){var e=(0,s.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T({offerId:n,establishmentId:t});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){P||y(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.default,{appearance:g,onClick:function(){y(!0)},className:f,isDisabled:P,children:m}),b&&(0,r.jsx)(d.Z,{onClose:I,width:"medium",children:(0,r.jsxs)("div",{style:{padding:"2rem"},children:[(0,r.jsx)("h2",{style:{marginBottom:"1rem",fontSize:"1.5rem",fontWeight:600},children:"Teklifi Kabul Et"}),!w&&!C&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{style:{marginBottom:"1.5rem",lineHeight:"1.6"},children:v}),(0,r.jsxs)("div",{style:{display:"flex",gap:"1rem",justifyContent:"flex-end"},children:[(0,r.jsx)(l.default,{appearance:"default",onClick:I,isDisabled:P,children:"\u0130ptal"}),(0,r.jsx)(l.default,{appearance:"success",onClick:S,isLoading:P,isDisabled:P,children:P?"\u0130\u015fleniyor...":"Evet, Kabul Et"})]})]}),w&&(0,r.jsxs)("div",{style:{textAlign:"center",padding:"1rem 0"},children:[(0,r.jsx)("div",{style:{fontSize:"3rem",color:"#28a745",marginBottom:"1rem"},children:"\u2713"}),(0,r.jsx)("p",{style:{color:"#28a745",fontWeight:500},children:"Teklif ba\u015far\u0131yla kabul edildi!"}),(0,r.jsx)("p",{style:{color:"#666",marginTop:"0.5rem"},children:"\xd6deme sayfas\u0131na y\xf6nlendiriliyorsunuz..."})]}),C&&(0,r.jsxs)("div",{style:{marginTop:"1rem",padding:"1rem",background:"#fff3cd",borderRadius:"4px",borderLeft:"4px solid #ffc107"},children:[(0,r.jsx)("p",{style:{color:"#856404",fontWeight:500,marginBottom:"0.5rem"},children:"\u26a0 Uyar\u0131"}),(0,r.jsx)("p",{style:{color:"#856404"},children:C}),(0,r.jsxs)("div",{style:{marginTop:"1rem",display:"flex",gap:"1rem",justifyContent:"flex-end"},children:[(0,r.jsx)(l.default,{appearance:"default",onClick:I,children:"Kapat"}),(0,r.jsx)(l.default,{appearance:"warning",onClick:S,children:"Tekrar Dene"})]})]})]})})]})}},10839:function(e,n,t){"use strict";var r=t(26265),a=t(85893),i=t(38347),s=t(18235);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};
1n%2?o(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.alignments,t=void 0===n?{}:n,r=e.children,o=e.className,l=e.distributions,d=void 0===l?{}:l,u=e.gutter,f=(0,i.Z)(e,["alignments","children","className","distributions","gutter"]),p=["row",u];return Object.keys(t).forEach((function(e){var n=t[e];n&&p.push("".concat(n,"-").concat(e))})),Object.keys(d).forEach((function(e){var n=d[e];n&&p.push("".concat(n,"-").concat(e))})),(0,a.jsx)("div",c(c({className:(0,s.e7)(p,o)},f),{},{children:r}))}},59223:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return r.Z}});var r=t(10839)},59717:function(e,n,t){"use strict";var r=t(26265),a=t(85893),i=t(38347);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=(0,i.Z)(e,["children"]);return(0,a.jsx)("option",o(o({},t),{},{children:n}))}},27378:function(e,n,t){"use strict";t.d(n,{R:function(){return f.Z},Z:function(){return u}});var r=t(26265),a=t(85893),i=t(38347),s=t(67294),o=t(18235);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d=function(e,n){var t=e.autoFocus,r=e.children,c=e.className,d=e.isDisabled,u=void 0!==d&&d,f=e.spacing,p=void 0===f?"default":f,m=e.testId,h=(0,i.Z)(e,["autoFocus","children","className","isDisabled","spacing","testId"]),g=(0,s.useRef)(),x=["select","select--spacing-".concat(p)];return(0,s.useEffect)((function(){t&&g.current.focus()}),[]),(0,a.jsx)("div",{className:(0,o.e7)(x,c),"data-testid":m,children:(0,a.jsx)("select",l(l({disabled:u,ref:(0,o.he)(g,n)},h),{},{children:r}))})},u=s.forwardRef(d),f=t(59717)},84020:function(e,n,t){"use strict";var r=t(85893),a=t(26265),i=t(38347),s=t(67294),o=t(18235);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,a.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d=function(e,n){var t=e.labelWidth,a=e.autoFocus,c=e.className,d=e.isDisabled,u=void 0!==d&&d,f=e.spacing,p=void 0===f?"default":f,m=e.testId,h=e.type,g=void 0===h?"text":h,x=e.width,v=e.label,j=(0,i.Z)(e,["labelWidth","autoFocus","className","isDisabled","spacing","testId","type","width","label"]),b=(0,s.useRef)(),y=["textfield","textfield--spacing-".concat(p)];return(0,s.useEffect)((function(){a&&b.current.focus()}),[]),(0,r.jsxs)("div",{className:(0,o.e7)(y,c),"data-testid":m,style:{width:x},children:[(0,r.jsx)("input",l({disabled:u,ref:(0,o.he)(b,n),type:g},j)),v&&(0,r.jsx)("label",{style:{width:t||"100%"},children:v})]})};n.Z=s.forwardRef(d)},50075:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return se}});var r=t(85893),a=t(59999),i=t(26265),s=t(38347),o=t(809),c=t.n(o),l=t(92447),d=t(67294),u=t
1(9669),f=t.n(u),p=t(68091),m=t(80044),h=t(32875),g=t(84157),x=t(53222),v=t(81738),j=t(37259),b=t(11163),y=t(84020),O=t(27378),w=t(91080),N=t(7098),k=t(33237),P=t(74177),C=t(59981),T=t(22101),S=function(e){return{}},I=function(e){return{count:e.dataCount,pages:e.pageCount,data:e.data.map((function(e){return{offerEstablishmentId:e.offerEstablishmentId,name:e.name,surname:e.surname,countryId:e.countryId,countryName:e.countryName,passportNumber:e.passportNumber,companionProximity:e.companionProximity,visaCode:e.visaCode,citizenshipNumber:e.citizenshipNumber,id:e.id,createdDateTime:e.createdDateTime}}))}},Z=function(e){return{data:{offerEstablishmentId:e.data.offerEstablishmentId,name:e.data.name,surname:e.data.surname,countryId:e.data.countryId,countryName:e.data.countryName,passportNumber:e.data.passportNumber,companionProximity:e.data.companionProximity,visaCode:e.data.visaCode,citizenshipNumber:e.data.citizenshipNumber,id:e.data.id}}},D=function(e){return e.data},z={create:function(e){var n;return(0,T.Xn)({method:"post",url:"offer-user-health-visa-code/create",data:e,headers:{Authorization:"Bearer ".concat(null===(n=p.pR.get("identity"))||void 0===n?void 0:n.access),"Content-Type":"application/json"}})},createCompanions:function(e){var n;return(0,T.Xn)({method:"post",url:"offer-user-health-visa-code/create-companions",data:e,headers:{Authorization:"Bearer ".concat(null===(n=p.pR.get("identity"))||void 0===n?void 0:n.access),"Content-Type":"application/json"}},S)},get:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,T.Xn)({method:"get",url:"offer-user-health-visa-code/get",headers:{Authorization:"Bearer ".concat(null===(e=p.pR.get("identity"))||void 0===e?void 0:e.access)},params:{pageIndex:n.pageIndex||"0",pageSize:n.pageSize||"20",offerEstablishmentId:n.offerEstablishmentId,orderBy:n.orderBy||"",languageShortName:"en",cacheDisabled:(0,T.WP)()}},I)},getById:function(e,n){var t;return(0,T.Xn)({method:"get",url:"offer-user-health-visa-code/get-by-id",headers:{Authorization:"Bearer ".concat(n||(null===(t=p.pR.get("identity"))||void 0===t?void 0:t.access))}
1,params:{LanguageShortName:e.language,Id:e.id,cacheDisable:(0,T.WP)()}},Z)},getByVisaCode:function(e){return(0,T.Xn)({method:"get",url:"offer-user-health-visa-code/get-by-visa-code",params:{VisaCode:e.VisaCode||""}},D)}},F=t(29679),E=t.n(F),A=t(43906),R=t(18235),B=t(61120),U=t.n(B),_=t(91819);function L(e){return M.apply(this,arguments)}function M(){return(M=(0,l.Z)(c().mark((function e(n){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],e.next=3,W(n,function(){var e=(0,l.Z)(c().mark((function e(n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U()(n,{scale:2,useCORS:!0,allowTaint:!0}).then((function(e){t.push(e.toDataURL("image/png"))}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 3:return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e,n){return X.apply(this,arguments)}function X(){return(X=(0,l.Z)(c().mark((function e(n,t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<n.length)){e.next=7;break}return e.next=4,t(n[r],r);case 4:r++,e.next=1;break;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var q=function(e){return{data:e.data.map((function(e){return{code:e.code,name:e.name,description:e.description,price:e.price,id:e.id}}))}},H={get:function(e){var n;return(0,T.Xn)({method:"get",url:"healthcare-price",headers:{Authorization:"Bearer ".concat(null===(n=p.pR.get("identity"))||void 0===n?void 0:n.access)},params:{languageShortName:e.languageShortName,codes:e.codes.join(",")}},q)}},V=t(21269),Q=t(31929),Y=function(e){var n=e.establishment,t=e.onDismiss,i=e.show,s=e.user,o=(0,d.useState)(!1),u=o[0],f=o[1],p=(0,d.useState)(!1),m=p[0],g=p[1],x=(0,d.useState)({}),v=x[0],j=x[1],b=(0,d.useContext)(h.T),y=b.post.offer;(0,d.useEffect)((function(){i&&n&&O()}),[i]);var O=function(){var e=n.proforma,t=[];e.treatments&&(t=[].concat((0,a.Z)(t),(0,a.Z)(e.treatments.map((function(e){return e.code}))))),e.labExaminations&&(t=[].concat((0,a.Z)(t),(0,a.Z)(e.labExaminations.map((function(e){return e.code}))))),e.nuclearExaminations&&(t=[].concat((0,a.Z)(t),(0,a.Z)(e.nuclearExaminations.map((function(e){return e.code}))))),H.get({codes:t,languageShortName:b.lang}).then((function(e){var n={};e.data&&(e.data.forEach((function(e){n[e.code]=e.name})),j(n))})).finally((function(){f(!0)}))},N=function(){var e,n;g(!0),(e=".proforma-doc",n="proforma-".concat(y.createdDate),new Promise(function(){var t=(0,l.Z)(c().mark((function t(r){var a,i,s,o,l,d,u,f,p,m,h;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=document.querySelectorAll(e),i=0;case 2:if(!(i<a.length)){t.next=20;break}s=a[i].querySelectorAll("img"),o=0;case 5:if(!(o<s.length)){t.next=17;break}return t.next=8,fetch(s[o].src);case 8:return l=t.sent,t.next=11,l.blob();case 11:d=t.sent,u=URL.createObjectURL(d),s[o].src=u;case 14:o++,t.next=5;break;case 17:i++,t.next=2;break;case 20:if(!a.length){t.next=33;break}return document.body.classList.add("is-snapshot"),f=new _.kH({orientation:"portrait"}),t.next=25,L(a);case 25:(p=t.sent).forEach((function(e){var n=f.getImageProperties(e),t=f.internal.pageSize.getWidth(),r=n.height*t/n.width;f.addImage(e,"PNG",0,0,t,r),f.addPage("p","landscape")})),f.deletePage(p.length+1),m=(new Date).toLocaleDateString("tr-TR",{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}).replaceAll(":","_"),h="".concat(n,"-").concat(m).replaceAll(" ","_"),f.save("".concat(h,".pdf")),document.body.classList.remove("is-snapshot"),r(h);case 33:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())).then((function(){g(!1)}))},k=function(){var e,t,a,i,o,c,l,d,u,f,p,m,h,g,x,j,y,O,N,k,P,C,T,S,I,Z,D,z,F=n.proforma;return F&&n?(0,r.jsx)("div",{className:"proforma-doc-container",children:(0,r.jsxs)("div",{className:"proforma-doc",children:[(0,r.jsxs)("div",{className:"proforma-doc-header",children:[(0,r.jsx)("div",{className:"proforma-doc-header-logo",children:(0,r.jsx)(V.Z,{src:"documents/".concat(null===n||void 0===n?void 0:n.logo),alt:n.name,height:100,className:"proforma-doc-header-logo-image"})}),(0,r.jsxs)("div",{className:"proforma-doc-header-text",children:[(0,r.jsx)("h5",{children:n.name}),(0,r.jsxs)("div",{className:"proforma-doc-header-raw",children:[(0,r.jsxs)("strong",{children:[b.configs.locale.address,": "]})," ",n.address]}),(0,r.jsxs)("div",{className:"proforma-doc-header-raw",children:[(0,r.jsxs)("strong",{children:[b.configs.locale.telephone,": "]})," ",n.phone]}),(0,r.jsxs)("div",{className:"proforma-doc-header-raw",children:[(0,r.jsxs)("strong",{children:[b.configs.locale.email,": "]})," ",n.email]})]}),(0,r.jsx)("div",{className:"proforma-doc-header-date",children:new Date(n.updatedAt).toLocaleStr
1ing("tr-TR",{day:"numeric",month:"numeric",year:"numeric"})})]}),s&&(0,r.jsxs)("div",{className:"proforma-doc-patient-info",children:[(0,r.jsx)("div",{className:"proforma-doc-patient-info-title",children:(0,r.jsx)("strong",{children:b.configs.locale.patientInformation||"Hasta Bilgileri"})}),(0,r.jsxs)("div",{className:"proforma-doc-patient-info-content",style:{justifyContent:"space-between",display:"flex",gap:"20px",flexWrap:"wrap",padding:"10px 10px"},children:[(0,r.jsxs)("div",{className:"proforma-doc-patient-info-item",children:[(0,r.jsxs)("strong",{children:[b.configs.locale.name||"Ad",": "]}),s.name]}),(0,r.jsxs)("div",{className:"proforma-doc-patient-info-item",children:[(0,r.jsxs)("strong",{children:[b.configs.locale.surname||"Soyad",": "]}),s.surname]}),(0,r.jsxs)("div",{className:"proforma-doc-patient-info-item",children:[(0,r.jsxs)("strong",{children:[b.configs.locale.nationality||"Uyruk",": "]}),s.countryName]})]})]}),(0,r.jsxs)("div",{className:"proforma-doc-content",children:[null!==(e=F.treatments)&&void 0!==e&&e.length?(0,r.jsxs)("table",{children:[(0,r.jsxs)("thead",{children:[(0,r.jsx)("th",{children:b.configs.locale.treatments}),(0,r.jsx)("th",{children:b.configs.locale.costPackagePrice})]}),(0,r.jsx)("tbody",{children:null===(t=F.treatments)||void 0===t?void 0:t.map((function(e,n){return(0,r.jsxs)("tr",{children:[(0,r.jsxs)("td",{children:[e.code," - ",v[e.code]]}),(0,r.jsxs)("td",{children:[e.price.amount," ",e.price.currency.toUpperCase()]})]},n)}))})]}):null,(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsx)("th",{children:b.configs.locale.theItemsIncluded\u0130nTheCost})}),(0,r.jsxs)("tbody",{children:[null===(a=F.labExaminations)||void 0===a?void 0:a.map((function(e,n){return(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{children:[e.code," - ",v[e.code]," (",e.count," pieces)"]})},n)})),null===(i=F.nuclearExaminations)||void 0===i?void 0:i.map((function(e,n){return(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{children:[e.code," - ",v[e.code]," (",e.count," pieces)"]})},n)})),null===(o=F.otherExaminations)||void 0===o?void 0:o.map((function(e,n){return(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{children:[e.name," (",e.count," pieces)"]})},n)}))]})]}),(0,r.jsxs)("div",{className:"proforma-doc-options",children:[(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===(c=F.options)||void 0===c?void 0:c.isMedicalExamination)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.medicalSecondExaminationQuestion}),null!==(l=F.options)&&void 0!==l&&l.isMedicalExamination?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]}),(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===(d=F.options)||void 0===d?void 0:d.isTransferService)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.transferServiceQuestion}),null!==(u=F.options)&&void 0!==u&&u.isTransferService?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]}),(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===(f=F.options)||void 0===f?void 0:f.isTranslatorService)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.translatorServiceQuestion}),null!==(p=F.options)&&void 0!==p&&p.isTranslatorService?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]}),(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===(m=F.options)||void 0===m?void 0:m.isCoordinationService)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.coordinationServiceQuestion}),null!==(h=F.options)&&void 0!==h&&h.isCoordinationService?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]}),(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===F||void 0===F||null===(g=F.options)||void 0===g||null===(x=g.physicallyExamination)||void 0===x?void 0:x.isIncluded)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.physicalExaminationQuestion}),null!==(j=F.options)&&void 0!==j&&j.physicallyExamination.isIncluded?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice,null!==(y=F.options)&&void 0!==y&&null!==(O=y.physicallyExamination)&&void 0!==O&&O.count?" (".concat(null===(N=F.options)||void 0===N?void 0:N.physicallyExamination.count," pieces)"):null]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]}),(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===(k=F.options)||void 0===k?void 0:k.intensiveCare.isIncluded)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.intensiveCareQuestion}),null!==(P=F.options)&&void 0!==P&&P.intensiveCare.isIncluded?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice,null!==(C=F.options)&&void 0!==C&&C.intensiveCare.count?" (".concat(null===(T=F.options)||void 0===T?void 0:T.intensiveCare.count," days)"):null]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]}),(0,r.jsxs)("div",{className:(0,R.e7)("proforma-doc-option",(null===(S=F.options)||void 0===S?void 0:S.accommodation.isIncluded)&&"proforma-doc-option--success"),children:[(0,r.jsx)("strong",{children:b.configs.locale.serviceAdmissionQuestion}),null!==(I=F.options)&&void 0!==I&&I.accommodation.isIncluded?(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"check"}),b.configs.locale.includedInThePrice,null!==(Z=F.options)&&void 0!==Z&&Z.accommodation.count?" (".concat(null===(D=F.options)||void 0===D?void 0:D.accommodation.count," days and ").concat(null===(z=F.options)||void 0===z?void 0:z.accommodation.room.toUpperCase()," room)"):null]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(w.default,{name:"remove"}),b.configs.locale.notIncludedInThePrice]})]})]}),F.description&&(0,r.jsxs)("div",{className:"proforma-doc-description",children:[(0,r.jsx)("strong",{children:b.configs.locale.de
1scription}),F.description]}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:"proforma-doc-header rtl-direction-rtl",style:{height:"10px"},children:b.configs.locale.proformaDescription}),(0,r.jsx)("div",{style:{marginLeft:"84%"},children:(0,r.jsx)("img",{src:(0,Q.storage)("other/heart-of-health1-1.svg"),alt:"Health T\xfcrkiye",width:100,style:{marginTop:20}})})]})]})}):null};return i&&n?(0,r.jsxs)(P.Z,{heading:b.configs.locale.proforma,className:"proforma-modal",width:"wide",onClose:function(){return t()},actions:[{children:b.configs.locale.downloadAsPdf,onClick:function(){return N()},disabled:!u,isLoading:m},{children:b.configs.locale.close,onClick:function(){return t()}}],children:[(0,r.jsx)("p",{children:b.configs.locale.proformaOfferWarning}),u?k():(0,r.jsx)(A.Z,{})]}):null},G=t(59876),K=t(20129),J=t(94630),$=t(64345),ee=t(59717),ne=t(10839),te=t(2336),re=function(){var e=(0,l.Z)(c().mark((function e(n,t){var r,a,i,s,o,l,d,u,f,p;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=document.getElementById(n),a=r.contentWindow,i=a.document.body.querySelectorAll("img"),s=0;case 4:if(!(s<i.length)){e.next=16;break}return e.next=7,fetch(i[s].src);case 7:return o=e.sent,e.next=10,o.blob();case 10:l=e.sent,d=URL.createObjectURL(l),i[s].src=d;case 13:s++,e.next=4;break;case 16:if(a){e.next=18;break}return e.abrupt("return");case 18:return e.next=20,U()(a.document.body,{useCORS:!0,allowTaint:!0});case 20:u=e.sent,f=u.toDataURL("image/png"),(p=new _.ZP("p","mm","a4")).addImage(f,"PNG",0,0,210,297),p.save("".concat(t,".pdf"));case 25:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se=function(){var e=(0,d.useContext)(h.T),n=(0,d.useState)(e.post.offer),t=n[0],o=n[1],u=(0,d.useState)([]),T=u[0],S=u[1],I=(0,d.useState)("hospital"),Z=I[0],D=I[1],F=(0,d.useState)(""),R=F[0],B=F[1],U=(0,d.useState)(""),_=U[0],L=U[1],M=(0,d.useState)(-1),W=M[0],X=M[1],q=(0,d.useState)(-1),H=q[0],V=q[1],Q=(0,d.useState)(-1),ae=(Q[0],Q[1]),se=(0,d.useState)(-1),oe=se[0],ce=se[1],le=(0,d.useState)(!1),de=le[0],ue=le[1],fe=(0,d.useState)(!1),pe=fe[0],me=fe[1],he=(0,d.useState)(1),ge=he[0],xe=he[1],ve=(0,d.useState)([]),je=ve[0],be=ve[1],ye=(0,d.useState)([]),Oe=ye[0],we=ye[1],Ne=(0,d.useState)(""),ke=Ne[0],Pe=Ne[1],Ce=(0,d.useState)(null),Te=Ce[0],Se=Ce[1],Ie=(0,d.useState)("idle"),Ze=Ie[0],De=Ie[1],ze=(0,d.useState)([]),Fe=ze[0],Ee=ze[1],Ae=p.pR.get("userinfo")||{},Re=(0,d.useState)(null),Be=Re[0],Ue=Re[1],_e=(0,d.useState)(!1),Le=_e[0],Me=_e[1],We=(0,b.useRouter)(),Xe=function(){return Se(null)},qe=function(){var n=(0,l.Z)(c().mark((function n(t){var r;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Fe.length){n.next=3;break}return Se("visa"),n.abrupt("return");case 3:if("passport-and-citizenship-number-reuired"!==Ze){n.next=6;break}return Se("passport-and-citizenship-number-reuired"),n.abrupt("return");case 6:if(me(!0),"idle"!==Ze){n.next=24;break}return n.next=10,$.Z.get({id:Ae.id,language:e.lang});case 10:if(!(r=n.sent).data.passportNumber||!r.data.identityNumber){n.next=20;break}return De(r.data.passportNumber),n.next=15,z.create({citizenshipNumber:r.data.passportNumber,offerEstablishmentId:t,languageShortName:e.lang});case 15:return n.next=17,Qe();case 17:Se("visa"),n.next=22;break;case 20:De("passport-and-citizenship-number-reuired"),Se("passport-and-citizenship-number-reuired");case 22:return me(!1),n.abrupt("return");case 24:return n.next=26,z.create({citizenshipNumber:Ze,offerEstablishmentId:t,languageShort
1Name:e.lang});case 26:me(!1);case 27:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),He=function(){if(en()){me(!0);var e=t.files,n=(0,s.Z)(t,["files"]);g.ZP.update(t.id,ie(ie({},n),{},{UploadedFiles:e})).then((function(e){e.id&&(L("The offer has been successfully updated."),Ye(),S([]))})).catch((function(){B("An error occurred while updating the offer. Please try the operations again.")})).finally((function(){me(!1)}))}},Ve=function(){var n=(0,l.Z)(c().mark((function n(){return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(me(!0),0!==Oe.length){n.next=4;break}return n.next=4,x.Z.get(K.UF.Country,{pageSize:9999,language:e.lang}).then((function(e){we(e.data)}));case 4:Se("hospital-companions"),me(!1);case 6:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),Qe=function(){var n=(0,l.Z)(c().mark((function n(){var r,a;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t.establishments.find((function(e){return!0===e.isOfferAdvancePayment}))){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,z.get({offerEstablishmentId:r.offerEstablishmentId,languageShortName:e.lang});case 5:a=n.sent,Ee(a.data);case 7:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),Ye=function(){var n=(0,l.Z)(c().mark((function n(){var r;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,g.ZP.getById({id:t.id.toString(),language:e.lang});case 3:r=n.sent,o(r.data),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),console.log(n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})));return function(){return n.apply(this,arguments)}}(),Ge=function(){var n=(0,l.Z)(c().mark((function n(r){var a,i;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r.preventDefault(),me(!0),a=new FormData(r.currentTarget),(i=Object.fromEntries(a)).offerEstablishmentId=t.establishments.find((function(e){return!0===e.isOfferAdvancePayment})).offerEstablishmentId,i.languageShortName=e.lang,r.currentTarget.reset(),n.next=9,z.createCompanions(i);case 9:return n.next=11,Qe();case 11:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),Ke=function(){var n=(0,l.Z)(c().mark((function n(){var t;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,x.Z.get(K.UF.OfferRejectReason,{language:e.lang,pageSize:1e3});case 3:t=n.sent,be(t.data),0!==t.data.length&&Pe(t.data[0].id.toString()),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),console.log(n.t0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})));return function(){return n.apply(this,arguments)}}(),Je=function(){var n=(0,l.Z)(c().mark((function n(){var t;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!Ae.id){n.next=6;break}return n.next=4,$.Z.get({id:Ae.id,language:e.lang});case 4:t=n.sent,Ue(t.data);case 6:n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),console.log(n.t0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})));return function(){return n.apply(this,arguments)}}(),$e=function(n,r){ue(!0);var a={offerId:t.id,establishmentId:n,status:r};r===g.mT.OfferRejectByTourist&&(a.offerRejectReasonId=parseInt(ke)),g.ZP.changeStatus(a).then((function(){g.ZP.getById({id:t.id.toString(),language:e.lang}).then((function(e){o(e.data),ae(-1),X(-1),ue(!1)}))})).catch((function(){B("An error occurred while updating the offer. Please try the operations again."),ae(-1),X(-1),ue(!1)}))},en=function(){var n=R;return t.description||(n=e.configs.locale.formWarningDescription),B(n),!n},nn=function(e){var n=(0,a.Z)(T),t=e.target.files;t&&Array.from(t).forEach((function(e){var t=e.name.split(".");n.push({name:e.name,size:e.size,extension:t[t.length-1]})})),o((function(e){return ie(ie({},e),{},{files:t})})),S(n)},tn=function(e){var n=(0,a.Z)(T);if(n.splice(e,1),t.files){for(var r=new DataTransfer,i=0;i<t.files.length;i++)i!==e&&r.items.add(t.files[i]);o((function(e){return ie(ie({},e),{},{files:r.files})}))}S(n)},rn=function(){var e=(0,l.Z)(c().mark((function e(n){var t,r,a,i,s,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,me(!0),t=p.pR.get("identity"),r=null===t||void 0===t?void 0:t.access,a=p.ET.filePathForOffer("offer/cdn/".concat(n)),e.next=7,f().get(a,{headers:{Authorization:"Bearer ".concat(r)},responseType:"blob"});case 7:i=e.sent,s=i.data,o=URL.createObjectURL(s),window.open(o,"_blank"),setTimeout((function(){return URL.revokeObjectURL(o)}),6e4),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),console.error("File open error:",e.t0),B("Dosya a\xe7\u0131l\u0131rken bir hata olu\u015ftu.");case 18:return e.prev=18,me(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[0,14,18,21]])})));return function(n){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){me(!0),Promise.all([Qe(),Ye(),Ke(),Je()]).finally((function(){return me(!1)}))}),[]);var an=function(e,n){return t.establishments.some((function(e){return e.status===g.mT.Pending}))?(0,r.jsxs)("div",{className:E().checkbox,children:[(0,r.jsx)("input",{id:e,type:"checkbox",checked:!!t[e],onChange:function(n){o((function(t){return ie(ie({},t),{},(0,i.Z)({},e,n.target.checked))}))}}),(0,r.jsx)("label",{className:E().checkboxText,htmlFor:e,children:n})]}):(0,r.jsxs)("div",{className:E().checkbox,children:[(0,r.jsx)("input",{disabled:!0,id:e,type:"checkbox",checked:!!t[e],onChange:function(n){o((function(t){return ie(ie({},t),{},(0,i.Z)({},e,n.target.checked))}))}}),(0,r.jsx)("label",{className:E().checkboxText,htmlFor:e,children:n})]})};(0,d.useEffect)((function(){if(("fr"===We.locale||"ru"===We.locale)&&window.innerWidth<=600){var e=document.getElementById("visaButton");e&&e.classList.add("small-font")}}),[We.locale]),(0,d.useEffect)((function(){var e=function(){Me(window.innerWidth<=600)};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[]);var sn=function(n){var t=e.configs.locale.offerIsPending,a="pending";switch(n){case g.mT.OfferCanceled:t=e.configs.locale.canceled,a="error";break;case g.mT.TreatmentNotAvailableByEstablishment:t=e.configs.locale.treatmentRequestNotAvailable,a="error";break;case g.mT.OfferReturnToTourist:t=e.configs.locale.offerDone;break;case g.mT.OfferAcceptByTourist:t=e.configs.locale.paymentPending||"\xd6deme Bekleniyor",a="warning";break;case g.mT.OfferPaidSuccessByTourist:t=e.configs.locale.paymentCompleted||"\xd6deme Tamamland\u0131",a="success";break;case g.mT.OfferPaidFailByTourist:t=e.configs.locale.paymentFailed||"\xd6deme Ba\u015far\u0131s\u0131z",a="error";break;case g.mT.OfferRejectByTourist:t=e.configs.locale.youRejected,a="error";break;case g.mT.OfferAcceptByEstablishment:t=e.configs.locale.prepaymentPending;break;case g.mT.OfferRejectByEstablishment:t=e.configs.locale.establishmentRejected,a="error";break;case g.mT.OfferAcceptByOtherEstablishment:t=e.configs.locale.youAccepted2,a="error";break;case g.mT.OfferAcceptedOtherEstablishmentByTourist:t=e.configs.locale.offerIsAccepted,a="error";break;case g.mT.OfferWaitingOfTourist:t=e.configs.locale.waitingForYou;break;case g.mT.OfferStartedTreatment:t=e.configs.locale.yourTreatmentStarted,a="success";break;case g.mT.OfferFinishedTreatment:t=e.configs.locale.yourTreatmentEnded,a="success"}return(0,r.jsx)("strong",{className:a,children:t})},on=function(n){var a=n.status,i=n.id,s=n.isDisabled,c=n.offerEstablishmentId,l=n.isOfferAdvancePayment,d=n.offerDiscountCode,u=function(){return d?null:a===g.mT.OfferWaitingOfTourist&&l?(0,r.jsx)(j.default,{disabled:s,appearance:"primary",children:e.configs.locale.usePromocode||"#usePromocode",iconAfter:(0,r.jsx)(w.default,{name:"check",size:10}),onClick:function(){g.ZP.createThyDiscountCode(c,e.lang).then((function(){L(e.configs.locale.promocodeCreated||"#promocodeCreated"),setTimeout((function(){L(""),window.location.reload()}),2e3)})).catch((function(e){return B(e.message)}))}}):null},f=function(){return a===g.mT.OfferWaitingOfTourist&&l?(0,r.jsx)(j.default,{disabled:s,isLoading:pe,appearance:"default",children:Fe.length?e.configs.locale.myVisa||"#myVisa":e.configs.locale.generateVisCode||"#generateVisCode",onClick:function(){return qe(c)}}):null};return a===g.mT.Pending?(0,r.jsx)(j.default,{disabled:s,appearance:"default",children:e.configs.locale.cancelRequest,iconAfter:(0,r.jsx)(w.default,{name:"clear",size:10}),onClick:function(){X(i),xe(1)}}):a===g.mT.OfferReturnToTourist?(0,r.jsxs)(j.ButtonGroup,{children:[(0,r.jsx)(j.default,{disabled:s,appearance:"danger",children:e.configs.locale.rejectOffer,iconAfter:(0,r.jsx)(w.default,{name:"clear",size:10}),onClick:function(){X(i),xe(2)}}),(0,r.jsxs)(C.Z,{offerId:t.id,establishmentId:i,appearance:"success",onSuccess:function(n){L(n||e.configs.locale.offerAccepted||"Teklif kabul edildi"),setTimeout((function(){g.ZP.getById({id:t.id.toString(),language:e.lang}).then((function(e){o(e.data),L("")}))}),2e3)},onError:function(e){B(e)},children:[(0,r.jsx)(w.default,{name:"check",size:14,style:{marginRight:"4px"}}),e.configs.locale.accept]})]}):a===g.mT.OfferPaidFailByTourist?(0,r.jsxs)(C.Z,{offerId:t.id,establishmentId:i,appearance:"default",confirmMessage:e.configs.locale.retryPaymentConfirm||"\xd6deme i\u015flemi ba\u015far\u0131s\u0131z oldu. Tekrar denemek istiyor musunuz?",onSuccess:function(n){L(n||e.configs.locale.paymentRetryInitiated||"\xd6deme i\u015flemi yeniden ba\u015flat\u0131l\u0131yor..."),setTimeout((function(){g.ZP.getById({id:t.id.toString(),language:e.lang}).then((function(e){o(e.data),L("")}))}),2e3)},onError:function(e){B(e)},children:[(0,r.jsx)(w.default,{name:"refresh",size:14,style:{marginRight:"4px"}}),e.configs.locale.retryPayment||"Yeniden \xd6deme Yap"]}):a===g.mT.OfferAcceptByTourist?(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:"#ffc107"},children:[(0,r.jsx)(w.default,{name:"access-time",size:16}),(0,r.jsx)("span",{style:{fontWeight:500},children:e.configs.locale.paymentProcessing||"\xd6deme i\u015fleniyor..."})]}):a===g.mT.OfferPaidSuccessByTourist?(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:"#28a745"},children:[(0,r.jsx)(w.default,{name:"check-circle",size:16}),(0,r.jsx)("span",{style:{fontWeight:500},children:e.configs.locale.paymentSuccessful||"\xd6deme Tamamland\u0131"})]}):(0,r.jsxs)(j.ButtonGroup,{className:"block",children:[(0,r.jsx)(u,{}),(0,r.jsx)(f,{})]})},cn=function(e,n){if(!e||!e.length)return null;var t=Array.from(e);return(0,r.jsx)("div",{className:"check-list-scroll-area",children:t.map((function(e,t){var a=e.name.split(".");return(0,r.jsxs)("div",{className:"check-list-item",children:[(0,r.jsxs)("div",{className:"check-list-content",children:[(0,r.jsx)("div",{className:"file-list-icon",children:a[a.length-1]}),(0,r.jsxs)("hgroup",{children:[(0,r.jsx)("h4",{className:"check-list-header",children:e.name}),(0,r.jsxs)("h6",{className:"check-list-text",children:[(e.size/Math.pow(1024,2)).toFixed(3)," MB"]})]})]}),n?(0,r.jsx)(j.default,{appearance:"danger",iconAfter:(0,r.jsx)(w.default,{name:"clear",size:12}),onClick:function(){return tn(t)}}):(0,r.jsx)(j.default,{appearance:"primary",iconAfter:(0,r.jsx)(w.default,{name:"link",size:16}),onClick:function(){return rn(e.id)}})]},t)}))})},ln=function(){return t.establishments.some((function(e){return e.status===g.mT.Pending}))?(0,r.jsxs)(d.Fragment,{children:[(0,r.jsx)("h3",{className:"check-list-title",children:e.configs.locale.uploadFiles}),(0,r.jsxs)("div",{className:"check-list-file-input vertical-file-input",children:[(0,r.jsxs)("label",{htmlFor:"fileMultiple",children:[(0,r.jsx)(w.default,{name:"upload-file"}),(0,r.jsx)("small",{children:e.configs.locale.uploadFilesText1})," ",(0,r.jsx)("strong",{children:e.configs.locale.uploadFilesText2})]}),(0,r.jsx)("input",{type:"file",id:"fileMultiple",multiple:!0,onChange:nn})]}),T.length?(0,r.jsx)("div",{className:"vertical-file-input-wrapper",children:cn(T.map((function(e){return{name:e.name,path:e.name,size:e.size,id:e.id}})),!0)}):null]}):t.establishments.some((function(e){return e.status===g.mT.OfferReturnToTourist}))?(0,r.jsxs)(d.Fragment,{children:[(0,r.jsx)("h3",{className:"check-list-title",children:e.configs.locale.uploadFiles}),(0,r.jsxs)("div",{className:"check-list-file-input vertical-file-input",children:[(0,r.jsxs)("label",{htmlFor:"fileMultiple",children:[(0,r.jsx)(w.default,{name:"upload-file"}),(0,r.jsx)("small",{children:e.configs.locale.uploadFilesText1})," ",(0,r.jsx)("strong",{children:e.configs.locale.uploadFilesText2})]}),(0,r.jsx)("input",{disabled:!0,type:"file",id:"fileMultiple",multiple:!0,onChange:nn})]}),T.length?(0,r.jsx)("div",{className:"vertical-file-input-wrapper",children:cn(T.map((function(e){return{name:e.name,path:e.name,size:e.size,id:e.id}})),!0)}):null]}):void 0},dn=function(){return t.establishments.some((function(e){return e.status===g.mT.Pending}))?(0,r.jsxs)("div",{className:E().propertiesArea,children:[(0,r.jsx)("label",{className:"check-list-title",htmlFor:"explanations",children:e.configs.locale.explanations}),(0,r.jsx)("textarea",{className:E().textarea,id:"explanations",placeholder:e.configs.locale.additionalExplanations,value:t.description,onChange:function(e){return o((function(n){return ie(ie({},n),{},{description:e.target.value})}))}})]}):(0,r.jsxs)("div",{className:E().propertiesArea,children:[(0,r.jsx)("label",{className:"check-list-title",htmlFor:"explanations",children:e.configs.locale.explanations}),(0,r.jsx)("textarea",{className:E().textarea,disabled:!0,id:"explanations",placeholder:e.configs.locale.additionalExplanations,value:t.description,onChange:function(e){return o((function(n){return ie(ie({},n),{},{description:e.target.value})}))}})]})},un=function(){return(0,r.jsxs)("div",{className:E().propertiesArea,children:[(0,r.jsx)("h3",{className:"check-list-title",children:e.configs.locale.additionalServices}),an("isRequestAccomodation",e.configs.locale.accomodatationService),an("isRequestFlight",e.configs.locale.flightService),an("isRequestTransfer",e.configs.locale.transferService)]})},fn=function(){return-1===H?null:(0,r.jsxs)(P.Z,{appearance:"warning",heading:e.configs.locale.areYouSure,width:"narrow",actions:[{appearance:"danger",children:e.configs.locale.cancelAll,isLoading:de,disabled:!ke,onClick:function(){!function(n,r){ue(!0);var a={offerId:t.id,establishmentId:n,status:r};r===g.mT.OfferRejectByTourist&&(a.offerRejectReasonId=parseInt(ke)),g.ZP.cancelAll(a).then((function(){g.ZP.getById({id:t.id.toString(),language:e.lang}).then((function(e){o(e.data),V(-1),ue(!1)}))})).catch((function(){B("An error occurred while updating the offer. Please try the operations again."),V(-1),ue(!1)}))}(W,g.mT.OfferRejectByTourist)}},{children:e.configs.locale.close,onClick:function(){return V(-1)}}],children:[(0,r.jsx)("p",{children:e.configs.locale.areYouSureWarning2}),(0,r.jsx)(G.Z,{children:(0,r.jsxs)(J.gN,{className:"form-item",children:[(0,r.jsxs)("strong",{children:[e.configs.locale.offerRejectReason,":"]}),(0,r.jsx)("select",{onChange:function(e){Pe(e.currentTarget.value)},value:ke,children:je.map((function(e){var n=e.id,t=e.title;return(0,r.jsx)("option",{value:n,children:t},n)}))})]})})]})};return(0,r.jsxs)("div",{className:(0,m.classnames)("account-area","offer-detail"),children:[t.id?(0,r.jsxs)(d.Fragment,{children:[(0,r.jsxs)("h2",{className:(0,m.classnames)("account-title","offer-detail-title"),children:[e.configs.locale.offer," #",t.code]}),(0,r.jsxs)("ul",{className:E().offerInfo,children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:e.configs.locale.offerId})," ",(0,r.jsx)("span",{children:t.code})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:e.configs.locale.offerDate})," ",(0,r.jsx)("span",{children:t.createdDate})]})]}),(0,r.jsxs)("div",{className:E().tabButtons,children:[(0,r.jsx)(j.default,{className:(0,m.classnames)(E().tabButton,"hospital"===Z&&E().tabButtonActive,Le&&E().smallFont),onClick:function(){return D("hospital")},children:(0,r.jsx)("span",{className:E().tabButtonText,children:e.configs.locale.hospitalList})}),(0,r.jsx)(j.default,{className:(0,m.classnames)(E().tabButton,"properties"===Z&&E().tabButtonActive,Le&&E().smallFont),onClick:function(){return D("properties")},children:(0,r.jsx)("span",{className:E().tabButtonText,children:e.configs.local
1e.properties})}),(0,r.jsx)(j.default,{className:(0,m.classnames)(E().tabButton,"planAReOffer"===Z&&E().tabButtonActive,Le&&E().smallFont),onClick:function(){var n,r=t.id;switch(e.lang){case"ar":n="/ar/plan-your-treatment";break;case"fr":n="/fr/plan-your-treatment";break;case"ru":n="/ru/plan-your-treatment";break;case"en":default:n="/plan-your-treatment"}We.push({pathname:n,query:{filter:r}})},children:(0,r.jsx)("span",{className:E().tabButtonText,children:e.configs.locale.planAReOffer})})]}),"hospital"!==Z?null:(0,r.jsxs)("div",{className:(0,m.classnames)("check-list-box","hospital-list-box"),children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,r.jsx)("h3",{className:"check-list-title",children:e.configs.locale.hospitalsYouWantAQuoteOfferDetail||"#hospitalsYouWantAQuoteOfferDetail"}),(0,r.jsx)("div",{children:t.establishments.some((function(e){return e.status===g.mT.Pending}))?(0,r.jsx)(j.default,{appearance:"danger",children:e.configs.locale.cancelAll,iconAfter:(0,r.jsx)(w.default,{name:"clear",size:10}),onClick:function(){V(t.id),xe(1)}}):null})]}),(0,r.jsx)("div",{children:t.establishments.map((function(n,t){return(0,r.jsxs)("div",{className:"check-list-trigger",children:[(0,r.jsxs)("div",{className:"check-list-content",children:[(0,r.jsx)(v.Z,{"aria-disabled":n.isDisabled,href:n.isDisabled?"":"/".concat(e.configs.routes.hospitalDetail,"/").concat(n.slug),target:"_blank",children:(0,r.jsx)(N.default,{src:"documents/".concat(n.image),alt:n.name,width:200,height:130,className:"hospital-list-image"})},t),(0,r.jsxs)("hgroup",{children:[(0,r.jsx)("h4",{className:"check-list-header",children:n.name}),(0,r.jsx)("h6",{className:"check-list-text",children:n.city}),(0,r.jsxs)("h6",{className:"check-list-status",children:[e.configs.locale.offerStatus," -"," ",sn(n.status),n.offerRejectReasonTitle&&(0,r.jsxs)("strong",{children:[" - ",n.offerRejectReasonTitle]})]}),n.remainingTime&&(0,r.jsxs)("h6",{className:"check-list-text",children:[e.configs.locale.remainingTime," -"," ",(0,r.jsx)("strong",{children:n.remainingTime})]}),n.proforma&&Object.keys(n.proforma).length?(0,r.jsx)(j.default,{onClick:function(){return ce(t)},children:e.configs.locale.showProforma}):null,(0,r.jsx)("span",{style:{color:"white"},children:"..."}),n.offerDiscountCode&&22!==n.status&&(0,r.jsxs)(j.default,{onClick:function(){navigator.clipboard.writeText(n.offerDiscountCode).then((function(){L(e.configs.locale.promoCodeCopied||"#promoCodeCopied"),setTimeout((function(){L("")}),2e3)}))},children:[e.configs.locale.promoCode||"#promoCode"," -"," ",n.offerDiscountCode]})]})]}),on(n)]})}))})]}),"properties"!==Z?null:t.establishments.some((function(e){return e.status===g.mT.Pending}))?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:(0,m.classnames)("check-list-box","file-list-box"),children:[t.files.length?(0,r.jsxs)(d.Fragment,{children:[(0,r.jsx)("h3",{className:"check-list-title",children:e.configs.locale.currentFiles}),cn(t.files)]}):null,ln()]}),dn(),un(),(0,r.jsx)("div",{className:E().propertiesArea,children:(0,r.jsx)(j.default,{appearance:"primary",children:e.configs.locale.saveChanges,spacing:"large",isLoading:pe,onClick:He})})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:(0,m.classnames)("check-list-box","file-list-box"),children:[t.files.length?(0,r.jsxs)(d.Fragment,{children:[(0,r.jsx)("h3",{className:"check-list-title",children:e.configs.locale.currentFiles}),cn(t.files)]}):null,ln()]}),dn(),un(),(0,r.jsx)("div",{className:E().propertiesArea})]}),(0,r.jsxs)(d.Fragment,{children:[R&&(0,r.jsx)(k.Z,{error:{code:400,message:R,type:"Error"},onClose:function(){return B("")}}),_&&(0,r.jsx)(P.Z,{appearance:"success",heading:e.configs.locale.success||"#success",width:"narrow",onClose:function(){return L("")},actions:[{children:"Close",onClick:function(){return L("")}}],children:(0,r.jsx)("p",{children:_})}),t.establishments[oe]&&(0,r.jsx)(Y,{establishment:t.establishments[oe],show:-1!==oe,onDismiss:function(){return ce(-1)},date:t.createdDate,user:Be}),-1===W?null:(0,r.jsxs)(P.Z,{appearance:"warning",heading:e.configs.locale.areYouSure,width:"narrow",actions:[{appearance:"danger",children:1===ge?e.configs.locale.cancelRequest:e.configs.locale.rejectOffer,isLoading:de,disabled:!ke,onClick:function(){$e(W,g.mT.OfferRejectByTourist)}},{children:e.configs.locale.close,onClick:function(){return X(-1)}}],children:[(0,r.jsx)("p",{children:e.configs.locale.areYouSureWarning2}),(0,r.jsx)(G.Z,{children:(0,r.jsxs)(J.gN,{className:"form-item",children:[(0,r.jsxs)("strong",{children:[e.configs.locale.offerRejectReason,":"]}),(0,r.jsx)("select",{onChange:function(e){Pe(e.currentTarget.value)},value:ke,children:je.map((function(e){var n=e.id,t=e.title;return(0,r.jsx)("option",{value:n,children:t},n)}))})]})})]}),fn()]})]}):(0,r.jsx)(A.Z,{}),"visa"===Te&&(0,r.jsx)(P.Z,{width:"medium",heading:(0,r.jsxs)("div",{className:"flex justify-between w-full",children:[(0,r.jsx)("strong",{children:e.configs.locale.healthVisaCode||"#healthVisaCode"}),(0,r.jsx)(j.default,{id:"visaButton",appearance:"success",isLoading:pe,children:e.configs.locale.downloadAsPdf||"#downloadAsPdf",iconAfter:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{d:"M5.523 12.424c.14-.082.293-.162.459-.238a7.878 7.878 0 0 1-.45.606c-.28.337-.498.516-.635.572a.266.266 0 0 1-.035.012.282.282 0 0 1-.026-.044c-.056-.11-.054-.216.04-.36.106-.165.319-.354.647-.548zm2.455-1.647c-.119.025-.237.05-.356.078a21.148 21.148 0 0 0 .5-1.05 12.045 12.045 0 0 0 .51.858c-.217.032-.436.07-.654.114zm2.525.939a3.881 3.881 0 0 1-.435-.41c.228.005.434.022.612.054.317.057.466.
1147.518.209a.095.095 0 0 1 .026.064.436.436 0 0 1-.06.2.307.307 0 0 1-.094.124.107.107 0 0 1-.069.015c-.09-.003-.258-.066-.498-.256zM8.278 6.97c-.04.244-.108.524-.2.829a4.86 4.86 0 0 1-.089-.346c-.076-.353-.087-.63-.046-.822.038-.177.11-.248.196-.283a.517.517 0 0 1 .145-.04c.013.03.028.092.032.198.005.122-.007.277-.038.465z"}),(0,r.jsx)("path",{"fill-rule":"evenodd",d:"M4 0h5.293A1 1 0 0 1 10 .293L13.707 4a1 1 0 0 1 .293.707V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm5.5 1.5v2a1 1 0 0 0 1 1h2l-3-3zM4.165 13.668c.09.18.23.343.438.419.207.075.412.04.58-.03.318-.13.635-.436.926-.786.333-.401.683-.927 1.021-1.51a11.651 11.651 0 0 1 1.997-.406c.3.383.61.713.91.95.28.22.603.403.934.417a.856.856 0 0 0 .51-.138c.155-.101.27-.247.354-.416.09-.181.145-.37.138-.563a.844.844 0 0 0-.2-.518c-.226-.27-.596-.4-.96-.465a5.76 5.76 0 0 0-1.335-.05 10.954 10.954 0 0 1-.98-1.686c.25-.66.437-1.284.52-1.794.036-.218.055-.426.048-.614a1.238 1.238 0 0 0-.127-.538.7.7 0 0 0-.477-.365c-.202-.043-.41 0-.601.077-.377.15-.576.47-.651.823-.073.34-.04.736.046 1.136.088.406.238.848.43 1.295a19.697 19.697 0 0 1-1.062 2.227 7.662 7.662 0 0 0-1.482.645c-.37.22-.699.48-.897.787-.21.326-.275.714-.08 1.103z"})]}),onClick:(0,l.Z)(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Fe.find((function(e){return!e.companionProximity})),me(!0),e.next=4,re(n.visaCode,"visa-code-".concat(n.name,"-").concat(n.surname,".pdf"));case 4:me(!1);case 5:case"end":return e.stop()}}),e)})))})]}),onClose:Xe,actions:[{appearance:"subtle",children:e.configs.locale.close||"#close",onClick:Xe},{appearance:"primary",children:e.configs.locale.myCompanions||"#myCompanions",onClick:Ve,iconAfter:(0,r.jsx)(w.default,{name:"chevron-right"}),isLoading:pe}],children:(0,r.jsxs)("p",{className:"visa-code",children:[(0,r.jsx)("strong",{children:Ae.name}),(0,r.jsx)("br",{}),e.configs.locale.yourCodeIs||"#yourCodeIs"," ",(0,r.jsx)("strong",{children:Fe.find((function(e){return!e.companionProximity})).visaCode})]})}),"hospital-companions"===Te&&(0,r.jsx)(P.Z,{width:"extended",onClose:Xe,heading:(0,r.jsxs)("div",{className:"flex justify-between w-full",children:[(0,r.jsx)(j.default,{iconAfter:(0,r.jsx)(w.default,{size:25,name:"arrow-back"}),isLoading:de,onClick:function(e){return function(){return Se(e)}}("visa")}),(0,r.jsx)("strong",{children:e.configs.locale.myCompanions||"#myCompanions"})]}),children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("form",{onSubmit:Ge,children:[(0,r.jsxs)(ne.Z,{gutter:"gutter-y",children:[(0,r.jsx)(te.Z,{sizes:{xs:12,md:6,lg:2},children:(0,r.jsx)(y.Z,{label:e.configs.locale.name||"#name",name:"name",required:!0,className:"custom-textfield border flex flex-col-reverse"})}),(0,r.jsx)(te.Z,{sizes:{xs:12,md:6,lg:2},children:(0,r.jsx)(y.Z,{label:e.configs.locale.surname||"#surname",name:"surname",required:!0,className:"custom-textfield border flex flex-col-reverse"})}),(0,r.jsxs)(te.Z,{className:"textfield--spacing-default flex flex-col",sizes:{xs:12,md:6,lg:2},children:[(0,r.jsx)("label",{children:e.configs.locale.country||"#country"}),(0,r.jsxs)(O.Z,{required:!0,name:"countryId",children:[(0,r.jsx)(ee.Z,{value:""}),Oe.map((function(e){return(0,r.jsx)(ee.Z,{value:e.id,children:e.name})}))]})]}),(0,r.jsx)(te.Z,{sizes:{xs:12,md:6,lg:2},children:(0,r.jsx)(y.Z,{required:!0,label:e.configs.locale.passportNumber||"#passportNumber",name:"passportNumber",className:"custom-textfield border flex flex-col-reverse"})}),(0,r.jsx)(te.Z,{sizes:{xs:12,md:6,lg:2},children:(0,r.jsx)(y.Z,{required:!0,label:e.configs.locale.companionProximity||"#companionProximity",name:"companionProximity",className:"custom-textfield border flex flex-col-reverse"})}),(0,r.jsx)(te.Z,{sizes:{xs:12,md:6,lg:2},children:(0,r.jsx)(y.Z,{required:!0,label:e.configs.locale.citizenshipNumber||"#citizenshipNumber",name:"citizenshipNumber",className:"custom-textfield border flex flex-col-reverse"})}),(0,r.jsx)(te.Z,{sizes:{xs:12},className:"flex items-end ",children:(0,r.jsx)(j.default,{appearance:"primary",isLoading:pe,type:"submit",className:"w-full",children:e.configs.locale.addCompanion||"#addCompanion",disabled:Fe.length>=5})})]}),(0,r.jsx)("br",{}),(0,r.jsx)("br",{})]}),(0,r.jsx)("div",{style:{overflowX:"auto"},children:(0,r.jsxs)("table",{className:E()["companion-table"],children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:e.configs.locale.name||"#name"}),(0,r.jsx)("th",{children:e.configs.locale.surname||"#surname"}),(0,r.jsx)("th",{children:e.configs.locale.country||"#country"}),(0,r.jsx)("th",{children:e.configs.locale.passportNumber||"#passportNumber"}),(0,r.jsx)("th",{children:e.configs.locale.companionProximity||"#companionProximity"}),(0,r.jsx)("th",{children:e.configs.locale.citizenshipNumber||"#citizenshipNumber"}),(0,r.jsx)("th",{children:e.configs.locale.code||"#code"})]}),Fe.filter((function(e){return e.companionProximity})).map((function(e,n){return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:e.name}),(0,r.jsx)("td",{children:e.surname}),(0,r.jsx)("td",{children:e.countryName}),(0,r.jsx)("td",{children:e.passportNumber}),(0,r.jsx)("td",{children:e.companionProximity}),(0,r.jsx)("td",{children:e.citizenshipNumber}),(0,r.jsxs)("td",{className:"flex justify-between",children:[e.visaCode," ",(0,r.jsx)(j.default,{appearance:"success",isLoading:pe,iconAfter:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{d:"M5.523 12.424c.14-.082.293-.162.459-.238a7.878 7.878 0 0 1-.45.606c-.28.337-.498.516-.635.572a.266.266 0 0 1-.035.012.282.282 0 0 1-.026-.044c-.056-.11-.054-.216.04-.36.106-.165.319-.354.647-.548zm2.455-1.647c-.119.025-.237.05-.356.078a21.148 21.148 0 0 0 .5-1.05 12.045 12.045 0 0 0 .51.858c-.217.032-.436.07-.654.114zm2.525.939a3.881 3.881 0 0 1-.435-.41c.228.005.434.022.612.054.317.057.466.
1147.518.209a.095.095 0 0 1 .026.064.436.436 0 0 1-.06.2.307.307 0 0 1-.094.124.107.107 0 0 1-.069.015c-.09-.003-.258-.066-.498-.256zM8.278 6.97c-.04.244-.108.524-.2.829a4.86 4.86 0 0 1-.089-.346c-.076-.353-.087-.63-.046-.822.038-.177.11-.248.196-.283a.517.517 0 0 1 .145-.04c.013.03.028.092.032.198.005.122-.007.277-.038.465z"}),(0,r.jsx)("path",{"fill-rule":"evenodd",d:"M4 0h5.293A1 1 0 0 1 10 .293L13.707 4a1 1 0 0 1 .293.707V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm5.5 1.5v2a1 1 0 0 0 1 1h2l-3-3zM4.165 13.668c.09.18.23.343.438.419.207.075.412.04.58-.03.318-.13.635-.436.926-.786.333-.401.683-.927 1.021-1.51a11.651 11.651 0 0 1 1.997-.406c.3.383.61.713.91.95.28.22.603.403.934.417a.856.856 0 0 0 .51-.138c.155-.101.27-.247.354-.416.09-.181.145-.37.138-.563a.844.844 0 0 0-.2-.518c-.226-.27-.596-.4-.96-.465a5.76 5.76 0 0 0-1.335-.05 10.954 10.954 0 0 1-.98-1.686c.25-.66.437-1.284.52-1.794.036-.218.055-.426.048-.614a1.238 1.238 0 0 0-.127-.538.7.7 0 0 0-.477-.365c-.202-.043-.41 0-.601.077-.377.15-.576.47-.651.823-.073.34-.04.736.046 1.136.088.406.238.848.43 1.295a19.697 19.697 0 0 1-1.062 2.227 7.662 7.662 0 0 0-1.482.645c-.37.22-.699.48-.897.787-.21.326-.275.714-.08 1.103z"})]}),onClick:(0,l.Z)(c().mark((function n(){return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return me(!0),n.next=3,re(e.visaCode,"visa-code-".concat(e.name,"-").concat(e.surname,".pdf"));case 3:me(!1);case 4:case"end":return n.stop()}}),n)})))})]})]},n)}))]})})]})}),"passport-and-citizenship-number-reuired"===Te&&(0,r.jsx)(P.Z,{actions:[{appearance:"subtle",children:e.configs.locale.close||"#close",onClick:Xe},{children:e.configs.locale.goMyProfile||"#goMyProfile",appearance:"primary",onClick:function(){Xe(),We.push("/".concat(e.configs.routes.profile,"?warning=true"))}}],appearance:"warning",heading:"Passport number required",onClose:Xe,width:"narrow",children:"Please go to your profile and fill your passport number and identity number."}),Fe.map((function(e){var n=Fe.find((function(e){return!e.companionProximity})),a=t.establishments.find((function(e){return e.status===g.mT.OfferWaitingOfTourist}));return(0,r.jsx)("iframe",{id:e.visaCode,style:{height:"0",border:"none",position:"fixed",width:"210mm",left:0,top:0},src:"/api/pdf?visaCode=".concat(e.visaCode,"&name=").concat(e.name,"&surname=").concat(e.surname,"&userType=").concat(e.companionProximity?"Companion":"Patient","&country=").concat(e.countryName,"&passportNumber=").concat(e.passportNumber,"&establishmentName=").concat(a.name,"&establishmentCity=").concat(a.city,"&patientName=").concat(n.name,"&patientSurname=").concat(n.surname,"&patientCountry=").concat(n.countryName,"&patientPassportNumber=").concat(n.passportNumber,"&createdDateTime=").concat(e.createdDateTime)})}))]})}},29679:function(e){e.exports={root:"MyOfferDetail_root__3HOcy",offerInfo:"MyOfferDetail_offerInfo__A3bDi",yourTreatment:"MyOfferDetail_yourTreatment__2vvRr",tabButtons:"MyOfferDetail_tabButtons__3bJ-k",tabButton:"MyOfferDetail_tabButton__3leQ5",tabButtonActive:"MyOfferDetail_tabButtonActive__3xbK8",propertiesArea:"MyOfferDetail_propertiesArea__2dKqZ",select:"MyOfferDetail_select__pAzE9",textarea:"MyOfferDetail_textarea__1fohQ",checkbox:"MyOfferDetail_checkbox__3Lp2m",pricing:"MyOfferDetail_pricing__xPE6t","companion-table":"MyOfferDetail_companion-table__TdUJ8",tabButtonText:"MyOfferDetail_tabButtonText__27-v4"}}}]);
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.