@mediquo/elements 0.6.5 → 0.8.0-rc.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 (127) hide show
  1. package/dist/chunks/action-unavailable-message-DPH7oOl_.js +1 -0
  2. package/dist/chunks/addSeconds-ofMnxlgT.js +1 -0
  3. package/dist/chunks/api-chat-client-DLOZVIkT.js +1 -0
  4. package/dist/chunks/{apple-pay-outcomes-CnVRvAVS.js → apple-pay-outcomes-BMxr7x7j.js} +1 -1
  5. package/dist/chunks/{appointment-card-skeleton-1c7552Ln.d.ts → appointment-action-unavailable-dialog-Da2IATYj.d.ts} +9 -86
  6. package/dist/chunks/appointment-card-skeleton-B5b-O2Fh.js +1 -0
  7. package/dist/chunks/appointment-card-skeleton-B7dKtGv0.d.ts +91 -0
  8. package/dist/chunks/{appointment-details-DpzdYLjq.d.ts → appointment-details-CVEDe_k0.d.ts} +1 -1
  9. package/dist/chunks/appointment-details-Czlj6VHq.js +1 -0
  10. package/dist/chunks/{appointment.model.d-Dy50gMPg.d.ts → appointment.model.d-BWwBLaEL.d.ts} +3 -0
  11. package/dist/chunks/blob-to-base64-CUL1trde.js +1 -0
  12. package/dist/chunks/{context-consumer-ESdICVAb.js → chunk-6CCJWPGL-DlOpbEYH.js} +1 -1
  13. package/dist/chunks/chunk-BUV4MGML-Bn3JWCAv.js +1 -0
  14. package/dist/chunks/chunk-Y4EKUX25-CqL3lLdx.js +1 -0
  15. package/dist/chunks/consume-BhoQNO_8.js +1 -0
  16. package/dist/chunks/document.model.d-DIzMiOmd.d.ts +6 -0
  17. package/dist/chunks/documentation-view-BwT9Ol66.js +1 -0
  18. package/dist/chunks/get-appointment-query-lJe75hGS.js +1 -0
  19. package/dist/chunks/get-organization-setup-query-DxHNY0w8.js +1 -0
  20. package/dist/chunks/get-patient-documents-query-D1SfC_k_.js +1 -0
  21. package/dist/chunks/get-patient-profile-query-DiU2f_QH.js +1 -0
  22. package/dist/chunks/get-schedule-services-query-Ckvz9Fqh.js +1 -0
  23. package/dist/chunks/i18n-formats-EgnwLxKt.js +1 -0
  24. package/dist/chunks/index-63zQSBy4.js +1 -0
  25. package/dist/chunks/index-BgnerXfH.js +1 -0
  26. package/dist/chunks/{index-DhfVmF4C.js → index-C195MGA_.js} +1 -1
  27. package/dist/chunks/index-CDBk7hVW.d.ts +28 -0
  28. package/dist/chunks/{index-DNUbmrQl.d.ts → index-CSJzkkRA.d.ts} +1 -4
  29. package/dist/chunks/index-DZjrAnPq.js +1 -0
  30. package/dist/chunks/{mq-chat-room-DuG4RuIp.d.ts → mq-chat-room-CRPruRJD.d.ts} +1 -1
  31. package/dist/chunks/price-DU3YLTpk.js +1 -0
  32. package/dist/chunks/query-controller-D7jBX4X7.js +1 -0
  33. package/dist/chunks/refund-cancel-policy-DhD6jEtp.js +1 -0
  34. package/dist/chunks/{schemas.d-5LR6aN9I.d.ts → schemas.d-D7bCe24u.d.ts} +20 -20
  35. package/dist/chunks/telemetry-client-Bkbn48Dd.js +1 -0
  36. package/dist/env.js +1 -1
  37. package/dist/mq-apple-pay-checkout.js +1 -1
  38. package/dist/mq-appointment-checkout.js +1 -1
  39. package/dist/mq-appointment-documentation.d.ts +4 -3
  40. package/dist/mq-appointment-documentation.js +1 -1
  41. package/dist/mq-chat-room.d.ts +2 -2
  42. package/dist/mq-chat-room.js +1 -1
  43. package/dist/mq-checkout.js +1 -1
  44. package/dist/mq-dashboard.d.ts +23 -13
  45. package/dist/mq-dashboard.js +1 -1
  46. package/dist/mq-documents.d.ts +2 -1
  47. package/dist/mq-documents.js +1 -1
  48. package/dist/mq-google-pay-checkout.js +1 -1
  49. package/dist/mq-immediate-videocall-checkout.js +1 -1
  50. package/dist/mq-my-appointments.d.ts +9 -8
  51. package/dist/mq-my-appointments.js +1 -1
  52. package/dist/mq-next-appointments.d.ts +88 -0
  53. package/dist/mq-next-appointments.js +1 -0
  54. package/dist/mq-payment-poller.js +1 -1
  55. package/dist/mq-professional-presence-sync.js +1 -1
  56. package/dist/mq-recent-documents.d.ts +60 -0
  57. package/dist/mq-recent-documents.js +1 -0
  58. package/dist/mq-schedule-success.d.ts +3 -4
  59. package/dist/mq-schedule-success.js +2 -2
  60. package/dist/mq-schedule.d.ts +10 -11
  61. package/dist/mq-schedule.js +1 -1
  62. package/dist/mq-session-provider.d.ts +1 -1
  63. package/dist/mq-support-chat.d.ts +2 -2
  64. package/dist/mq-support-chat.js +1 -1
  65. package/dist/mq-terms-and-conditions.js +1 -1
  66. package/dist/mq-unread-count-sync.js +1 -1
  67. package/dist/mq-videocall.d.ts +4 -3
  68. package/dist/mq-videocall.js +1 -1
  69. package/dist/react/mq-apple-pay-checkout.js +1 -1
  70. package/dist/react/mq-appointment-checkout.js +1 -1
  71. package/dist/react/mq-appointment-documentation.d.ts +4 -3
  72. package/dist/react/mq-appointment-documentation.js +1 -1
  73. package/dist/react/mq-chat-room.d.ts +2 -2
  74. package/dist/react/mq-chat-room.js +1 -1
  75. package/dist/react/mq-checkout.js +1 -1
  76. package/dist/react/mq-dashboard.d.ts +11 -9
  77. package/dist/react/mq-dashboard.js +1 -1
  78. package/dist/react/mq-documents-page.d.ts +2 -1
  79. package/dist/react/mq-documents-page.js +1 -1
  80. package/dist/react/mq-documents.d.ts +2 -1
  81. package/dist/react/mq-documents.js +1 -1
  82. package/dist/react/mq-google-pay-checkout.js +1 -1
  83. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  84. package/dist/react/mq-my-appointments.d.ts +10 -9
  85. package/dist/react/mq-my-appointments.js +1 -1
  86. package/dist/react/mq-next-appointments.d.ts +38 -0
  87. package/dist/react/mq-next-appointments.js +2 -0
  88. package/dist/react/mq-payment-poller.js +1 -1
  89. package/dist/react/mq-professional-presence-sync.js +1 -1
  90. package/dist/react/mq-recent-documents.d.ts +27 -0
  91. package/dist/react/mq-recent-documents.js +2 -0
  92. package/dist/react/mq-schedule-success.d.ts +3 -3
  93. package/dist/react/mq-schedule-success.js +1 -1
  94. package/dist/react/mq-schedule.d.ts +5 -5
  95. package/dist/react/mq-schedule.js +1 -1
  96. package/dist/react/mq-session-provider.d.ts +1 -1
  97. package/dist/react/mq-support-chat.d.ts +2 -2
  98. package/dist/react/mq-support-chat.js +1 -1
  99. package/dist/react/mq-terms-and-conditions.js +1 -1
  100. package/dist/react/mq-unread-count-sync.js +1 -1
  101. package/dist/react/mq-videocall.d.ts +4 -3
  102. package/dist/react/mq-videocall.js +1 -1
  103. package/dist/theme.d.ts +8 -0
  104. package/dist/theme.js +1 -1
  105. package/dist/ui/icons/arrow-right-icon.d.ts +6 -0
  106. package/dist/ui/icons/arrow-right-icon.js +1 -0
  107. package/dist/ui/icons/dots-horizontal-icon.d.ts +6 -0
  108. package/dist/ui/icons/dots-horizontal-icon.js +1 -0
  109. package/dist/ui/mq-clamped-text.js +1 -1
  110. package/package.json +10 -2
  111. package/dist/chunks/api-chat-client-BBL1U9EQ.js +0 -1
  112. package/dist/chunks/appointment-card-skeleton-C8VERHzq.js +0 -1
  113. package/dist/chunks/chunk-GZF3YFSX-DM-GTqxg.js +0 -1
  114. package/dist/chunks/chunk-YMQSBQHL-De_r7BNk.js +0 -1
  115. package/dist/chunks/consume-CovVqBjI.js +0 -1
  116. package/dist/chunks/documentation-view-DJCr5_MN.js +0 -1
  117. package/dist/chunks/get-appointment-query-Ck68BEMg.js +0 -1
  118. package/dist/chunks/get-organization-setup-query-BMbuRi6v.js +0 -1
  119. package/dist/chunks/get-patient-documents-query-DIQH-TMM.js +0 -1
  120. package/dist/chunks/get-patient-profile-query-B0tUDJmT.js +0 -1
  121. package/dist/chunks/i18n-formats-DYS91YEa.js +0 -1
  122. package/dist/chunks/index-KvIw19qY.js +0 -1
  123. package/dist/chunks/index-ShXzd7UZ.js +0 -1
  124. package/dist/chunks/price-LTnCz9kN.js +0 -1
  125. package/dist/chunks/query-controller-BlO1Ax65.js +0 -1
  126. package/dist/chunks/refund-cancel-policy-CXFTrFfo.js +0 -1
  127. package/dist/chunks/telemetry-client-BLJVs9me.js +0 -1
