@everfur/sdk 0.9.1 → 0.9.3
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.
- package/CHANGELOG.md +56 -0
- package/README.md +1 -1
- package/dist/{Chat-DbHkTbqz.d.cts → Chat-Bkv-MLLu.d.cts} +3 -3
- package/dist/{Chat-BoVmqEeF.d.ts → Chat-Dy1L27a8.d.ts} +3 -3
- package/dist/{DepthViews-yO1H371y.d.ts → DepthViews-BwyzpEyX.d.ts} +1 -1
- package/dist/{DepthViews-DK7EJ6Hp.d.cts → DepthViews-CBalhef3.d.cts} +1 -1
- package/dist/{DepthViews-BzwflaJ3.d.ts → DepthViews-De6yb5Tq.d.ts} +1 -1
- package/dist/{DepthViews-Chyp69Ue.d.cts → DepthViews-eRdy2ayE.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments-BmMrn9tU.d.ts → attachments-BAcQdIz7.d.ts} +5 -5
- package/dist/{attachments-Dcb19rMP.d.ts → attachments-Brt7ivEo.d.ts} +2 -2
- package/dist/{attachments-B7TrtyfH.d.cts → attachments-DhGAelCA.d.cts} +2 -2
- package/dist/{attachments-Dnpqk1Gl.d.cts → attachments-tPWJ0DJI.d.cts} +5 -5
- package/dist/{bookingCopy-DR0-SmqH.d.ts → bookingCopy-CJLAgEgK.d.ts} +2 -2
- package/dist/{bookingCopy-C153FHEC.d.cts → bookingCopy-Ds2JGcPE.d.cts} +2 -2
- package/dist/{callCopy-DHjem0R-.d.cts → callCopy-Bw6oZT54.d.cts} +7 -2
- package/dist/{callCopy-DHjem0R-.d.ts → callCopy-Bw6oZT54.d.ts} +7 -2
- package/dist/{casesRepository-DC9lEQez.d.cts → casesRepository-D0aQSXkb.d.cts} +1 -1
- package/dist/{casesRepository-BXdwCWQF.d.ts → casesRepository-DjhMfm_n.d.ts} +1 -1
- package/dist/chat/index.cjs +9 -8
- package/dist/chat/index.d.cts +9 -9
- package/dist/chat/index.d.ts +9 -9
- package/dist/chat/index.js +9 -8
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{config-BRyNmzhx.d.cts → config-C68HTCf4.d.cts} +1 -1
- package/dist/{config-DdK2czhD.d.ts → config-DeUmccwl.d.ts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context-jaONuHXM.d.cts → context-DY9pcjdK.d.cts} +5 -5
- package/dist/{context-_EyjBNKI.d.ts → context-D_2sCvoo.d.ts} +5 -5
- package/dist/{copy-D8iSBQE6.d.cts → copy-tYW0C83H.d.cts} +2 -2
- package/dist/{copy-BJpRsqK-.d.ts → copy-wAnv8ldC.d.ts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +12 -12
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +1 -1
- package/dist/{depth-bKpg3L9r.d.ts → depth-C7RIscDR.d.ts} +2 -2
- package/dist/{depth-DJ1KGMww.d.cts → depth-jbSWsweM.d.cts} +2 -2
- package/dist/{entitlementRepository-4x_tBE73.d.cts → entitlementRepository-Ccc6K6wB.d.cts} +2 -2
- package/dist/{entitlementRepository-CojBLazH.d.ts → entitlementRepository-D7Fc7OdG.d.ts} +2 -2
- package/dist/{identity-A8fVB518.d.ts → identity-BTT6YtH5.d.ts} +1 -1
- package/dist/{identity-CmxZ4GR0.d.cts → identity-ScajqjK5.d.cts} +1 -1
- package/dist/index.cjs +10 -9
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +10 -9
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/{pets-e5RjSP6O.d.ts → pets-CqeoV1Jv.d.ts} +1 -1
- package/dist/{pets-DjBlY7yg.d.cts → pets-uKMldfz0.d.cts} +1 -1
- package/dist/{petsRepository-DkQ2fwZY.d.cts → petsRepository-BYe7_MUo.d.cts} +1 -1
- package/dist/{petsRepository-CQh8paML.d.ts → petsRepository-BdfbY9Oe.d.ts} +1 -1
- package/dist/{ports-CzVBbI_A.d.ts → ports-D4FQKTBS.d.ts} +4 -4
- package/dist/{ports-2voZkqty.d.cts → ports-okLpXkpu.d.cts} +4 -4
- package/dist/records/depth/index.cjs +6 -4
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +6 -4
- package/dist/records/index.cjs +19 -17
- package/dist/records/index.d.cts +9 -9
- package/dist/records/index.d.ts +9 -9
- package/dist/records/index.js +19 -17
- package/dist/{requestFunnel-CQ42Kf9G.d.ts → requestFunnel-Dhaj0yUq.d.ts} +2 -2
- package/dist/{requestFunnel-CA0ANsWj.d.cts → requestFunnel-u8qnM5Ll.d.cts} +2 -2
- package/dist/{runtimeTypes-C0tI7s-V.d.ts → runtimeTypes-BFes64Vp.d.ts} +4 -4
- package/dist/{runtimeTypes-BxtQXaYi.d.cts → runtimeTypes-C67itXfp.d.cts} +4 -4
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +1 -1
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/call/index.cjs +3 -5
- package/dist/televet/call/index.d.cts +1 -1
- package/dist/televet/call/index.d.ts +1 -1
- package/dist/televet/call/index.js +3 -5
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/{timelineRows-WFv_3EOi.d.cts → timelineRows-CDSO3ElK.d.cts} +1 -1
- package/dist/{timelineRows-GSpzKLla.d.ts → timelineRows-pd4wYVbe.d.ts} +1 -1
- package/dist/{useRecordsDepth-BQF0Zynl.d.ts → useRecordsDepth-CqSMkcyR.d.ts} +1 -1
- package/dist/{useRecordsDepth-BL5Pf3oK.d.cts → useRecordsDepth-W3UAKQRN.d.cts} +1 -1
- package/dist/{view-rgB1iqWO.d.ts → view-CKfIaJYp.d.ts} +8 -2
- package/dist/{view-D3kOelPL.d.cts → view-h7RPJAEe.d.cts} +8 -2
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/index.cjs +7 -5
- package/dist/web/index.d.cts +14 -14
- package/dist/web/index.d.ts +14 -14
- package/dist/web/index.js +7 -5
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.cjs +5 -4
- package/dist/web/records/depth/index.d.cts +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/depth/index.js +6 -5
- package/dist/web/records/index.cjs +10 -9
- package/dist/web/records/index.d.cts +9 -9
- package/dist/web/records/index.d.ts +9 -9
- package/dist/web/records/index.js +10 -9
- package/dist/web/televet/booking/index.cjs +1 -1
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/televet/booking/index.js +1 -1
- package/dist/web/televet/call/index.cjs +3 -5
- package/dist/web/televet/call/index.d.cts +1 -1
- package/dist/web/televet/call/index.d.ts +1 -1
- package/dist/web/televet/call/index.js +3 -5
- package/package.json +1 -1
package/dist/web/index.d.cts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
-
import { E as EverfurProviderProps } from '../context-
|
|
3
|
-
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from '../context-
|
|
2
|
+
import { E as EverfurProviderProps } from '../context-DY9pcjdK.cjs';
|
|
3
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from '../context-DY9pcjdK.cjs';
|
|
4
4
|
import { C as CapabilityName, a as CapabilityDecision } from '../resolve-D4Ywz5OS.cjs';
|
|
5
5
|
export { b as CapabilityDisabled, D as DisabledLevel } from '../resolve-D4Ywz5OS.cjs';
|
|
6
|
-
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from '../attachments-
|
|
7
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-
|
|
6
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from '../attachments-tPWJ0DJI.cjs';
|
|
7
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-tPWJ0DJI.cjs';
|
|
8
8
|
import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.cjs';
|
|
9
9
|
export { B as Brand, a as ClientId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from '../ids-B2GAAifq.cjs';
|
|
10
|
-
import { a as ChatCheckinTarget } from '../ports-
|
|
11
|
-
export { C as ChatCheckin, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from '../ports-
|
|
12
|
-
import { P as PetProfileInput } from '../petsRepository-
|
|
13
|
-
export { a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from '../petsRepository-
|
|
14
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-
|
|
15
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-
|
|
10
|
+
import { a as ChatCheckinTarget } from '../ports-okLpXkpu.cjs';
|
|
11
|
+
export { C as ChatCheckin, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from '../ports-okLpXkpu.cjs';
|
|
12
|
+
import { P as PetProfileInput } from '../petsRepository-BYe7_MUo.cjs';
|
|
13
|
+
export { a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from '../petsRepository-BYe7_MUo.cjs';
|
|
14
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-C68HTCf4.cjs';
|
|
15
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-D0aQSXkb.cjs';
|
|
16
16
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as categoryFor, i as isRetryableCode, u as userFacingError } from '../EverfurError-DeBqRpQV.cjs';
|
|
17
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-
|
|
17
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-DhGAelCA.cjs';
|
|
18
18
|
import { U as UploadTransport, F as FileHandle } from '../ports-BN6RHF9W.cjs';
|
|
19
19
|
export { b as FilePort, a as UploadPolicyWire } from '../ports-BN6RHF9W.cjs';
|
|
20
20
|
import { K as KvPort } from '../cacheEpoch-DknKn3S0.cjs';
|
|
21
21
|
export { I as ImageCachePort } from '../cacheEpoch-DknKn3S0.cjs';
|
|
22
|
-
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from '../runtimeTypes-
|
|
22
|
+
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from '../runtimeTypes-C67itXfp.cjs';
|
|
23
23
|
export { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.cjs';
|
|
24
24
|
export { E as ErrorPolicyPort } from '../ErrorPolicyPort-10s3HJCt.cjs';
|
|
25
25
|
export { C as CameraPort, a as CaptureOptions, M as MediaSource } from '../CameraPort-Cv31Pz7g.cjs';
|
|
26
26
|
export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, i as isErr, c as isOk, u as unwrap } from '../EverfurResult-COlXj1wq.cjs';
|
|
27
|
-
export { M as MintedToken, T as TokenProvider } from '../identity-
|
|
27
|
+
export { M as MintedToken, T as TokenProvider } from '../identity-ScajqjK5.cjs';
|
|
28
28
|
export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, f as face, h as headingFace, p as previewTheme, t as themeAdjustments } from '../typeStyle-DJedEu14.cjs';
|
|
29
29
|
import { E as EverfurThemeInput } from '../branding-BCfwLj0h.cjs';
|
|
30
30
|
export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, m as expandAppearance } from '../branding-BCfwLj0h.cjs';
|
|
@@ -32,7 +32,7 @@ import { d as EverfurFontWeight, m as EverfurTheme, a as EverfurFontFaceKey } fr
|
|
|
32
32
|
export { E as EverfurColorTokens, b as EverfurFontFamilies, c as EverfurFontSource, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, T as THEME_SLOT_KEYS, v as THEME_SLOT_NAMES } from '../tokens-DLj8OnLH.cjs';
|
|
33
33
|
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile-CSs1wlXT.cjs';
|
|
34
34
|
export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species-BXAIMh7I.cjs';
|
|
35
|
-
import '../requestFunnel-
|
|
35
|
+
import '../requestFunnel-u8qnM5Ll.cjs';
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
-
import { E as EverfurProviderProps } from '../context-
|
|
3
|
-
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from '../context-
|
|
2
|
+
import { E as EverfurProviderProps } from '../context-D_2sCvoo.js';
|
|
3
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from '../context-D_2sCvoo.js';
|
|
4
4
|
import { C as CapabilityName, a as CapabilityDecision } from '../resolve-D4Ywz5OS.js';
|
|
5
5
|
export { b as CapabilityDisabled, D as DisabledLevel } from '../resolve-D4Ywz5OS.js';
|
|
6
|
-
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from '../attachments-
|
|
7
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-
|
|
6
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from '../attachments-BAcQdIz7.js';
|
|
7
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-BAcQdIz7.js';
|
|
8
8
|
import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.js';
|
|
9
9
|
export { B as Brand, a as ClientId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from '../ids-B2GAAifq.js';
|
|
10
|
-
import { a as ChatCheckinTarget } from '../ports-
|
|
11
|
-
export { C as ChatCheckin, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from '../ports-
|
|
12
|
-
import { P as PetProfileInput } from '../petsRepository-
|
|
13
|
-
export { a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from '../petsRepository-
|
|
14
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-
|
|
15
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-
|
|
10
|
+
import { a as ChatCheckinTarget } from '../ports-D4FQKTBS.js';
|
|
11
|
+
export { C as ChatCheckin, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from '../ports-D4FQKTBS.js';
|
|
12
|
+
import { P as PetProfileInput } from '../petsRepository-BdfbY9Oe.js';
|
|
13
|
+
export { a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from '../petsRepository-BdfbY9Oe.js';
|
|
14
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-DeUmccwl.js';
|
|
15
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-DjhMfm_n.js';
|
|
16
16
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as categoryFor, i as isRetryableCode, u as userFacingError } from '../EverfurError-DeBqRpQV.js';
|
|
17
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-
|
|
17
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-Brt7ivEo.js';
|
|
18
18
|
import { U as UploadTransport, F as FileHandle } from '../ports-BN6RHF9W.js';
|
|
19
19
|
export { b as FilePort, a as UploadPolicyWire } from '../ports-BN6RHF9W.js';
|
|
20
20
|
import { K as KvPort } from '../cacheEpoch-DknKn3S0.js';
|
|
21
21
|
export { I as ImageCachePort } from '../cacheEpoch-DknKn3S0.js';
|
|
22
|
-
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from '../runtimeTypes-
|
|
22
|
+
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from '../runtimeTypes-BFes64Vp.js';
|
|
23
23
|
export { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.js';
|
|
24
24
|
export { E as ErrorPolicyPort } from '../ErrorPolicyPort-C3nNSS_j.js';
|
|
25
25
|
export { C as CameraPort, a as CaptureOptions, M as MediaSource } from '../CameraPort-Cv31Pz7g.js';
|
|
26
26
|
export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, i as isErr, c as isOk, u as unwrap } from '../EverfurResult-ClPTS0P2.js';
|
|
27
|
-
export { M as MintedToken, T as TokenProvider } from '../identity-
|
|
27
|
+
export { M as MintedToken, T as TokenProvider } from '../identity-BTT6YtH5.js';
|
|
28
28
|
export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, f as face, h as headingFace, p as previewTheme, t as themeAdjustments } from '../typeStyle-BxVyF71R.js';
|
|
29
29
|
import { E as EverfurThemeInput } from '../branding-DJf4h12Q.js';
|
|
30
30
|
export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, m as expandAppearance } from '../branding-DJf4h12Q.js';
|
|
@@ -32,7 +32,7 @@ import { d as EverfurFontWeight, m as EverfurTheme, a as EverfurFontFaceKey } fr
|
|
|
32
32
|
export { E as EverfurColorTokens, b as EverfurFontFamilies, c as EverfurFontSource, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, T as THEME_SLOT_KEYS, v as THEME_SLOT_NAMES } from '../tokens-DLj8OnLH.js';
|
|
33
33
|
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile-CSs1wlXT.js';
|
|
34
34
|
export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species-BXAIMh7I.js';
|
|
35
|
-
import '../requestFunnel-
|
|
35
|
+
import '../requestFunnel-Dhaj0yUq.js';
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
package/dist/web/index.js
CHANGED
|
@@ -96,7 +96,7 @@ return Object.freeze({kind:"done",terminal:true,conversationId:fields.conversati
|
|
|
96
96
|
return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:fields.serverRequestId??null})}function analysisStartedFrame(requestId,lastEventId,serverRequestId=null){/* @__PURE__ */
|
|
97
97
|
return Object.freeze({kind:"analysisStarted",requestId:requestId,lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function analysisCompleteFrame(fields,serverRequestId=null){/* @__PURE__ */
|
|
98
98
|
return Object.freeze({kind:"analysisComplete",terminal:false,resultId:fields.resultId,analysisType:fields.analysisType,modelVersion:fields.modelVersion,confidence:fields.confidence,detections:/* @__PURE__ */Object.freeze([...fields.detections]),interpretation:fields.interpretation,lastEventId:fields.lastEventId,serverRequestId:serverRequestId})}function unknownFrame(raw,lastEventId,serverRequestId=null){/* @__PURE__ */
|
|
99
|
-
return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function createIdentityProvider(userRef2,getToken,onMinted){let cached=null,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */z.record(/* @__PURE__ */z.string(),/* @__PURE__ */z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=new TextDecoder("utf-8"),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.9.1",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
99
|
+
return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function createIdentityProvider(userRef2,getToken,onMinted){let cached=null,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */z.record(/* @__PURE__ */z.string(),/* @__PURE__ */z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=new TextDecoder("utf-8"),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
100
100
|
return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
|
|
101
101
|
return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
|
|
102
102
|
return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
|
|
@@ -200,14 +200,16 @@ return jsx("li",{children:/* @__PURE__ */jsxs("button",{type:"button","aria-curr
|
|
|
200
200
|
/* @__PURE__ */jsx("button",{type:"button",onClick:onClose,style:styles.close,children:CHAT_COPY.close})]}):null}function makeStyles3(theme){let c=theme.color,s=theme.space,r=theme.radius,t=theme.type;return{sheet:{boxSizing:"border-box",position:"fixed",top:"auto",right:0,bottom:0,left:0,margin:0,width:"100%",maxWidth:"100%",maxHeight:SHEET_MAX_HEIGHT,overflowY:"auto",padding:`${s.lg+4}px ${s.lg+4}px ${s.xxl}px`,border:0,borderRadius:`${SHEET_RADIUS}px ${SHEET_RADIUS}px 0 0`,backgroundColor:c.surface,color:c.text.primary,display:"flex",flexDirection:"column",gap:s.md+2,...sheetSlotCss(theme.slots.dialog)},title:{margin:0,...headingFaceCss(theme,"bold"),fontSize:t.tierSizes.heading.heading,lineHeight:`${Math.round(t.tierSizes.heading.heading*1.22)}px`,color:c.brandInk,...slotText(theme.slots.dialog)},list:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:s.sm},row:{boxSizing:"border-box",width:"100%",minHeight:MIN_TOUCH_TARGET2,display:"flex",flexDirection:"row",alignItems:"center",gap:s.md,margin:0,padding:s.md,borderRadius:r.md,border:`1px solid ${c.brandBorder}`,backgroundColor:c.surfaceCream,color:c.text.primary,textAlign:"left",cursor:"pointer",font:"inherit"},rowActive:{border:`1px solid ${c.brandInk}`,backgroundColor:c.brandSoft},ring:{boxSizing:"border-box",flexShrink:0,width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,border:`2px solid ${c.mark}`,display:"inline-flex",alignItems:"center",justifyContent:"center"},disc:{boxSizing:"border-box",width:ROW_AVATAR_SIZE,height:ROW_AVATAR_SIZE,borderRadius:r.pill,display:"inline-flex",alignItems:"center",justifyContent:"center",...faceCss(theme,"bold"),fontSize:Math.round(ROW_AVATAR_SIZE*.42),lineHeight:1,textTransform:"uppercase"},text:{flex:"1 1 auto",minWidth:0,display:"flex",flexDirection:"column",gap:2},name:{...faceCss(theme,"bold"),fontSize:t.size.body+1,lineHeight:`${t.size.body+4}px`,color:c.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},meta:{...faceCss(theme,"monoBold"),fontSize:t.tierSizes.compact.tiny,lineHeight:`${t.tierSizes.compact.tiny+2}px`,letterSpacing:.4,textTransform:"uppercase",color:c.text.muted},addRow:{boxSizing:"border-box",display:"flex",alignItems:"center",gap:s.sm,width:"100%",minHeight:MIN_TOUCH_TARGET2,padding:`${s.xs}px ${s.sm}px`,background:"none",border:"none",borderRadius:r.lg,cursor:"pointer",textAlign:"left"},addDisc:{boxSizing:"border-box",width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,display:"inline-flex",alignItems:"center",justifyContent:"center",border:`2px dashed ${c.brandBorder}`,backgroundColor:c.surfaceCream,color:c.brandInk,fontSize:t.size.subtitle,lineHeight:1},addLabel:{...faceCss(theme,"bold"),fontSize:t.size.body,color:c.text.primary,...slotText(theme.slots.dialog)},close:{boxSizing:"border-box",alignSelf:"center",minHeight:MIN_TOUCH_TARGET2,minWidth:MIN_TOUCH_TARGET2,display:"inline-flex",alignItems:"center",justifyContent:"center",margin:0,padding:`0 ${s.xl}px`,borderRadius:r.pill,border:`1px solid ${c.brandBorder}`,backgroundColor:c.surface,color:c.text.primary,cursor:"pointer",...faceCss(theme,"medium"),fontSize:t.tierSizes.control.body}}}var HEADER_AVATAR_SIZE=35,RING_WIDTH=1.75,AVATAR_INNER_SIZE=HEADER_AVATAR_SIZE-RING_WIDTH*2,ADD_BADGE_SIZE=12.4,MENU_BUTTON_SIZE=36,HISTORY_GLYPH_SIZE=20,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,MIN_TOUCH_TARGET3=44;function ChatHeader(props){let{pets:pets,activePet:activePet,unread:unread,onOpenHistory:onOpenHistory,historyTriggerRef:historyTriggerRef,onSelectPet:onSelectPet,onAddPet:onAddPet=null,vetEntry:vetEntry=null}=props,{rail:rail=false,historyOpen:historyOpen=false,onNewChat:onNewChat}=props,theme=useEverfurTheme(),styles=useMemo(()=>makeStyles4(theme),[theme]),glyphInk=theme.slots.header?.textColor??theme.color.text.primary,historyControls=/* @__PURE__ */jsxs("div",{style:styles.historyControls,children:[onNewChat!==void 0?/* @__PURE__ */jsx("button",{type:"button",onClick:onNewChat,"aria-label":HISTORY_COPY.newChat,style:styles.menuButton,children:/* @__PURE__ */jsx(Glyph,{name:"squarePen",size:HISTORY_GLYPH_SIZE,color:glyphInk})}):null,
|
|
201
201
|
/* @__PURE__ */jsx("button",{ref:historyTriggerRef,type:"button",onClick:onOpenHistory,"aria-label":historyControlLabel(rail,historyOpen,unread),"aria-expanded":historyOpen,style:styles.menuButton,children:/* @__PURE__ */jsxs("span",{"aria-hidden":"true",style:styles.menuDisc,children:[
|
|
202
202
|
/* @__PURE__ */jsx(Glyph,{name:"history",size:HISTORY_GLYPH_SIZE,color:glyphInk}),unread?/* @__PURE__ */jsx("span",{style:styles.unreadDot}):null]})})]});/* @__PURE__ */
|
|
203
|
-
return jsxs("header",{style:styles.bar,children:[
|
|
204
|
-
/* @__PURE__ */jsx("div",{style:styles.
|
|
205
|
-
/* @__PURE__ */jsx(
|
|
203
|
+
return jsxs("header",{style:styles.bar,children:[
|
|
204
|
+
/* @__PURE__ */jsx("div",{style:styles.leading,children:rail?null:historyControls}),
|
|
205
|
+
/* @__PURE__ */jsx("div",{style:styles.centre,children:/* @__PURE__ */jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,styles:styles})}),
|
|
206
|
+
/* @__PURE__ */jsxs("div",{style:styles.trailing,children:[vetEntry!==null?/* @__PURE__ */jsx("button",{type:"button",onClick:vetEntry,style:styles.vetEntry,children:TELEVET_COPY.visitButton}):null,
|
|
207
|
+
/* @__PURE__ */jsx(PetAvatarSlot,{pets:pets,activePet:activePet,styles:styles,onSelectPet:onSelectPet,onAddPet:onAddPet}),rail?historyControls:null]})]})}function historyControlLabel(rail,open,unread){let base=rail?open?CHAT_COPY.hideChatsWeb:CHAT_COPY.showChatsWeb:CHAT_COPY.openHistoryWeb;return unread?`${base}${CHAT_COPY.newReplySuffix}`:base}function PetAvatarSlot({pets:pets,activePet:activePet,styles:styles,onSelectPet:onSelectPet,onAddPet:onAddPet}){let[open,setOpen]=useState(false),triggerRef=useRef(null),name=activePet?.name?.trim()||CHAT_COPY.yourPet;return pets.length<2&&onAddPet===null||activePet===null?/* @__PURE__ */jsx("div",{role:"img","aria-label":name,style:styles.avatarSlot,children:/* @__PURE__ */jsx(AvatarRing,{pet:activePet,styles:styles})}):/* @__PURE__ */jsxs("div",{style:styles.avatarSlot,children:[
|
|
206
208
|
/* @__PURE__ */jsxs("button",{ref:triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":open,"aria-label":fillCopy(CHAT_COPY.switchActivePet,{name:name}),onClick:()=>setOpen(true),style:styles.avatarButton,children:[
|
|
207
209
|
/* @__PURE__ */jsx(AvatarRing,{pet:activePet,styles:styles}),
|
|
208
210
|
/* @__PURE__ */jsx("span",{"aria-hidden":"true",style:styles.addBadge,children:/* @__PURE__ */jsx("span",{style:styles.addBadgeGlyph,children:"+"})})]}),
|
|
209
211
|
/* @__PURE__ */jsx(PetSwitcherDialog,{open:open,pets:pets,activePetRef:activePet.petRef,returnFocusTo:triggerRef,onClose:()=>setOpen(false),onSelect:petRef2=>{setOpen(false),onSelectPet(petRef2)},onAddPet:onAddPet===null?null:()=>{setOpen(false),onAddPet()}})]})}function AvatarRing({pet:pet,styles:styles}){let theme=useEverfurTheme(),palette=pet===null?null:petDiscPaint(pet,isEverfurLightLook(theme),{fill:theme.color.highlight,ink:theme.color.onHighlight});/* @__PURE__ */
|
|
210
|
-
return jsx("span",{style:styles.ring,children:/* @__PURE__ */jsx("span",{style:{...styles.disc,...palette===null?styles.discEmpty:{backgroundColor:palette.background,color:palette.foreground}},children:palette===null?getInitial(null):palette.initial})})}function makeStyles4(theme){let c=theme.color,s=theme.space,r=theme.radius,t=theme.type,header=theme.slots.header;return{vetEntry:{boxSizing:"border-box",minHeight:44,padding:`0 ${s.md}px`,borderRadius:r.pill,backgroundColor:c.surfaceCream,border:`1px solid ${c.controlEdge}`,color:c.brandInk,cursor:"pointer",whiteSpace:"nowrap",...faceCss(theme,"bold"),fontSize:t.size.caption},bar:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.sm,padding:`${s.sm+2}px ${s.lg}px`,backgroundColor:c.surfaceCream,...slotCss(header)},menuButton:{boxSizing:"border-box",minWidth:MIN_TOUCH_TARGET3,minHeight:MIN_TOUCH_TARGET3,display:"inline-flex",alignItems:"center",justifyContent:"center",margin:0,padding:0,border:"1px solid transparent",borderRadius:r.pill,background:"transparent",cursor:"pointer",color:header?.textColor??c.text.primary},menuDisc:{position:"relative",boxSizing:"border-box",width:MENU_BUTTON_SIZE,height:MENU_BUTTON_SIZE,borderRadius:r.pill,display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4},historyControls:{display:"flex",flexDirection:"row",alignItems:"center",flexShrink:0},unreadDot:{position:"absolute",top:6,right:6,boxSizing:"border-box",width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:r.pill,backgroundColor:c.danger,border:`${UNREAD_DOT_RING}px solid ${header?.backgroundColor??c.surfaceCream}`},centre:{flex:"1 1 auto",minWidth:0,display:"flex",alignItems:"center",justifyContent:"center"},logo:LOGO_STYLE,avatarSlot:{position:"relative",minWidth:MIN_TOUCH_TARGET3,minHeight:MIN_TOUCH_TARGET3,display:"inline-flex",alignItems:"center",justifyContent:"center"},avatarButton:{position:"relative",boxSizing:"border-box",minWidth:MIN_TOUCH_TARGET3,minHeight:MIN_TOUCH_TARGET3,display:"inline-flex",alignItems:"center",justifyContent:"center",margin:0,padding:0,border:0,background:"transparent",cursor:"pointer"},ring:{boxSizing:"border-box",width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,borderRadius:r.pill,border:`${RING_WIDTH}px solid ${c.mark}`,display:"inline-flex",alignItems:"center",justifyContent:"center"},disc:{boxSizing:"border-box",width:AVATAR_INNER_SIZE,height:AVATAR_INNER_SIZE,borderRadius:r.pill,display:"inline-flex",alignItems:"center",justifyContent:"center",...faceCss(theme,"bold"),fontSize:Math.round(AVATAR_INNER_SIZE*.42),lineHeight:1,textTransform:"uppercase"},discEmpty:{backgroundColor:c.surfaceSubtle,color:c.text.muted},addBadge:{position:"absolute",bottom:(MIN_TOUCH_TARGET3-HEADER_AVATAR_SIZE)/2,right:(MIN_TOUCH_TARGET3-HEADER_AVATAR_SIZE)/2,boxSizing:"border-box",width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:r.pill,border:`0.5px solid ${c.mark}`,backgroundColor:c.surface,display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},addBadgeGlyph:{...faceCss(theme,"bold"),fontSize:t.tierSizes.badge.small,lineHeight:1,color:c.brandInk}}}var STATIC=/* @__PURE__ */Object.freeze({kind:"static"}),CitationLinkContext=createContext(STATIC);function useCitationLinks(){return useContext(CitationLinkContext)}function useCitationLinkMode(onOpenUrl){return useMemo(()=>onOpenUrl===void 0?STATIC:/* @__PURE__ */Object.freeze({kind:"host",open:url=>{callHost(onOpenUrl,url,"citation")}}),[onOpenUrl])}function CitationLinksScope({onOpenUrl:onOpenUrl,children:children}){let mode=useCitationLinkMode(onOpenUrl);return createElement(CitationLinkContext.Provider,{value:mode},children)}var DEFAULT_ROOT_HEADING_LEVEL=2;function headingLevel(value){return typeof value!="number"||!Number.isInteger(value)?DEFAULT_ROOT_HEADING_LEVEL:value<1?1:value>6?6:value}function nextHeadingLevel(level){return level+1}function headingTag(level){return`h${String(level)}`}var NESTED_HEADING_LEVEL_DEFAULT=nextHeadingLevel(DEFAULT_ROOT_HEADING_LEVEL);createContext(NESTED_HEADING_LEVEL_DEFAULT);var HISTORY_PANEL_WIDTH=320,MIN_THREAD_WIDTH=480,RAIL_MIN_CONTAINER_WIDTH=HISTORY_PANEL_WIDTH+MIN_THREAD_WIDTH,DESKTOP_MIN_CONTAINER_WIDTH=1024,CHAT_COLUMN_MAX_WIDTH=768,ASSISTANT_MEASURE="72ch",NARROW_LAYOUT=/* @__PURE__ */Object.freeze({rail:false,desktop:false}),RAIL_LAYOUT=/* @__PURE__ */Object.freeze({rail:true,desktop:false}),DESKTOP_LAYOUT=/* @__PURE__ */Object.freeze({rail:true,desktop:true});function layoutFor(width){return width===null||width<RAIL_MIN_CONTAINER_WIDTH?NARROW_LAYOUT:width>=DESKTOP_MIN_CONTAINER_WIDTH?DESKTOP_LAYOUT:RAIL_LAYOUT}var ChatLayoutContext=createContext({layout:NARROW_LAYOUT,report:()=>{},headingLevel:headingLevel(void 0)});function useChatLayout(){return useContext(ChatLayoutContext).layout}function useChatHeadingLevel(){return useContext(ChatLayoutContext).headingLevel}function ChatLayoutScope({children:children,headingLevel:hostLevel}){let[layout,setLayout]=useState(NARROW_LAYOUT),level=headingLevel(hostLevel),value=useMemo(()=>({layout:layout,report:setLayout,headingLevel:level}),[layout,level]);return createElement(ChatLayoutContext.Provider,{value:value},children)}function useMeasuredLayout(root){let{report:report}=useContext(ChatLayoutContext);useEffect(()=>{let node=root.current;if(node===null||typeof ResizeObserver>"u")return;let read=()=>{let width=node.getBoundingClientRect().width;report(layoutFor(width>0?Math.round(width):null))};read();let observer=new ResizeObserver(read);return observer.observe(node),()=>observer.disconnect()},[root,report])}var CHAT_EASING=/* @__PURE__ */Object.freeze({standard:EASING_CURVES.standard,emphasized:EASING_CURVES.emphasized,exit:EASING_CURVES.exit,outQuad:/* @__PURE__ */Object.freeze([.25,.46,.45,.94]),out:/* @__PURE__ */Object.freeze([.23,1,.32,1])}),cubicBezier=cssCubicBezier,CHAT_MOTION=/* @__PURE__ */Object.freeze({layoutMs:220,messageInMs:200,bannerInMs:220,bannerOutMs:160,iconInMs:180,iconOutMs:120,followUpInMs:180,followUpStaggerMs:70,citationsInMs:220,citationsRisePx:6,drawerMs:220,pressScale:.97,pressMs:140,revealTickMs:24,revealDivisor:12,dotsCycleMs:520,dotsMinOpacity:.44,dotsLiftPx:3.5,dotsStagger:/* @__PURE__ */Object.freeze([0,.18,.36]),copiedMs:1500,uploadFlashMs:600,bubbleInMs:280,bubbleFromScale:.94,bubbleRisePx:6,promptRisePx:8,reduced:false}),CHAT_MOTION_REDUCED=/* @__PURE__ */Object.freeze({...CHAT_MOTION,layoutMs:0,messageInMs:0,bannerInMs:0,bannerOutMs:0,iconInMs:0,iconOutMs:0,followUpInMs:0,followUpStaggerMs:0,citationsInMs:0,citationsRisePx:0,drawerMs:0,pressScale:1,pressMs:0,revealTickMs:0,dotsCycleMs:0,dotsMinOpacity:1,dotsLiftPx:0,bubbleInMs:0,bubbleFromScale:1,bubbleRisePx:0,promptRisePx:0,reduced:true});function chatMotion(theme){return theme.motion.reducedMotion?CHAT_MOTION_REDUCED:CHAT_MOTION}function followUpDelayMs(motion,index){return Math.max(0,index)*motion.followUpStaggerMs}function nextRevealLength(motion,visible,total){if(motion.reduced||visible>=total)return total;let step=Math.max(1,Math.ceil((total-visible)/motion.revealDivisor));return Math.min(total,visible+step)}function useChatMotion(){let theme=useEverfurTheme();return useMemo(()=>chatMotion(theme),[theme])}function canAnimate(node){return node!==null&&typeof node.animate=="function"}function animateEnter(node,motion){if(!canAnimate(node)||motion.durationMs<=0)return null;let translate=[motion.fromTranslateX!==void 0?`translateX(${motion.fromTranslateX})`:"",motion.fromTranslateY!==void 0&&motion.fromTranslateY!==0?`translateY(${motion.fromTranslateY}px)`:""].filter(part=>part.length>0).join(" "),from={...motion.fromOpacity!==void 0?{opacity:motion.fromOpacity}:{},...translate.length>0?{transform:translate}:{}},to={...motion.fromOpacity!==void 0?{opacity:1}:{},...translate.length>0?{transform:"none"}:{}};try{return node.animate([from,to],{duration:motion.durationMs,delay:motion.delayMs??0,easing:cubicBezier(CHAT_EASING.standard),fill:"backwards"})}catch{return null}}function popIn(node,motion){if(!canAnimate(node)||motion.bubbleInMs<=0)return null;try{return node.animate([{opacity:0,transform:`translateY(${motion.bubbleRisePx}px) scale(${motion.bubbleFromScale})`},{opacity:1,transform:"none"}],{duration:motion.bubbleInMs,easing:cubicBezier(CHAT_EASING.out),fill:"backwards"})}catch{return null}}function animateExit(node,durationMs,toTranslateX){if(!canAnimate(node)||durationMs<=0)return Promise.resolve();try{let animation=node.animate([{opacity:1,transform:"none"},{opacity:0,...toTranslateX!==void 0?{transform:`translateX(${toTranslateX})`}:{}}],{duration:durationMs,easing:cubicBezier(CHAT_EASING.exit),fill:"forwards"});return new Promise(resolve=>{animation.onfinish=()=>resolve(),animation.oncancel=()=>resolve()})}catch{return Promise.resolve()}}function usePresence(show,exitMs){let[present2,setPresent]=useState(show),exiting=present2&&!show;return useEffect(()=>{if(show){setPresent(true);return}if(!present2)return;if(exitMs<=0){setPresent(false);return}let handle=setTimeout(()=>setPresent(false),exitMs);return()=>clearTimeout(handle)},[show,exitMs,present2]),{present:present2,exiting:exiting}}function useRevealedText(text3,active,motion){let[visible,setVisible]=useState(active&&!motion.reduced?0:text3.length),latest=useRef({text:text3,active:active});return latest.current={text:text3,active:active},useEffect(()=>{if(!active||motion.reduced||motion.revealTickMs<=0){setVisible(latest.current.text.length);return}let handle=setInterval(()=>{setVisible(current=>nextRevealLength(motion,current,latest.current.text.length))},motion.revealTickMs);return()=>clearInterval(handle)},[active,motion]),active&&!motion.reduced?text3.slice(0,Math.min(visible,text3.length)):text3}var MIN_TOUCH_TARGET4=44,DRAWER_MAX_WIDTH="85%",DRAWER_SHADOW={y:16,blur:48,alpha:.18},SCRIM_ALPHA=.32,UNREAD_DOT_SIZE2=8,ACTIVE_ROW_ALPHA=.22,SEARCH_EDGE_WIDTH=1.5,LOAD_MORE_MARGIN="50%";function HistoryDrawer({chat:chat,history:history,mode:mode,returnFocusTo:returnFocusTo}){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles5(theme,mode==="dialog"),[theme,mode]),motion=useChatMotion(),dialog=useModalDialog(mode==="dialog"&&history.open,history.close,returnFocusTo),panelRef=useRef(null),open=history.open,slideMs=motion.drawerMs;if(useEffect(()=>{if(!open||mode!=="dialog")return;let animation=animateEnter(panelRef.current,{durationMs:slideMs,fromOpacity:0,fromTranslateX:"-100%"});return()=>animation?.cancel()},[open,mode,slideMs]),!open)return null;let body=/* @__PURE__ */jsx(PanelBody,{chat:chat,history:history,styles:styles,theme:theme,rail:mode==="rail"});return mode==="rail"?/* @__PURE__ */jsx("aside",{ref:node=>{panelRef.current=node},"aria-label":HISTORY_COPY.heading,style:styles.rail,children:body}):/* @__PURE__ */jsx("div",{style:styles.scrim,onClick:history.close,children:/* @__PURE__ */jsx("div",{ref:node=>{dialog.dialogRef.current=node,panelRef.current=node},role:"dialog","aria-modal":"true","aria-label":HISTORY_COPY.heading,tabIndex:-1,onKeyDown:dialog.onKeyDown,onClick:event=>event.stopPropagation(),style:styles.overlay,children:body})})}function PanelBody({chat:chat,history:history,styles:styles,theme:theme,rail:rail}){let{rows:rows,filtered:filtered,loading:loading,loadingMore:loadingMore,error:error,cursor:cursor2,emptyKind:emptyKind,searching:searching,query:query,setQuery:setQuery}=history,showRows=!loading&&error===null,[searchFocused,setSearchFocused]=useState(false),closeInk=(rail?void 0:theme.slots.dialog?.textColor)??theme.color.brandInk,searchInk=theme.slots.input?.textColor??theme.color.text.muted;/* @__PURE__ */
|
|
212
|
+
return jsx("span",{style:styles.ring,children:/* @__PURE__ */jsx("span",{style:{...styles.disc,...palette===null?styles.discEmpty:{backgroundColor:palette.background,color:palette.foreground}},children:palette===null?getInitial(null):palette.initial})})}function makeStyles4(theme){let c=theme.color,s=theme.space,r=theme.radius,t=theme.type,header=theme.slots.header;return{vetEntry:{boxSizing:"border-box",minHeight:44,padding:`0 ${s.md}px`,borderRadius:r.pill,backgroundColor:c.surfaceCream,border:`1px solid ${c.controlEdge}`,color:c.brandInk,cursor:"pointer",whiteSpace:"nowrap",...faceCss(theme,"bold"),fontSize:t.size.caption},bar:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.sm,padding:`${s.sm+2}px ${s.lg}px`,backgroundColor:c.surfaceCream,...slotCss(header)},menuButton:{boxSizing:"border-box",minWidth:MIN_TOUCH_TARGET3,minHeight:MIN_TOUCH_TARGET3,display:"inline-flex",alignItems:"center",justifyContent:"center",margin:0,padding:0,border:"1px solid transparent",borderRadius:r.pill,background:"transparent",cursor:"pointer",color:header?.textColor??c.text.primary},menuDisc:{position:"relative",boxSizing:"border-box",width:MENU_BUTTON_SIZE,height:MENU_BUTTON_SIZE,borderRadius:r.pill,display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4},historyControls:{display:"flex",flexDirection:"row",alignItems:"center",flexShrink:0},unreadDot:{position:"absolute",top:6,right:6,boxSizing:"border-box",width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:r.pill,backgroundColor:c.danger,border:`${UNREAD_DOT_RING}px solid ${header?.backgroundColor??c.surfaceCream}`},leading:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:s.sm,flex:"1 1 0"},trailing:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:s.sm,flex:"1 1 0"},centre:{flex:"0 1 auto",minWidth:0,display:"flex",alignItems:"center",justifyContent:"center"},logo:{...LOGO_STYLE,minWidth:0,flexShrink:1},avatarSlot:{position:"relative",minWidth:MIN_TOUCH_TARGET3,minHeight:MIN_TOUCH_TARGET3,display:"inline-flex",alignItems:"center",justifyContent:"center"},avatarButton:{position:"relative",boxSizing:"border-box",minWidth:MIN_TOUCH_TARGET3,minHeight:MIN_TOUCH_TARGET3,display:"inline-flex",alignItems:"center",justifyContent:"center",margin:0,padding:0,border:0,background:"transparent",cursor:"pointer"},ring:{boxSizing:"border-box",width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,borderRadius:r.pill,border:`${RING_WIDTH}px solid ${c.mark}`,display:"inline-flex",alignItems:"center",justifyContent:"center"},disc:{boxSizing:"border-box",width:AVATAR_INNER_SIZE,height:AVATAR_INNER_SIZE,borderRadius:r.pill,display:"inline-flex",alignItems:"center",justifyContent:"center",...faceCss(theme,"bold"),fontSize:Math.round(AVATAR_INNER_SIZE*.42),lineHeight:1,textTransform:"uppercase"},discEmpty:{backgroundColor:c.surfaceSubtle,color:c.text.muted},addBadge:{position:"absolute",bottom:(MIN_TOUCH_TARGET3-HEADER_AVATAR_SIZE)/2,right:(MIN_TOUCH_TARGET3-HEADER_AVATAR_SIZE)/2,boxSizing:"border-box",width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:r.pill,border:`0.5px solid ${c.mark}`,backgroundColor:c.surface,display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},addBadgeGlyph:{...faceCss(theme,"bold"),fontSize:t.tierSizes.badge.small,lineHeight:1,color:c.brandInk}}}var STATIC=/* @__PURE__ */Object.freeze({kind:"static"}),CitationLinkContext=createContext(STATIC);function useCitationLinks(){return useContext(CitationLinkContext)}function useCitationLinkMode(onOpenUrl){return useMemo(()=>onOpenUrl===void 0?STATIC:/* @__PURE__ */Object.freeze({kind:"host",open:url=>{callHost(onOpenUrl,url,"citation")}}),[onOpenUrl])}function CitationLinksScope({onOpenUrl:onOpenUrl,children:children}){let mode=useCitationLinkMode(onOpenUrl);return createElement(CitationLinkContext.Provider,{value:mode},children)}var DEFAULT_ROOT_HEADING_LEVEL=2;function headingLevel(value){return typeof value!="number"||!Number.isInteger(value)?DEFAULT_ROOT_HEADING_LEVEL:value<1?1:value>6?6:value}function nextHeadingLevel(level){return level+1}function headingTag(level){return`h${String(level)}`}var NESTED_HEADING_LEVEL_DEFAULT=nextHeadingLevel(DEFAULT_ROOT_HEADING_LEVEL);createContext(NESTED_HEADING_LEVEL_DEFAULT);var HISTORY_PANEL_WIDTH=320,MIN_THREAD_WIDTH=480,RAIL_MIN_CONTAINER_WIDTH=HISTORY_PANEL_WIDTH+MIN_THREAD_WIDTH,DESKTOP_MIN_CONTAINER_WIDTH=1024,CHAT_COLUMN_MAX_WIDTH=768,ASSISTANT_MEASURE="72ch",NARROW_LAYOUT=/* @__PURE__ */Object.freeze({rail:false,desktop:false}),RAIL_LAYOUT=/* @__PURE__ */Object.freeze({rail:true,desktop:false}),DESKTOP_LAYOUT=/* @__PURE__ */Object.freeze({rail:true,desktop:true});function layoutFor(width){return width===null||width<RAIL_MIN_CONTAINER_WIDTH?NARROW_LAYOUT:width>=DESKTOP_MIN_CONTAINER_WIDTH?DESKTOP_LAYOUT:RAIL_LAYOUT}var ChatLayoutContext=createContext({layout:NARROW_LAYOUT,report:()=>{},headingLevel:headingLevel(void 0)});function useChatLayout(){return useContext(ChatLayoutContext).layout}function useChatHeadingLevel(){return useContext(ChatLayoutContext).headingLevel}function ChatLayoutScope({children:children,headingLevel:hostLevel}){let[layout,setLayout]=useState(NARROW_LAYOUT),level=headingLevel(hostLevel),value=useMemo(()=>({layout:layout,report:setLayout,headingLevel:level}),[layout,level]);return createElement(ChatLayoutContext.Provider,{value:value},children)}function useMeasuredLayout(root){let{report:report}=useContext(ChatLayoutContext);useEffect(()=>{let node=root.current;if(node===null||typeof ResizeObserver>"u")return;let read=()=>{let width=node.getBoundingClientRect().width;report(layoutFor(width>0?Math.round(width):null))};read();let observer=new ResizeObserver(read);return observer.observe(node),()=>observer.disconnect()},[root,report])}var CHAT_EASING=/* @__PURE__ */Object.freeze({standard:EASING_CURVES.standard,emphasized:EASING_CURVES.emphasized,exit:EASING_CURVES.exit,outQuad:/* @__PURE__ */Object.freeze([.25,.46,.45,.94]),out:/* @__PURE__ */Object.freeze([.23,1,.32,1])}),cubicBezier=cssCubicBezier,CHAT_MOTION=/* @__PURE__ */Object.freeze({layoutMs:220,messageInMs:200,bannerInMs:220,bannerOutMs:160,iconInMs:180,iconOutMs:120,followUpInMs:180,followUpStaggerMs:70,citationsInMs:220,citationsRisePx:6,drawerMs:220,pressScale:.97,pressMs:140,revealTickMs:24,revealDivisor:12,dotsCycleMs:520,dotsMinOpacity:.44,dotsLiftPx:3.5,dotsStagger:/* @__PURE__ */Object.freeze([0,.18,.36]),copiedMs:1500,uploadFlashMs:600,bubbleInMs:280,bubbleFromScale:.94,bubbleRisePx:6,promptRisePx:8,reduced:false}),CHAT_MOTION_REDUCED=/* @__PURE__ */Object.freeze({...CHAT_MOTION,layoutMs:0,messageInMs:0,bannerInMs:0,bannerOutMs:0,iconInMs:0,iconOutMs:0,followUpInMs:0,followUpStaggerMs:0,citationsInMs:0,citationsRisePx:0,drawerMs:0,pressScale:1,pressMs:0,revealTickMs:0,dotsCycleMs:0,dotsMinOpacity:1,dotsLiftPx:0,bubbleInMs:0,bubbleFromScale:1,bubbleRisePx:0,promptRisePx:0,reduced:true});function chatMotion(theme){return theme.motion.reducedMotion?CHAT_MOTION_REDUCED:CHAT_MOTION}function followUpDelayMs(motion,index){return Math.max(0,index)*motion.followUpStaggerMs}function nextRevealLength(motion,visible,total){if(motion.reduced||visible>=total)return total;let step=Math.max(1,Math.ceil((total-visible)/motion.revealDivisor));return Math.min(total,visible+step)}function useChatMotion(){let theme=useEverfurTheme();return useMemo(()=>chatMotion(theme),[theme])}function canAnimate(node){return node!==null&&typeof node.animate=="function"}function animateEnter(node,motion){if(!canAnimate(node)||motion.durationMs<=0)return null;let translate=[motion.fromTranslateX!==void 0?`translateX(${motion.fromTranslateX})`:"",motion.fromTranslateY!==void 0&&motion.fromTranslateY!==0?`translateY(${motion.fromTranslateY}px)`:""].filter(part=>part.length>0).join(" "),from={...motion.fromOpacity!==void 0?{opacity:motion.fromOpacity}:{},...translate.length>0?{transform:translate}:{}},to={...motion.fromOpacity!==void 0?{opacity:1}:{},...translate.length>0?{transform:"none"}:{}};try{return node.animate([from,to],{duration:motion.durationMs,delay:motion.delayMs??0,easing:cubicBezier(CHAT_EASING.standard),fill:"backwards"})}catch{return null}}function popIn(node,motion){if(!canAnimate(node)||motion.bubbleInMs<=0)return null;try{return node.animate([{opacity:0,transform:`translateY(${motion.bubbleRisePx}px) scale(${motion.bubbleFromScale})`},{opacity:1,transform:"none"}],{duration:motion.bubbleInMs,easing:cubicBezier(CHAT_EASING.out),fill:"backwards"})}catch{return null}}function animateExit(node,durationMs,toTranslateX){if(!canAnimate(node)||durationMs<=0)return Promise.resolve();try{let animation=node.animate([{opacity:1,transform:"none"},{opacity:0,...toTranslateX!==void 0?{transform:`translateX(${toTranslateX})`}:{}}],{duration:durationMs,easing:cubicBezier(CHAT_EASING.exit),fill:"forwards"});return new Promise(resolve=>{animation.onfinish=()=>resolve(),animation.oncancel=()=>resolve()})}catch{return Promise.resolve()}}function usePresence(show,exitMs){let[present2,setPresent]=useState(show),exiting=present2&&!show;return useEffect(()=>{if(show){setPresent(true);return}if(!present2)return;if(exitMs<=0){setPresent(false);return}let handle=setTimeout(()=>setPresent(false),exitMs);return()=>clearTimeout(handle)},[show,exitMs,present2]),{present:present2,exiting:exiting}}function useRevealedText(text3,active,motion){let[visible,setVisible]=useState(active&&!motion.reduced?0:text3.length),latest=useRef({text:text3,active:active});return latest.current={text:text3,active:active},useEffect(()=>{if(!active||motion.reduced||motion.revealTickMs<=0){setVisible(latest.current.text.length);return}let handle=setInterval(()=>{setVisible(current=>nextRevealLength(motion,current,latest.current.text.length))},motion.revealTickMs);return()=>clearInterval(handle)},[active,motion]),active&&!motion.reduced?text3.slice(0,Math.min(visible,text3.length)):text3}var MIN_TOUCH_TARGET4=44,DRAWER_MAX_WIDTH="85%",DRAWER_SHADOW={y:16,blur:48,alpha:.18},SCRIM_ALPHA=.32,UNREAD_DOT_SIZE2=8,ACTIVE_ROW_ALPHA=.22,SEARCH_EDGE_WIDTH=1.5,LOAD_MORE_MARGIN="50%";function HistoryDrawer({chat:chat,history:history,mode:mode,returnFocusTo:returnFocusTo}){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles5(theme,mode==="dialog"),[theme,mode]),motion=useChatMotion(),dialog=useModalDialog(mode==="dialog"&&history.open,history.close,returnFocusTo),panelRef=useRef(null),open=history.open,slideMs=motion.drawerMs;if(useEffect(()=>{if(!open||mode!=="dialog")return;let animation=animateEnter(panelRef.current,{durationMs:slideMs,fromOpacity:0,fromTranslateX:"-100%"});return()=>animation?.cancel()},[open,mode,slideMs]),!open)return null;let body=/* @__PURE__ */jsx(PanelBody,{chat:chat,history:history,styles:styles,theme:theme,rail:mode==="rail"});return mode==="rail"?/* @__PURE__ */jsx("aside",{ref:node=>{panelRef.current=node},"aria-label":HISTORY_COPY.heading,style:styles.rail,children:body}):/* @__PURE__ */jsx("div",{style:styles.scrim,onClick:history.close,children:/* @__PURE__ */jsx("div",{ref:node=>{dialog.dialogRef.current=node,panelRef.current=node},role:"dialog","aria-modal":"true","aria-label":HISTORY_COPY.heading,tabIndex:-1,onKeyDown:dialog.onKeyDown,onClick:event=>event.stopPropagation(),style:styles.overlay,children:body})})}function PanelBody({chat:chat,history:history,styles:styles,theme:theme,rail:rail}){let{rows:rows,filtered:filtered,loading:loading,loadingMore:loadingMore,error:error,cursor:cursor2,emptyKind:emptyKind,searching:searching,query:query,setQuery:setQuery}=history,showRows=!loading&&error===null,[searchFocused,setSearchFocused]=useState(false),closeInk=(rail?void 0:theme.slots.dialog?.textColor)??theme.color.brandInk,searchInk=theme.slots.input?.textColor??theme.color.text.muted;/* @__PURE__ */
|
|
211
213
|
return jsxs(Fragment,{children:[
|
|
212
214
|
/* @__PURE__ */jsxs("div",{style:styles.head,children:[
|
|
213
215
|
/* @__PURE__ */jsx("p",{style:styles.heading,children:HISTORY_COPY.heading}),
|
|
@@ -2,12 +2,12 @@ import { E as EverfurError } from '../../EverfurError-DeBqRpQV.cjs';
|
|
|
2
2
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.cjs';
|
|
3
3
|
import { E as EverfurResult } from '../../EverfurResult-COlXj1wq.cjs';
|
|
4
4
|
import { E as ErrorPolicyPort } from '../../ErrorPolicyPort-10s3HJCt.cjs';
|
|
5
|
-
import { A as AuthContext } from '../../identity-
|
|
6
|
-
export { I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity-
|
|
5
|
+
import { A as AuthContext } from '../../identity-ScajqjK5.cjs';
|
|
6
|
+
export { I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity-ScajqjK5.cjs';
|
|
7
7
|
import { U as UserRef, R as RecordsRequestId, P as PetRef, C as ConversationId } from '../../ids-B2GAAifq.cjs';
|
|
8
8
|
export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.cjs';
|
|
9
9
|
import { V as VetVisitIntent } from '../../visitIntent-D7_yVp1I.cjs';
|
|
10
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config-
|
|
10
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config-C68HTCf4.cjs';
|
|
11
11
|
|
|
12
12
|
/** The push providers the registration route accepts. `apns` is refused with `provider_unsupported` until APNs direct lands. */
|
|
13
13
|
type PushProvider = 'expo' | 'fcm' | 'apns';
|
|
@@ -2,12 +2,12 @@ import { E as EverfurError } from '../../EverfurError-DeBqRpQV.js';
|
|
|
2
2
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.js';
|
|
3
3
|
import { E as EverfurResult } from '../../EverfurResult-ClPTS0P2.js';
|
|
4
4
|
import { E as ErrorPolicyPort } from '../../ErrorPolicyPort-C3nNSS_j.js';
|
|
5
|
-
import { A as AuthContext } from '../../identity-
|
|
6
|
-
export { I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity-
|
|
5
|
+
import { A as AuthContext } from '../../identity-BTT6YtH5.js';
|
|
6
|
+
export { I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity-BTT6YtH5.js';
|
|
7
7
|
import { U as UserRef, R as RecordsRequestId, P as PetRef, C as ConversationId } from '../../ids-B2GAAifq.js';
|
|
8
8
|
export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.js';
|
|
9
9
|
import { V as VetVisitIntent } from '../../visitIntent-D7_yVp1I.js';
|
|
10
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config-
|
|
10
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config-DeUmccwl.js';
|
|
11
11
|
|
|
12
12
|
/** The push providers the registration route accepts. `apns` is refused with `provider_unsupported` until APNs direct lands. */
|
|
13
13
|
type PushProvider = 'expo' | 'fcm' | 'apns';
|
|
@@ -110,10 +110,11 @@ return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitle
|
|
|
110
110
|
return jsxRuntime.jsx("div",{role:"status","aria-busy":"true","aria-label":`Loading ${capability}`,className:className,style:{...styles.offstate,...style},children:/* @__PURE__ */jsxRuntime.jsx("div",{style:styles.skeletonBar})})}function OffState({decision:decision,style:style,className:className}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles(theme),[theme]),message=decision.disabled?.reason??"";/* @__PURE__ */
|
|
111
111
|
return jsxRuntime.jsx("div",{className:className,style:{...styles.offstate,...style},children:message.length>0?/* @__PURE__ */jsxRuntime.jsx("p",{style:styles.offstateText,children:message}):null})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return{offstate:{...SURFACE_ROOT_RESET,boxSizing:"border-box",minHeight:MIN_OFFSTATE_HEIGHT,display:"flex",flexDirection:"column",justifyContent:"center",padding:`${space.md}px ${space.lg}px`,backgroundColor:color.surfaceCream,borderRadius:radius.md,border:`1px solid ${color.brandBorder}`},offstateText:{margin:0,...faceCss(theme,"regular"),fontSize:type.size.body,lineHeight:`${Math.round(type.size.body*type.lineHeight.normal)}px`,color:color.text.muted},skeletonBar:{height:space.md,borderRadius:radius.xs,backgroundColor:color.brandSofter}}}var RecordsFootnoteDrawnAbove=react.createContext(false);function RecordsFootnote(props){let theme=useEverfurTheme(),style=react.useMemo(()=>footnoteStyle(theme),[theme]);return react.useContext(RecordsFootnoteDrawnAbove)?null:/* @__PURE__ */jsxRuntime.jsx("p",{role:"note",className:props.className,style:{...style,...props.style},"data-testid":"records-footnote",children:RECORDS_FOOTNOTE})}function footnoteStyle(theme){let{color:color,space:space,type:type}=theme;return{...SURFACE_ROOT_RESET,boxSizing:"border-box",margin:0,padding:`${space.md}px ${space.lg}px ${space.lg}px`,textAlign:"center",...faceCss(theme,"regular"),fontSize:type.size.caption,lineHeight:`${Math.round(type.size.caption*type.lineHeight.normal)}px`,color:color.text.muted,backgroundColor:color.background}}function slotCss(slot,borderWidth){return{...slotBoxCss(slot,borderWidth),...slotText(slot)}}var MIN_HEIGHT=120,MIN_TARGET=44;function RecordsGateOffState({reason:reason,onExit:onExit,exitLabel:exitLabel,style:style,className:className}){let{color:color,space:space,radius:radius,type:type}=useEverfurTheme();/* @__PURE__ */
|
|
112
112
|
return jsxRuntime.jsxs("div",{className:className,"data-testid":"records-gate-off",style:{boxSizing:"border-box",minHeight:MIN_HEIGHT,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:space.md,padding:space.lg,borderRadius:radius.md,border:`1px solid ${color.brandBorder}`,backgroundColor:color.surfaceCream,color:color.text.primary,...style},children:[reason.length>0?/* @__PURE__ */jsxRuntime.jsx("p",{style:{margin:0,fontSize:type.size.bodyTight,color:color.text.muted},children:reason}):null,
|
|
113
|
-
/* @__PURE__ */jsxRuntime.jsx("button",{type:"button",onClick:onExit,"data-testid":"records-gate-off-exit",style:{minHeight:MIN_TARGET,padding:`0 ${space.lg}px`,borderRadius:radius.pill,border:`1.5px solid ${color.brandInk}`,backgroundColor:"transparent",color:color.brandInk,font:"inherit",fontSize:type.size.body,cursor:"pointer"},children:exitLabel})]})}function recordsGateExit(onExit,exitLabel){return onExit===void 0?{}:{renderDisabled:decision=>/* @__PURE__ */jsxRuntime.jsx(RecordsGateOffState,{reason:decision.disabled?.reason??"",onExit:onExit,exitLabel:exitLabel})}}function parseColor(value){let rgba=toRgba(value);return rgba===null?null:normalizeRgba(rgba)}function toRgba(value){if(typeof value=="number")return argbIntToRgba(value);if(typeof value!="string")return null;let s=value.trim();if(s.length===0)return null;if(s.startsWith("#"))return fromHex(s.slice(1));if(s.toLowerCase().startsWith("0x"))return fromHex(s.slice(2));if(s.toLowerCase().startsWith("rgb"))return fromRgbFunc(s);if(/^[0-9a-fA-F]+$/.test(s)){let hex=fromHex(s);if(hex!==null)return hex}return/^\d+$/.test(s)?argbIntToRgba(Number.parseInt(s,10)):null}function fromHex(hex){let h=hex.trim();if(!/^[0-9a-fA-F]+$/.test(h))return null;if(h.length===3)return{r:dup(h[0]),g:dup(h[1]),b:dup(h[2]),a:1};if(h.length===6)return{r:byte(h,0),g:byte(h,2),b:byte(h,4),a:1};if(h.length===8){let a=byte(h,0);return{r:byte(h,2),g:byte(h,4),b:byte(h,6),a:a/255}}return null}function fromRgbFunc(input){let open=input.indexOf("("),close=input.indexOf(")");if(open<0||close<0||close<open)return null;let parts=input.slice(open+1,close).split(",").map(p=>p.trim());if(parts.length<3)return null;let r=clampByte(Number(parts[0])),g=clampByte(Number(parts[1])),b=clampByte(Number(parts[2]));if(r===null||g===null||b===null)return null;let a=1;if(parts.length>=4){let alpha=Number(parts[3]);if(!Number.isFinite(alpha))return null;a=Math.min(1,Math.max(0,alpha))}return{r:r,g:g,b:b,a:a}}function argbIntToRgba(n){if(!Number.isFinite(n))return null;let int=Math.trunc(n)>>>0,a=int>>>24&255;return{r:int>>>16&255,g:int>>>8&255,b:int&255,a:a===0?1:a/255}}function byte(hex,at){return Number.parseInt(hex.slice(at,at+2),16)}function dup(nibble){return Number.parseInt(`${nibble??"0"}${nibble??"0"}`,16)}function clampByte(n){return Number.isFinite(n)?Math.min(255,Math.max(0,Math.round(n))):null}function normalizeRgba(rgba){if(rgba.a>=1)return rgbToHex(rgba.r,rgba.g,rgba.b);let a=Math.round(rgba.a*1e3)/1e3;return`rgba(${rgba.r},${rgba.g},${rgba.b},${a})`}function rgbToHex(r,g,b){return`#${hex2(r)}${hex2(g)}${hex2(b)}`.toUpperCase()}function hex2(n){return n.toString(16).padStart(2,"0")}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b);return{success:!same(c.success,compiled.success),warning:!same(c.warningStrong,compiled.warningStrong)||!same(c.cautionAccent,compiled.cautionAccent),info:!(same(c.info,c.brandInk)&&same(c.badgeBgInfo,c.brandSoft)&&same(c.infoEdge,c.structureEdge))}}function BrandImage({src:src,alt:alt,decorative:decorative=false,style:style,height:height,fallback:fallback=null,onFailed:onFailed}){let[failed,setFailed]=react.useState(null);return src===null||failed===src?fallback:/* @__PURE__ */jsxRuntime.jsx("img",{src:src,alt:decorative?"":alt,...decorative?{"aria-hidden":true}:{},...height===void 0?{}:{height:height},style:style,decoding:"async",referrerPolicy:"no-referrer",onError:()=>{setFailed(src),onFailed?.()}})}var LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160,LOGO_STYLE=/* @__PURE__ */Object.freeze({display:"block",height:LOGO_HEIGHT,width:"auto",maxWidth:LOGO_MAX_WIDTH,objectFit:"contain"});function BrandLogo({logoUrl:logoUrl,name:name,styles:styles}){/* @__PURE__ */
|
|
114
|
-
return jsxRuntime.jsx(BrandImage,{src:logoUrl,alt:name,height:LOGO_HEIGHT,style:styles?.logo??LOGO_STYLE})}var SCREEN_HEADING_ATTR="data-ef-screen-heading";var MIN_SURFACE_HEIGHT=120,MIN_TOUCH_TARGET=44,BUTTON_HEIGHT=52,BACK_LABEL="Back";function useScreenStyles(){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeScreenStyles(theme),[theme]);return{theme:theme,styles:styles}}function ScreenHeader({title:title,onBack:onBack,right:right,testID:testID,variant:variant="brand"}){let{theme:theme,styles:styles}=useScreenStyles();/* @__PURE__ */
|
|
115
|
-
return jsxRuntime.jsxs(
|
|
116
|
-
/* @__PURE__ */jsxRuntime.jsxs("div",{style:styles.headerRight,children:[variant==="brand"?/* @__PURE__ */jsxRuntime.jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,styles:styles.headerLogo}):null,right??/* @__PURE__ */jsxRuntime.jsx("span",{style:styles.iconButton})]})]})}function makeScreenStyles(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,lh=(size,multiplier)=>`${Math.round(size*multiplier)}px`,text=(size,multiplier,fg,weight="regular")=>({margin:0,...faceCss(theme,weight),fontSize:size,lineHeight:lh(size,multiplier),color:fg}),recordCard=recordCardSlot(slots),cardText=slotText(recordCard),headerInk=slots.header?.textColor??color.brandInk,bannerText=slotText(slots.banner),dialogText=slotText(slots.dialog),errorColor=theme.brightness==="dark"?color.errorRed:color.danger,tone=(bg,fg)=>({backgroundColor:bg,color:fg,border:"1.5px solid transparent"}),edge=(line,fg)=>({backgroundColor:color.surface,color:fg,border:`1.5px solid ${line}`}),cardEdge=`1px solid ${color.borderRingCream}`,button={boxSizing:"border-box",minHeight:BUTTON_HEIGHT,minWidth:MIN_TOUCH_TARGET,padding:`${space.md}px ${space.lg+space.xs/2}px`,borderRadius:radius.pill,...faceCss(theme,"bold"),fontSize:type.size.body,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:space.sm,textDecoration:"none"};return{chipTones:{neutral:edge(color.brandBorderStrong,color.text.primary),info:tone(color.brandSoft,color.brandInk),warning:edge(color.cautionAccent,color.text.primary),critical:edge(color.danger,color.danger),positive:edge(color.success,brandedStatus(theme).success?color.success:color.brandInk)},root:{...SURFACE_ROOT_RESET,boxSizing:"border-box",display:"flex",flexDirection:"column",minHeight:MIN_SURFACE_HEIGHT,height:"100%",backgroundColor:color.background,color:color.text.primary,...faceCss(theme,"regular")},body:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},content:{display:"flex",flexDirection:"column",gap:space.lg,padding:`0 ${space.lg}px ${space.xxl}px`},contentTight:{display:"flex",flexDirection:"column",gap:space.lg,padding:`0 ${space.sm}px ${space.xxl}px`},inset:{padding:`0 ${space.sm}px`},headerRow:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:space.sm,padding:`${space.xs}px ${space.lg}px ${space.md}px`,...slotCss(slots.header)},headerText:slotText(slots.header),headerSlot:slotCss(slots.header,1),headerInk:headerInk,headerLogo:{logo:{display:"block",height:28,width:"auto",maxWidth:96,objectFit:"contain",flexShrink:0}},pageLogo:{logo:{display:"block",height:28,width:"auto",maxWidth:160,objectFit:"contain",alignSelf:"flex-start"}},iconButton:{boxSizing:"border-box",width:MIN_TOUCH_TARGET,height:MIN_TOUCH_TARGET,display:"inline-flex",alignItems:"center",justifyContent:"center",border:0,background:"transparent",cursor:"pointer",padding:0,color:color.brandInk,flexShrink:0},backChevron:{display:"block",width:space.md,height:space.md,borderLeft:`2px solid ${headerInk}`,borderBottom:`2px solid ${headerInk}`,transform:"rotate(45deg)",marginLeft:space.xs},headerTitle:{...text(type.size.heading,type.lineHeight.tight,color.brandInk,"bold"),...headingFaceCss(theme,"bold"),flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...slotText(slots.header)},documentTitle:{...text(type.size.subtitle,type.lineHeight.snug,color.text.primary,"bold"),...headingFaceCss(theme,"bold"),flex:1,textAlign:"center",...slotText(slots.header)},headerRight:{display:"flex",alignItems:"center",gap:space.sm+space.xs/2},section:{display:"flex",flexDirection:"column",gap:space.sm+space.xs/2},sectionHeader:{display:"flex",alignItems:"center",gap:space.sm,padding:`0 ${space.xs}px`},sectionTitle:{...text(type.size.subtitle,type.lineHeight.snug,color.text.primary,"bold"),...headingFaceCss(theme,"bold"),letterSpacing:"-0.02em"},sectionCount:{...text(type.size.bodyTight,type.lineHeight.snug,color.text.muted,"medium")},card:{boxSizing:"border-box",borderRadius:radius.lg,border:cardEdge,backgroundColor:color.surface,padding:`${space.xs}px ${space.lg}px`,margin:0,listStyle:"none",...slotBoxCss(recordCard,1)},creamCard:{boxSizing:"border-box",borderRadius:radius.lg,border:cardEdge,backgroundColor:color.surfaceCream,padding:space.lg,display:"flex",flexDirection:"column",gap:space.md,...slotBoxCss(recordCard,1)},cardSlot:slotBoxCss(recordCard,1),cardInk:cardText,row:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:space.md,padding:`${space.md}px 0`},rowDivider:{borderTop:`1px solid ${color.borderHairlineGreen}`},rowMain:{flex:1,minWidth:0},rowRight:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:space.xs+space.xs/2},rowTitle:{...text(type.size.body,type.lineHeight.snug,color.text.primary,"medium"),...cardText},rowDetail:{...text(type.size.caption,type.lineHeight.normal,color.text.secondary),marginTop:space.xs/2,...cardText},rowValue:{...text(type.size.body+1,type.lineHeight.snug,color.text.primary,"bold"),marginTop:space.xs/2,...cardText},rowMuted:{...text(type.size.caption,type.lineHeight.normal,color.text.muted),...cardText},chip:{boxSizing:"border-box",display:"inline-flex",alignItems:"center",minHeight:24,borderRadius:radius.pill,padding:`0 ${space.sm+space.xs/2}px`,...faceCss(theme,"monoBold"),fontSize:type.size.tiny+1,lineHeight:lh(type.size.tiny+1,type.lineHeight.snug),letterSpacing:"0.06em",textTransform:"uppercase",whiteSpace:"nowrap"},pill:button,pillPrimary:{border:0,backgroundColor:color.brand,color:color.onPrimary,...slotBoxCss(slots.primaryButton),...slotText(slots.primaryButton)},pillOutline:{border:`1.5px solid ${color.brandInk}`,backgroundColor:"transparent",color:color.brandInk},pillDanger:{border:`1.4px solid ${color.danger}`,backgroundColor:color.surface,color:color.danger,fontSize:type.size.bodyTight},pillAsk:{border:`1px solid ${color.borderRingCream}`,backgroundColor:color.surface,color:color.text.primary},pillLink:{minHeight:MIN_TOUCH_TARGET,border:0,backgroundColor:"transparent",color:color.linkInk,padding:`${space.sm}px`},pillDisabled:{opacity:.5,cursor:"default"},infoNote:{display:"flex",gap:space.sm,borderRadius:radius.md-space.xs/2,backgroundColor:color.brandSoft,padding:`${space.sm+space.xs/2}px ${space.md}px`,...text(type.size.bodyTight,type.lineHeight.normal,color.text.primary),...slotCss(slots.banner)},cautionNote:{display:"flex",gap:space.sm,borderRadius:radius.md-space.xs/2,backgroundColor:color.badgeBgCaution,padding:`${space.sm+space.xs/2}px ${space.md}px`,...text(type.size.bodyTight,type.lineHeight.normal,color.warningStrong)},statusCard:{borderRadius:radius.md,backgroundColor:color.brandSoft,padding:space.md+space.xs/2,...text(type.size.bodyTight,type.lineHeight.relaxed,color.text.primary)},errorBanner:{display:"flex",gap:space.sm,borderRadius:radius.md-space.xs/2,backgroundColor:color.badgeBgCritical,padding:space.md,...text(type.size.bodyTight,type.lineHeight.normal,errorColor)},errorText:text(type.size.bodyTight,type.lineHeight.normal,errorColor),band:{display:"flex",alignItems:"flex-start",gap:space.sm,borderRadius:radius.md-space.xs/2,padding:space.md,backgroundColor:color.brandSoft,margin:0,...slotCss(slots.banner)},bandText:{flex:1,...text(type.size.caption,type.lineHeight.normal,color.text.secondary),...bannerText},infoGlyph:{boxSizing:"border-box",flexShrink:0,width:space.md+space.xs/2,height:space.md+space.xs/2,borderRadius:radius.pill,border:`1px solid ${slots.banner?.textColor??color.text.secondary}`,display:"inline-flex",alignItems:"center",justifyContent:"center",...faceCss(theme,"bold"),fontSize:type.size.small,color:color.text.secondary,...bannerText},chevron:{display:"inline-block",width:space.sm,height:space.sm,borderTop:`2px solid ${color.text.muted}`,borderRight:`2px solid ${color.text.muted}`,flexShrink:0},chipSentence:{...faceCss(theme,"medium"),fontSize:type.size.caption,lineHeight:lh(type.size.caption,type.lineHeight.normal),letterSpacing:"normal",textTransform:"none",whiteSpace:"normal",borderRadius:radius.md,padding:`${space.xs}px ${space.sm+space.xs/2}px`},lead:{...text(type.size.body+1,type.lineHeight.snug,color.text.primary,"bold"),padding:`0 ${space.sm}px`},subLead:{...text(type.size.body,type.lineHeight.normal,color.text.muted),padding:`0 ${space.lg}px ${space.md}px`},field:{boxSizing:"border-box",display:"block",width:"100%",minHeight:MIN_TOUCH_TARGET,padding:`${space.sm}px ${space.md}px`,border:`1px solid ${color.borderHairlineGreen}`,borderRadius:radius.sm,color:color.text.primary,backgroundColor:color.surface,...faceCss(theme,"regular"),fontSize:type.size.body,...slotCss(slots.input,1)},inputSlot:slotCss(slots.input,1),inputText:slotText(slots.input),fieldLabel:{...text(type.size.bodyTight,type.lineHeight.normal,color.text.secondary,"medium"),display:"block",marginBottom:space.xs},muted:text(type.size.caption,type.lineHeight.normal,color.text.muted),bodyText:text(type.size.body,type.lineHeight.normal,color.text.primary),mono:faceCss(theme,"mono"),plainList:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"},dialogFrame:{boxSizing:"border-box",position:"fixed",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0,padding:0,border:0,backgroundColor:"transparent",overflow:"hidden"},dialogScrim:{boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:space.lg,backgroundColor:"rgba(0,0,0,0.4)"},dialogScrimSide:{boxSizing:"border-box",display:"flex",alignItems:"stretch",justifyContent:"flex-end",width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.4)"},dialogPanel:{boxSizing:"border-box",width:"100%",maxWidth:560,maxHeight:"100%",overflowY:"auto",backgroundColor:color.surface,borderRadius:radius.xl-1,padding:`${space.lg}px ${space.lg+space.xs+space.xs/2}px`,display:"flex",flexDirection:"column",gap:space.md,...faceCss(theme,"regular"),color:color.text.primary},dialogPanelSide:{boxSizing:"border-box",width:"min(100vw, 480px)",height:"100%",maxHeight:"100%",overflowY:"auto",backgroundColor:color.surface,padding:`${space.lg}px ${space.lg+space.xs+space.xs/2}px`,display:"flex",flexDirection:"column",gap:space.md,...faceCss(theme,"regular"),color:color.text.primary},dialogSlot:slotCss(slots.dialog),dialogSlotSide:{...slotCss(slots.dialog),...slots.dialog?.borderRadius===void 0?null:{borderRadius:`${slots.dialog.borderRadius}px 0 0 ${slots.dialog.borderRadius}px`}},sheetHeader:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:space.sm},sheetTitle:{...text(type.size.heading,type.lineHeight.snug,color.text.primary,"bold"),...headingFaceCss(theme,"bold"),...dialogText},sheetHelper:{...text(type.size.bodyTight,type.lineHeight.normal,color.text.muted),...dialogText},closeGlyph:{fontSize:type.size.verdict,lineHeight:1,color:color.text.primary,...dialogText}}}var RECORDS_EMPTY_COPY=/* @__PURE__ */Object.freeze({idle:/* @__PURE__ */Object.freeze({title:"Find your pet’s clinic",body:"Search for the clinic that holds your pet’s records. We’ll request them on your behalf once you sign the authorization.",action:null}),no_requests:/* @__PURE__ */Object.freeze({title:"No record requests yet",body:"When you request records from a clinic, you’ll be able to track every step here.",action:null}),no_records:/* @__PURE__ */Object.freeze({title:"Nothing to show just yet",body:"Once your pet’s records arrive and our team reviews them, lab trends and visits will appear here.",action:null}),rate_limited:/* @__PURE__ */Object.freeze({title:"Slow down a moment",body:"You’ve made a lot of requests just now. You can try again shortly.",action:"Try again"}),service_unavailable:/* @__PURE__ */Object.freeze({title:"Records search is temporarily down",body:"We’re working on it. Please try again in a few minutes.",action:"Try again"}),error:/* @__PURE__ */Object.freeze({title:"Couldn’t reach Everfur",body:"Check your connection and try again.",action:"Try again"})}),RATE_LIMIT_COOLDOWN_S=60;function coolingActionLabel(seconds){return`Try again in ${seconds}s`}var COOLING_A11Y_LABEL="Try again, available shortly";function SkeletonBlock({width:width,height:height,radius:radius,style:style}){let{color:color,radius:radii}=useEverfurTheme();/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */jsxRuntime.jsx("button",{type:"button",onClick:onExit,"data-testid":"records-gate-off-exit",style:{minHeight:MIN_TARGET,padding:`0 ${space.lg}px`,borderRadius:radius.pill,border:`1.5px solid ${color.brandInk}`,backgroundColor:"transparent",color:color.brandInk,font:"inherit",fontSize:type.size.body,cursor:"pointer"},children:exitLabel})]})}function recordsGateExit(onExit,exitLabel){return onExit===void 0?{}:{renderDisabled:decision=>/* @__PURE__ */jsxRuntime.jsx(RecordsGateOffState,{reason:decision.disabled?.reason??"",onExit:onExit,exitLabel:exitLabel})}}function parseColor(value){let rgba=toRgba(value);return rgba===null?null:normalizeRgba(rgba)}function toRgba(value){if(typeof value=="number")return argbIntToRgba(value);if(typeof value!="string")return null;let s=value.trim();if(s.length===0)return null;if(s.startsWith("#"))return fromHex(s.slice(1));if(s.toLowerCase().startsWith("0x"))return fromHex(s.slice(2));if(s.toLowerCase().startsWith("rgb"))return fromRgbFunc(s);if(/^[0-9a-fA-F]+$/.test(s)){let hex=fromHex(s);if(hex!==null)return hex}return/^\d+$/.test(s)?argbIntToRgba(Number.parseInt(s,10)):null}function fromHex(hex){let h=hex.trim();if(!/^[0-9a-fA-F]+$/.test(h))return null;if(h.length===3)return{r:dup(h[0]),g:dup(h[1]),b:dup(h[2]),a:1};if(h.length===6)return{r:byte(h,0),g:byte(h,2),b:byte(h,4),a:1};if(h.length===8){let a=byte(h,0);return{r:byte(h,2),g:byte(h,4),b:byte(h,6),a:a/255}}return null}function fromRgbFunc(input){let open=input.indexOf("("),close=input.indexOf(")");if(open<0||close<0||close<open)return null;let parts=input.slice(open+1,close).split(",").map(p=>p.trim());if(parts.length<3)return null;let r=clampByte(Number(parts[0])),g=clampByte(Number(parts[1])),b=clampByte(Number(parts[2]));if(r===null||g===null||b===null)return null;let a=1;if(parts.length>=4){let alpha=Number(parts[3]);if(!Number.isFinite(alpha))return null;a=Math.min(1,Math.max(0,alpha))}return{r:r,g:g,b:b,a:a}}function argbIntToRgba(n){if(!Number.isFinite(n))return null;let int=Math.trunc(n)>>>0,a=int>>>24&255;return{r:int>>>16&255,g:int>>>8&255,b:int&255,a:a===0?1:a/255}}function byte(hex,at){return Number.parseInt(hex.slice(at,at+2),16)}function dup(nibble){return Number.parseInt(`${nibble??"0"}${nibble??"0"}`,16)}function clampByte(n){return Number.isFinite(n)?Math.min(255,Math.max(0,Math.round(n))):null}function normalizeRgba(rgba){if(rgba.a>=1)return rgbToHex(rgba.r,rgba.g,rgba.b);let a=Math.round(rgba.a*1e3)/1e3;return`rgba(${rgba.r},${rgba.g},${rgba.b},${a})`}function rgbToHex(r,g,b){return`#${hex2(r)}${hex2(g)}${hex2(b)}`.toUpperCase()}function hex2(n){return n.toString(16).padStart(2,"0")}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b);return{success:!same(c.success,compiled.success),warning:!same(c.warningStrong,compiled.warningStrong)||!same(c.cautionAccent,compiled.cautionAccent),info:!(same(c.info,c.brandInk)&&same(c.badgeBgInfo,c.brandSoft)&&same(c.infoEdge,c.structureEdge))}}var RECORDS_SANDBOX_COPY=/* @__PURE__ */Object.freeze({note:"Test account: clinics are never contacted. Use records test mode to move a request forward.",clinicNotContacted:"Clinic not contacted",notEmailed:email=>`This is a test account, so no email went to ${email}.`,newClinicDirectSendNote:"This is a test account, so this clinic will not be emailed."});var NO_SUBSCRIPTION=()=>()=>{};function isSandboxSnapshot(snapshot){return snapshot?.livemode===false}function useEntitlementSource(){try{return useEverfurContext().runtime.entitlements??null}catch{return null}}function useRecordsSandboxTenant(){let source=useEntitlementSource(),subscribe2=react.useCallback(listener=>source===null?NO_SUBSCRIPTION():source.subscribe(listener),[source]),read=react.useCallback(()=>source===null?false:isSandboxSnapshot(source.getSnapshot()),[source]);return react.useSyncExternalStore(subscribe2,read,read)}function BrandImage({src:src,alt:alt,decorative:decorative=false,style:style,height:height,fallback:fallback=null,onFailed:onFailed}){let[failed,setFailed]=react.useState(null);return src===null||failed===src?fallback:/* @__PURE__ */jsxRuntime.jsx("img",{src:src,alt:decorative?"":alt,...decorative?{"aria-hidden":true}:{},...height===void 0?{}:{height:height},style:style,decoding:"async",referrerPolicy:"no-referrer",onError:()=>{setFailed(src),onFailed?.()}})}var LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160,LOGO_STYLE=/* @__PURE__ */Object.freeze({display:"block",height:LOGO_HEIGHT,width:"auto",maxWidth:LOGO_MAX_WIDTH,objectFit:"contain"});function BrandLogo({logoUrl:logoUrl,name:name,styles:styles}){/* @__PURE__ */
|
|
114
|
+
return jsxRuntime.jsx(BrandImage,{src:logoUrl,alt:name,height:LOGO_HEIGHT,style:styles?.logo??LOGO_STYLE})}var SCREEN_HEADING_ATTR="data-ef-screen-heading";var MIN_SURFACE_HEIGHT=120,MIN_TOUCH_TARGET=44,BUTTON_HEIGHT=52,BACK_LABEL="Back";function useScreenStyles(){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeScreenStyles(theme),[theme]);return{theme:theme,styles:styles}}function ScreenHeader({title:title,onBack:onBack,right:right,testID:testID,variant:variant="brand"}){let{theme:theme,styles:styles}=useScreenStyles(),sandbox=useRecordsSandboxTenant();/* @__PURE__ */
|
|
115
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
|
|
116
|
+
/* @__PURE__ */jsxRuntime.jsxs("header",{style:styles.headerRow,"data-testid":testID,children:[onBack?/* @__PURE__ */jsxRuntime.jsx("button",{type:"button",onClick:onBack,"aria-label":BACK_LABEL,style:{...styles.iconButton,...styles.headerText},"data-testid":testID?`${testID}-back`:void 0,children:/* @__PURE__ */jsxRuntime.jsx("span",{"aria-hidden":"true",style:styles.backChevron})}):/* @__PURE__ */jsxRuntime.jsx("span",{style:styles.iconButton}),title.trim().length>0?/* @__PURE__ */jsxRuntime.jsx("h2",{tabIndex:-1,[SCREEN_HEADING_ATTR]:"",style:variant==="document"?styles.documentTitle:styles.headerTitle,children:title}):/* @__PURE__ */jsxRuntime.jsx("span",{"aria-hidden":"true",style:styles.headerTitle,"data-testid":testID?`${testID}-spacer`:void 0}),
|
|
117
|
+
/* @__PURE__ */jsxRuntime.jsxs("div",{style:styles.headerRight,children:[variant==="brand"?/* @__PURE__ */jsxRuntime.jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,styles:styles.headerLogo}):null,right??/* @__PURE__ */jsxRuntime.jsx("span",{style:styles.iconButton})]})]}),sandbox?/* @__PURE__ */jsxRuntime.jsx("p",{role:"note",style:{...styles.band,margin:`0 ${theme.space.lg}px ${theme.space.md}px`},"data-testid":"records-sandbox-note",children:/* @__PURE__ */jsxRuntime.jsx("span",{style:styles.bandText,children:RECORDS_SANDBOX_COPY.note})}):null]})}function makeScreenStyles(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,lh=(size,multiplier)=>`${Math.round(size*multiplier)}px`,text=(size,multiplier,fg,weight="regular")=>({margin:0,...faceCss(theme,weight),fontSize:size,lineHeight:lh(size,multiplier),color:fg}),recordCard=recordCardSlot(slots),cardText=slotText(recordCard),headerInk=slots.header?.textColor??color.brandInk,bannerText=slotText(slots.banner),dialogText=slotText(slots.dialog),errorColor=theme.brightness==="dark"?color.errorRed:color.danger,tone=(bg,fg)=>({backgroundColor:bg,color:fg,border:"1.5px solid transparent"}),edge=(line,fg)=>({backgroundColor:color.surface,color:fg,border:`1.5px solid ${line}`}),cardEdge=`1px solid ${color.borderRingCream}`,button={boxSizing:"border-box",minHeight:BUTTON_HEIGHT,minWidth:MIN_TOUCH_TARGET,padding:`${space.md}px ${space.lg+space.xs/2}px`,borderRadius:radius.pill,...faceCss(theme,"bold"),fontSize:type.size.body,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:space.sm,textDecoration:"none"};return{chipTones:{neutral:edge(color.brandBorderStrong,color.text.primary),info:tone(color.brandSoft,color.brandInk),warning:edge(color.cautionAccent,color.text.primary),critical:edge(color.danger,color.danger),positive:edge(color.success,brandedStatus(theme).success?color.success:color.brandInk)},root:{...SURFACE_ROOT_RESET,boxSizing:"border-box",display:"flex",flexDirection:"column",minHeight:MIN_SURFACE_HEIGHT,height:"100%",backgroundColor:color.background,color:color.text.primary,...faceCss(theme,"regular")},body:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},content:{display:"flex",flexDirection:"column",gap:space.lg,padding:`0 ${space.lg}px ${space.xxl}px`},contentTight:{display:"flex",flexDirection:"column",gap:space.lg,padding:`0 ${space.sm}px ${space.xxl}px`},inset:{padding:`0 ${space.sm}px`},headerRow:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:space.sm,padding:`${space.xs}px ${space.lg}px ${space.md}px`,...slotCss(slots.header)},headerText:slotText(slots.header),headerSlot:slotCss(slots.header,1),headerInk:headerInk,headerLogo:{logo:{display:"block",height:28,width:"auto",maxWidth:96,objectFit:"contain",flexShrink:0}},pageLogo:{logo:{display:"block",height:28,width:"auto",maxWidth:160,objectFit:"contain",alignSelf:"flex-start"}},iconButton:{boxSizing:"border-box",width:MIN_TOUCH_TARGET,height:MIN_TOUCH_TARGET,display:"inline-flex",alignItems:"center",justifyContent:"center",border:0,background:"transparent",cursor:"pointer",padding:0,color:color.brandInk,flexShrink:0},backChevron:{display:"block",width:space.md,height:space.md,borderLeft:`2px solid ${headerInk}`,borderBottom:`2px solid ${headerInk}`,transform:"rotate(45deg)",marginLeft:space.xs},headerTitle:{...text(type.size.heading,type.lineHeight.tight,color.brandInk,"bold"),...headingFaceCss(theme,"bold"),flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...slotText(slots.header)},documentTitle:{...text(type.size.subtitle,type.lineHeight.snug,color.text.primary,"bold"),...headingFaceCss(theme,"bold"),flex:1,textAlign:"center",...slotText(slots.header)},headerRight:{display:"flex",alignItems:"center",gap:space.sm+space.xs/2},section:{display:"flex",flexDirection:"column",gap:space.sm+space.xs/2},sectionHeader:{display:"flex",alignItems:"center",gap:space.sm,padding:`0 ${space.xs}px`},sectionTitle:{...text(type.size.subtitle,type.lineHeight.snug,color.text.primary,"bold"),...headingFaceCss(theme,"bold"),letterSpacing:"-0.02em"},sectionCount:{...text(type.size.bodyTight,type.lineHeight.snug,color.text.muted,"medium")},card:{boxSizing:"border-box",borderRadius:radius.lg,border:cardEdge,backgroundColor:color.surface,padding:`${space.xs}px ${space.lg}px`,margin:0,listStyle:"none",...slotBoxCss(recordCard,1)},creamCard:{boxSizing:"border-box",borderRadius:radius.lg,border:cardEdge,backgroundColor:color.surfaceCream,padding:space.lg,display:"flex",flexDirection:"column",gap:space.md,...slotBoxCss(recordCard,1)},cardSlot:slotBoxCss(recordCard,1),cardInk:cardText,row:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:space.md,padding:`${space.md}px 0`},rowDivider:{borderTop:`1px solid ${color.borderHairlineGreen}`},rowMain:{flex:1,minWidth:0},rowRight:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:space.xs+space.xs/2},rowTitle:{...text(type.size.body,type.lineHeight.snug,color.text.primary,"medium"),...cardText},rowDetail:{...text(type.size.caption,type.lineHeight.normal,color.text.secondary),marginTop:space.xs/2,...cardText},rowValue:{...text(type.size.body+1,type.lineHeight.snug,color.text.primary,"bold"),marginTop:space.xs/2,...cardText},rowMuted:{...text(type.size.caption,type.lineHeight.normal,color.text.muted),...cardText},chip:{boxSizing:"border-box",display:"inline-flex",alignItems:"center",minHeight:24,borderRadius:radius.pill,padding:`0 ${space.sm+space.xs/2}px`,...faceCss(theme,"monoBold"),fontSize:type.size.tiny+1,lineHeight:lh(type.size.tiny+1,type.lineHeight.snug),letterSpacing:"0.06em",textTransform:"uppercase",whiteSpace:"nowrap"},pill:button,pillPrimary:{border:0,backgroundColor:color.brand,color:color.onPrimary,...slotBoxCss(slots.primaryButton),...slotText(slots.primaryButton)},pillOutline:{border:`1.5px solid ${color.brandInk}`,backgroundColor:"transparent",color:color.brandInk},pillDanger:{border:`1.4px solid ${color.danger}`,backgroundColor:color.surface,color:color.danger,fontSize:type.size.bodyTight},pillAsk:{border:`1px solid ${color.borderRingCream}`,backgroundColor:color.surface,color:color.text.primary},pillLink:{minHeight:MIN_TOUCH_TARGET,border:0,backgroundColor:"transparent",color:color.linkInk,padding:`${space.sm}px`},pillDisabled:{opacity:.5,cursor:"default"},infoNote:{display:"flex",gap:space.sm,borderRadius:radius.md-space.xs/2,backgroundColor:color.brandSoft,padding:`${space.sm+space.xs/2}px ${space.md}px`,...text(type.size.bodyTight,type.lineHeight.normal,color.text.primary),...slotCss(slots.banner)},cautionNote:{display:"flex",gap:space.sm,borderRadius:radius.md-space.xs/2,backgroundColor:color.badgeBgCaution,padding:`${space.sm+space.xs/2}px ${space.md}px`,...text(type.size.bodyTight,type.lineHeight.normal,color.warningStrong)},statusCard:{borderRadius:radius.md,backgroundColor:color.brandSoft,padding:space.md+space.xs/2,...text(type.size.bodyTight,type.lineHeight.relaxed,color.text.primary)},errorBanner:{display:"flex",gap:space.sm,borderRadius:radius.md-space.xs/2,backgroundColor:color.badgeBgCritical,padding:space.md,...text(type.size.bodyTight,type.lineHeight.normal,errorColor)},errorText:text(type.size.bodyTight,type.lineHeight.normal,errorColor),band:{display:"flex",alignItems:"flex-start",gap:space.sm,borderRadius:radius.md-space.xs/2,padding:space.md,backgroundColor:color.brandSoft,margin:0,...slotCss(slots.banner)},bandText:{flex:1,...text(type.size.caption,type.lineHeight.normal,color.text.secondary),...bannerText},infoGlyph:{boxSizing:"border-box",flexShrink:0,width:space.md+space.xs/2,height:space.md+space.xs/2,borderRadius:radius.pill,border:`1px solid ${slots.banner?.textColor??color.text.secondary}`,display:"inline-flex",alignItems:"center",justifyContent:"center",...faceCss(theme,"bold"),fontSize:type.size.small,color:color.text.secondary,...bannerText},chevron:{display:"inline-block",width:space.sm,height:space.sm,borderTop:`2px solid ${color.text.muted}`,borderRight:`2px solid ${color.text.muted}`,flexShrink:0},chipSentence:{...faceCss(theme,"medium"),fontSize:type.size.caption,lineHeight:lh(type.size.caption,type.lineHeight.normal),letterSpacing:"normal",textTransform:"none",whiteSpace:"normal",borderRadius:radius.md,padding:`${space.xs}px ${space.sm+space.xs/2}px`},lead:{...text(type.size.body+1,type.lineHeight.snug,color.text.primary,"bold"),padding:`0 ${space.sm}px`},subLead:{...text(type.size.body,type.lineHeight.normal,color.text.muted),padding:`0 ${space.lg}px ${space.md}px`},field:{boxSizing:"border-box",display:"block",width:"100%",minHeight:MIN_TOUCH_TARGET,padding:`${space.sm}px ${space.md}px`,border:`1px solid ${color.borderHairlineGreen}`,borderRadius:radius.sm,color:color.text.primary,backgroundColor:color.surface,...faceCss(theme,"regular"),fontSize:type.size.body,...slotCss(slots.input,1)},inputSlot:slotCss(slots.input,1),inputText:slotText(slots.input),fieldLabel:{...text(type.size.bodyTight,type.lineHeight.normal,color.text.secondary,"medium"),display:"block",marginBottom:space.xs},muted:text(type.size.caption,type.lineHeight.normal,color.text.muted),bodyText:text(type.size.body,type.lineHeight.normal,color.text.primary),mono:faceCss(theme,"mono"),plainList:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"},dialogFrame:{boxSizing:"border-box",position:"fixed",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0,padding:0,border:0,backgroundColor:"transparent",overflow:"hidden"},dialogScrim:{boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:space.lg,backgroundColor:"rgba(0,0,0,0.4)"},dialogScrimSide:{boxSizing:"border-box",display:"flex",alignItems:"stretch",justifyContent:"flex-end",width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.4)"},dialogPanel:{boxSizing:"border-box",width:"100%",maxWidth:560,maxHeight:"100%",overflowY:"auto",backgroundColor:color.surface,borderRadius:radius.xl-1,padding:`${space.lg}px ${space.lg+space.xs+space.xs/2}px`,display:"flex",flexDirection:"column",gap:space.md,...faceCss(theme,"regular"),color:color.text.primary},dialogPanelSide:{boxSizing:"border-box",width:"min(100vw, 480px)",height:"100%",maxHeight:"100%",overflowY:"auto",backgroundColor:color.surface,padding:`${space.lg}px ${space.lg+space.xs+space.xs/2}px`,display:"flex",flexDirection:"column",gap:space.md,...faceCss(theme,"regular"),color:color.text.primary},dialogSlot:slotCss(slots.dialog),dialogSlotSide:{...slotCss(slots.dialog),...slots.dialog?.borderRadius===void 0?null:{borderRadius:`${slots.dialog.borderRadius}px 0 0 ${slots.dialog.borderRadius}px`}},sheetHeader:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:space.sm},sheetTitle:{...text(type.size.heading,type.lineHeight.snug,color.text.primary,"bold"),...headingFaceCss(theme,"bold"),...dialogText},sheetHelper:{...text(type.size.bodyTight,type.lineHeight.normal,color.text.muted),...dialogText},closeGlyph:{fontSize:type.size.verdict,lineHeight:1,color:color.text.primary,...dialogText}}}var RECORDS_EMPTY_COPY=/* @__PURE__ */Object.freeze({idle:/* @__PURE__ */Object.freeze({title:"Find your pet’s clinic",body:"Search for the clinic that holds your pet’s records. We’ll request them on your behalf once you sign the authorization.",action:null}),no_requests:/* @__PURE__ */Object.freeze({title:"No record requests yet",body:"When you request records from a clinic, you’ll be able to track every step here.",action:null}),no_records:/* @__PURE__ */Object.freeze({title:"Nothing to show just yet",body:"Once your pet’s records arrive and our team reviews them, lab trends and visits will appear here.",action:null}),rate_limited:/* @__PURE__ */Object.freeze({title:"Slow down a moment",body:"You’ve made a lot of requests just now. You can try again shortly.",action:"Try again"}),service_unavailable:/* @__PURE__ */Object.freeze({title:"Records search is temporarily down",body:"We’re working on it. Please try again in a few minutes.",action:"Try again"}),error:/* @__PURE__ */Object.freeze({title:"Couldn’t reach Everfur",body:"Check your connection and try again.",action:"Try again"})}),RATE_LIMIT_COOLDOWN_S=60;function coolingActionLabel(seconds){return`Try again in ${seconds}s`}var COOLING_A11Y_LABEL="Try again, available shortly";function SkeletonBlock({width:width,height:height,radius:radius,style:style}){let{color:color,radius:radii}=useEverfurTheme();/* @__PURE__ */
|
|
117
118
|
return jsxRuntime.jsx("span",{"aria-hidden":"true",style:{display:"block",width:width,height:height,borderRadius:radius??radii.xs,backgroundColor:color.skeleton,flexShrink:0,...style}})}var DISCLAIMER_H=44,TIMELINE_SEPARATOR_INSET=62;function TimelineSkeleton({testID:testID}){let s=useStyles();/* @__PURE__ */
|
|
118
119
|
return jsxRuntime.jsxs("div",{role:"progressbar","aria-label":DEPTH_COPY.loadingTimeline,"aria-busy":"true",style:s.timeline,"data-testid":testID,children:[
|
|
119
120
|
/* @__PURE__ */jsxRuntime.jsx("div",{style:s.timelineDisclaimer,children:/* @__PURE__ */jsxRuntime.jsx(SkeletonBlock,{width:"100%",height:DISCLAIMER_H,radius:12})}),Array.from({length:6},(_,index)=>/* @__PURE__ */jsxRuntime.jsxs("div",{children:[index>0?/* @__PURE__ */jsxRuntime.jsx("div",{style:s.timelineSeparator}):null,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews-
|
|
2
|
-
export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../../useRecordsDepth-
|
|
3
|
-
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows-
|
|
4
|
-
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../../depth-
|
|
1
|
+
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews-CBalhef3.cjs';
|
|
2
|
+
export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../../useRecordsDepth-W3UAKQRN.cjs';
|
|
3
|
+
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows-CDSO3ElK.cjs';
|
|
4
|
+
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../../depth-jbSWsweM.cjs';
|
|
5
5
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../../ids-B2GAAifq.cjs';
|
|
6
6
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError-DeBqRpQV.cjs';
|
|
7
7
|
export { E as EverfurResult } from '../../../EverfurResult-COlXj1wq.cjs';
|
|
8
8
|
export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../../models-A4A5S7AG.cjs';
|
|
9
9
|
import 'react';
|
|
10
|
-
import '../../../requestFunnel-
|
|
10
|
+
import '../../../requestFunnel-u8qnM5Ll.cjs';
|
|
11
11
|
import '../../../ErrorPolicyPort-10s3HJCt.cjs';
|
|
12
|
-
import '../../../config-
|
|
13
|
-
import '../../../identity-
|
|
12
|
+
import '../../../config-C68HTCf4.cjs';
|
|
13
|
+
import '../../../identity-ScajqjK5.cjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews-
|
|
2
|
-
export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../../useRecordsDepth-
|
|
3
|
-
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows-
|
|
4
|
-
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../../depth-
|
|
1
|
+
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews-BwyzpEyX.js';
|
|
2
|
+
export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../../useRecordsDepth-CqSMkcyR.js';
|
|
3
|
+
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows-pd4wYVbe.js';
|
|
4
|
+
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../../depth-C7RIscDR.js';
|
|
5
5
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../../ids-B2GAAifq.js';
|
|
6
6
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError-DeBqRpQV.js';
|
|
7
7
|
export { E as EverfurResult } from '../../../EverfurResult-ClPTS0P2.js';
|
|
8
8
|
export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../../models-CnXY5LuO.js';
|
|
9
9
|
import 'react';
|
|
10
|
-
import '../../../requestFunnel-
|
|
10
|
+
import '../../../requestFunnel-Dhaj0yUq.js';
|
|
11
11
|
import '../../../ErrorPolicyPort-C3nNSS_j.js';
|
|
12
|
-
import '../../../config-
|
|
13
|
-
import '../../../identity-
|
|
12
|
+
import '../../../config-DeUmccwl.js';
|
|
13
|
+
import '../../../identity-BTT6YtH5.js';
|