@mediquo/elements 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/chunks/action-unavailable-message-CzRDRmk9.js +1 -0
  2. package/dist/chunks/addSeconds-ofMnxlgT.js +1 -0
  3. package/dist/chunks/api-chat-client-BsiZ3A6g.js +1 -0
  4. package/dist/chunks/{apple-pay-outcomes-CnVRvAVS.js → apple-pay-outcomes-B4dOTOhL.js} +1 -1
  5. package/dist/chunks/{appointment-card-skeleton-1c7552Ln.d.ts → appointment-action-unavailable-dialog-ByWsZP0d.d.ts} +2 -86
  6. package/dist/chunks/appointment-card-skeleton-CwIuoOXV.js +1 -0
  7. package/dist/chunks/appointment-card-skeleton-DRWT9q2U.d.ts +91 -0
  8. package/dist/chunks/appointment-details-D7Rw3Hyl.js +1 -0
  9. package/dist/chunks/blob-to-base64-CUL1trde.js +1 -0
  10. package/dist/chunks/{context-consumer-ESdICVAb.js → chunk-6CCJWPGL-DlOpbEYH.js} +1 -1
  11. package/dist/chunks/chunk-BUV4MGML-Bn3JWCAv.js +1 -0
  12. package/dist/chunks/chunk-Y4EKUX25-CqL3lLdx.js +1 -0
  13. package/dist/chunks/consume-BhoQNO_8.js +1 -0
  14. package/dist/chunks/document.model.d-DIzMiOmd.d.ts +6 -0
  15. package/dist/chunks/documentation-view-Mqdp7yKi.js +1 -0
  16. package/dist/chunks/get-appointment-query-lJe75hGS.js +1 -0
  17. package/dist/chunks/get-organization-setup-query-DxHNY0w8.js +1 -0
  18. package/dist/chunks/get-patient-documents-query-D1SfC_k_.js +1 -0
  19. package/dist/chunks/get-patient-profile-query-DiU2f_QH.js +1 -0
  20. package/dist/chunks/get-schedule-services-query-Ckvz9Fqh.js +1 -0
  21. package/dist/chunks/i18n-formats-EgnwLxKt.js +1 -0
  22. package/dist/chunks/index-63zQSBy4.js +1 -0
  23. package/dist/chunks/index-CDBk7hVW.d.ts +28 -0
  24. package/dist/chunks/{index-DNUbmrQl.d.ts → index-CSJzkkRA.d.ts} +1 -4
  25. package/dist/chunks/index-CatvNhwL.js +1 -0
  26. package/dist/chunks/index-DZjrAnPq.js +1 -0
  27. package/dist/chunks/{index-DhfVmF4C.js → index-m_sTPA-8.js} +1 -1
  28. package/dist/chunks/price-DU3YLTpk.js +1 -0
  29. package/dist/chunks/query-controller-D7jBX4X7.js +1 -0
  30. package/dist/chunks/refund-cancel-policy-qaBi5AHH.js +1 -0
  31. package/dist/chunks/{schemas.d-5LR6aN9I.d.ts → schemas.d-D7bCe24u.d.ts} +20 -20
  32. package/dist/chunks/telemetry-client-Bkbn48Dd.js +1 -0
  33. package/dist/env.js +1 -1
  34. package/dist/mq-apple-pay-checkout.js +1 -1
  35. package/dist/mq-appointment-checkout.js +1 -1
  36. package/dist/mq-appointment-documentation.d.ts +2 -1
  37. package/dist/mq-appointment-documentation.js +1 -1
  38. package/dist/mq-chat-room.js +1 -1
  39. package/dist/mq-checkout.js +1 -1
  40. package/dist/mq-dashboard.d.ts +16 -6
  41. package/dist/mq-dashboard.js +1 -1
  42. package/dist/mq-documents.d.ts +2 -1
  43. package/dist/mq-documents.js +1 -1
  44. package/dist/mq-google-pay-checkout.js +1 -1
  45. package/dist/mq-immediate-videocall-checkout.js +1 -1
  46. package/dist/mq-my-appointments.d.ts +6 -5
  47. package/dist/mq-my-appointments.js +1 -1
  48. package/dist/mq-next-appointments.d.ts +88 -0
  49. package/dist/mq-next-appointments.js +1 -0
  50. package/dist/mq-payment-poller.js +1 -1
  51. package/dist/mq-professional-presence-sync.js +1 -1
  52. package/dist/mq-recent-documents.d.ts +60 -0
  53. package/dist/mq-recent-documents.js +1 -0
  54. package/dist/mq-schedule-success.js +2 -2
  55. package/dist/mq-schedule.d.ts +8 -9
  56. package/dist/mq-schedule.js +1 -1
  57. package/dist/mq-session-provider.d.ts +1 -1
  58. package/dist/mq-support-chat.js +1 -1
  59. package/dist/mq-terms-and-conditions.js +1 -1
  60. package/dist/mq-unread-count-sync.js +1 -1
  61. package/dist/mq-videocall.d.ts +2 -1
  62. package/dist/mq-videocall.js +1 -1
  63. package/dist/react/mq-apple-pay-checkout.js +1 -1
  64. package/dist/react/mq-appointment-checkout.js +1 -1
  65. package/dist/react/mq-appointment-documentation.d.ts +2 -1
  66. package/dist/react/mq-appointment-documentation.js +1 -1
  67. package/dist/react/mq-chat-room.js +1 -1
  68. package/dist/react/mq-checkout.js +1 -1
  69. package/dist/react/mq-dashboard.d.ts +8 -6
  70. package/dist/react/mq-dashboard.js +1 -1
  71. package/dist/react/mq-documents-page.d.ts +2 -1
  72. package/dist/react/mq-documents-page.js +1 -1
  73. package/dist/react/mq-documents.d.ts +2 -1
  74. package/dist/react/mq-documents.js +1 -1
  75. package/dist/react/mq-google-pay-checkout.js +1 -1
  76. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  77. package/dist/react/mq-my-appointments.d.ts +7 -6
  78. package/dist/react/mq-my-appointments.js +1 -1
  79. package/dist/react/mq-next-appointments.d.ts +38 -0
  80. package/dist/react/mq-next-appointments.js +2 -0
  81. package/dist/react/mq-payment-poller.js +1 -1
  82. package/dist/react/mq-professional-presence-sync.js +1 -1
  83. package/dist/react/mq-recent-documents.d.ts +27 -0
  84. package/dist/react/mq-recent-documents.js +2 -0
  85. package/dist/react/mq-schedule-success.js +1 -1
  86. package/dist/react/mq-schedule.d.ts +3 -3
  87. package/dist/react/mq-schedule.js +1 -1
  88. package/dist/react/mq-session-provider.d.ts +1 -1
  89. package/dist/react/mq-support-chat.js +1 -1
  90. package/dist/react/mq-terms-and-conditions.js +1 -1
  91. package/dist/react/mq-unread-count-sync.js +1 -1
  92. package/dist/react/mq-videocall.d.ts +2 -1
  93. package/dist/react/mq-videocall.js +1 -1
  94. package/dist/theme.d.ts +8 -0
  95. package/dist/theme.js +1 -1
  96. package/dist/ui/icons/arrow-right-icon.d.ts +6 -0
  97. package/dist/ui/icons/arrow-right-icon.js +1 -0
  98. package/dist/ui/icons/dots-horizontal-icon.d.ts +6 -0
  99. package/dist/ui/icons/dots-horizontal-icon.js +1 -0
  100. package/dist/ui/mq-clamped-text.js +1 -1
  101. package/package.json +9 -1
  102. package/dist/chunks/api-chat-client-BBL1U9EQ.js +0 -1
  103. package/dist/chunks/appointment-card-skeleton-C8VERHzq.js +0 -1
  104. package/dist/chunks/chunk-GZF3YFSX-DM-GTqxg.js +0 -1
  105. package/dist/chunks/chunk-YMQSBQHL-De_r7BNk.js +0 -1
  106. package/dist/chunks/consume-CovVqBjI.js +0 -1
  107. package/dist/chunks/documentation-view-DJCr5_MN.js +0 -1
  108. package/dist/chunks/get-appointment-query-Ck68BEMg.js +0 -1
  109. package/dist/chunks/get-organization-setup-query-BMbuRi6v.js +0 -1
  110. package/dist/chunks/get-patient-documents-query-DIQH-TMM.js +0 -1
  111. package/dist/chunks/get-patient-profile-query-B0tUDJmT.js +0 -1
  112. package/dist/chunks/i18n-formats-DYS91YEa.js +0 -1
  113. package/dist/chunks/index-KvIw19qY.js +0 -1
  114. package/dist/chunks/index-ShXzd7UZ.js +0 -1
  115. package/dist/chunks/price-LTnCz9kN.js +0 -1
  116. package/dist/chunks/query-controller-BlO1Ax65.js +0 -1
  117. package/dist/chunks/refund-cancel-policy-CXFTrFfo.js +0 -1
  118. package/dist/chunks/telemetry-client-BLJVs9me.js +0 -1