@@ -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-DLOZVIkT.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,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 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);
@@ -5,7 +5,7 @@ import '../ui/mq-avatar.js';
5
5
  import '../ui/mq-button.js';
6
6
  import '../ui/mq-skeleton.js';
7
7
  import { z } from 'zod';
8
- import { C as ConsultationType } from './appointment.model.d-Dy50gMPg.js';
8
+ import { C as ConsultationType } from './appointment.model.d-BWwBLaEL.js';
9
9
  import { QueryClient } from '@tanstack/query-core';
10
10
 
11
11
  /**
@@ -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};
@@ -0,0 +1 @@
1
+ import{Q as t}from"./chunk-RCFIJTXZ-C6Ir0-sM.js";import{a as e}from"./chunk-6CCJWPGL-DlOpbEYH.js";import{S as s,p as r,r as i,s as n,a as u,n as a,i as h,b as o,t as c,c as l,f as d,d as p,e as f,g as y}from"./query-Cjvi4_dT.js";var b=class extends s{constructor(t,e){super(),this.options=e,this.#t=t,this.#e=null,this.#s=r(),this.bindMethods(),this.setOptions(e)}#t;#r=void 0;#i=void 0;#n=void 0;#u;#a;#s;#e;#h;#o;#c;#l;#d;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#r.addObserver(this),R(this.#r,this.options)?this.#y():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#v(),this.#r.removeObserver(this)}setOptions(t){const e=this.options,s=this.#r;if(this.options=this.#t.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof i(this.options.enabled,this.#r))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#Q(),this.#r.setOptions(this.options),e._defaulted&&!n(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});const r=this.hasListeners();r&&Q(this.#r,s,this.options,e)&&this.#y(),this.updateResult(),!r||this.#r===s&&i(this.options.enabled,this.#r)===i(e.enabled,this.#r)&&u(this.options.staleTime,this.#r)===u(e.staleTime,this.#r)||this.#m();const a=this.#I();!r||this.#r===s&&i(this.options.enabled,this.#r)===i(e.enabled,this.#r)&&a===this.#p||this.#O(a)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return function(t,e){if(!n(t.getCurrentResult(),e))return!0;return!1}(this,s)&&(this.#n=s,this.#a=this.options,this.#u=this.#r.state),s}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(t,s)=>(this.trackProp(s),e?.(s),"promise"!==s||this.options.experimental_prefetchInRender||"pending"!==this.#s.status||this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(t,s))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#r}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#y({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(t){this.#Q();let e=this.#r.fetch(this.options,t);return t?.throwOnError||(e=e.catch(a)),e}#m(){this.#R();const t=u(this.options.staleTime,this.#r);if(h||this.#n.isStale||!o(t))return;const e=c(this.#n.dataUpdatedAt,t)+1;this.#l=l.setTimeout(()=>{this.#n.isStale||this.updateResult()},e)}#I(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#r):this.options.refetchInterval)??!1}#O(t){this.#v(),this.#p=t,!h&&!1!==i(this.options.enabled,this.#r)&&o(this.#p)&&0!==this.#p&&(this.#d=l.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#y()},this.#p))}#b(){this.#m(),this.#O(this.#I())}#R(){this.#l&&(l.clearTimeout(this.#l),this.#l=void 0)}#v(){this.#d&&(l.clearInterval(this.#d),this.#d=void 0)}createResult(t,e){const s=this.#r,n=this.options,u=this.#n,a=this.#u,h=this.#a,o=t!==s?t.state:this.#i,{state:c}=t;let l,d={...c},y=!1;if(e._optimisticResults){const r=this.hasListeners(),i=!r&&R(t,e),u=r&&Q(t,s,e,n);(i||u)&&(d={...d,...p(c.data,t.options)}),"isRestoring"===e._optimisticResults&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:I}=d;l=d.data;let O=!1;if(void 0!==e.placeholderData&&void 0===l&&"pending"===I){let t;u?.isPlaceholderData&&e.placeholderData===h?.placeholderData?(t=u.data,O=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#c?.state.data,this.#c):e.placeholderData,void 0!==t&&(I="success",l=f(u?.data,t,e),y=!0)}if(e.select&&void 0!==l&&!O)if(u&&l===a?.data&&e.select===this.#h)l=this.#o;else try{this.#h=e.select,l=e.select(l),l=f(u?.data,l,e),this.#o=l,this.#e=null}catch(t){this.#e=t}this.#e&&(b=this.#e,l=this.#o,v=Date.now(),I="error");const g="fetching"===d.fetchStatus,w="pending"===I,C="error"===I,S=w&&g,T=void 0!==l,F={status:I,fetchStatus:d.fetchStatus,isPending:w,isSuccess:"success"===I,isError:C,isInitialLoading:S,isLoading:S,data:l,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>o.dataUpdateCount||d.errorUpdateCount>o.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:C&&!T,isPaused:"paused"===d.fetchStatus,isPlaceholderData:y,isRefetchError:C&&T,isStale:m(t,e),refetch:this.refetch,promise:this.#s,isEnabled:!1!==i(e.enabled,t)};if(this.options.experimental_prefetchInRender){const e=t=>{"error"===F.status?t.reject(F.error):void 0!==F.data&&t.resolve(F.data)},i=()=>{const t=this.#s=F.promise=r();e(t)},n=this.#s;switch(n.status){case"pending":t.queryHash===s.queryHash&&e(n);break;case"fulfilled":"error"!==F.status&&F.data===n.value||i();break;case"rejected":"error"===F.status&&F.error===n.reason||i()}}return F}updateResult(){const t=this.#n,e=this.createResult(this.#r,this.options);if(this.#u=this.#r.state,this.#a=this.options,void 0!==this.#u.data&&(this.#c=this.#r),n(e,t))return;this.#n=e;this.#g({listeners:(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,s="function"==typeof e?e():e;if("all"===s||!s&&!this.#f.size)return!0;const r=new Set(s??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(e=>{const s=e;return this.#n[s]!==t[s]&&r.has(s)})})()})}#Q(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#r)return;const e=this.#r;this.#r=t,this.#i=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#g(t){y.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#r,type:"observerResultsUpdated"})})}};function R(t,e){return function(t,e){return!1!==i(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&v(t,e,e.refetchOnMount)}function v(t,e,s){if(!1!==i(e.enabled,t)&&"static"!==u(e.staleTime,t)){const r="function"==typeof s?s(t):s;return"always"===r||!1!==r&&m(t,e)}return!1}function Q(t,e,s,r){return(t!==e||!1===i(r.enabled,t))&&(!s.suspense||"error"!==t.state.status)&&m(t,s)}function m(t,e){return!1!==i(e.enabled,t)&&t.isStaleByTime(u(e.staleTime,t))}Promise.withResolvers||(Promise.withResolvers=function(){let t,e;const s=new this((s,r)=>{t=s,e=r});return{resolve:t,reject:e,promise:s}});var I=class{constructor(s,r,i){this.host=s,this.optionsFn=r,this._queryClient=i,this.whenQueryClient=Promise.withResolvers(),this.whenQueryObserver=Promise.withResolvers(),this.host.addController(this),this.context=new e(this.host,{context:t,subscribe:!0,callback:t=>{t&&(this.queryClient=t)}}),this.optionsFn&&this.observeQuery(this.optionsFn)}set queryClient(t){this._queryClient=t,t&&this.whenQueryClient.resolve(t),this.host.requestUpdate()}get queryClient(){return this._queryClient}async observeQuery(t,e=!0){const s=await this.whenQueryClient.promise,r=await this.getDefaultedOptions("function"==typeof t?t():t);this.queryObserver=new b(s,r),this.result=e?this.queryObserver.getOptimisticResult(r):void 0,this.host.requestUpdate(),this.whenQueryObserver.resolve(this.queryObserver)}async hostUpdate(){if(this.optionsFn){const t=await this.whenQueryObserver.promise,e=await this.getDefaultedOptions(this.optionsFn());t.setOptions(e)}}hostConnected(){this.subscribe()}async subscribe(){const t=await this.whenQueryObserver.promise;this.unsubscribe?.(),this.unsubscribe=t.subscribe(t=>{this.result=t,this.host.requestUpdate()}),t.updateResult(),this.host.requestUpdate()}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}async getDefaultedOptions(t){return(await this.whenQueryClient.promise).defaultQueryOptions(t)}render(t){const e=this.result;return"pending"!==e?.status||"idle"!==e?.fetchStatus||e?.data?e?.isPending?t.pending?.()??null:e?.isError?t.error?.(e?.error)??null:e?.isSuccess?t.complete(e?.data):t.initial?.()??null:t.initial?.()??null}};export{I as Q};
@@ -0,0 +1 @@
1
+ import{b as t}from"./api-chat-client-DLOZVIkT.js";import{t as n}from"./parseISO-Dj3qSTG8.js";function r(t,r,o){const e=function(t,r){return+n(t)-+n(r)}(t,r)/1e3;return(s=o?.roundingMethod,t=>{const n=(s?Math[s]:Math.trunc)(t);return 0===n?0:n})(e);var s}function o(n){const{startsAtIso:o,refundPolicySeconds:e,now:s=new Date}=n,c=r(t(o),s);return!(c<0)&&(null==e||c>=e)}export{o as c};
@@ -7,14 +7,14 @@ declare const LoginTokenResponseSchema: z.ZodObject<{
7
7
  country_code: z.ZodString;
8
8
  timezone: z.ZodString;
9
9
  first_name: z.ZodString;
10
- last_name: z.ZodString;
10
+ last_name: z.ZodNullable<z.ZodString>;
11
11
  name: z.ZodString;
12
- birth_date: z.ZodString;
13
- email: z.ZodString;
12
+ birth_date: z.ZodNullable<z.ZodString>;
13
+ email: z.ZodNullable<z.ZodString>;
14
14
  language_code: z.ZodString;
15
15
  phone: z.ZodString;
16
16
  phone_prefix: z.ZodString;
17
- tax_id: z.ZodString;
17
+ tax_id: z.ZodNullable<z.ZodString>;
18
18
  legal_consent: z.ZodObject<{
19
19
  accepted_at: z.ZodNullable<z.ZodString>;
20
20
  last_version_at: z.ZodNullable<z.ZodString>;
@@ -43,13 +43,13 @@ declare const LoginTokenResponseSchema: z.ZodObject<{
43
43
  country_code: string;
44
44
  timezone: string;
45
45
  first_name: string;
46
- last_name: string;
47
- birth_date: string;
48
- email: string;
46
+ last_name: string | null;
47
+ birth_date: string | null;
48
+ email: string | null;
49
49
  language_code: string;
50
50
  phone: string;
51
51
  phone_prefix: string;
52
- tax_id: string;
52
+ tax_id: string | null;
53
53
  legal_consent: {
54
54
  accepted_at: string | null;
55
55
  last_version_at: string | null;
@@ -64,13 +64,13 @@ declare const LoginTokenResponseSchema: z.ZodObject<{
64
64
  country_code: string;
65
65
  timezone: string;
66
66
  first_name: string;
67
- last_name: string;
68
- birth_date: string;
69
- email: string;
67
+ last_name: string | null;
68
+ birth_date: string | null;
69
+ email: string | null;
70
70
  language_code: string;
71
71
  phone: string;
72
72
  phone_prefix: string;
73
- tax_id: string;
73
+ tax_id: string | null;
74
74
  legal_consent: {
75
75
  accepted_at: string | null;
76
76
  last_version_at: string | null;
@@ -87,13 +87,13 @@ declare const LoginTokenResponseSchema: z.ZodObject<{
87
87
  country_code: string;
88
88
  timezone: string;
89
89
  first_name: string;
90
- last_name: string;
91
- birth_date: string;
92
- email: string;
90
+ last_name: string | null;
91
+ birth_date: string | null;
92
+ email: string | null;
93
93
  language_code: string;
94
94
  phone: string;
95
95
  phone_prefix: string;
96
- tax_id: string;
96
+ tax_id: string | null;
97
97
  legal_consent: {
98
98
  accepted_at: string | null;
99
99
  last_version_at: string | null;
@@ -111,13 +111,13 @@ declare const LoginTokenResponseSchema: z.ZodObject<{
111
111
  country_code: string;
112
112
  timezone: string;
113
113
  first_name: string;
114
- last_name: string;
115
- birth_date: string;
116
- email: string;
114
+ last_name: string | null;
115
+ birth_date: string | null;
116
+ email: string | null;
117
117
  language_code: string;
118
118
  phone: string;
119
119
  phone_prefix: string;
120
- tax_id: string;
120
+ tax_id: string | null;
121
121
  legal_consent: {
122
122
  accepted_at: string | null;
123
123
  last_version_at: string | null;
@@ -0,0 +1 @@
1
+ function t(t,e){return{action_type:"event",event_type:"access to videocall button click",patient_hash:t,id_appointment:e}}function e(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function n(t,e){return{action_type:"event",event_type:"modify appoinment button click",patient_hash:t,id_appointment:e}}function i(t,e){return{action_type:"event",event_type:"cancel appoinment button click",patient_hash:t,id_appointment:e}}function a(t,e){return{action_type:"event",event_type:"view appointment document list button click",patient_hash:t,id_appointment:e}}function p(t,e){return{action_type:"event",event_type:"repeat appointment button click",patient_hash:t,id_appointment:e}}function o(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function s(t,e){return{action_type:"event",event_type:"access to videocall button click",patient_hash:t,id_appointment:e}}function c(t,e){return{action_type:"event",event_type:"add to calendar button click",patient_hash:t,id_appointment:e}}function _(t,e){return{action_type:"pageview",event_type:"appointment success page view",patient_hash:t,id_appointment:e}}function r(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function u(t,e){return{action_type:"event",event_type:"update documentation",patient_hash:t,id_appointment:e}}function h(t,e){return{action_type:"pageview",event_type:"documentation page view",patient_hash:t,id_appointment:e}}function y(t){return{action_type:"event",event_type:"view documentation list button click",patient_hash:t}}function l(t,e){return{action_type:"event",event_type:"download document button click",patient_hash:t,id_document:e}}function v(t){return{action_type:"event",event_type:"make an appointment button click",patient_hash:t}}function d(t){return{action_type:"event",event_type:"view appointment list button click",patient_hash:t}}function f(t){return{action_type:"pageview",event_type:"home page view",patient_hash:t}}function m(t,e,n){return{action_type:"event",event_type:"find availability button click",patient_hash:t,speciality_id:e,service_id:n}}function b(t,e,n,i,a,p,o){return{action_type:"debug",event_type:"find availability result",patient_hash:t,speciality_id:e,service_id:n,first_slot_date:i,first_slot_professional_hash:a,total_professionals:p,total_slots:o}}function k(t,e,n,i,a){return{action_type:"event",event_type:"professional schedule slot button click",patient_hash:t,professional_hash:e,start_date:n,speciality_id:i,service_id:a}}function w(t,e,n,i){return{action_type:"event",event_type:"professional availability button click",patient_hash:t,professional_hash:e,speciality_id:n,service_id:i}}function g(t,e,n,i,a){return{action_type:"event",event_type:"confirm appointment button click",patient_hash:t,professional_hash:e,start_date:n,speciality_id:i,service_id:a}}function T(t){return{action_type:"pageview",event_type:"select professional step page view",patient_hash:t}}function K(t,e){return{action_type:"pageview",event_type:"not time yet pageview",patient_hash:t,id_appointment:e}}function C(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function q(t,e){return{action_type:"pageview",event_type:"waiting room pageview",patient_hash:t,id_appointment:e}}function x(t,e){return{action_type:"pageview",event_type:"videocall pageview",patient_hash:t,id_appointment:e}}class HttpTransport{endpoint;apiKey;constructor(t,e){this.endpoint=t,this.apiKey=e}send(t){fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":this.apiKey},body:JSON.stringify(t)}).catch(()=>{})}}class MediquoTelemetryClient{_apiKey=null;_transport=null;setApiKey(t){this._apiKey=t,this._buildTransport()}track(t){null!==this._transport&&this._transport.send(t)}_buildTransport(){null!==this._apiKey&&(this._transport=new HttpTransport("https://tracking.____.mediquo.com/sdk",this._apiKey))}}const A=new class AppTelemetryClient extends MediquoTelemetryClient{track(t){}};export{C as A,q as B,x as C,u as a,r as b,n as c,h as d,i as e,p as f,t as g,a as h,e as i,l as j,_ as k,c as l,o as m,s as n,v as o,f as p,m as q,y as r,g as s,A as t,k as u,d as v,w,b as x,T as y,K as z};
package/dist/env.js CHANGED
@@ -1 +1 @@
1
- const E="https://mediquo-landing.s3.eu-central-1.amazonaws.com/sdk-web/elements",o="production",e="0.6.5",n={development:{MODE:"development",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"47836441",ASSETS_BASE_URL:E},production:{MODE:"production",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"46655102",ASSETS_BASE_URL:E}};let t=o;const _=new Proxy({},{get:(E,o)=>n[t??"production"][o]});function S(E){t=E}export{E as ASSETS_BASE_URL,_ as env,S as setEnv};
1
+ const E="https://mediquo-landing.s3.eu-central-1.amazonaws.com/sdk-web/elements",e="development",o="0.8.0-rc.0",n={development:{MODE:"development",MQ_DEFAULT_ENV:e,MQ_ELEMENTS_VERSION:o,OPENTOK_API_KEY:"47836441",ASSETS_BASE_URL:E},production:{MODE:"production",MQ_DEFAULT_ENV:e,MQ_ELEMENTS_VERSION:o,OPENTOK_API_KEY:"46655102",ASSETS_BASE_URL:E}};let t=e;const _=new Proxy({},{get:(E,e)=>n[t??"production"][e]});function S(E){t=E}export{E as ASSETS_BASE_URL,_ as env,S as setEnv};
@@ -1 +1 @@
1
- import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{m as a}from"./chunks/runtime-Bg1WXVCx.js";import{l as s}from"./chunks/localized-decorator-BlOuLhym.js";import{L as i}from"./chunks/login-token-task-BI-L2zSV.js";import{l as n}from"./chunks/chunk-4FFT6DC2-CVWibomC.js";import{i as o,a as r,x as p}from"./chunks/lit-element-DiWJYFwC.js";import{n as l}from"./chunks/property-scuRaFcM.js";import{r as c}from"./chunks/state-LQivXIgA.js";import{setEnv as h}from"./env.js";import{initLocalization as u,isValidLocale as y,setLocale as d}from"./i18n.js";import{a as m}from"./chunks/api-chat-client-BBL1U9EQ.js";import{u as v,s as b,r as k}from"./chunks/apple-pay-outcomes-CnVRvAVS.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";function f(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/Safari/i.test(e)&&!/Chrome|Chromium|Edg|OPR|Firefox|FxiOS/i.test(e)}async function P(e){if("undefined"==typeof window||!window.isSecureContext)return{available:!1,reason:"unsupported"};if(!function(){if("undefined"==typeof window)return!1;const e="undefined"!=typeof ApplePaySession&&"function"==typeof ApplePaySession.canMakePayments,t="undefined"!=typeof customElements&&void 0!==customElements.get("apple-pay-button");return e&&t}())return{available:!1,reason:"sdk-missing"};if(!e.trim())return{available:!1,reason:"merchant-id-missing"};const t=ApplePaySession;if(function(e){return"function"==typeof e.applePayCapabilities}(t))try{return function(e){switch(e){case"applePayUnsupported":return{available:!1,reason:"unsupported"};case"paymentCredentialsUnavailable":case"paymentCredentialsAvailable":case"paymentCredentialStatusUnknown":return{available:!0,usesQrFlow:!f()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}const g={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{u()}catch{}const E=["visa","masterCard","amex"],_=["supports3DS"],S=o`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:center;font-family:system-ui,sans-serif;font-size:13px;line-height:1.4;color:#6e6e73}.pay-row{display:block;width:100%}.pay-row--paying{opacity:.55;pointer-events:none}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:10px;--apple-pay-button-padding:0;display:block;width:100%;min-height:48px;cursor:pointer}.state{text-align:center;font-family:system-ui,sans-serif;font-size:15px;color:#86868b;margin:0}`;class ApplePayCheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(ApplePayCheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(ApplePayCheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(ApplePayCheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}function A(e,t){n.warn(e,{error:t instanceof Error?t.message:String(t)})}let C=class MqApplePayCheckout extends r{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this._loginTokenTask=new i(this,m,{args:()=>[this.apiKey,this.token],onComplete:e=>{m.setAuthToken(e.access_token),this._refreshAvailability()},onError:()=>{this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"auth"}))}}),this._onPayClick=()=>{if(this._paying||"ready"!==this._availabilityPhase)return;let e;try{e=new ApplePaySession(3,this._buildPaymentRequest())}catch(e){return A("mq-apple-pay-checkout: failed to create ApplePaySession",e),void this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}this._paying=!0,this._suppressCancelEvent=!1,e.onvalidatemerchant=async t=>{try{const a=await m.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(v(a))}catch(t){A("mq-apple-pay-checkout: validate-merchant failed",t),this._suppressCancelEvent=!0,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"merchant"})),e.abort(),this._paying=!1}},e.onpaymentauthorized=async t=>{try{const a=await m.payments.authorizeApplePay({order_id:this.sessionId,token:b(t.payment.token)}),{status:s,consultation_id:i}=a.data,n=k(s,i,this.sessionId);switch(n.kind){case"success":e.completePayment(ApplePaySession.STATUS_SUCCESS),this.dispatchEvent(new ApplePayCheckoutSuccessEvent({sessionId:n.sessionId,reference:n.reference}));break;case"denied":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutDeniedEvent({sessionId:n.sessionId}));break;case"error":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:n.reason}))}}catch(t){A("mq-apple-pay-checkout: authorize failed",t),e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"authorize"}))}finally{this._paying=!1}},e.oncancel=()=>{this._paying=!1,this._suppressCancelEvent?this._suppressCancelEvent=!1:this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"cancelled"}))};try{e.begin()}catch(e){A("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=S}willUpdate(e){if(e.has("env")&&this.env&&h(this.env),e.has("apiKey")&&m.setApiKey(this.apiKey),e.has("locale")){const e=y(this.locale)?this.locale:"es_ES";d(e),m.setLanguage(e)}e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await P(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return y(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...E],merchantCapabilities:[..._],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?p`<p class="state">${a("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:p`<p class="state">${a("Apple Pay no está disponible")}</p>`:p`<p class="state">${a("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>p`<p class="state">${a("Preparando Apple Pay…")}</p>`,error:()=>p`<p class="state">${a("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?p`<p class="state">${a("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():p`${this._showQrHelper?p`<p class="helper">${a("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,g[e]??"es-ES"}" aria-label="${a("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([l({type:String,attribute:"env"})],C.prototype,"env",void 0),e([l({type:String,attribute:"api-key"})],C.prototype,"apiKey",void 0),e([l({type:String,attribute:"token"})],C.prototype,"token",void 0),e([l({type:String,attribute:"locale",reflect:!0})],C.prototype,"locale",void 0),e([l({type:String,attribute:"merchant-id"})],C.prototype,"merchantId",void 0),e([l({type:String,attribute:"session-id"})],C.prototype,"sessionId",void 0),e([l({type:String,attribute:"amount"})],C.prototype,"amount",void 0),e([l({type:String,attribute:"currency"})],C.prototype,"currency",void 0),e([l({type:String,attribute:"country"})],C.prototype,"country",void 0),e([l({type:String,attribute:"label"})],C.prototype,"label",void 0),e([c()],C.prototype,"_availabilityPhase",void 0),e([c()],C.prototype,"_showQrHelper",void 0),e([c()],C.prototype,"_paying",void 0),C=e([s(),t("mq-apple-pay-checkout")],C);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,C as MqApplePayCheckout};
1
+ import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{m as a}from"./chunks/runtime-Bg1WXVCx.js";import{l as s}from"./chunks/localized-decorator-BlOuLhym.js";import{L as i}from"./chunks/login-token-task-BI-L2zSV.js";import{l as n}from"./chunks/chunk-4FFT6DC2-CVWibomC.js";import{i as o,a as r,x as p}from"./chunks/lit-element-DiWJYFwC.js";import{n as l}from"./chunks/property-scuRaFcM.js";import{r as c}from"./chunks/state-LQivXIgA.js";import{setEnv as h}from"./env.js";import{initLocalization as u,isValidLocale as y,setLocale as d}from"./i18n.js";import{a as m}from"./chunks/api-chat-client-DLOZVIkT.js";import{u as v,s as b,r as k}from"./chunks/apple-pay-outcomes-BMxr7x7j.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";function f(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/Safari/i.test(e)&&!/Chrome|Chromium|Edg|OPR|Firefox|FxiOS/i.test(e)}async function P(e){if("undefined"==typeof window||!window.isSecureContext)return{available:!1,reason:"unsupported"};if(!function(){if("undefined"==typeof window)return!1;const e="undefined"!=typeof ApplePaySession&&"function"==typeof ApplePaySession.canMakePayments,t="undefined"!=typeof customElements&&void 0!==customElements.get("apple-pay-button");return e&&t}())return{available:!1,reason:"sdk-missing"};if(!e.trim())return{available:!1,reason:"merchant-id-missing"};const t=ApplePaySession;if(function(e){return"function"==typeof e.applePayCapabilities}(t))try{return function(e){switch(e){case"applePayUnsupported":return{available:!1,reason:"unsupported"};case"paymentCredentialsUnavailable":case"paymentCredentialsAvailable":case"paymentCredentialStatusUnknown":return{available:!0,usesQrFlow:!f()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}const g={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{u()}catch{}const E=["visa","masterCard","amex"],_=["supports3DS"],S=o`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:center;font-family:system-ui,sans-serif;font-size:13px;line-height:1.4;color:#6e6e73}.pay-row{display:block;width:100%}.pay-row--paying{opacity:.55;pointer-events:none}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:10px;--apple-pay-button-padding:0;display:block;width:100%;min-height:48px;cursor:pointer}.state{text-align:center;font-family:system-ui,sans-serif;font-size:15px;color:#86868b;margin:0}`;class ApplePayCheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(ApplePayCheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(ApplePayCheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(ApplePayCheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}function A(e,t){n.warn(e,{error:t instanceof Error?t.message:String(t)})}let C=class MqApplePayCheckout extends r{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this._loginTokenTask=new i(this,m,{args:()=>[this.apiKey,this.token],onComplete:e=>{m.setAuthToken(e.access_token),this._refreshAvailability()},onError:()=>{this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"auth"}))}}),this._onPayClick=()=>{if(this._paying||"ready"!==this._availabilityPhase)return;let e;try{e=new ApplePaySession(3,this._buildPaymentRequest())}catch(e){return A("mq-apple-pay-checkout: failed to create ApplePaySession",e),void this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}this._paying=!0,this._suppressCancelEvent=!1,e.onvalidatemerchant=async t=>{try{const a=await m.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(v(a))}catch(t){A("mq-apple-pay-checkout: validate-merchant failed",t),this._suppressCancelEvent=!0,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"merchant"})),e.abort(),this._paying=!1}},e.onpaymentauthorized=async t=>{try{const a=await m.payments.authorizeApplePay({order_id:this.sessionId,token:b(t.payment.token)}),{status:s,consultation_id:i}=a.data,n=k(s,i,this.sessionId);switch(n.kind){case"success":e.completePayment(ApplePaySession.STATUS_SUCCESS),this.dispatchEvent(new ApplePayCheckoutSuccessEvent({sessionId:n.sessionId,reference:n.reference}));break;case"denied":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutDeniedEvent({sessionId:n.sessionId}));break;case"error":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:n.reason}))}}catch(t){A("mq-apple-pay-checkout: authorize failed",t),e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"authorize"}))}finally{this._paying=!1}},e.oncancel=()=>{this._paying=!1,this._suppressCancelEvent?this._suppressCancelEvent=!1:this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"cancelled"}))};try{e.begin()}catch(e){A("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=S}willUpdate(e){if(e.has("env")&&this.env&&h(this.env),e.has("apiKey")&&m.setApiKey(this.apiKey),e.has("locale")){const e=y(this.locale)?this.locale:"es_ES";d(e),m.setLanguage(e)}e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await P(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return y(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...E],merchantCapabilities:[..._],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?p`<p class="state">${a("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:p`<p class="state">${a("Apple Pay no está disponible")}</p>`:p`<p class="state">${a("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>p`<p class="state">${a("Preparando Apple Pay…")}</p>`,error:()=>p`<p class="state">${a("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?p`<p class="state">${a("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():p`${this._showQrHelper?p`<p class="helper">${a("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,g[e]??"es-ES"}" aria-label="${a("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([l({type:String,attribute:"env"})],C.prototype,"env",void 0),e([l({type:String,attribute:"api-key"})],C.prototype,"apiKey",void 0),e([l({type:String,attribute:"token"})],C.prototype,"token",void 0),e([l({type:String,attribute:"locale",reflect:!0})],C.prototype,"locale",void 0),e([l({type:String,attribute:"merchant-id"})],C.prototype,"merchantId",void 0),e([l({type:String,attribute:"session-id"})],C.prototype,"sessionId",void 0),e([l({type:String,attribute:"amount"})],C.prototype,"amount",void 0),e([l({type:String,attribute:"currency"})],C.prototype,"currency",void 0),e([l({type:String,attribute:"country"})],C.prototype,"country",void 0),e([l({type:String,attribute:"label"})],C.prototype,"label",void 0),e([c()],C.prototype,"_availabilityPhase",void 0),e([c()],C.prototype,"_showQrHelper",void 0),e([c()],C.prototype,"_paying",void 0),C=e([s(),t("mq-apple-pay-checkout")],C);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,C as MqApplePayCheckout};
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{a as o,x as i}from"./chunks/lit-element-DiWJYFwC.js";import{n as s}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import{a as p}from"./chunks/api-chat-client-BBL1U9EQ.js";import"./mq-checkout.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/login-token-task-BI-L2zSV.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";class AppointmentPaidEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(AppointmentPaidEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let r=class MqAppointmentCheckout extends o{constructor(){super(...arguments),this._provideSession=async()=>{const t=await p.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,preconsultation_documents:this.preconsultationDocuments});return{sessionId:t.session_id,paymentUrl:t.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return i`<mq-checkout env="${n(this.env)}" api-key="${this.apiKey}" token="${this.token}" locale="${this.locale}" .provideSession="${this._provideSession}" @payment-success="${this._onSuccess}"></mq-checkout>`}};t([s({type:String,attribute:"env"})],r.prototype,"env",void 0),t([s({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([s({type:String,attribute:"token"})],r.prototype,"token",void 0),t([s({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([s({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([s({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([s({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([s({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([s({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([s({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
1
+ import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{a as o,x as i}from"./chunks/lit-element-DiWJYFwC.js";import{n as s}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import{a as p}from"./chunks/api-chat-client-DLOZVIkT.js";import"./mq-checkout.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/external-CJj32K_p.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/login-token-task-BI-L2zSV.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";class AppointmentPaidEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(AppointmentPaidEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let r=class MqAppointmentCheckout extends o{constructor(){super(...arguments),this._provideSession=async()=>{const t=await p.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,preconsultation_documents:this.preconsultationDocuments});return{sessionId:t.session_id,paymentUrl:t.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return i`<mq-checkout env="${n(this.env)}" api-key="${this.apiKey}" token="${this.token}" locale="${this.locale}" .provideSession="${this._provideSession}" @payment-success="${this._onSuccess}"></mq-checkout>`}};t([s({type:String,attribute:"env"})],r.prototype,"env",void 0),t([s({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([s({type:String,attribute:"token"})],r.prototype,"token",void 0),t([s({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([s({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([s({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([s({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([s({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([s({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([s({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
@@ -2,18 +2,19 @@ import * as lit_html from 'lit-html';
2
2
  import { LitElement, PropertyValues } from 'lit';
3
3
  import { Env } from './env.js';
4
4
  import './ui/mq-button.js';
5
- import './chunks/mq-chat-room-DuG4RuIp.js';
5
+ import './chunks/mq-chat-room-CRPruRJD.js';
6
6
  import './ui/mq-floating-bubble.js';
7
7
  import './ui/mq-card.js';
8
8
  import './ui/mq-unread-badge.js';
9
9
  import './ui/mq-page-title.js';
10
- import './chunks/index-DNUbmrQl.js';
10
+ import './chunks/index-CSJzkkRA.js';
11
11
  import './chunks/mq-layout-D8Mak16a.js';
12
12
  import './ui/mq-avatar.js';
13
13
  import './ui/mq-skeleton.js';
14
14
  import 'zod';
15
- import './chunks/appointment.model.d-Dy50gMPg.js';
15
+ import './chunks/appointment.model.d-BWwBLaEL.js';
16
16
  import '@tanstack/query-core';
17
+ import './chunks/document.model.d-DIzMiOmd.js';
17
18
 
18
19
  /**
19
20
  * Standalone "appointment documentation" screen: fetches an appointment by id
@@ -1 +1 @@
1
- import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,c as o}from"./chunks/custom-element-D2ziPxYE.js";import{Q as r}from"./chunks/query-controller-BlO1Ax65.js";import{g as n}from"./chunks/get-appointment-query-Ck68BEMg.js";import{a,i as c,x as p}from"./chunks/lit-element-DiWJYFwC.js";import{n as d}from"./chunks/property-scuRaFcM.js";import{setEnv as m}from"./env.js";import{a as l}from"./chunks/api-chat-client-BBL1U9EQ.js";import"./chunks/documentation-view-DJCr5_MN.js";import"./ui/mq-card.js";import"./chunks/mq-layout-BndHxkbb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/telemetry-client-BLJVs9me.js";import"./ui/icons/calendar-icon.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.js";import"./chunks/state-LQivXIgA.js";import"./ui/icons/info-circle-outine-icon.js";import"./ui/mq-button.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/if-defined-BYeVdwgd.js";import"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./ui/icons/message-bubble-icon.js";import"./mq-chat-room.js";import"./chunks/provide-D2fnEhT2.js";import"./chunks/context-provider--AKuwfs9.js";import"./chunks/consume-CovVqBjI.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-avatar.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-GZF3YFSX-DM-GTqxg.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/mq-page-title.js";import"./ui/icons/arrow-narrow-left-icon.js";import"./chunks/index-KvIw19qY.js";import"./ui/icons/download-icon.js";import"./chunks/get-organization-setup-query-BMbuRi6v.js";import"./chunks/i18n-formats-DYS91YEa.js";let u=class DocumentationViewSkeleton extends a{static{this.styles=c`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.page-title-skeleton{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--size-3)}.back-button-skeleton{width:var(--size-10);height:var(--size-10);border-radius:var(--border-radius-full);flex-shrink:0}.title-bar-skeleton{width:120px;height:24px;border-radius:var(--border-radius-sm)}@media (min-width:768px){.page-title-skeleton{gap:var(--sp-6)}.title-bar-skeleton{width:200px;height:32px}}.description-skeleton{width:100%;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-2)}.description-skeleton:last-of-type{width:70%;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-name-skeleton{width:180px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-1)}.professional-speciality-skeleton{width:140px;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.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);font-family:var(--font-body)}.icon-skeleton{width:20px;height:20px;border-radius:var(--border-radius-sm)}.text-skeleton{width:120px;height:16px;border-radius:var(--border-radius-sm)}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card .skeleton{background-color:var(--color-muted)}.documents-card-title-skeleton{width:150px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.button-skeleton{width:100%;height:44px;border-radius:var(--border-radius-md);margin-top:var(--size-4)}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}`}render(){return p`<div class="page-title-skeleton"><div class="skeleton back-button-skeleton"></div><div class="skeleton title-bar-skeleton"></div></div><div class="skeleton description-skeleton"></div><div class="skeleton description-skeleton"></div><mq-card class="professional-card" roundness="md"><div><div class="skeleton professional-name-skeleton"></div><div class="skeleton professional-speciality-skeleton"></div></div><dl class="description-list"><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div></dl></mq-card><mq-card class="documents-card" roundness="md"><div class="skeleton documents-card-title-skeleton"></div><div class="skeleton button-skeleton"></div></mq-card>`}};u=s([o("documentation-view-skeleton")],u);let k=class MqAppointmentDocumentation extends a{constructor(){super(...arguments),this.getAppointmentQuery=new r(this,()=>n(l,{id:this.appointmentId}))}willUpdate(i){i.has("env")&&this.env&&m(this.env),i.has("apiKey")&&this.apiKey&&l.setApiKey(this.apiKey),i.has("token")&&this.token&&l.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),l.setLanguage(this.locale))}render(){return p`<mq-layout background="transparent">${this.getAppointmentQuery.render({complete:t=>p`<documentation-view .token="${this.token}" .appointment="${t}"></documentation-view>`,error:()=>p``,pending:()=>p`<documentation-view-skeleton></documentation-view-skeleton>`})}</mq-layout>`}};s([d({type:String,attribute:"appointment-id"})],k.prototype,"appointmentId",void 0),s([d({type:String,attribute:"token"})],k.prototype,"token",void 0),s([d({type:String,attribute:"api-key"})],k.prototype,"apiKey",void 0),s([d({type:String,attribute:"locale"})],k.prototype,"locale",void 0),s([d({type:String,attribute:"env"})],k.prototype,"env",void 0),k=s([o("mq-appointment-documentation")],k),i();export{k as MqAppointmentDocumentation};
1
+ import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,c as o}from"./chunks/custom-element-D2ziPxYE.js";import{Q as r}from"./chunks/query-controller-D7jBX4X7.js";import{g as n}from"./chunks/get-appointment-query-lJe75hGS.js";import{a,i as c,x as d}from"./chunks/lit-element-DiWJYFwC.js";import{n as p}from"./chunks/property-scuRaFcM.js";import{setEnv as m}from"./env.js";import{a as l}from"./chunks/api-chat-client-DLOZVIkT.js";import"./chunks/documentation-view-BwT9Ol66.js";import"./ui/mq-card.js";import"./chunks/mq-layout-BndHxkbb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/chunk-6CCJWPGL-DlOpbEYH.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/addSeconds-ofMnxlgT.js";import"./ui/icons/calendar-icon.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.js";import"./chunks/state-LQivXIgA.js";import"./ui/icons/info-circle-outine-icon.js";import"./ui/mq-button.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/if-defined-BYeVdwgd.js";import"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./ui/icons/message-bubble-icon.js";import"./mq-chat-room.js";import"./chunks/provide-D2fnEhT2.js";import"./chunks/context-provider--AKuwfs9.js";import"./chunks/consume-BhoQNO_8.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-avatar.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/chunk-BUV4MGML-Bn3JWCAv.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-Y4EKUX25-CqL3lLdx.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/mq-page-title.js";import"./ui/icons/arrow-narrow-left-icon.js";import"./chunks/index-BgnerXfH.js";import"./ui/icons/download-icon.js";import"./chunks/blob-to-base64-CUL1trde.js";import"./chunks/i18n-formats-EgnwLxKt.js";import"./chunks/telemetry-client-Bkbn48Dd.js";let u=class DocumentationViewSkeleton extends a{static{this.styles=c`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.page-title-skeleton{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--size-3)}.back-button-skeleton{width:var(--size-10);height:var(--size-10);border-radius:var(--border-radius-full);flex-shrink:0}.title-bar-skeleton{width:120px;height:24px;border-radius:var(--border-radius-sm)}@media (min-width:768px){.page-title-skeleton{gap:var(--sp-6)}.title-bar-skeleton{width:200px;height:32px}}.description-skeleton{width:100%;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-2)}.description-skeleton:last-of-type{width:70%;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-name-skeleton{width:180px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-1)}.professional-speciality-skeleton{width:140px;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.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);font-family:var(--font-body)}.icon-skeleton{width:20px;height:20px;border-radius:var(--border-radius-sm)}.text-skeleton{width:120px;height:16px;border-radius:var(--border-radius-sm)}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card .skeleton{background-color:var(--color-muted)}.documents-card-title-skeleton{width:150px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.button-skeleton{width:100%;height:44px;border-radius:var(--border-radius-md);margin-top:var(--size-4)}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}`}render(){return d`<div class="page-title-skeleton"><div class="skeleton back-button-skeleton"></div><div class="skeleton title-bar-skeleton"></div></div><div class="skeleton description-skeleton"></div><div class="skeleton description-skeleton"></div><mq-card class="professional-card" roundness="md"><div><div class="skeleton professional-name-skeleton"></div><div class="skeleton professional-speciality-skeleton"></div></div><dl class="description-list"><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div></dl></mq-card><mq-card class="documents-card" roundness="md"><div class="skeleton documents-card-title-skeleton"></div><div class="skeleton button-skeleton"></div></mq-card>`}};u=s([o("documentation-view-skeleton")],u);let k=class MqAppointmentDocumentation extends a{constructor(){super(...arguments),this.getAppointmentQuery=new r(this,()=>n(l,{id:this.appointmentId}))}willUpdate(i){i.has("env")&&this.env&&m(this.env),i.has("apiKey")&&this.apiKey&&l.setApiKey(this.apiKey),i.has("token")&&this.token&&l.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),l.setLanguage(this.locale))}render(){return d`<mq-layout background="transparent">${this.getAppointmentQuery.render({complete:t=>d`<documentation-view .token="${this.token}" .appointment="${t}"></documentation-view>`,error:()=>d``,pending:()=>d`<documentation-view-skeleton></documentation-view-skeleton>`})}</mq-layout>`}};s([p({type:String,attribute:"appointment-id"})],k.prototype,"appointmentId",void 0),s([p({type:String,attribute:"token"})],k.prototype,"token",void 0),s([p({type:String,attribute:"api-key"})],k.prototype,"apiKey",void 0),s([p({type:String,attribute:"locale"})],k.prototype,"locale",void 0),s([p({type:String,attribute:"env"})],k.prototype,"env",void 0),k=s([o("mq-appointment-documentation")],k),i();export{k as MqAppointmentDocumentation};
@@ -1,11 +1,11 @@
1
- export { M as MqChatRoom } from './chunks/mq-chat-room-DuG4RuIp.js';
1
+ export { M as MqChatRoom } from './chunks/mq-chat-room-CRPruRJD.js';
2
2
  import 'lit-html';
3
3
  import 'lit';
4
4
  import './ui/mq-avatar.js';
5
5
  import './ui/mq-button.js';
6
6
  import './ui/mq-skeleton.js';
7
7
  import 'zod';
8
- import './chunks/appointment.model.d-Dy50gMPg.js';
8
+ import './chunks/appointment.model.d-BWwBLaEL.js';
9
9
  import '@tanstack/query-core';
10
10
 
11
11
  declare class MqChatRoomCloseEvent extends Event {