@@ -0,0 +1 @@
1
+ import{s as t}from"./chunk-6CCJWPGL-DlOpbEYH.js";import{_ as e,c as i}from"./custom-element-D2ziPxYE.js";import{Q as o}from"./chunk-RCFIJTXZ-C6Ir0-sM.js";import{M as n}from"./mutation-controller-CR2qcqhH.js";import{h as a,f as s}from"./price-DU3YLTpk.js";import{getLocale as r}from"../i18n.js";import"../ui/mq-button.js";import"../ui/mq-dialog.js";import{c as l}from"./consume-BhoQNO_8.js";import{m as p,s as m}from"./runtime-Bg1WXVCx.js";import{l as c}from"./localized-decorator-BlOuLhym.js";import{a as d,i as h,x as u}from"./lit-element-DiWJYFwC.js";import{n as f}from"./property-scuRaFcM.js";import{a as v}from"./api-chat-client-BsiZ3A6g.js";function g(e,i){return{queryKey:t(e,"appointments",i),queryFn:()=>e.appointments.getAppointments(i)}}let b=class CancelAppointmentConfirmationDialog extends d{constructor(){super(...arguments),this.open=!1,this.cancelAppointmentMutation=new n(this,{mutationFn:async t=>v.appointments.cancelAppointment(t),onSuccess:()=>{this.queryClientContext?.invalidateQueries(),this.dispatchEvent(new CustomEvent("success",{bubbles:!0,composed:!0}))}}),this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleDismissClick=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleConfirmClick=()=>{this.cancelAppointmentMutation.run({id:this.appointmentId})}}static{this.styles=h`:host{display:contents}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.subheading-payable{font-size:var(--text-base);line-height:22px}.price-rows{display:flex;flex-direction:column;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);color:var(--color-card-foreground);width:100%;margin-bottom:var(--sp-4)}.price-row{display:flex;align-items:center;justify-content:space-between;min-height:34px;gap:var(--sp-2)}.price-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-4);justify-content:flex-end;flex-wrap:wrap}`}render(){const t=r(),e=this.price,i=a(e),o=this.cancelAppointmentMutation.isPending;if(i){const i=s(e,t),n=`-${i}`;return u`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${p("Confirmar cancelación")}</h2><p slot="subheading" class="subheading-payable">${p("¿Seguro que quieres cancelar esta cita? Se te devolverá el importe pagado en un plazo de 5-10 días hábiles.")}</p><div><div class="price-rows"><div class="price-row"><span>${p("Importe pagado")}</span> <span>${i}</span></div><div class="price-row"><span>${p("Importe a devolver")}</span> <span>${n}</span></div></div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${p("Volver")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${p("Confirmar")}</mq-button></div></div></mq-dialog>`}return u`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${p("Confirmar cancelación")}</h2><p slot="subheading">${p("¿Seguro que quieres cancelar esta cita?")}</p><div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${p("Cancelar")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${p("Confirmar")}</mq-button></div></div></mq-dialog>`}};e([f({type:Boolean,reflect:!0})],b.prototype,"open",void 0),e([l({context:o,subscribe:!0})],b.prototype,"queryClientContext",void 0),e([f({type:String})],b.prototype,"appointmentId",void 0),e([f({type:Object})],b.prototype,"price",void 0),b=e([c(),i("cancel-appointment-confirmation-dialog")],b);let y=class AppointmentActionUnavailableDialog extends d{constructor(){super(...arguments),this.open=!1,this.heading="",this.message="",this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static{this.styles=h`:host{display:contents}mq-dialog::part(dialog){max-width:343px;min-width:0}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.actions{display:flex;margin-top:var(--sp-4)}`}render(){return u`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${this.heading}</h2><p slot="subheading">${this.message}</p><div class="actions"><mq-button variant="primary" fullwidth @click="${this.handleClose}">${p("Volver")}</mq-button></div></mq-dialog>`}};function $(t){const{action:e,refundPolicySeconds:i}=t,o=null!=i&&i<3600,n=Math.ceil((i??0)/60),a=Math.ceil((i??0)/3600);return p(0===(o?n:a)?"modify"===e?"Esta cita ya ha pasado, por lo que no se puede modificar.":"Esta cita ya ha pasado, por lo que no se puede anular.":"modify"===e?o?m`Lo sentimos, como faltan menos de ${n} minutos para tu cita no podemos modificarla.`:m`Lo sentimos, como faltan menos de ${a} horas para tu cita no podemos modificarla.`:o?m`Lo sentimos, como faltan menos de ${n} minutos para tu cita no podemos anularla.`:m`Lo sentimos, como faltan menos de ${a} horas para tu cita no podemos anularla.`)}e([f({type:Boolean,reflect:!0})],y.prototype,"open",void 0),e([f({type:String})],y.prototype,"heading",void 0),e([f({type:String})],y.prototype,"message",void 0),y=e([c(),i("appointment-action-unavailable-dialog")],y);export{g as a,$ as g};
@@ -0,0 +1 @@
1
+ import{c as r,t}from"./parseISO-Dj3qSTG8.js";function n(n,a,e){return function(n,a){return r(n,+t(n)+a)}(n,1e3*a)}export{n as a};
@@ -0,0 +1 @@
1
+ import{o as e,s as t,i as n,n as r,a as i,z as s,e as o,b as a,r as l,u as c,c as u,d,f as p,l as h,g as f}from"./external-CJj32K_p.js";import{p as m}from"./parseISO-Dj3qSTG8.js";import{f as g}from"./format-CRFiCNHw.js";import{i as b}from"./isBefore-CPpTogxo.js";import{env as y}from"../env.js";e({file:n(File)});var _=e({url:t().url()});function v(t){return e({data:i(t),meta:e({current_page:r(),last_page:r(),per_page:r(),total:r()})})}var w=s.enum(["prescription","report","diagnosticTestPrescription"]),C=w.enum,E=s.enum(["published","draft"]);E.enum;var R=s.object({document_id:s.string().uuid(),document_type:w,name:s.string(),professional:s.object({speciality_id:s.number()}),status:E,url:s.string().url(),created_at:s.string()}),O=e({hash:t(),profile:e({first_name:t().nullable(),last_name:t().nullable(),birth_date:t().nullable(),gender:o(["male","female"]).nullable(),email:t().nullable(),phone_prefix:t().nullable(),phone:t().nullable(),billing:e({tax_id:t().nullable(),address:t().nullable(),country_code:t().nullable(),region:t().nullable(),postal_code:t().nullable()})})});function S(e){const t=e?.profile;return`${t?.first_name??""} ${t?.last_name??""}`.trim()}function A(e){return[e?.profile.first_name,e?.profile.last_name,e?.profile.email,e?.profile.phone,e?.profile.birth_date,e?.profile?.billing?.tax_id].every(e=>null!==e)}function T(e){return m(`${e.replace(" ","T")}Z`)}function j(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()));return g(t,"yyyy-MM-dd HH:mm:ss")}function x(e,t){try{const n=new Intl.DateTimeFormat("en",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(t);return n.find(e=>"timeZoneName"===e.type)?.value??""}catch{return""}}var P=s.enum(["pending","expired","accepted","inCall","declined","cancelled","finished","free_of_charge","owed","unpaid","reporting"]),k=P.enum,N=s.enum(["videocall","chat","phonecall"]),U=N.enum,L=s.object({id:s.string().uuid(),room_id:s.string(),channel:N,consultation_short_url:s.string().url().nullable(),call_id:s.string().url(),duration:s.number(),from:s.object({hash:s.string(),name:s.string().nullable(),avatar:s.string().url().nullable(),speciality:s.string().nullable(),collegiate_number:s.string().nullable(),is_dismissed:s.boolean(),languages:s.array(s.string()),description:s.string().nullable()}),to:s.object({id:s.number(),hash:s.string(),name:s.string().nullable(),avatar:s.string().url().nullable(),is_dismissed:s.boolean()}),speciality_id:s.number().nullable(),created_at:s.string(),status:P,seconds_to_open:s.number().nonnegative(),start_date:s.string(),started_at:s.string().nullable(),expires_at:s.string().nullable(),consultation_reason:s.string().nullable(),preconsultation_documents:s.array(s.object({file_path:s.string(),file_name:s.string(),id:s.string().uuid()})).nullable(),service_id:s.string().uuid().nullable(),price:s.number().nullable().optional(),currency:s.string().nullable().optional(),discount_amount:s.number().nullable().optional()}),D=s.enum(["appointment","chat","immediate"]),F=D.enum;function B(e){return 0===e.seconds_to_open}function I(e){if(!e)return!1;const t=new Date,n=T(e);return b(n,t)}s.object({appointmentId:s.string()});var $=L;s.object({callId:s.string()});var M=s.object({session_id:s.string(),session_token:s.string()});s.object({professional_hash:s.string(),consultation_id:s.string(),consultation_type:s.enum(["appointment"])}),s.object({professional_hash:s.string(),consultation_id:s.string(),consultation_type:s.enum(["appointment"])}),s.object({appointment_id:s.string()});var q=s.array(R);s.object({url:s.string().url()}),s.object({first_name:O.shape.profile.shape.first_name,last_name:O.shape.profile.shape.last_name,tax_id:O.shape.profile.shape.billing.shape.tax_id,birth_date:O.shape.profile.shape.birth_date,gender:O.shape.profile.shape.gender.optional(),email:O.shape.profile.shape.email,phone_prefix:O.shape.profile.shape.phone_prefix,phone:O.shape.profile.shape.phone,terms_accepted:s.boolean(),privacy_accepted:s.boolean()}),s.object({patient_hash:s.string(),page:s.number().optional(),per_page:s.number().optional()});var z=v(R);e({slot_id:t().uuid(),service_id:t().uuid(),specialty_id:t(),consultation_reason:t().optional(),preconsultation_documents:i(e({file_path:t(),file_name:t()})).optional(),discount_code:t().optional(),return_url:t().url().optional()});var H=e({id:t(),percent_off:r(),code:t(),after_discount_amount:r().nullable()}),J=e({id:t(),percent_off:r(),code:t(),name:t().nullish()}),K={Addon:"addon",Stripe:"stripe"},W=e({session_id:t(),payment_link:t().url(),provider:a(K).optional()});e({video_call_schedule_id:t()});var V=W;e({professional_hash:t().uuid()});var X=W,G={Paid:"paid",Unpaid:"unpaid",Denied:"denied"},Z=e({status:a(G),consultation_id:t(),consultation_type:t()});e({order_id:t(),validation_url:t().url()});var Q=l(c());e({order_id:t(),token:t()});var Y=e({data:e({status:a(G),consultation_id:t(),consultation_type:t().optional()})});e({order_id:t(),token:t()});var ee=e({data:e({status:a(G),consultation_id:t(),consultation_type:t().optional()})}),te=s.array(s.object({id:s.number(),name:s.string(),code:s.string()})),ne=s.object({primary_color:s.string().nullable(),logo:s.string().nullable(),favicon:s.string().nullable(),support_professional:s.object({hash:s.string().nullable()}).optional(),home:s.object({title:s.string().nullable(),description:s.string().nullable(),image_url:s.string().nullable()}),appointments:s.object({reserve_conditions:s.string().nullable(),seconds_before_start_to_refund_on_cancel:s.number().nullable(),has_nps:s.boolean().optional(),has_chat_in_appointment:s.boolean().optional(),has_discount_coupons_show:s.boolean().optional(),payment_provider:s.nativeEnum(K).nullish()}),legal_consent:s.object({terms_url:s.string().nullable(),privacy_url:s.string().nullable()})}),re=o(["monday","tuesday","wednesday","thursday","friday","saturday","sunday","working_week","weekend","all_week"]);re.enum;var ie=e({days_of_week:re,from_time:t(),to_time:t()});e({hash:t().uuid()});var se=e({hash:t().uuid(),active_absence:e({id:t().uuid(),finishes_at:t()}).nullable(),avatar:t().url().nullable(),collegiate_number:t().nullable(),description:t().nullable(),is_available:u(),name:t(),overview:t().nullable(),schedule_description:t().nullable(),speciality_id:r().nullable(),status:o(["online","offline"]),title:t().nullable(),chat_schedule:e({channel:N,duration:r(),name:t(),timezone:t(),starts_at:t(),gaps:i(ie)}).nullable()});function oe(e){return e.active_absence?"absent":"online"===e.status?"online":"offline"}o(["online","offline","absent"]),e({roomId:r()});var ae=O;e({first_name:t(),last_name:t(),tax_id:t(),birth_date:t(),gender:o(["male","female"]),email:t(),phone_prefix:t(),phone:t(),terms_accepted:u(),privacy_accepted:u()}),e({terms_accepted:u(),privacy_accepted:u(),commercial_accepted:u()}),e({hash:t().uuid()});var le=e({id:r(),hash:t().uuid(),speciality_alias:t(),name:t(),avatar:t().url(),description:t(),collegiate_number:t(),languages:i(t()),centers:i(e({id:t().uuid(),name:t()}))});d([h(1),h(2),h(3)]);var ce={Sent:1,Received:2,Read:3},ue=e({roomId:r(),messageId:t().uuid(),string:t(),status:r(),senderType:o(["ordinary","system"]),fromUserHash:t().uuid(),auto:d([h(0),h(1)]),createdAt:t().nullable(),deletedAt:t().nullable(),time:r().nullable()}),de=e({file_name:t(),file_size:r(),url:t().url(),signed_url:t().url().nullable(),type:o(["uncategorized","voice_note"]),meta:e({duration:r()})}),pe=ue.extend({type:h("string"),attachment:p()}),he=ue.extend({type:h("file"),attachment:de}),fe=ue.extend({type:h("image"),attachment:de});e({roomId:r()});var me=i(d([pe,he,fe]));e({roomId:r()});var ge=e({unread_count:r()});e({professional_hash:t()});var be=e({room_id:r()}),ye=o(["available","reserved"]),_e=ye.enum,ve=e({id:t().uuid(),channel:N,duration:r(),starts_at:t(),finishes_at:t(),professional:e({id:t().uuid(),name:t()}),services:i(e({id:t().uuid(),name:t()})),speciality:e({id:r(),price:e({amount:r(),currency:t()}).nullish()}),status:ye}),we=s.array(s.object({id:s.string().uuid(),name:s.string(),code:s.string(),channel:N,price:s.object({amount:s.number(),currency:s.string()}).nullable()})),Ce=s.array(s.object({id:s.string().uuid(),avatar:s.string().url().nullable(),description:s.string().nullable(),collegiate_number:s.string().nullable(),languages:s.array(s.string()),name:s.string(),slots:s.array(ve),speciality:s.object({id:s.number()}),tax_id:s.string().nullable()}));s.object({speciality_id:s.number(),organization_schedule_service_id:s.string().uuid(),closest_slots_days:s.number().optional(),slots_per_day:s.number().optional()}),s.object({service_id:s.string().uuid(),professional_hash:s.string().uuid(),starts_at:s.string(),finishes_at:s.string(),rescheduling_appointment_id:s.string().uuid().optional()});var Ee=s.array(ve),Re=s.array(s.object({id:s.number(),name:s.string(),code:s.string().nullish(),price:s.object({amount:s.number(),currency:s.string()}).nullable()}));s.object({slot_id:s.string().uuid(),service_id:s.string().uuid().optional(),speciality_id:s.number().optional()});var Oe=ve;e({status:i(P).optional(),order:e({field:o(["starts_at"]).optional(),direction:o(["asc","desc"]).optional()}).optional(),page:r().optional(),per_page:r().optional()});var Se=v(e({appointment:e({id:t().uuid(),url:t().url(),starts_at:t(),duration:r(),status:P,channel:N,expires_at:t().nullable(),service_id:t().uuid().nullable()}),room:e({id:r()}),price:e({amount:r(),currency:t()}).nullable(),patient:e({hash:t().uuid()}),slots:i(f()),professional:e({hash:t().uuid(),name:t(),avatar:t().url().optional(),description:t().optional(),languages:i(t()),collegiate_number:t().optional()}),speciality:e({id:r(),name:t()})}));e({slot_id:t().uuid(),service_id:t().uuid(),consultation_reason:t().optional(),preconsultation_documents:i(e({file_path:t(),file_name:t()})).optional(),discount_code:t().optional()});var Ae=e({appointment:e({id:t().uuid()})});e({id:t().uuid()});var Te=L,je=e({file_path:t(),presigned_storage_url:t().url()});e({id:t().uuid(),slot_id:t().uuid(),consultation_reason:t().optional(),preconsultation_documents:i(e({file_path:t(),file_name:t()})).optional()}),e({id:t().uuid()}),e({appointment_id:t().uuid(),consultation_reason:t().optional()}),e({appointment_id:t().uuid(),file_path:t(),file_name:t()}),e({appointment_id:t().uuid(),document_id:t().uuid()}),e({appointmentId:t().uuid()}),s.object({api_key:s.string(),token:s.string()});var xe=s.object({access_token:s.string(),patient:s.object({hash:s.string(),country_code:s.string(),timezone:s.string(),first_name:s.string(),last_name:s.string().nullable(),name:s.string(),birth_date:s.string().nullable(),email:s.string().email().nullable(),language_code:s.string(),phone:s.string(),phone_prefix:s.string(),tax_id:s.string().nullable(),legal_consent:s.object({accepted_at:s.string().nullable(),last_version_at:s.string().nullable(),terms_url:s.string(),privacy_url:s.string(),has_commercial_communications:s.boolean(),organization_name:s.string()})})});e({consultation_id:t(),consultation_type:D,rating:r().int().min(1).max(5),comment:t().nullable().optional()});var Pe=e({rating:r().int().optional(),comment:t().nullable().optional()}).passthrough();function ke(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ne}=Object.prototype,{getPrototypeOf:Ue}=Object,{iterator:Le,toStringTag:De}=Symbol,Fe=(Be=Object.create(null),e=>{const t=Ne.call(e);return Be[t]||(Be[t]=t.slice(8,-1).toLowerCase())});var Be;const Ie=e=>(e=e.toLowerCase(),t=>Fe(t)===e),$e=e=>t=>typeof t===e,{isArray:Me}=Array,qe=$e("undefined");function ze(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Ke(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const He=Ie("ArrayBuffer");const Je=$e("string"),Ke=$e("function"),We=$e("number"),Ve=e=>null!==e&&"object"==typeof e,Xe=e=>{if("object"!==Fe(e))return!1;const t=Ue(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||De in e||Le in e)},Ge=Ie("Date"),Ze=Ie("File"),Qe=Ie("Blob"),Ye=Ie("FileList"),et=Ie("URLSearchParams"),[tt,nt,rt,it]=["ReadableStream","Request","Response","Headers"].map(Ie);function st(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),Me(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ze(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(r=0;r<s;r++)o=i[r],t.call(null,e[o],o,e)}}function ot(e,t){if(ze(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const at="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,lt=e=>!qe(e)&&e!==at;const ct=(ut="undefined"!=typeof Uint8Array&&Ue(Uint8Array),e=>ut&&e instanceof ut);var ut;const dt=Ie("HTMLFormElement"),pt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ht=Ie("RegExp"),ft=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};st(n,(n,i)=>{let s;!1!==(s=t(n,i,e))&&(r[i]=s||n)}),Object.defineProperties(e,r)};const mt=Ie("AsyncFunction"),gt=(bt="function"==typeof setImmediate,yt=Ke(at.postMessage),bt?setImmediate:yt?(_t=`axios@${Math.random()}`,vt=[],at.addEventListener("message",({source:e,data:t})=>{e===at&&t===_t&&vt.length&&vt.shift()()},!1),e=>{vt.push(e),at.postMessage(_t,"*")}):e=>setTimeout(e));var bt,yt,_t,vt;const wt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(at):"undefined"!=typeof process&&process.nextTick||gt;var Ct={isArray:Me,isArrayBuffer:He,isBuffer:ze,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ke(e.append)&&("formdata"===(t=Fe(e))||"object"===t&&Ke(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&He(e.buffer),t},isString:Je,isNumber:We,isBoolean:e=>!0===e||!1===e,isObject:Ve,isPlainObject:Xe,isEmptyObject:e=>{if(!Ve(e)||ze(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:tt,isRequest:nt,isResponse:rt,isHeaders:it,isUndefined:qe,isDate:Ge,isFile:Ze,isBlob:Qe,isRegExp:ht,isFunction:Ke,isStream:e=>Ve(e)&&Ke(e.pipe),isURLSearchParams:et,isTypedArray:ct,isFileList:Ye,forEach:st,merge:function e(){const{caseless:t}=lt(this)&&this||{},n={},r=(r,i)=>{const s=t&&ot(n,i)||i;Xe(n[s])&&Xe(r)?n[s]=e(n[s],r):Xe(r)?n[s]=e({},r):Me(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&st(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(st(t,(t,r)=>{n&&Ke(t)?e[r]=ke(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&Ue(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Fe,kindOfTest:Ie,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Me(e))return e;let t=e.length;if(!We(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Le]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:dt,hasOwnProperty:pt,hasOwnProp:pt,reduceDescriptors:ft,freezeMethods:e=>{ft(e,(t,n)=>{if(Ke(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Ke(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Me(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ot,global:at,isContextDefined:lt,isSpecCompliantForm:function(e){return!!(e&&Ke(e.append)&&"FormData"===e[De]&&e[Le])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ve(e)){if(t.indexOf(e)>=0)return;if(ze(e))return e;if(!("toJSON"in e)){t[r]=e;const i=Me(e)?[]:{};return st(e,(e,t)=>{const s=n(e,r+1);!qe(s)&&(i[t]=s)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:mt,isThenable:e=>e&&(Ve(e)||Ke(e))&&Ke(e.then)&&Ke(e.catch),setImmediate:gt,asap:wt,isIterable:e=>null!=e&&Ke(e[Le])};function Et(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Ct.inherits(Et,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ct.toJSONObject(this.config),code:this.code,status:this.status}}});const Rt=Et.prototype,Ot={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ot[e]={value:e}}),Object.defineProperties(Et,Ot),Object.defineProperty(Rt,"isAxiosError",{value:!0}),Et.from=(e,t,n,r,i,s)=>{const o=Object.create(Rt);return Ct.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Et.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};function St(e){return Ct.isPlainObject(e)||Ct.isArray(e)}function At(e){return Ct.endsWith(e,"[]")?e.slice(0,-2):e}function Tt(e,t,n){return e?e.concat(t).map(function(e,t){return e=At(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const jt=Ct.toFlatObject(Ct,{},null,function(e){return/^is[A-Z]/.test(e)});function xt(e,t,n){if(!Ct.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ct.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ct.isUndefined(t[e])})).metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ct.isSpecCompliantForm(t);if(!Ct.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ct.isDate(e))return e.toISOString();if(Ct.isBoolean(e))return e.toString();if(!a&&Ct.isBlob(e))throw new Et("Blob is not supported. Use a Buffer instead.");return Ct.isArrayBuffer(e)||Ct.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(Ct.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ct.isArray(e)&&function(e){return Ct.isArray(e)&&!e.some(St)}(e)||(Ct.isFileList(e)||Ct.endsWith(n,"[]"))&&(a=Ct.toArray(e)))return n=At(n),a.forEach(function(e,r){!Ct.isUndefined(e)&&null!==e&&t.append(!0===o?Tt([n],r,s):null===o?n:n+"[]",l(e))}),!1;return!!St(e)||(t.append(Tt(i,n,s),l(e)),!1)}const u=[],d=Object.assign(jt,{defaultVisitor:c,convertValue:l,isVisitable:St});if(!Ct.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ct.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ct.forEach(n,function(n,s){!0===(!(Ct.isUndefined(n)||null===n)&&i.call(t,n,Ct.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])}),u.pop()}}(e),t}function Pt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function kt(e,t){this._pairs=[],e&&xt(e,this,t)}const Nt=kt.prototype;function Ut(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lt(e,t,n){if(!t)return e;const r=n&&n.encode||Ut;Ct.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(s=i?i(t,n):Ct.isURLSearchParams(t)?t.toString():new kt(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Nt.append=function(e,t){this._pairs.push([e,t])},Nt.toString=function(e){const t=e?function(t){return e.call(this,t,Pt)}:Pt;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ct.forEach(this.handlers,function(t){null!==t&&e(t)})}}var Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ft={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:kt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Bt="undefined"!=typeof window&&"undefined"!=typeof document,It="object"==typeof navigator&&navigator||void 0,$t=Bt&&(!It||["ReactNative","NativeScript","NS"].indexOf(It.product)<0),Mt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,qt=Bt&&window.location.href||"http://localhost";var zt={...Object.freeze({__proto__:null,hasBrowserEnv:Bt,hasStandardBrowserEnv:$t,hasStandardBrowserWebWorkerEnv:Mt,navigator:It,origin:qt}),...Ft};function Ht(e){function t(e,n,r,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;if(s=!s&&Ct.isArray(r)?r.length:s,a)return Ct.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&Ct.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],i)&&Ct.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o}if(Ct.isFormData(e)&&Ct.isFunction(e.entries)){const n={};return Ct.forEachEntry(e,(e,r)=>{t(function(e){return Ct.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Jt={transitional:Dt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Ct.isObject(e);i&&Ct.isHTMLForm(e)&&(e=new FormData(e));if(Ct.isFormData(e))return r?JSON.stringify(Ht(e)):e;if(Ct.isArrayBuffer(e)||Ct.isBuffer(e)||Ct.isStream(e)||Ct.isFile(e)||Ct.isBlob(e)||Ct.isReadableStream(e))return e;if(Ct.isArrayBufferView(e))return e.buffer;if(Ct.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return xt(e,new zt.classes.URLSearchParams,{visitor:function(e,t,n,r){return zt.isNode&&Ct.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=Ct.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return xt(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ct.isString(e))try{return(t||JSON.parse)(e),Ct.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Jt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ct.isResponse(e)||Ct.isReadableStream(e))return e;if(e&&Ct.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Et.from(e,Et.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ct.forEach(["delete","get","head","post","put","patch"],e=>{Jt.headers[e]={}});const Kt=Ct.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Wt=Symbol("internals");function Vt(e){return e&&String(e).trim().toLowerCase()}function Xt(e){return!1===e||null==e?e:Ct.isArray(e)?e.map(Xt):String(e)}function Gt(e,t,n,r,i){return Ct.isFunction(r)?r.call(this,t,n):(i&&(t=n),Ct.isString(t)?Ct.isString(r)?-1!==t.indexOf(r):Ct.isRegExp(r)?r.test(t):void 0:void 0)}let Zt=class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Vt(t);if(!i)throw new Error("header name must be a non-empty string");const s=Ct.findKey(r,i);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Xt(e))}const s=(e,t)=>Ct.forEach(e,(e,n)=>i(e,n,t));if(Ct.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Ct.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Kt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Ct.isObject(e)&&Ct.isIterable(e)){let n,r,i={};for(const t of e){if(!Ct.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?Ct.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=Vt(e)){const n=Ct.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ct.isFunction(t))return t.call(this,e,n);if(Ct.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Vt(e)){const n=Ct.findKey(this,e);return!(!n||void 0===this[n]||t&&!Gt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Vt(e)){const i=Ct.findKey(n,e);!i||t&&!Gt(0,n[i],i,t)||(delete n[i],r=!0)}}return Ct.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Gt(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Ct.forEach(this,(r,i)=>{const s=Ct.findKey(n,i);if(s)return t[s]=Xt(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();o!==i&&delete t[i],t[o]=Xt(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ct.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ct.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Wt]=this[Wt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Vt(e);t[r]||(!function(e,t){const n=Ct.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return Ct.isArray(e)?e.forEach(r):r(e),this}};function Qt(e,t){const n=this||Jt,r=t||n,i=Zt.from(r.headers);let s=r.data;return Ct.forEach(e,function(e){s=e.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Yt(e){return!(!e||!e.__CANCEL__)}function en(e,t,n){Et.call(this,e??"canceled",Et.ERR_CANCELED,t,n),this.name="CanceledError"}function tn(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Et("Request failed with status code "+n.status,[Et.ERR_BAD_REQUEST,Et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Zt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ct.reduceDescriptors(Zt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Ct.freezeMethods(Zt),Ct.inherits(en,Et,{__CANCEL__:!0});const nn=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[o];i||(i=l),n[s]=a,r[s]=l;let u=o,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,i=0,s=1e3/t;const o=(t,s=Date.now())=>{i=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=s?o(e,t):(n=e,r||(r=setTimeout(()=>{r=null,o(n)},s-a)))},()=>n&&o(n)]}(n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-r,l=i(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},rn=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sn=e=>(...t)=>Ct.asap(()=>e(...t));var on=zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(zt.origin),zt.navigator&&/(msie|trident)/i.test(zt.navigator.userAgent)):()=>!0,an=zt.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];Ct.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Ct.isString(r)&&o.push("path="+r),Ct.isString(i)&&o.push("domain="+i),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ln(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const cn=e=>e instanceof Zt?{...e}:e;function un(e,t){t=t||{};const n={};function r(e,t,n,r){return Ct.isPlainObject(e)&&Ct.isPlainObject(t)?Ct.merge.call({caseless:r},e,t):Ct.isPlainObject(t)?Ct.merge({},t):Ct.isArray(t)?t.slice():t}function i(e,t,n,i){return Ct.isUndefined(t)?Ct.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function s(e,t){if(!Ct.isUndefined(t))return r(void 0,t)}function o(e,t){return Ct.isUndefined(t)?Ct.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,s){return s in t?r(n,i):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>i(cn(e),cn(t),0,!0)};return Ct.forEach(Object.keys({...e,...t}),function(r){const s=l[r]||i,o=s(e[r],t[r],r);Ct.isUndefined(o)&&s!==a||(n[r]=o)}),n}var dn=e=>{const t=un({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:l}=t;if(t.headers=a=Zt.from(a),t.url=Lt(ln(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Ct.isFormData(r))if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(zt.hasStandardBrowserEnv&&(i&&Ct.isFunction(i)&&(i=i(t)),i||!1!==i&&on(t.url))){const e=s&&o&&an.read(o);e&&a.set(s,e)}return t};var pn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=dn(e);let i=r.data;const s=Zt.from(r.headers).normalize();let o,a,l,c,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function f(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Zt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());tn(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Et("Request aborted",Et.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Et("Network Error",Et.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Dt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Et(t,i.clarifyTimeoutError?Et.ETIMEDOUT:Et.ECONNABORTED,e,m)),m=null},void 0===i&&s.setContentType(null),"setRequestHeader"in m&&Ct.forEach(s.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Ct.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([l,u]=nn(h,!0),m.addEventListener("progress",l)),p&&m.upload&&([a,c]=nn(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(o=t=>{m&&(n(!t||t.type?new en(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===zt.protocols.indexOf(b)?n(new Et("Unsupported protocol "+b+":",Et.ERR_BAD_REQUEST,e)):m.send(i||null)})};const hn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Et?t:new en(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,i(new Et(`timeout ${t} of ms exceeded`,Et.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>Ct.asap(o),a}},fn=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},mn=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},gn=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of mn(e))yield*fn(n,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},bn="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,yn=bn&&"function"==typeof ReadableStream,_n=bn&&("function"==typeof TextEncoder?(vn=new TextEncoder,e=>vn.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var vn;const wn=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Cn=yn&&wn(()=>{let e=!1;const t=new Request(zt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),En=yn&&wn(()=>Ct.isReadableStream(new Response("").body)),Rn={stream:En&&(e=>e.body)};var On;bn&&(On=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Rn[e]&&(Rn[e]=Ct.isFunction(On[e])?t=>t[e]():(t,n)=>{throw new Et(`Response type '${e}' is not supported`,Et.ERR_NOT_SUPPORT,n)})}));const Sn=async(e,t)=>{const n=Ct.toFiniteNumber(e.getContentLength());return n??(async e=>{if(null==e)return 0;if(Ct.isBlob(e))return e.size;if(Ct.isSpecCompliantForm(e)){const t=new Request(zt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ct.isArrayBufferView(e)||Ct.isArrayBuffer(e)?e.byteLength:(Ct.isURLSearchParams(e)&&(e+=""),Ct.isString(e)?(await _n(e)).byteLength:void 0)})(t)};const An={http:null,xhr:pn,fetch:bn&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:p}=dn(e);c=c?(c+"").toLowerCase():"text";let h,f=hn([i,s&&s.toAbortSignal()],o);const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(l&&Cn&&"get"!==n&&"head"!==n&&0!==(g=await Sn(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Ct.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=rn(g,nn(sn(l)));r=gn(n.body,65536,e,t)}}Ct.isString(d)||(d=d?"include":"omit");const i="credentials"in Request.prototype;h=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?d:void 0});let s=await fetch(h,p);const o=En&&("stream"===c||"response"===c);if(En&&(a||o&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=s[t]});const t=Ct.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&rn(t,nn(sn(a),!0))||[];s=new Response(gn(s.body,65536,n,()=>{r&&r(),m&&m()}),e)}c=c||"text";let b=await Rn[Ct.findKey(Rn,c)||"text"](s,e);return!o&&m&&m(),await new Promise((t,n)=>{tn(t,n,{data:b,headers:Zt.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:h})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Et("Network Error",Et.ERR_NETWORK,e,h),{cause:t.cause||t});throw Et.from(t,t&&t.code,e,h)}})};Ct.forEach(An,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Tn=e=>`- ${e}`,jn=e=>Ct.isFunction(e)||null===e||!1===e;var xn=e=>{e=Ct.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!jn(n)&&(r=An[(t=String(n)).toLowerCase()],void 0===r))throw new Et(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+s]=r}if(!r){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Et("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Tn).join("\n"):" "+Tn(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Pn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new en(null,e)}function kn(e){Pn(e),e.headers=Zt.from(e.headers),e.data=Qt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return xn(e.adapter||Jt.adapter)(e).then(function(t){return Pn(e),t.data=Qt.call(e,e.transformResponse,t),t.headers=Zt.from(t.headers),t},function(t){return Yt(t)||(Pn(e),t&&t.response&&(t.response.data=Qt.call(e,e.transformResponse,t.response),t.response.headers=Zt.from(t.response.headers))),Promise.reject(t)})}const Nn="1.11.0",Un={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Un[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ln={};Un.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Nn+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,s)=>{if(!1===e)throw new Et(r(i," has been removed"+(t?" in "+t:"")),Et.ERR_DEPRECATED);return t&&!Ln[i]&&(Ln[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}},Un.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Dn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Et("options must be an object",Et.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new Et("option "+s+" must be "+n,Et.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Et("Unknown option "+s,Et.ERR_BAD_OPTION)}},validators:Un};const Fn=Dn.validators;let Bn=class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=un(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&Dn.assertOptions(n,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),null!=r&&(Ct.isFunction(r)?t.paramsSerializer={serialize:r}:Dn.assertOptions(r,{encode:Fn.function,serialize:Fn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Dn.assertOptions(t,{baseUrl:Fn.spelling("baseURL"),withXsrfToken:Fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&Ct.merge(i.common,i[t.method]);i&&Ct.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=Zt.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[kn.bind(this),void 0];for(e.unshift(...o),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=o.length;let p=t;for(d=0;d<u;){const e=o[d++],t=o[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=kn.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Lt(ln((e=un(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Ct.forEach(["delete","get","head","options"],function(e){Bn.prototype[e]=function(t,n){return this.request(un(n||{},{method:e,url:t,data:(n||{}).data}))}}),Ct.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(un(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Bn.prototype[e]=t(),Bn.prototype[e+"Form"]=t(!0)});const In={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(In).forEach(([e,t])=>{In[t]=e});const $n=function e(t){const n=new Bn(t),r=ke(Bn.prototype.request,n);return Ct.extend(r,Bn.prototype,n,{allOwnKeys:!0}),Ct.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(un(t,n))},r}(Jt);$n.Axios=Bn,$n.CanceledError=en,$n.CancelToken=class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new en(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new CancelToken(function(t){e=t}),cancel:e}}},$n.isCancel=Yt,$n.VERSION=Nn,$n.toFormData=xt,$n.AxiosError=Et,$n.Cancel=$n.CanceledError,$n.all=function(e){return Promise.all(e)},$n.spread=function(e){return function(t){return e.apply(null,t)}},$n.isAxiosError=function(e){return Ct.isObject(e)&&!0===e.isAxiosError},$n.mergeConfig=un,$n.AxiosHeaders=Zt,$n.formToJSON=e=>Ht(Ct.isHTMLForm(e)?new FormData(e):e),$n.getAdapter=xn,$n.HttpStatusCode=In,$n.default=$n;const{Axios:Mn,AxiosError:qn,CanceledError:zn,isCancel:Hn,CancelToken:Jn,VERSION:Kn,all:Wn,Cancel:Vn,isAxiosError:Xn,spread:Gn,toFormData:Zn,AxiosHeaders:Qn,HttpStatusCode:Yn,formToJSON:er,getAdapter:tr,mergeConfig:nr}=$n;var rr=class{constructor(e,t){this.httpClient=e,this.validate=t}async getAppointments(e){return this.httpClient.get("/appointments/v1",{params:e}).then(this.validate(Se))}async createAppointment(e){return this.httpClient.post(`/appointments/v1/slots/${e.slot_id}`,e).then(e=>e.data).then(this.validate(Ae))}async getAppointment(e){return this.httpClient.get(`/api/v1/appointments/${e.id}`).then(e=>e.data).then(this.validate(Te))}async getDocumentsStorage(){return this.httpClient.get("/appointments/v1/documents/storage").then(e=>e.data).then(this.validate(je))}async rescheduleAppointment(e){const{id:t,...n}=e;return this.httpClient.put(`/appointments/v1/${t}/reschedule`,n)}async cancelAppointment(e){return this.httpClient.put(`/appointments/v1/${e.id}/cancel`)}async updateAppointment(e){const{appointment_id:t,...n}=e;return this.httpClient.put(`/appointments/v1/${t}/update`,n)}async addDocument(e){const{appointment_id:t,...n}=e;return this.httpClient.post(`/appointments/v1/${t}/consultation-document`,n)}async deleteDocument(e){return this.httpClient.delete(`/appointments/v1/${e.appointment_id}/consultation-document/${e.document_id}`)}async reconnectAppointment(e){return this.httpClient.put(`/appointments/v1/${e.appointmentId}/reconnect`)}},ir=class{constructor(e,t){this.httpClient=e,this.validate=t}async loginToken(e){return this.httpClient.post("/login/v1/token",{token:e.token},{headers:{"x-api-key":e.api_key}}).then(this.validate(xe))}};var sr=class{constructor(e,t){this.httpClient=e,this.validate=t}async postReview(e){return this.httpClient.post("/consultations/v1/review",e)}async startChatConsultation(e){return this.httpClient.put(`/consultations/v1/chat/professionals/${encodeURIComponent(e)}/consult`).then(()=>{})}async getReview(e){return this.httpClient.get(`/consultations/v1/review/${e}`).then(e=>e.data).then(this.validate(Pe))}},or=class{constructor(e,t){this.httpClient=e,this.validate=t}async uploadFile(e){const t=new FormData;return t.append("file",e.file,e.file.name),this.httpClient.post("/documents/v1/upload-file",t,{headers:{"Content-Type":"multipart/form-data"}}).then(this.validate(_))}},ar=class{constructor(e,t){this.httpClient=e,this.validate=t}async getAppointment(e){return this.httpClient.get(`/flash/v1/appointments/${e.appointmentId}`).then(e=>e.data).then(this.validate($))}async joinCall(e){return this.httpClient.get(`/flash/v1/calls/${e.callId}/join`).then(e=>e.data).then(this.validate(M))}async setReady(e){return this.httpClient.post(`/flash/v1/waiting/${e.professional_hash}/ready`,{consultation_id:e.consultation_id,consultation_type:e.consultation_type})}async leaveWaitingRoom(e){return this.httpClient.post(`/flash/v1/waiting/${e.professional_hash}/leave`,{consultation_id:e.consultation_id,consultation_type:e.consultation_type})}async getSharedDocuments(e){return this.httpClient.get(`/flash/v1/appointments/${e.appointment_id}/documents`).then(e=>e.data).then(this.validate(q))}async downloadDocument(e){return this.httpClient.get(e.url,{responseType:"blob"}).then(e=>e.data)}async updatePatientProfile(e){return this.httpClient.put("/flash/v1/profile",e)}async getPatientDocuments(e){return this.httpClient.get(`/flash/v1/patients/${e.patient_hash}/documents`,{params:{page:e.page,per_page:e.per_page}}).then(this.validate(z))}},lr=class{constructor(e,t){this.httpClient=e,this.validate=t}async getOrganizationSpecialties(){return this.httpClient.get("/organizations/v1/specialities").then(e=>e.data).then(this.validate(te))}async getOrganizationSetup(){return this.httpClient.get("/organizations/v1/setup").then(e=>e.data).then(this.validate(ne))}},cr=class{constructor(e,t){this.httpClient=e,this.validate=t}async createPaymentLink(e){const{specialty_id:t,...n}=e,r={...n,speciality_id:t};return this.httpClient.post("/payments/v1/schedule",r).then(e=>e.data).then(this.validate(W))}async createImmediateVideocallPaymentLink(e){return this.httpClient.post("/payments/v1/immediate-videocall",e).then(e=>e.data).then(this.validate(V))}async createChatConsultationPaymentLink(e){return this.httpClient.post("/payments/v1/schedule",e).then(e=>e.data).then(this.validate(X))}async getConsultationCoupon(e,t){return this.httpClient.get(`/payments/v1/consultation-coupon/${encodeURIComponent(e)}`,{params:{amount:t}}).then(e=>e.data).then(this.validate(H))}async getAppointmentConsultationCoupon(e){return this.httpClient.get(`/payments/v1/appointment/${encodeURIComponent(e)}/consultation-coupon`).then(e=>e.data).then(this.validate(J))}async getPaymentSession(e){return this.httpClient.get(`/payments/v1/session/${e}`).then(e=>e.data).then(this.validate(Z))}async validateApplePayMerchant(e){return this.httpClient.post("/payments/v1/apple-pay/validate-merchant",e).then(this.validate(Q))}async authorizeApplePay(e){return this.httpClient.post("/payments/v1/apple-pay/authorize",e).then(this.validate(Y))}async authorizeGooglePay(e){return this.httpClient.post("/payments/v1/google-pay/authorize",e).then(this.validate(ee))}},ur=class{constructor(e,t){this.httpClient=e,this.validate=t}async getProfessional(e){return this.httpClient.get(`sdk/v1/professionals/${e.hash}`).then(e=>e.data).then(this.validate(se))}async readAllMessages(e){return this.httpClient.put(`sdk/v1/rooms/${e.roomId}/messages/read`).then(e=>e.data)}},dr=class{constructor(e,t){this.httpClient=e,this.validate=t}async getPatientProfile(){return this.httpClient.get("/profile/v1/patients").then(e=>e.data).then(this.validate(ae))}async getProfessionalPublicProfile(e){return this.httpClient.get(`/profile/v1/public/professionals/${e.hash}`).then(e=>e.data).then(this.validate(le))}async acceptLegalConsent(e){return this.httpClient.post("/profile/v1/legal-consent",e)}},pr=class{constructor(e,t){this.httpClient=e,this.validate=t}async getRoomMessages(e){return this.httpClient.get(`api/v1/rooms/${e.roomId}/messages`).then(e=>e.data).then(this.validate(me))}async getUnreadMessagesCount(e){return this.httpClient.get(`chat/v1/${e.roomId}/unread-count`).then(e=>e.data).then(this.validate(ge))}async createSupportRoom(e){return this.httpClient.post("chat/v1/support-room",e).then(e=>e.data).then(this.validate(be))}},hr=class{constructor(e,t){this.httpClient=e,this.validate=t}async getScheduleServices(){return this.httpClient.get("/schedules/v1/services").then(e=>e.data).then(this.validate(we))}async getProfessionalsBySpecialtyAndService(e){return this.httpClient.get("/schedules/v1/professionals",{params:e}).then(e=>e.data).then(this.validate(Ce))}async getScheduleServiceProfessionalSlots(e){return this.httpClient.get(`/schedules/v1/services/${e.service_id}/professionals/${e.professional_hash}/slots`,{params:{starts_at:e.starts_at,finishes_at:e.finishes_at,rescheduling_appointment_id:e.rescheduling_appointment_id}}).then(e=>e.data).then(this.validate(Ee))}async getScheduleServiceSpecialities(e){return this.httpClient.get(`/schedules/v1/services/${e}/specialities`).then(e=>e.data).then(this.validate(Re))}async getScheduleSlot(e){return this.httpClient.get(`schedules/v1/slot/${e.slot_id}`,{params:{service_id:e.service_id,speciality_id:e.speciality_id}}).then(e=>e.data).then(this.validate(Oe))}};var fr={development:"https://chat-dev.mediquo.com",production:"https://chat.mediquo.com"},mr=class{constructor({env:e="production",baseURL:t,debug:n}={}){const r=t??fr[e];var i;this.httpClient=(i=r,$n.create({baseURL:i,headers:{"Content-Type":"application/json"}}));const s=(o={debug:n},e=>t=>{const n=e.safeParse(t.data);if(n.error&&o?.debug){const e=t.config?.url??"";console.warn(`[Validation Error]${e?` - URL: ${e}`:""}\n${r=n.error,r.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("\n")}`)}var r;return n.data??t.data});var o;this.flash=new ar(this.httpClient,s),this.auth=new ir(this.httpClient,s),this.appointments=new rr(this.httpClient,s),this.payments=new cr(this.httpClient,s),this.schedules=new hr(this.httpClient,s),this.organizations=new lr(this.httpClient,s),this.profile=new dr(this.httpClient,s),this.professionals=new ur(this.httpClient,s),this.rooms=new pr(this.httpClient,s),this.documents=new or(this.httpClient,s),this.consultations=new sr(this.httpClient,s)}setAuthToken(e){this.httpClient.defaults.headers.common.Authorization=`Bearer ${e}`}setApiKey(e){this._apiKey=e,this.httpClient.defaults.headers.common["x-api-key"]=e}getApiKey(){return this._apiKey}setLanguage(e){this.httpClient.defaults.headers.common["Accept-Language"]=e}};let gr=null,br=null;const yr=new Proxy({},{get:(e,t)=>(gr&&br===y.MODE||(gr=new mr({env:y.MODE,debug:"development"===y.MODE}),br=y.MODE),gr)[t]});export{U as A,F as C,C as D,ce as M,G as P,_e as S,yr as a,T as b,k as c,oe as d,Xn as e,K as f,x as g,j as h,I as i,S as j,A as k,B as l};
@@ -1 +1 @@
1
- import{P as n}from"./api-chat-client-BBL1U9EQ.js";function e(e,r,t){return e===n.Paid?{kind:"success",sessionId:t,reference:r}:e===n.Denied?{kind:"denied",sessionId:t}:{kind:"error",reason:"authorize"}}function r(n){const e=n.merchant_session;return null===e||"object"!=typeof e||Array.isArray(e)?n:e}function t(n){if("string"==typeof n)return n;if(null!==n&&"object"==typeof n&&"paymentData"in n){const e=n.paymentData;if("string"==typeof e)return e;if(null!=e)return JSON.stringify(e)}return JSON.stringify(n)}export{e as r,t as s,r as u};
1
+ import{P as n}from"./api-chat-client-BsiZ3A6g.js";function e(e,r,t){return e===n.Paid?{kind:"success",sessionId:t,reference:r}:e===n.Denied?{kind:"denied",sessionId:t}:{kind:"error",reason:"authorize"}}function r(n){const e=n.merchant_session;return null===e||"object"!=typeof e||Array.isArray(e)?n:e}function t(n){if("string"==typeof n)return n;if(null!==n&&"object"==typeof n&&"paymentData"in n){const e=n.paymentData;if("string"==typeof e)return e;if(null!=e)return JSON.stringify(e)}return JSON.stringify(n)}export{e as r,t as s,r as u};
@@ -1,18 +1,11 @@
1
+ import { z } from 'zod';
1
2
  import * as lit_html from 'lit-html';
2
3
  import * as lit from 'lit';
3
4
  import { LitElement } from 'lit';
4
- import { z } from 'zod';
5
- import './appointment-details-DpzdYLjq.js';
6
- import '../ui/mq-card.js';
7
- import './professional-overview-mO3tuMuH.js';
8
- import { L as LoginTokenResponse } from './schemas.d-5LR6aN9I.js';
9
- import './mq-chat-room-DuG4RuIp.js';
10
- import '../ui/mq-floating-bubble.js';
11
5
  import { P as PriceInCents } from './price.d-CwLosdAN.js';
12
6
  import '../ui/mq-button.js';
13
7
  import '../ui/mq-dialog.js';
14
8
  import { QueryClient } from '@tanstack/query-core';
15
- import '../ui/mq-unread-badge.js';
16
9
 
17
10
  declare const GetAppointmentsResponseSchema: z.ZodObject<{
18
11
  data: z.ZodArray<z.ZodObject<{
@@ -318,81 +311,4 @@ declare global {
318
311
  }
319
312
  }
320
313
 
321
- type RepeatTarget = {
322
- specialty: string;
323
- service: string;
324
- };
325
- /**
326
- * Action buttons block for an appointment card.
327
- *
328
- * The modify / cancel / repeat actions are ALWAYS rendered with a normal
329
- * (enabled) appearance. When the corresponding action is currently
330
- * unavailable, clicking it opens an informational dialog explaining why
331
- * instead of executing the action — and no telemetry is tracked for that
332
- * blocked click.
333
- *
334
- * Chat toggle and cancel-confirmation are owned by the parent card, so this
335
- * element only emits `toggle-chat` and `request-cancel` for those.
336
- */
337
- declare class AppointmentCardActions extends LitElement {
338
- static styles: lit.CSSResult;
339
- loginToken: LoginTokenResponse;
340
- variant: "next" | "history";
341
- appointmentId: string;
342
- isVideocall: boolean;
343
- hasChatSupport: boolean;
344
- unreadCount: number;
345
- isModifyUnavailable: boolean;
346
- isCancelUnavailable: boolean;
347
- hasNoSlots: boolean;
348
- modifyUnavailableMessage: string;
349
- cancelUnavailableMessage: string;
350
- repeatTarget: RepeatTarget | null;
351
- professionalHash: string;
352
- private openDialog;
353
- private get patientHash();
354
- private renderChatButton;
355
- private handleModifyClick;
356
- private handleCancelClick;
357
- private handleRepeatClick;
358
- private renderNextActions;
359
- private renderHistoryActions;
360
- private handleDialogClose;
361
- render(): lit_html.TemplateResult<1>;
362
- }
363
- declare global {
364
- interface HTMLElementTagNameMap {
365
- "appointment-card-actions": AppointmentCardActions;
366
- }
367
- }
368
-
369
- declare class AppointmentCard extends LitElement {
370
- static styles: lit.CSSResult;
371
- appointmentResource: GetAppointmentsResponse["data"][number];
372
- specialtyId: number;
373
- variant: "next" | "history";
374
- detailsVariant: "default" | "wide";
375
- loginToken: LoginTokenResponse;
376
- private isChatOpen;
377
- private isCancelDialogOpen;
378
- private unreadQuery;
379
- private getOrganizationSpecialtiesQuery;
380
- private getOrganizationSetupQuery;
381
- private getScheduleServicesQuery;
382
- render(): lit_html.TemplateResult<1>;
383
- }
384
- declare global {
385
- interface HTMLElementTagNameMap {
386
- "appointment-card": AppointmentCard;
387
- }
388
- }
389
-
390
- declare class AppointmentCardSkeleton extends LitElement {
391
- static styles: lit.CSSResult;
392
- render(): lit_html.TemplateResult<1>;
393
- }
394
- declare global {
395
- interface HTMLElementTagNameMap {
396
- "appointment-card-skeleton": AppointmentCardSkeleton;
397
- }
398
- }
314
+ export type { GetAppointmentsResponse as G };
@@ -0,0 +1 @@
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{c as i}from"./consume-BhoQNO_8.js";import{m as a}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{Q as n}from"./query-controller-D7jBX4X7.js";import{g as s}from"./get-organization-setup-query-DxHNY0w8.js";import{g as p,a as r}from"./i18n-formats-EgnwLxKt.js";import{g as l}from"./get-schedule-services-query-Ckvz9Fqh.js";import{g as c}from"./chunk-Y4EKUX25-CqL3lLdx.js";import{a as d,i as h,E as m,x as u}from"./lit-element-DiWJYFwC.js";import{n as g}from"./property-scuRaFcM.js";import{r as v}from"./state-LQivXIgA.js";import{getLocale as f}from"../i18n.js";import{a as y,A as b,i as $}from"./api-chat-client-BsiZ3A6g.js";import"./appointment-details-D7Rw3Hyl.js";import"../ui/mq-card.js";import"./professional-overview-C4H_znIJ.js";import{l as C}from"./chunk-S5RWG6G2-DPesx3Od.js";import"../mq-chat-room.js";import"../ui/mq-floating-bubble.js";import{g as x}from"./action-unavailable-message-CzRDRmk9.js";import{t as k,c as q,e as R,f as j,g as w,h as S,i as D}from"./telemetry-client-Bkbn48Dd.js";import{e as O}from"./class-map-Co76I6aw.js";import{MqAppointmentRescheduleEvent as I,MqAppointmentBookEvent as M,MqAppointmentJoinVideocallEvent as U,MqAppointmentViewDocumentationEvent as _}from"../events.js";import{messageBubbleIcon as H}from"../ui/icons/message-bubble-icon.js";import{videoIcon as z}from"../ui/icons/video-icon.js";import"../ui/mq-button.js";import"../ui/mq-unread-badge.js";import{c as A}from"./refund-cancel-policy-qaBi5AHH.js";import{toast as E}from"../ui/mq-toast.js";let N=class AppointmentCardActions extends d{constructor(){super(...arguments),this.variant="next",this.isVideocall=!1,this.hasChatSupport=!1,this.unreadCount=0,this.isModifyUnavailable=!1,this.isCancelUnavailable=!1,this.hasNoSlots=!1,this.modifyUnavailableMessage="",this.cancelUnavailableMessage="",this.repeatTarget=null,this.professionalHash="",this.openDialog=null,this.handleModifyClick=()=>{this.isModifyUnavailable?this.openDialog="modify":(k.track(q(this.patientHash,this.appointmentId)),this.dispatchEvent(new I({appointmentId:this.appointmentId})))},this.handleCancelClick=()=>{this.isCancelUnavailable?this.openDialog="cancel":(k.track(R(this.patientHash,this.appointmentId)),this.dispatchEvent(new CustomEvent("request-cancel",{bubbles:!0,composed:!0})))},this.handleRepeatClick=()=>{this.hasNoSlots?this.openDialog="repeat-no-slots":this.repeatTarget?(k.track(j(this.patientHash,this.appointmentId)),this.dispatchEvent(new M({specialty:this.repeatTarget.specialty,service:this.repeatTarget.service,professional:this.professionalHash}))):this.openDialog="repeat-error"},this.handleDialogClose=()=>{this.openDialog=null}}static{this.styles=h`:host{display:contents}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}get patientHash(){return this.loginToken.patient.hash}renderChatButton(){return u`<mq-button variant="primary" fullwidth noPadding @click="${()=>{this.dispatchEvent(new CustomEvent("toggle-chat",{bubbles:!0,composed:!0}))}}">${H({size:24})} ${a("Chat")} ${this.unreadCount>0?u`<mq-unread-badge></mq-unread-badge>`:m}</mq-button>`}renderNextActions(){return u`${this.isVideocall?u`<mq-button variant="outline" fullwidth noPadding @click="${()=>{k.track(w(this.patientHash,this.appointmentId)),this.dispatchEvent(new U({appointmentId:this.appointmentId}))}}">${z({size:24})} ${a("Ir a videollamada")}</mq-button>`:m}<div class="actions-secondary">${this.hasChatSupport?this.renderChatButton():m}<mq-button variant="outline" fullwidth noPadding @click="${this.handleModifyClick}">${a("Modificar")}</mq-button><mq-button variant="outline-negative" fullwidth noPadding @click="${this.handleCancelClick}">${a("Cancelar")}</mq-button></div>`}renderHistoryActions(){return u`${this.hasChatSupport?this.renderChatButton():m}<mq-button variant="outline" fullwidth noPadding @click="${()=>{k.track(S(this.patientHash,this.appointmentId)),this.dispatchEvent(new _({appointmentId:this.appointmentId}))}}">${a("Documentos")}</mq-button><mq-button variant="outline" fullwidth noPadding @click="${this.handleRepeatClick}">${a("Repetir")}</mq-button>`}render(){return u`<div class="${O({actions:!0,next:"next"===this.variant})}">${"next"===this.variant?this.renderNextActions():this.renderHistoryActions()}</div><appointment-action-unavailable-dialog .open="${"modify"===this.openDialog}" .heading="${a("Modificar cita")}" .message="${this.modifyUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"cancel"===this.openDialog}" .heading="${a("Anular cita")}" .message="${this.cancelUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-no-slots"===this.openDialog}" .heading="${a("Repetir cita")}" .message="${a("Este profesional no tiene horarios disponibles")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-error"===this.openDialog}" .heading="${a("Repetir cita")}" .message="${a("Lo sentimos, no hemos podido repetir tu cita. Por favor, contacta con soporte.")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog>`}};t([i({context:C})],N.prototype,"loginToken",void 0),t([g({type:String})],N.prototype,"variant",void 0),t([g({type:String})],N.prototype,"appointmentId",void 0),t([g({type:Boolean})],N.prototype,"isVideocall",void 0),t([g({type:Boolean})],N.prototype,"hasChatSupport",void 0),t([g({type:Number})],N.prototype,"unreadCount",void 0),t([g({type:Boolean})],N.prototype,"isModifyUnavailable",void 0),t([g({type:Boolean})],N.prototype,"isCancelUnavailable",void 0),t([g({type:Boolean})],N.prototype,"hasNoSlots",void 0),t([g({type:String})],N.prototype,"modifyUnavailableMessage",void 0),t([g({type:String})],N.prototype,"cancelUnavailableMessage",void 0),t([g({type:Object})],N.prototype,"repeatTarget",void 0),t([g({type:String})],N.prototype,"professionalHash",void 0),t([v()],N.prototype,"openDialog",void 0),N=t([o(),e("appointment-card-actions")],N);let T=class AppointmentCard extends d{constructor(){super(...arguments),this.variant="next",this.detailsVariant="wide",this.isChatOpen=!1,this.isCancelDialogOpen=!1,this.unreadQuery=new n(this,()=>c(y,{roomId:this.appointmentResource?.room?.id})),this.getOrganizationSpecialtiesQuery=new n(this,()=>p(y,{enabled:!!this.appointmentResource?.speciality?.id})),this.getOrganizationSetupQuery=new n(this,()=>s(y)),this.getScheduleServicesQuery=new n(this,()=>l(y))}static{this.styles=h`:host{display:flex}.card{width:100%;padding:var(--sp-6);display:flex;flex-direction:column;gap:var(--sp-4);justify-content:space-between}.card-top-content{display:flex;flex-direction:column;gap:var(--sp-6)}.see-details{color:var(--color-primary-link-default);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.see-details:hover{text-decoration:underline}.chevron-down{width:16px;height:16px;transition:transform .2s ease}.appointment-details{display:flex;flex-direction:column;gap:12px}.clock-icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.clock-icon-wrapper svg{width:100%;height:100%}.appointment-type{display:flex;align-items:center;gap:12px;font-size:18px;color:#2c3e50}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}render(){const t=this.appointmentResource.appointment.channel===b.videocall,e=this.appointmentResource.appointment.channel===b.phonecall,i=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,o=(t||e)&&i,n=f(),s=$(this.appointmentResource.appointment.expires_at),p=0===this.appointmentResource.slots.length,l=this.getOrganizationSetupQuery.result?.data?.appointments?.seconds_before_start_to_refund_on_cancel,c=A({startsAtIso:this.appointmentResource.appointment.starts_at,refundPolicySeconds:l}),d=s||p||!c,h=s||!c,g=x({action:"modify",refundPolicySeconds:l}),v=x({action:"cancel",refundPolicySeconds:l}),y=this.getOrganizationSpecialtiesQuery.result?.data?.find(t=>Number(t.id)===Number(this.appointmentResource.speciality.id)),C=r(y?.code??"",n,y?.name??this.appointmentResource.speciality.name),q=this.getScheduleServicesQuery.result?.data?.find(t=>t.id===this.appointmentResource.appointment.service_id)?.code,R=y?.code&&q?{specialty:y.code,service:q}:null;return u`<mq-card class="card" roundness="md"><div class="card-top-content"><professional-overview .specialtyName="${C??""}" .collegiateNumber="${this.appointmentResource.professional.collegiate_number??void 0}" .description="${this.appointmentResource.professional.description??""}" .languages="${this.appointmentResource.professional.languages}" .avatar="${this.appointmentResource.professional.avatar??""}" .name="${this.appointmentResource.professional.name}"></professional-overview><appointment-details .startsAt="${this.appointmentResource.appointment.starts_at}" .duration="${this.appointmentResource.appointment.duration}" .channel="${this.appointmentResource.appointment.channel}" .timezone="${this.loginToken?.patient?.timezone}" variant="${this.detailsVariant}"></appointment-details></div><appointment-card-actions .variant="${this.variant}" .appointmentId="${this.appointmentResource.appointment.id??""}" .isVideocall="${t}" .hasChatSupport="${o}" .unreadCount="${this.unreadQuery.result?.data?.unread_count??0}" .isModifyUnavailable="${d}" .isCancelUnavailable="${h}" .hasNoSlots="${p}" .modifyUnavailableMessage="${g}" .cancelUnavailableMessage="${v}" .repeatTarget="${R}" .professionalHash="${this.appointmentResource.professional.hash}" @toggle-chat="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&k.track(D(this.loginToken.patient.hash,this.appointmentResource.appointment.id??""))}}" @request-cancel="${()=>{this.isCancelDialogOpen=!0}}"></appointment-card-actions><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?u`<mq-chat-room slot="content" .consultationId="${this.appointmentResource.appointment.id}" consultation-type="appointment" token="${this.loginToken.access_token}" .roomId="${this.appointmentResource.room.id}" .professionalHash="${this.appointmentResource.professional.hash}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}" ?readonly="${s}"></mq-chat-room>`:m}</mq-floating-bubble><cancel-appointment-confirmation-dialog .appointmentId="${this.appointmentResource.appointment.id}" .price="${this.appointmentResource.price??void 0}" .open="${this.isCancelDialogOpen}" @cancel="${()=>{this.isCancelDialogOpen=!1}}" @success="${()=>{this.isCancelDialogOpen=!1,E.success(a("Consulta anulada correctamente")),this.dispatchEvent(new CustomEvent("appointment-cancel-confirmed",{bubbles:!0,composed:!0,detail:{id:this.appointmentResource.appointment.id}}))}}"></cancel-appointment-confirmation-dialog></mq-card>`}};t([g({type:Object})],T.prototype,"appointmentResource",void 0),t([g({type:Number})],T.prototype,"specialtyId",void 0),t([g({type:String})],T.prototype,"variant",void 0),t([g({type:String})],T.prototype,"detailsVariant",void 0),t([i({context:C})],T.prototype,"loginToken",void 0),t([v()],T.prototype,"isChatOpen",void 0),t([v()],T.prototype,"isCancelDialogOpen",void 0),T=t([o(),e("appointment-card")],T);let P=class AppointmentCardSkeleton extends d{static{this.styles=h`div{border-radius:var(--border-radius-md);background:color-mix(in srgb,var(--color-neutrals-background-disabled) 50%,#fff 50%);height:337px;width:100%}`}render(){return u`<div></div>`}};P=t([e("appointment-card-skeleton")],P);
@@ -0,0 +1,91 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { LitElement } from 'lit';
4
+ import { G as GetAppointmentsResponse } from './appointment-action-unavailable-dialog-ByWsZP0d.js';
5
+ import './appointment-details-DpzdYLjq.js';
6
+ import '../ui/mq-card.js';
7
+ import './professional-overview-mO3tuMuH.js';
8
+ import { L as LoginTokenResponse } from './schemas.d-D7bCe24u.js';
9
+ import './mq-chat-room-DuG4RuIp.js';
10
+ import '../ui/mq-floating-bubble.js';
11
+ import '../ui/mq-button.js';
12
+ import '../ui/mq-unread-badge.js';
13
+
14
+ type RepeatTarget = {
15
+ specialty: string;
16
+ service: string;
17
+ };
18
+ /**
19
+ * Action buttons block for an appointment card.
20
+ *
21
+ * The modify / cancel / repeat actions are ALWAYS rendered with a normal
22
+ * (enabled) appearance. When the corresponding action is currently
23
+ * unavailable, clicking it opens an informational dialog explaining why
24
+ * instead of executing the action — and no telemetry is tracked for that
25
+ * blocked click.
26
+ *
27
+ * Chat toggle and cancel-confirmation are owned by the parent card, so this
28
+ * element only emits `toggle-chat` and `request-cancel` for those.
29
+ */
30
+ declare class AppointmentCardActions extends LitElement {
31
+ static styles: lit.CSSResult;
32
+ loginToken: LoginTokenResponse;
33
+ variant: "next" | "history";
34
+ appointmentId: string;
35
+ isVideocall: boolean;
36
+ hasChatSupport: boolean;
37
+ unreadCount: number;
38
+ isModifyUnavailable: boolean;
39
+ isCancelUnavailable: boolean;
40
+ hasNoSlots: boolean;
41
+ modifyUnavailableMessage: string;
42
+ cancelUnavailableMessage: string;
43
+ repeatTarget: RepeatTarget | null;
44
+ professionalHash: string;
45
+ private openDialog;
46
+ private get patientHash();
47
+ private renderChatButton;
48
+ private handleModifyClick;
49
+ private handleCancelClick;
50
+ private handleRepeatClick;
51
+ private renderNextActions;
52
+ private renderHistoryActions;
53
+ private handleDialogClose;
54
+ render(): lit_html.TemplateResult<1>;
55
+ }
56
+ declare global {
57
+ interface HTMLElementTagNameMap {
58
+ "appointment-card-actions": AppointmentCardActions;
59
+ }
60
+ }
61
+
62
+ declare class AppointmentCard extends LitElement {
63
+ static styles: lit.CSSResult;
64
+ appointmentResource: GetAppointmentsResponse["data"][number];
65
+ specialtyId: number;
66
+ variant: "next" | "history";
67
+ detailsVariant: "default" | "wide";
68
+ loginToken: LoginTokenResponse;
69
+ private isChatOpen;
70
+ private isCancelDialogOpen;
71
+ private unreadQuery;
72
+ private getOrganizationSpecialtiesQuery;
73
+ private getOrganizationSetupQuery;
74
+ private getScheduleServicesQuery;
75
+ render(): lit_html.TemplateResult<1>;
76
+ }
77
+ declare global {
78
+ interface HTMLElementTagNameMap {
79
+ "appointment-card": AppointmentCard;
80
+ }
81
+ }
82
+
83
+ declare class AppointmentCardSkeleton extends LitElement {
84
+ static styles: lit.CSSResult;
85
+ render(): lit_html.TemplateResult<1>;
86
+ }
87
+ declare global {
88
+ interface HTMLElementTagNameMap {
89
+ "appointment-card-skeleton": AppointmentCardSkeleton;
90
+ }
91
+ }
@@ -0,0 +1 @@
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{g as n}from"./api-chat-client-BsiZ3A6g.js";import{a}from"./addSeconds-ofMnxlgT.js";import{i as r,a as s,E as l,x as p}from"./lit-element-DiWJYFwC.js";import{n as m}from"./property-scuRaFcM.js";import{e as c}from"./class-map-Co76I6aw.js";import{getLocale as h}from"../i18n.js";import{briefcaseIcon as d}from"../ui/icons/briefcase-icon.js";import{calendarIcon as f}from"../ui/icons/calendar-icon.js";import{clockIcon as u}from"../ui/icons/clock-icon.js";import{messageBubbleIcon as v}from"../ui/icons/message-bubble-icon.js";import{phoneIcon as w}from"../ui/icons/phone-icon.js";const g=r`.appointment-details{display:flex;flex-direction:column;gap:var(--sp-3)}.detail-row{display:inline-flex;width:fit-content;align-items:center;gap:var(--sp-2);color:var(--color-neutrals-text-default);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.detail-row svg{flex-shrink:0}.detail-row span::first-letter{text-transform:uppercase}.detail-row.full-width{width:100%}:host([strike-through]) .detail-row span{text-decoration:line-through}@media (min-width:768px){.appointment-details.wide{flex-direction:row;flex-wrap:wrap}}`;let y=class AppointmentDetails extends s{constructor(){super(...arguments),this.channel=void 0,this.variant="default",this.strikeThrough=!1,this.timezone=void 0,this._appointmentChannelToLabel=t=>{switch(t){case"videocall":return i("Videoconsulta");case"chat":return i("Chat");case"phonecall":return i("Consulta telefónica");default:return""}},this._appointmentChannelToIcon=t=>{switch(t){case"videocall":return d({size:24});case"chat":return v({size:24});case"phonecall":return w({size:24});default:return l}}}static{this.styles=g}render(){const t=h().replace("_","-"),e=new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",...this.timezone?{timeZone:this.timezone}:{}}),i=new Intl.DateTimeFormat(t,{timeStyle:"short",...this.timezone?{timeZone:this.timezone}:{}}),o=new Date(this.startsAt),r=a(o,this.duration),s=e.format(o),m=i.format(o),d=i.format(r),v=this.timezone?n(this.timezone,o):"";return p`<div class="${c({"appointment-details":!0,wide:"wide"===this.variant})}"><div class="detail-row">${f({size:24})} <span>${s}</span></div><div class="detail-row">${u({size:24})} <span>${m} - ${d}${v?` (${v})`:""}</span></div>${this.channel?p`<div class="detail-row full-width">${this._appointmentChannelToIcon(this.channel)} <span>${this._appointmentChannelToLabel(this.channel)}</span></div>`:l}</div>`}};t([m({type:String})],y.prototype,"startsAt",void 0),t([m({type:Number})],y.prototype,"duration",void 0),t([m({type:String})],y.prototype,"channel",void 0),t([m({type:String})],y.prototype,"variant",void 0),t([m({type:Boolean,attribute:"strike-through"})],y.prototype,"strikeThrough",void 0),t([m({type:String})],y.prototype,"timezone",void 0),y=t([o(),e("appointment-details")],y);export{y as A};
@@ -0,0 +1 @@
1
+ async function e(e){return new Promise((n,r)=>{const o=new FileReader;o.onloadend=()=>n(o.result),o.onerror=r,o.readAsDataURL(e)})}export{e as b};
@@ -1 +1 @@
1
- import{s as t}from"./context-request-event-Dfydf1ub.js";class s{constructor(t,i,e,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,i)=>{this.unsubscribe&&(this.unsubscribe!==i&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,i)),this.unsubscribe=i},this.host=t,void 0!==i.context){const t=i;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=i,this.callback=e,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.host,this.t,this.subscribe))}}export{s};
1
+ import{s as t}from"./context-request-event-Dfydf1ub.js";class s{constructor(t,i,e,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,i)=>{this.unsubscribe&&(this.unsubscribe!==i&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,i)),this.unsubscribe=i},this.host=t,void 0!==i.context){const t=i;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=i,this.callback=e,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.host,this.t,this.subscribe))}}function i(t,...i){return[t.getApiKey()??"_",...i]}export{s as a,i as s};
@@ -0,0 +1 @@
1
+ import{s}from"./chunk-6CCJWPGL-DlOpbEYH.js";function e(e,o,r){return{queryKey:s(e,"professionals",o.hash),queryFn:()=>e.professionals.getProfessional(o),staleTime:0,...r}}export{e as g};
@@ -0,0 +1 @@
1
+ import{z as e}from"./external-CJj32K_p.js";import{s}from"./chunk-6CCJWPGL-DlOpbEYH.js";var r=e.enum(["ordinary","system"]).enum;function n(e,r,n){return{queryKey:s(e,"unread-messages",r),queryFn:()=>e.rooms.getUnreadMessagesCount(r),staleTime:0,...n}}export{r as S,n as g};
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-6CCJWPGL-DlOpbEYH.js";function c({context:c,subscribe:e}){return(i,n)=>{"object"==typeof n?n.addInitializer(function(){new t(this,{context:c,callback:t=>{i.set.call(this,t)},subscribe:e})}):i.constructor.addInitializer(i=>{new t(i,{context:c,callback:t=>{i[n]=t},subscribe:e})})}}export{c};
@@ -0,0 +1,6 @@
1
+ import z from 'zod';
2
+
3
+ declare const DocumentTypeSchema: z.ZodEnum<["prescription", "report", "diagnosticTestPrescription"]>;
4
+ type DocumentType = z.infer<typeof DocumentTypeSchema>;
5
+
6
+ export type { DocumentType as D };
@@ -0,0 +1 @@
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{h as a,s as n}from"./task-Bj8p7kJX.js";import{a as s,C as r,g as d,i as l}from"./api-chat-client-BsiZ3A6g.js";import{a as c}from"./addSeconds-ofMnxlgT.js";import{a as m,i as p,E as h,x as u}from"./lit-element-DiWJYFwC.js";import{n as g}from"./property-scuRaFcM.js";import{getLocale as f}from"../i18n.js";import{calendarIcon as v}from"../ui/icons/calendar-icon.js";import{clockIcon as y}from"../ui/icons/clock-icon.js";import{r as b}from"./state-LQivXIgA.js";import{infoCircleOutineIcon as x}from"../ui/icons/info-circle-outine-icon.js";import"../ui/mq-button.js";import{l as $}from"./chunk-S5RWG6G2-DPesx3Od.js";import{messageBubbleIcon as k}from"../ui/icons/message-bubble-icon.js";import"../mq-chat-room.js";import"../ui/mq-floating-bubble.js";import"../ui/mq-card.js";import"../ui/mq-unread-badge.js";import{c as w}from"./consume-BhoQNO_8.js";import{Q as z}from"./query-controller-D7jBX4X7.js";import{g as q}from"./chunk-Y4EKUX25-CqL3lLdx.js";import"../ui/mq-page-title.js";import"./index-CatvNhwL.js";import{M as j}from"./mutation-controller-CR2qcqhH.js";import{g as _}from"./get-organization-setup-query-DxHNY0w8.js";import{g as C,a as O}from"./i18n-formats-EgnwLxKt.js";import{t as S,d as T,a as I,b as D}from"./telemetry-client-Bkbn48Dd.js";import{MqViewAppointmentsEvent as E}from"../events.js";let Q=class ChatCta extends m{constructor(){super(...arguments),this.text=i("Utiliza el chat para enviar el motivo de consulta, documentos o imágenes"),this.readonly=!1,this.isChatOpen=!1,this.unreadQuery=new z(this,()=>q(s,{roomId:this.roomId}))}static{this.styles=[p`.chat-cta{padding:var(--sp-6) var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-4)}.cta-message{display:inline-flex;align-items:center;justify-content:center;gap:var(--sp-4);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default)}.cta-message svg{flex-shrink:0}mq-button svg{flex-shrink:0}mq-chat-room{height:100%}@media (min-width:768px){.chat-cta{padding:var(--sp-6)}mq-button{max-width:323px;margin:0 auto}}`]}render(){return u`<mq-card class="chat-cta" roundness="md"><div class="cta-message">${x({size:24})} <span>${this.text}</span></div><mq-button variant="primary" size="md" fullwidth @click="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&this.onOpenChat?.()}}">${k({size:24})} ${i("Chatea con el profesional")} ${(this.unreadQuery.result?.data?.unread_count??0)>0?u`<mq-unread-badge></mq-unread-badge>`:h}</mq-button></mq-card><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?u`<mq-chat-room slot="content" .consultationId="${this.consultationId}" .consultationType="${r.appointment}" token="${this.loginToken.access_token}" .roomId="${this.roomId}" .professionalHash="${this.professionalHash}" ?readonly="${this.readonly}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}"></mq-chat-room>`:h}</mq-floating-bubble>`}};t([g({type:Number})],Q.prototype,"roomId",void 0),t([g({type:String})],Q.prototype,"professionalHash",void 0),t([g({type:String})],Q.prototype,"text",void 0),t([g({type:String})],Q.prototype,"consultationId",void 0),t([g({type:Boolean,reflect:!0})],Q.prototype,"readonly",void 0),t([g({attribute:!1})],Q.prototype,"onOpenChat",void 0),t([w({context:$})],Q.prototype,"loginToken",void 0),t([b()],Q.prototype,"isChatOpen",void 0),Q=t([o(),e("chat-cta")],Q);let B=class PageLayout extends m{constructor(){super(...arguments),this.yCentered=!1,this.background="solid"}static{this.styles=p`:host([background=transparent]){background-color:transparent}:host([background=solid]){background-color:var(--color-background)}:host([y-centered]) div{display:grid;place-items:center}div{width:100%;max-width:1000px;padding:var(--mq-layout-padding,0);margin:0 auto;box-sizing:border-box}:host([y-centered]) div{height:100%}main{width:100%}`}render(){return u`<div><main><slot></slot></main></div>`}};t([g({type:Boolean,attribute:"y-centered"})],B.prototype,"yCentered",void 0),t([g({type:String})],B.prototype,"background",void 0),B=t([e("page-layout")],B);const H=p`mq-page-title{margin:var(--size-3) 0}.description{font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal);margin:0;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-card>:not(:first-child){margin-top:var(--size-4)}.professional-name{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold);margin:0;margin-bottom:var(--size-1)}.professional-speciality{font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal);margin:0}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);color:var(--color-neutrals-text-default)}.description-list-item dt{display:inline-flex}.description-list-item dd{margin:0;font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-semibold)}.description-list-item dd::first-letter{text-transform:uppercase}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card-empty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal)}.documents-card-title{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold);margin:0;margin-bottom:var(--size-4)}.documents-list{margin-bottom:var(--size-4)}.documents-list>:not(:first-child){margin-top:var(--size-2)}.finished-consultation-footer{display:flex;flex-direction:column;gap:var(--size-5)}.document-item-skeleton{height:57px;width:100%;background-color:var(--color-muted);animation:skeleton-pulse 1.5s infinite}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}@media (min-width:768px){.description-list{flex-direction:row}mq-button{display:block;max-width:323px;margin:0 auto}}`;let P=class DocumentationView extends m{constructor(){super(...arguments),this.canReconnect=!1,this._sharedocumentsTask=new a(this,{task:async([t])=>await s.flash.getSharedDocuments({appointment_id:t}),args:()=>[this.appointment.id]}),this.getOrganizationSpecialtiesQuery=new z(this,()=>C(s)),this.getOrganizationSetupQuery=new z(this,()=>_(s)),this._reconnectMutation=new j(this,{mutationFn:t=>s.appointments.reconnectAppointment(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("reconnect",{bubbles:!0,composed:!0}))}})}static{this.styles=H}firstUpdated(){S.track(T(this.loginToken.patient.hash,this.appointment.id??""))}render(){const t=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,e=f(),o=e.replace("_","-"),a=this.loginToken.patient.timezone,s=a?{timeZone:a}:{},r=new Intl.DateTimeFormat(o,{dateStyle:"full",...s}),m=new Intl.DateTimeFormat(o,{hour:"2-digit",minute:"2-digit",...s}),p=new Date(this.appointment.start_date),g=c(p,this.appointment.duration),b=a?d(a,p):"";return u`<mq-page-title .title="${i("Consulta finalizada")}" back-label="${i("Salir")}" @mq-back="${t=>{t.stopPropagation(),this.dispatchEvent(new E({tab:"history"}))}}"></mq-page-title><p class="description">${i("Si tu médico ha generado alguna documentación podrás verla y descargarla aquí, desde la sección de documentación, tu correo o el chat.")}</p><mq-card class="professional-card" roundness="md"><div><h2 class="professional-name">${this.appointment.from.name}</h2><p class="professional-speciality">${this.appointment.from.speciality}</p></div><dl class="description-list"><div class="description-list-item"><dt>${v()}</dt><dd>${r.format(p)}</dd></div><div class="description-list-item"><dt>${y()}</dt><dd>${m.format(p)} - ${m.format(g)}${b?` (${b})`:""}</dd></div></dl></mq-card><mq-card class="documents-card" roundness="md"><h2 class="documents-card-title">${i("Documentación")}</h2><div class="documents-list">${this._sharedocumentsTask?.render({pending:()=>u`<div class="document-item-skeleton"></div>`,complete:()=>0===this._sharedocumentsTask?.value?.length?u`<p class="documents-card-empty">${i("El médico está terminando de gestionar tu consulta. Actualiza en unos minutos para ver si tienes documentación.")}</p>`:this._sharedocumentsTask?.value?.map(t=>u`<patient-document .kind="${t.document_type}" .filename="${t.name}" .specialty="${(()=>{const i=this.getOrganizationSpecialtiesQuery.result?.data?.find(e=>e.id===t.professional.speciality_id);return O(i?.code??"",e,i?.name)})()}" .description="${t.name}" .date="${t.created_at}" .downloadUrl="${t.url}"></patient-document>`)})}</div><mq-button variant="outline" size="md" fullwidth @click="${()=>{S.track(I(this.loginToken.patient.hash,this.appointment.id??"")),this._sharedocumentsTask?.run()}}" .disabled="${this._sharedocumentsTask?.status===n.PENDING}">${i("Actualizar")}</mq-button></mq-card><div class="finished-consultation-footer">${this.canReconnect?u`<mq-button variant="primary" size="md" fullwidth ?disabled="${this._reconnectMutation.isPending}" @click="${()=>this._reconnectMutation.run({appointmentId:this.appointment.id})}">${i("Volver a la sala de espera")}</mq-button>`:h} ${t?u`<chat-cta .consultationId="${this.appointment.id}" .roomId="${Number(this.appointment.room_id)}" .professionalHash="${this.appointment.from.hash}" .text="${i("Puedes chatear con tu profesional hasta 48 horas finalizada tu cita")}" ?readonly="${l(this.appointment.expires_at)}" .onOpenChat="${()=>{S.track(D(this.loginToken.patient.hash,this.appointment.id??""))}}"></chat-cta>`:h}</div>`}};t([g({type:Object})],P.prototype,"appointment",void 0),t([g({type:String})],P.prototype,"token",void 0),t([g({type:Boolean,attribute:"can-reconnect"})],P.prototype,"canReconnect",void 0),t([w({context:$})],P.prototype,"loginToken",void 0),P=t([o(),e("documentation-view")],P);
@@ -0,0 +1 @@
1
+ import{s as n}from"./chunk-6CCJWPGL-DlOpbEYH.js";function t(t,e,p){return{queryKey:n(t,"appointments",e.id),queryFn:()=>t.appointments.getAppointment(e),...p}}export{t as g};
@@ -0,0 +1 @@
1
+ import{s as n}from"./chunk-6CCJWPGL-DlOpbEYH.js";function r(r,t){return{queryKey:n(r,"organization-setup"),queryFn:()=>r.organizations.getOrganizationSetup(),...t}}export{r as g};
@@ -0,0 +1 @@
1
+ import{s as t}from"./chunk-6CCJWPGL-DlOpbEYH.js";function e(e,n){return{queryKey:t(e,"patient-documents",n),queryFn:()=>e.flash.getPatientDocuments(n)}}export{e as g};
@@ -0,0 +1 @@
1
+ import{s as e}from"./chunk-6CCJWPGL-DlOpbEYH.js";function r(r,t){return{queryKey:e(r,"patient-profile"),queryFn:()=>r.profile.getPatientProfile(),...t}}export{r as g};
@@ -0,0 +1 @@
1
+ import{s as e}from"./chunk-6CCJWPGL-DlOpbEYH.js";function s(s){return{queryKey:e(s,"schedule-services"),queryFn:()=>s.schedules.getScheduleServices()}}export{s as g};
@@ -0,0 +1 @@
1
+ import{s as o}from"./chunk-6CCJWPGL-DlOpbEYH.js";function a(a,e){return{queryKey:o(a,"organization-specialties"),queryFn:()=>a.organizations.getOrganizationSpecialties(),...e}}var e={digestive_system:{de_DE:"Verdauungssystem",en_US:"Digestive System",es_ES:"Aparato Digestivo",ca_ES:"Aparell Digestiu",pt_PT:"Aparelho Digestivo"},orthopedic_surgery_traumatology:{de_DE:"Traumatologie und Orthopädische Chirurgie",en_US:"Traumatology and Orthopedic Surgery",es_ES:"Traumatología y Cirugía Ortopédica",ca_ES:"Traumatologia i Cirurgia Ortopèdica",pt_PT:"Traumatologia e Cirurgia Ortopédica"},gynecology:{de_DE:"Gynäkologie",en_US:"Gynecology",es_ES:"Ginecología",ca_ES:"Ginecologia",pt_PT:"Ginecologia"},endocrinology:{de_DE:"Endokrinologie",en_US:"Endocrinology",es_ES:"Endocrinología",ca_ES:"Endocrinologia",pt_PT:"Endocrinologia"},psychiatry:{de_DE:"Psychiatrie",en_US:"Psychiatry",es_ES:"Psiquiatría",ca_ES:"Psiquiatria",pt_PT:"Psiquiatria"}},i={videocall:{de_DE:"Videosprechstunde",en_US:"Videocall",es_ES:"Videoconsulta",ca_ES:"Videoconsulta",pt_PT:"Videoconsulta"},phonecall:{de_DE:"Telefonische Behandlung",en_US:"Phone consultation",es_ES:"Consulta telefónica",ca_ES:"Consulta telefònica",pt_PT:"Consulta telefónica"}},n={de_DE:"Konsultationspreis",en_US:"Consultation price",es_ES:"Precio de consulta",ca_ES:"Preu de consulta",pt_PT:"Preço da consulta"},t={videocall:"videocall",phonecall:"phonecall",adeslas_videocall:"videocall",adeslas_prod_videocall:"videocall",adeslas_phonecall:"phonecall",adeslas_prod_phonecall:"phonecall"};function l(o,a,e){if(!o)return e??"";const l=t[o];return l?i[l][a]:e??n[a]}var r={consulta_telefonica:"phonecall",videoconsulta:"videocall"},c={"aparato-digestivo":"digestive_system","cirugia-ortopedica-y-traumatologia":"orthopedic_surgery_traumatology",ginecologia:"gynecology",endocrinologia:"endocrinology",psiquiatria:"psychiatry"};function s(o,a,i){const n=i?.trim();if(n)return n;const t=e[o]?.[a];return void 0!==t?t:o}export{r as S,s as a,c as b,l as c,e as d,a as g};
@@ -0,0 +1 @@
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{E as s,i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as r}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{e as a}from"./class-map-Co76I6aw.js";import{i as d,t as c,e as p}from"./directive-2EDmOukv.js";import{o as v}from"./style-map-CIdqdn7C.js";import"../ui/mq-text-button.js";const u={},m=(t,e=u)=>t._$AH=e,x=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),x(t,e);return!0},$=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},b=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),A(e)}};function _(t){void 0!==this._$AN?($(this),this._$AM=t,b(this)):this._$AM=t}function g(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)x(i[t],!1),$(i[t]);else null!=i&&(x(i,!1),$(i));else x(this,t)}const A=t=>{t.type==c.CHILD&&(t._$AP??=g,t._$AQ??=_)};class f extends d{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),b(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(x(this,t),$(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class h{}const y=new WeakMap,w=p(class extends f{render(t){return s}update(t,[e]){const i=e!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),s}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=y.get(e);void 0===s&&(s=new WeakMap,y.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?y.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),C=i`:host{display:flex;flex-direction:column;gap:var(--sp-1)}.text{margin:0}.text.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.toggle{align-self:flex-start}`;let G=class MqClampedText extends o{constructor(){super(...arguments),this.lines=2,this.expandLabel="",this.collapseLabel="",this.expanded=!1,this.overflowing=!1,this.textRef=new h,this.measure=()=>{const t=this.textRef.value;if(!t||this.expanded)return;const e=t.scrollHeight-t.clientHeight>1;e!==this.overflowing&&(this.overflowing=e)}}static{this.styles=C}updated(){const t=this.textRef.value;t&&!this.resizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.measure()),this.resizeObserver.observe(t)),this.measure()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}render(){return n`<div ${w(this.textRef)} class="text ${a({"is-clamped":!this.expanded})}" style="${v({"-webkit-line-clamp":this.expanded?"":String(this.lines)})}"><slot @slotchange="${this.measure}"></slot></div>${this.expanded||this.overflowing?n`<mq-text-button class="toggle" type="button" size="sm" fontWeight="normal" underlined @click="${()=>{this.expanded=!this.expanded}}">${this.expanded?this.collapseLabel:this.expandLabel}</mq-text-button>`:s}`}};t([r({type:Number})],G.prototype,"lines",void 0),t([r({type:String,attribute:"expand-label"})],G.prototype,"expandLabel",void 0),t([r({type:String,attribute:"collapse-label"})],G.prototype,"collapseLabel",void 0),t([l()],G.prototype,"expanded",void 0),t([l()],G.prototype,"overflowing",void 0),G=t([e("mq-clamped-text")],G);export{G as M,f,m};
@@ -0,0 +1,28 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { LitElement } from 'lit';
4
+
5
+ declare class HomeWidgetEmptyState extends LitElement {
6
+ static styles: lit.CSSResult;
7
+ icon: "document" | "calendar";
8
+ heading: string;
9
+ description: string;
10
+ render(): lit_html.TemplateResult<1>;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ "home-widget-empty-state": HomeWidgetEmptyState;
15
+ }
16
+ }
17
+
18
+ declare class SectionHeader extends LitElement {
19
+ static styles: lit.CSSResult;
20
+ heading: string;
21
+ actionLabel?: string;
22
+ render(): lit_html.TemplateResult<1>;
23
+ }
24
+ declare global {
25
+ interface HTMLElementTagNameMap {
26
+ "section-header": SectionHeader;
27
+ }
28
+ }
@@ -2,10 +2,7 @@ import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { LitElement } from 'lit';
4
4
  import '../ui/mq-button.js';
5
- import z from 'zod';
6
-
7
- declare const DocumentTypeSchema: z.ZodEnum<["prescription", "report", "diagnosticTestPrescription"]>;
8
- type DocumentType = z.infer<typeof DocumentTypeSchema>;
5
+ import { D as DocumentType } from './document.model.d-DIzMiOmd.js';
9
6
 
10
7
  /**
11
8
  * @fires download-file - Fired when the user requests a download (bubbles, composed; `url` and `filename` on the event)
@@ -0,0 +1 @@
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{i as o,a as i,x as r}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";import{r as a}from"./state-LQivXIgA.js";import{downloadIcon as s}from"../ui/icons/download-icon.js";import"../ui/mq-button.js";import{m as l}from"./runtime-Bg1WXVCx.js";import{l as d}from"./localized-decorator-BlOuLhym.js";import{a as p,D as c}from"./api-chat-client-BsiZ3A6g.js";import{b as m}from"./blob-to-base64-CUL1trde.js";import{DownloadFileEvent as f}from"../events.js";import{getLocale as h}from"../i18n.js";const v=o`:host{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4);width:100%}.left{display:flex;flex-direction:column;gap:var(--sp-1);flex:1;min-width:0}.tag{border-radius:var(--border-radius-sm);display:inline-flex;align-items:center;justify-content:center;padding:var(--sp-0_5) var(--sp-2);background-color:#e5e5e5;width:fit-content}.tag-label{font-family:var(--font-body);font-size:11px;font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-transform:uppercase;letter-spacing:3px;line-height:normal}.title{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let g=class PatientDocument extends i{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=v}getFormatter(){const t=h().replace("_","-");return new Intl.DateTimeFormat(t,{year:"numeric",month:"numeric",day:"numeric"})}async _handleDownload(){this.isDownloading=!0;const t=await p.flash.downloadDocument({url:this.downloadUrl}),e=await m(t);this.dispatchEvent(new f({url:e,filename:`${this.filename}.pdf`})),this.isDownloading=!1}formatKind(t){switch(t){case c.prescription:return l("Receta");case c.report:return l("Informe");case c.diagnosticTestPrescription:return l("Prescripción")}}render(){const t=this.getFormatter().format(new Date(this.date));return r`<div class="left"><div class="tag"><span class="tag-label">${this.formatKind(this.kind)}</span></div><div class="title">${t} - ${this.specialty}</div><div class="description">${this.description}</div></div><mq-button variant="ghost" size="icon-lg" @click="${this._handleDownload}" ?disabled="${this.isDownloading}">${s({size:24})}</mq-button>`}};t([n({type:String})],g.prototype,"kind",void 0),t([n({type:String})],g.prototype,"filename",void 0),t([n({type:String})],g.prototype,"specialty",void 0),t([n({type:String})],g.prototype,"description",void 0),t([n({type:String})],g.prototype,"date",void 0),t([n({type:String})],g.prototype,"downloadUrl",void 0),t([a()],g.prototype,"isDownloading",void 0),g=t([d(),e("patient-document")],g);
@@ -0,0 +1 @@
1
+ import{_ as t,c as i}from"./custom-element-D2ziPxYE.js";import{l as e}from"./localized-decorator-BlOuLhym.js";import"./runtime-Bg1WXVCx.js";import{i as o,a as n,x as r,E as a}from"./lit-element-DiWJYFwC.js";import{n as s}from"./property-scuRaFcM.js";import{calendarIcon as c}from"../ui/icons/calendar-icon.js";import{fileIcon as l}from"../ui/icons/file-icon.js";import{arrowRightIcon as p}from"../ui/icons/arrow-right-icon.js";const d=o`:host{display:flex;flex-direction:column;gap:var(--sp-4);width:100%;box-sizing:border-box}svg{flex-shrink:0;width:25px;height:25px}.content{display:flex;flex-direction:column;gap:var(--sp-2)}.title{font-family:var(--font-titles);font-size:var(--text-base);line-height:1.5;font-weight:var(--font-weight-medium);color:var(--color-text-icons--primary,#0a0a22);margin:0}.description{font-family:var(--font-body);font-size:var(--text-sm);line-height:1.35;font-weight:var(--font-weight-normal);color:var(--color-text-icons--secondary,#6d658b);margin:0}@media (min-width:768px){:host{flex-direction:row;align-items:flex-start;gap:var(--sp-6)}svg{width:32px;height:32px}}`;let h=class HomeWidgetEmptyState extends n{constructor(){super(...arguments),this.icon="document",this.heading="",this.description=""}static{this.styles=d}render(){const t="calendar"===this.icon?c:l;return r`${t({size:32,color:"var(--color-primary, #4a1ea7)"})}<div class="content"><p class="title">${this.heading}</p><p class="description">${this.description}</p></div>`}};t([s({type:String})],h.prototype,"icon",void 0),t([s({type:String})],h.prototype,"heading",void 0),t([s({type:String})],h.prototype,"description",void 0),h=t([e(),i("home-widget-empty-state")],h);const m=o`:host{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);width:100%}.heading{font-family:var(--font-titles);font-size:var(--text-base);line-height:1.5;font-weight:var(--font-weight-medium);color:var(--color-text-icons--primary,#0a0a22);margin:0}.action{display:inline-flex;align-items:center;gap:6px;background:0 0;border:none;padding:0;cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);line-height:1.35;font-weight:var(--font-weight-normal);color:var(--color-primary-text-link,#4a1ea7);white-space:nowrap}.action:hover{text-decoration:underline}.action svg{flex-shrink:0}`;let g=class SectionHeader extends n{constructor(){super(...arguments),this.heading=""}static{this.styles=m}render(){return r`<h2 class="heading">${this.heading}</h2>${this.actionLabel?r`<button class="action" type="button" @click="${()=>{this.dispatchEvent(new CustomEvent("section-action",{bubbles:!0,composed:!0}))}}">${this.actionLabel} ${p({size:18,color:"var(--color-primary-text-link, #4a1ea7)"})}</button>`:a}`}};t([s({type:String})],g.prototype,"heading",void 0),t([s({type:String,attribute:"action-label"})],g.prototype,"actionLabel",void 0),g=t([e(),i("section-header")],g);
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as a}from"./property-scuRaFcM.js";import{r as s}from"./state-LQivXIgA.js";import"../ui/mq-checkbox.js";import"../ui/mq-button.js";import{M as r}from"./mutation-controller-CR2qcqhH.js";import{setEnv as l}from"../env.js";import{a as h}from"./api-chat-client-BBL1U9EQ.js";const c=i`.page-header{box-sizing:border-box;width:100%;display:none}.page-title{font-family:var(--font-body);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.page-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.page-subtitle{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-subtle)}.page-subtitle ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-section{box-sizing:border-box;width:100%;display:flex;flex-direction:column;gap:var(--sp-6);background-color:var(--color-neutrals-background-weak);padding:var(--sp-6);border-radius:var(--border-radius-md)}.terms-title{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.terms-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-description{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.terms-description ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.checkbox-container{display:flex;gap:var(--sp-3);align-items:flex-start;cursor:pointer}.checkbox-label{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);flex:1}@media (min-width:768px){.page-header{display:block;margin-bottom:var(--sp-10)}.page-title{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}.page-title ::slotted(*){font-size:inherit;line-height:inherit}.page-subtitle{font-size:var(--text-base);line-height:var(--text-base--line-height)}.page-subtitle ::slotted(*){font-size:inherit;line-height:inherit}.terms-title{font-size:var(--text-2xl);line-height:var(--text-2xl--line-height)}.terms-title ::slotted(*){font-size:inherit;line-height:inherit}.terms-description{font-size:var(--text-base);line-height:var(--text-base--line-height)}.terms-description ::slotted(*){font-size:inherit;line-height:inherit}.checkbox-label{font-size:var(--text-base);line-height:var(--text-base--line-height)}}`;let d=class MqTermsAndConditions extends o{constructor(){super(...arguments),this.disabled=!1,this.hasCommercialCommunications=!1,this._accepted=!1,this.acceptLegalConsentMutation=new r(this,{mutationFn:async t=>h.profile.acceptLegalConsent(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("continue"))}})}static{this.styles=c}willUpdate(t){t.has("env")&&this.env&&l(this.env),t.has("apiKey")&&this.apiKey&&h.setApiKey(this.apiKey),t.has("token")&&this.token&&h.setAuthToken(this.token)}handleCheckboxChange(t){this._accepted=t.detail.checked}handleContinue(){this._accepted&&!this.disabled&&this.acceptLegalConsentMutation.run({terms_accepted:!0,privacy_accepted:!0,commercial_accepted:this.hasCommercialCommunications})}render(){const t=!this._accepted||this.disabled;return n`<div class="page-header"><div class="page-title"><slot name="page-title"></slot></div><div class="page-subtitle"><slot name="page-subtitle"></slot></div></div><div class="terms-section"><div><div class="terms-title"><slot name="terms-title"></slot></div><div class="terms-description"><slot name="terms-description"></slot></div></div><div class="checkbox-container"><mq-checkbox id="terms-checkbox" @change="${this.handleCheckboxChange}" ?disabled="${this.disabled}"></mq-checkbox><label class="checkbox-label" for="terms-checkbox"><slot name="checkbox-label"></slot></label></div><mq-button variant="primary" size="md" fullwidth ?disabled="${this.acceptLegalConsentMutation.isPending||t}" @click="${this.handleContinue}"><slot name="button-text"></slot></mq-button></div>`}};t([a({type:Boolean})],d.prototype,"disabled",void 0),t([a({type:Boolean})],d.prototype,"hasCommercialCommunications",void 0),t([a({type:String,attribute:"api-key"})],d.prototype,"apiKey",void 0),t([a({type:String,attribute:"token"})],d.prototype,"token",void 0),t([a({type:String,attribute:"env"})],d.prototype,"env",void 0),t([s()],d.prototype,"_accepted",void 0),d=t([e("mq-terms-and-conditions")],d);export{d as M};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as a}from"./property-scuRaFcM.js";import{r as s}from"./state-LQivXIgA.js";import"../ui/mq-checkbox.js";import"../ui/mq-button.js";import{M as r}from"./mutation-controller-CR2qcqhH.js";import{setEnv as l}from"../env.js";import{a as h}from"./api-chat-client-BsiZ3A6g.js";const c=i`.page-header{box-sizing:border-box;width:100%;display:none}.page-title{font-family:var(--font-body);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.page-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.page-subtitle{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-subtle)}.page-subtitle ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-section{box-sizing:border-box;width:100%;display:flex;flex-direction:column;gap:var(--sp-6);background-color:var(--color-neutrals-background-weak);padding:var(--sp-6);border-radius:var(--border-radius-md)}.terms-title{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.terms-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-description{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.terms-description ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.checkbox-container{display:flex;gap:var(--sp-3);align-items:flex-start;cursor:pointer}.checkbox-label{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);flex:1}@media (min-width:768px){.page-header{display:block;margin-bottom:var(--sp-10)}.page-title{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}.page-title ::slotted(*){font-size:inherit;line-height:inherit}.page-subtitle{font-size:var(--text-base);line-height:var(--text-base--line-height)}.page-subtitle ::slotted(*){font-size:inherit;line-height:inherit}.terms-title{font-size:var(--text-2xl);line-height:var(--text-2xl--line-height)}.terms-title ::slotted(*){font-size:inherit;line-height:inherit}.terms-description{font-size:var(--text-base);line-height:var(--text-base--line-height)}.terms-description ::slotted(*){font-size:inherit;line-height:inherit}.checkbox-label{font-size:var(--text-base);line-height:var(--text-base--line-height)}}`;let d=class MqTermsAndConditions extends o{constructor(){super(...arguments),this.disabled=!1,this.hasCommercialCommunications=!1,this._accepted=!1,this.acceptLegalConsentMutation=new r(this,{mutationFn:async t=>h.profile.acceptLegalConsent(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("continue"))}})}static{this.styles=c}willUpdate(t){t.has("env")&&this.env&&l(this.env),t.has("apiKey")&&this.apiKey&&h.setApiKey(this.apiKey),t.has("token")&&this.token&&h.setAuthToken(this.token)}handleCheckboxChange(t){this._accepted=t.detail.checked}handleContinue(){this._accepted&&!this.disabled&&this.acceptLegalConsentMutation.run({terms_accepted:!0,privacy_accepted:!0,commercial_accepted:this.hasCommercialCommunications})}render(){const t=!this._accepted||this.disabled;return n`<div class="page-header"><div class="page-title"><slot name="page-title"></slot></div><div class="page-subtitle"><slot name="page-subtitle"></slot></div></div><div class="terms-section"><div><div class="terms-title"><slot name="terms-title"></slot></div><div class="terms-description"><slot name="terms-description"></slot></div></div><div class="checkbox-container"><mq-checkbox id="terms-checkbox" @change="${this.handleCheckboxChange}" ?disabled="${this.disabled}"></mq-checkbox><label class="checkbox-label" for="terms-checkbox"><slot name="checkbox-label"></slot></label></div><mq-button variant="primary" size="md" fullwidth ?disabled="${this.acceptLegalConsentMutation.isPending||t}" @click="${this.handleContinue}"><slot name="button-text"></slot></mq-button></div>`}};t([a({type:Boolean})],d.prototype,"disabled",void 0),t([a({type:Boolean})],d.prototype,"hasCommercialCommunications",void 0),t([a({type:String,attribute:"api-key"})],d.prototype,"apiKey",void 0),t([a({type:String,attribute:"token"})],d.prototype,"token",void 0),t([a({type:String,attribute:"env"})],d.prototype,"env",void 0),t([s()],d.prototype,"_accepted",void 0),d=t([e("mq-terms-and-conditions")],d);export{d as M};
@@ -0,0 +1 @@
1
+ function n(n){return n/100}function r(r,t){const u=t.replaceAll("_","-");return new Intl.NumberFormat(u,{style:"currency",currency:r.currency}).format(n(r.amount))}function t(n){return null!=n&&n.amount>0}export{n as c,r as f,t as h};